Configure - MessageArgument
The MessageArgument
purpose is to simplify setting up forwarding, receiving and sending messages in configuration. By default, MessageArgument will forward all messages it receives that match its Command
and TextCommand
properties.
This can be used to pass messages through block APIs to reduce global routings between arbitrary locations.
Note: MessageArgument can be connected to multiple targets.
Properties
Property | Description |
---|---|
Input | When true indicates that the MessageArgument is used to receive messages when false indicates it is used to send messages |
Command | Command code of Message indicates what message to listen to or to send. Defaults to CM_TEXTCOMMAND 0x20100 indicating sending or receiving text-based commands. The Command can also be set to some binary command value. Command field value will override the Command field in the sent message. |
TextCommand | Indicates what CM_TEXTCOMMAND to listen to or to send. The field only applies when Command is set to CM_TEXTCOMMAND 0x20100. When Input is true and TextCommand is left empty the MessageArgument will receive all CM_TEXTCOMMAND messages sent to it, when TextCommand is set MessageArgument will receive only that specific message. When Input is false and TextCommand is left empty the MessageArgument will send CM_TEXTCOMMAND_EVENT EventMessage by default, and when TextCommand is set MessageArgument will override the sent message with the give text command. TextCommand field value, when set, will override the TextCommand filed in the sent message when sending CM_TEXTCOMMAND based messages. |
RoutingList | Target objects to send the message to. When RoutingList is set all messages that are received are also forwarded to the routed objects in addition to calling the handler function passed into the constructor. |
Connected | Indicates if the connection to all objects in RoutingList has been successfully established. |
The MessageArgument
is also used in code-based blocks; see Programmers API for MessageArgument
Note: MessageArgument can also be routed from GUI and any data set from GUI routing will be sent as message payload. Preferred data encoding for CM_TEXTCOMMAND message is key value list key_1=value_1;key_2=value_2;...;key_n=value_n
See also ReceiveMessage and SendMessage.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.