Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

External Trigger Example
<!—MsgId is the unique id of the message being sent -->
<!—TriggerId is the unique id of the external trigger to be enabled/disabled -->
<!—Enable sets desired state of the trigger -->
<?xml version="1.0" encoding="utf-8"?>
<ExternalTriggerCommand MsgTimeStamp="2019-02-01T12:14:01+00:00" MsgId="1" TriggerId="1" Enable="true" Timeout="10" xmlns="ICDNAV001-ExternalTriggerCommand">
  <Sender SenderId="SenderId1" NetworkAddress="127.0.0.1" NetworkPort="10000" />
</ExternalTriggerCommand>

<!—MsgId is the unique id of the message being sent -->
<!—TriggerId is the unique id of the external trigger to be enabled/disabled -->
<!—Enable sets desired state of the trigger -->
<?xml version="1.0" encoding="utf-8"?>
<ExternalTriggerCommand MsgTimeStamp="2019-02-01T12:14:01+00:00" MsgId="1" TriggerId="1" Enable="true" Timeout="10" xmlns="ICDNAV001-ExternalTriggerCommand">
  <Sender SenderId="SenderId1" NetworkAddress="127.0.0.1" NetworkPort="10000" />
</ExternalTriggerCommand>

External Trigger Command Element

The external trigger command instruction provides the ability to trigger an action in Witness based on the provided trigger Id and Enable state. Different actions can be associated with different Ids

External Trigger Command Attributes

Attributes

Description

Type

Notes

MsgId

Unique message Id

Long

This must be globally unique across all message types 

MsgTimeStamp

Date and time that the message was sent

DateTime


TriggerId


 

Id of the external trigger

Integer


This is the Id of the external trigger that needs to be changed. Actions in Witness can be configured to respond to specific Ids

Enable

Desired state of the trigger

Boolean

This is the state that needs to be applied to the trigger. Actions can be configured in Witness to respond to either the true or false state

Timeout

Optional attribute that provides the option to reverse a state once the timeout has expired

Integer

Timeout is in seconds

Network Sender Element

Each incoming message can include an optional Sender element. This must include the IP address and port that the client is using to send instructions.

If the Sender element is included the NetworkAddress value will be checked against the subscriber IP address and the command rejected if they do not match. 

In addition the Sender element is included in the Command Reply. This is a duplicate of the incoming details (i.e. the subscribers IP address and port). The subscriber can use this to verify that they authored the message.

Using the Timeout


Related information

  • No labels