Filter TR50 Tunnel
Connection Request
A Filter TR50 Tunnel Connection Request event trigger executes when a tunnel connection request is received by the node. The trigger's logic can decide to allow the connection or refuse the connection.
Defining a filter tunnel connection request event trigger
To define a filter tunnel connection request event trigger, follow these steps:
- From the Workbench left pane, expand the node where
you want to define the filter tunnel connection request
event trigger.
- Select the Project icon to display
the Projects window, right click a
specific project tab to display its pop-up menu, and
then select New.
You also can select the New button at the bottom of the Projects window when a specific project tab has already been selected. - The new Trigger window
appears.
Name the trigger. The trigger name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed. - From the Event tab, select the
Trigger Event Type down-arrow, expand
the TR50 category, and then select
Filter TR50 Tunnel Connection
Request.
The Event tab becomes active for the filter tunnel connection request event, but there are no additional parameters to define.
Filter TR50 tunnel connection request event type trigger event variables
The input event variables available to a filter tunnel connection request event trigger are:
Event variable | Data type | Description |
---|---|---|
Connection Name | STRING | The TR50 connection that was used to open the tunnel |
Opened By | STRING | The ID of the client that opened the tunnel, depending on the type of client. It could be either a thingKey or an email address. |
Router Address | STRING | The IP address and port of the tunnel router used for the tunnel connection. |
Router Key | STRING | The key of the tunnel router. |
Target Host | STRING | The IP address of the thing to connect to. |
Target Port | UINT2 | The port of the tunnel. |
ThingKey | STRING | The thing key to connect to. |
Tunnel ID | STRING | The unique tunnel ID assigned by the Tunnel Manager. |
Tunnel Key | STRING | The tunnel key. |
Tunnel Name | STRING | The name of the tunnel. |
The output event variables available to a filter tunnel connection request event trigger are:
Event variable | Data type | Description |
---|---|---|
Allow Connection | BOOL | Controls whether the tunnel
connection request is allowed or
refused. A value of true (1) allows the tunnel connection request, a value of false (zero) refuses the tunnel connection request. |
Reason | STRING | A message string that can provide
additional information regarding the
reason the connection was allowed or
denied. The reason message will appear on the Tunnel Manager window. |