Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

TcpServer

 2 Minutes

 0 Likes

 5 Views

TcpServer opens a TCP server on a selected local network adapter and port. It reports incoming messages and connection handles, allowing PIXERA Control logic to reply to individual TCP clients.


Usage

Use TcpServer when an external device or application must connect to PIXERA over TCP. The module listens for client connections, reports received messages through the receive Action, and sends responses through the send Action.

Incoming data can be packetized with carriage return, line feed, or a combination of both. The same configured delimiter is appended automatically to outgoing messages.


Setup

  1. Set Adapter IP to the local network adapter on which TcpServer should listen. Use Localhost when connections are only required from the same computer.
  2. Set Port to an available whole-number TCP port from 1 to 65535.
  3. Configure Add Carriage Return <CR> and Add Line Feed <LF> to match the delimiter required by the connecting TCP client:
  • Enable only Add Carriage Return <CR> for CR.
  • Enable only Add Line Feed <LF> for LF.
  • Enable both for CRLF.
  • Disable both when no delimiter-based packetizing is required.
  1. Run the init Action, or enable Auto Init to initialize the module automatically.
  2. Connect the output of the receive Action to the required Control logic. Its hdl output identifies the client connection that supplied the message.
  3. Pass the required connection handle and message to the send Action to reply to a client.
  4. Run the uninit Action before changing connection settings, or run init again after applying the new settings.

The selected TCP port must not already be in use by another application. Firewalls and network configuration must also permit connections to the selected adapter and port.


Features

  • Listens for multiple TCP client connections on a configurable local adapter and port.
  • Reports the current server state through the isOpen Action.
  • Reports the number of active client connections through the connectionCount Action.
  • Outputs incoming messages together with their client connection handles.
  • Sends messages to a specific client by connection handle.
  • Supports CR, LF, CRLF, or no delimiter.
  • Applies the configured delimiter to both incoming packetizing and outgoing messages.
  • Validates that the configured port is a whole number from 1 to 65535.

Actions

Action Info Input Output
init Initializes TcpServer using the current Properties and starts listening for TCP clients. - -
uninit Closes the TCP server, disconnects its network process, and clears its runtime values. - -
send Sends a message to a specific TCP client. The configured delimiter is appended automatically. hdl (handle), msg (string) -
receive Reports a message received from a TCP client and the handle required to reply to that client. - msg (string), hdl (handle)
isOpen Reports whether the TCP server is currently open. This is an internal Attribute Action. newState (bool), doSet (bool) result (bool)
connectionCount Reports the current number of connected TCP clients. This is an internal Attribute Action. currentCount (int), doSet (bool) result (int)

Properties

Name Content Type Hint Options Source Options Action
Port 15151 int - -
Adapter IP Localhost - Utils.Network.getLocalAdapterEntries -
Add Carriage Return <CR> TRUE bool - -
Add Line Feed <LF> TRUE bool - -
Auto Init FALSE bool - -
Description Starts a TCP server on the selected local adapter and port. Reinitialize the module after changing its connection settings. string - -
Author AV Stumpfl GmbH string - -
Logo PIXERA Logo image - -
Documentation - documentation - -
Version 1.4 string - -

Changelog

1.4

  • Aligned Action and Property naming, ordering, and slot styles with the Control Module standards.
  • Added the required Description and Documentation Properties.
  • Removed duplicate helper creation and routine runtime logging.
  • Added validation for the configured port and safe checks for message sending.
  • Kept Lua fallback values consistent with the exported Property defaults.

Module Version 1.4 | 30 July 2026 | AV Stumpfl GmbH

Was this article helpful?