Documentation Index

Fetch the complete documentation index at: https://support.tulip.co/llms.txt

Use this file to discover all available pages before exploring further.

Telnet driver

Prev Next

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
  • Disconnect

These functions are exposed in the Tulip App Editor as a Device Function, 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 app and can be used to maintain multiple connections simultaneously.

The other parameters for the Connect function are:

  • 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"). This terminator applies only to outgoing messages sent through the Send function. It does not affect how incoming messages are parsed.

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 within the driver or connection has errored.

Incoming messages are not split using the Message Terminator or any other delimiter. Each Message event reflects the data exactly as received from the underlying network connection, so how messages are broken up depends on the sending device and any intermediate network equipment.

Using the Telnet Driver

Configuration

No configuration is necessary outside of the Tulip app logic required to connect to a device. While the above examples show static values 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.