Skip to content

netsocketrsrvr

pierre drezet edited this page Aug 20, 2025 · 1 revision
Socket Server Misc ↓ Params ↓ Ports ↓

This function block provides a TCP or UDP socket that listens for incoming connections and data. The socket server can handle communication over a specified network interface and port, operating in either TCP or UDP mode. The component must be in the open state to send or receive data, and it can only manage one client connection at a time. After a client disconnects, the socket must be closed and reopened to accept new connections.

On receiving data, the client's IP address is asserted on an output port. The function block does not buffer or marshal incoming data, so large data packets may cause overruns if not consumed immediately. The socket server can send data back to the client while maintaining the connection until explicitly closed.

name type default min. max. description
Interface S 0 0 0 The network interface to use for connections.
Port I 8000 0 100000 The port number to listen on for incoming connections.
udp I 0 0 1 Set to 1 for UDP mode, 0 for TCP mode.
In Ev. Description
open Opens the socket on the specified port and interface to listen for incoming connections.
close Closes the socket and stops listening for incoming connections.
send Sends data to the connected client.
Data In Description
IF The network interface to use (e.g., localhost or specific IP).
port The port to use for the socket connection.
data Data to send to the client. Can be binary or string format.
inSize The size of the data buffer to send to the client.
Data Out Description
data Data received from the client. Must be consumed immediately to prevent loss.
size Number of bytes received.
source The source IP address of the client that sent the data.
Out Ev. Description
opened Indicates the socket is open and ready to receive connections.
closed Indicates the socket has been closed.
error Indicates an error occurred during operation.
received Indicates data has been received from the client.
sent Indicates data has been successfully sent to the client.
sendError Indicates an error occurred while sending data.
State Machine None
Toolbox Network/Level1 Version v1.0.
Licence Type MPL2.0 Component Supplier inx ltd.
Minimum DCC A0000 Profiles Networking.

Core Components

Events & Triggers

State Management

  • STATE - Represents a State in Lucid
  • state_condition - Event driven state condition --> transition and actions
  • state_debug - To debug state machines this function block is required.
  • state_manager - Each state machine is defined by a State Manager

Array & Data Structures

Buffers & Queues

Primitive Data Constants

Data Converters

Boolean Logic



Mathematics

Alebraic Evaluation

Mathematical Operators

Inequalities

Trigonometry

Other Functions

Data Selection

  • indexed_mux_int - Indexed Mux Int
  • indexed_mux_str - Indexed Mux String
  • map_int - Map Int
  • mux_1b - mux_1b
  • mux_1i - mux_1i
  • mux_1r - mux_1r
  • mux_1s - mux_1s
  • mux_2b - MultiplexTwo Input Bool
  • mux_2i - MultiplexTwo Input Int
  • mux_2r - MultiplexTwo Input Real
  • mux_2s - MultiplexTwo Input String
  • mux_3b - MultiplexThree Input Bool
  • mux_3i - MultiplexThree Input Int
  • mux_3r - MultiplexThree Input Real
  • mux_3s - MultiplexThree Input String
  • mux_4b - MultiplexFour Input Bool
  • mux_4i - MultiplexFour Input Int
  • mux_4r - MultiplexFour Input Real
  • mux_4s - MultiplexFour Input String
  • mux_8b - 8-Input Indexed Boolean Multiplexer Function Block
  • mux_8i - 8-Input Indexed Integer Multiplexer Function Block
  • mux_8r - 8-Input Real Number Multiplexer Function Block
  • mux_8s - Number Multiplexer Function Block
  • num_mux - Numeric Multiplexer Function Block

Data Processing & Parsers

Database & Storage

Demultiplexers

String Functions

File Operations



Basic IO Components

GPIO & Hardware I/O



Graphics and UI Components

GUI & User Interface

User Input

  • keypress - Reads key presses & control keys

Unity & Web Integration

  • inx-unity - Provides media and animation widget interface
  • unity2 - Unity 3D
  • webkit - JavaScript/WebKit Interface (Obsolete)

Language & Localization



Media Components

Audio & Media

Digital TV & Media Control



Communications Components

TCPIP Network & Communication

Wireless & LPWAN Networks

Fieldbus Comms



Digital Signal Processing

  • ADC Polled Analogue to Digital converter.
  • ADC_continuous Advanced ADC supporting clocked ISR modes and advanced signal averaging.
  • FFT8 Fast Fourier Transform of 8 bit binary input data
  • FIR8 Finite Impulse Response filter for 8 bit binary data.
  • IIR8 Infinite Impulse Response filter for 8 bit binary data.
  • [calibrate](ADC calibrate) - Calibrates the ADCs


Control Systems Components

PID Controllers



Machine Learning & Machine Vision

  • mv_camera - Provides access to camera input data image streams
  • mv_idsplay - Renders camera image streams.
  • mv_resize - Resizes an image using given interpolation method
  • mv_crop - Crops and image width and height at a give offset
  • mv_apriltag_reader Plain Old Prgramming AprilTag Reader
  • ml_tflite_inference Machine learning model inference.
  • ml_osvm Online iterative machine learning (training& inference).


Platform Components

System Utilities

  • reboot - Reboot the device
  • rtc - RealTimeClock - provdes date/time from RTC device or OS.
  • rtinfo - RuntimeInfo (e.g. MAC/IP address, memory,... )
  • scheduler - Weekly Scheduler
  • system_exec - Executes linux shell commands
  • rng - Random Number Generator (may use hardware RNG)

Time Components

Application Management

Over the Air Update (OTA)

  • ota - OTA Function Block for updating firmware
  • ota_data_parser - Assembles OTA data files from Devman.


Non-functional Components

Some function blocks that can be used Lucid app are for visual/organisation purposes only and do not translate into any executable ert-components.

Sub System Input/Output Ports

-Note this file is autogenerated from ert-config help files and may not currently be complete or properly categorised!

Clone this wiki locally