Description

The ComponentsToJson component duplicates its child ComponentsToJsonModel into a desired number of ComponentsToJsonInstances. Then it converts these instances and their content into a Json.

 Here is the list of slots that the BComponentsToJson can convert:

  • baja:StatusBoolean.
  • baja:StatusNumeric.
  • baja:StatusString.
  • baja:StatusEnum.
  • baja:AbsTime.

Implementation

  • Drag and drop the component from the palette.
  • Add some slots in the Model using the SlotSheet (add only the supported typespec listed above)
  • Trigger the "setInstanceCount" to create copies of the model
  • Change the values in the instances and trigger the "forceExecute" action to get the jsonObject as a String. Careful, the minUpdateTime is set at 1 min by default, if you do multiple changes, you will need to wait for one minute.Force the execution with the action otherwise.

Properties

  • Out: Display the result of the conversion
  • MinUpdateTime: At each change in a BComponentsToJsonInstance, the out value will be computed. To avoid an overload, the BComponentsToJson will wait the minUpdateTime between two changes.
  • Model: A container which will be used as a model for the created instances.

 

Advanced configuration properties

  • EnumPolicy: Determines whether a BStatusEnum will be converted into a tag (integer) or a tag (String)

Action

  • SetInstanceCount: If the given integer argument is higher than the number of children instances, copies of the model will be created to reach the given number, otherwise, children instances will be removed (starting from the bottom).
  • ForceExecute: Compute the out Value ignoring the minUpdateTime.