This article describes the capabilities and configuration associated with the Telnet driver in Tulip.
The Telnet driver allows Tulip Apps to connect to network sockets and send and receive messages. This includes, but is not limited to, devices that use a Telnet protocol.
The driver supports three functions, "Connect", "Send", and "Disconnect". These functions are exposed in the Tulip App Editor as a "Device Function" as shown below:
All three functions require an "identifier" to be passed as a parameter. This identifier uniquely identifies a connection within the Tulip App and can be used to maintain multiple connections simultaneously.
The other parameters for the Connect function are described below:
Port - The network port on the device or service to which you would like to connect.
Message Terminator - An optional parameter specifying a set of characters that will be sent after each Send function in order to indicate that the message is terminated. This is commonly a newline ("\n") or a carriage return with a newline ("\r\n").
The driver emits two kinds of events: a "Message" event indicating that a connection has sent a message and an "Error" event that indicates that something has errored within the driver or connection.
No configuration is necessary outside of the Tulip App logic required to connect to a device. While in the above examples we show static values being used for the connection details, it is common to pull these values from variables or Tulip Table records in order to allow for central management of these values.