Using the Telnet Driver
  • 30 Sep 2022
  • 1 Minute to read
  • Contributors

Using the Telnet Driver


Article Summary

Using the Telnet Driver

A guide to the Telnet Driver

This article describes the capabilities and configuration associated with the Telnet driver in Tulip.

Capabilities

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.

Functions

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:

Using the Telnet Driver

Using the Telnet Driver

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:

  • Host - The IP address or hostname of the device or service to which you would like to connect.
  • 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").

Events

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.

Using the Telnet Driver

Configuration

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.


Was this article helpful?