Users can create events for TCP devices that do not hold a value, but are triggered
every time their trigger condition is met.
What you should know
The Industrial IoT plugin role acts as the TCP
server. It must be configured to identify data and events by evaluating the
payload sent by the devices against regular expressions.
NOTE: To capture a value with a regular expression, a
capture group (delimited by parentheses) must be present. The plugin role
uses the value returned by the first capture group. If there is no capture
group in the regular expression, no value is returned. For help with regular
expression syntax, see the
Regular Expression Cheat
Sheet.
Procedure
-
From the Config Tool homepage, open the Plugins
task.
-
In the entity browser, select the Industrial IoT role
and click on the Devices tab.
-
Select the TCP device from the Devices list.
-
In the Events section, click Add an
event (
).
The Add an event dialog box opens.
-
Enter the event information:
- Name
- A name to identify the event.
- Regular expression
- Regular expression used to detect the presence of a particular event
in the data message. No capture group is needed here.
-
If the event has arguments, click Add an argument
(
) and enter the
following in the dialog box that opens:
- Name
- A name to identify the argument.
- Regular expression
- Regular expression used to capture the value of the argument in the
data message.
- Value type
- The data type of the value captured by the regular expression. For
more information, see Data types used by
the SNMP plugin.
- Conversion
- The conversion to be applied to the argument.
-
Click Add to add another argument or click
Add and Close.
-
Click Add to add another event or click Add
and Close.
The event is displayed in the Events
section.
-
Click Apply.