OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
Message Buffer Size Constants

Number of BASIC message buffers (16 bytes each) in the pool. More...

Macros

#define LEN_CONFIG_MEM_OPTIONS_DESCRIPTION   (64 - 1)
 Maximum description length for Configuration Options reply.
 
#define LEN_CONFIG_MEM_ADDRESS_SPACE_DESCRIPTION   (60 - 1)
 Maximum description length for Address Space Info reply.
 
#define NULL_NODE_ID   0x000000000000
 NULL/unassigned Node ID value.
 
#define NULL_EVENT_ID   0x0000000000000000
 NULL/unassigned Event ID value.
 
#define LEN_SNIP_NAME_BUFFER   41
 SNIP manufacturer name field length (including null)
 
#define LEN_SNIP_MODEL_BUFFER   41
 SNIP model name field length (including null)
 
#define LEN_SNIP_HARDWARE_VERSION_BUFFER   21
 SNIP hardware version field length (including null)
 
#define LEN_SNIP_SOFTWARE_VERSION_BUFFER   21
 SNIP software version field length (including null)
 
#define LEN_SNIP_USER_NAME_BUFFER   63
 SNIP user-assigned name field length (including null)
 
#define LEN_SNIP_USER_DESCRIPTION_BUFFER   64
 SNIP user description field length (including null)
 
#define LEN_SNIP_USER_DATA   (LEN_SNIP_USER_NAME_BUFFER + LEN_SNIP_USER_DESCRIPTION_BUFFER)
 Total SNIP user data size (name + description)
 
#define LEN_SNIP_VERSION   1
 SNIP manufacturer version field length (1 byte)
 
#define LEN_SNIP_USER_VERSION   1
 SNIP user version field length (1 byte)
 
#define LEN_SNIP_STRUCTURE   264
 Maximum SNIP structure size (256 payload + 8 Event ID)
 
#define LEN_MESSAGE_BYTES_BASIC   16
 BASIC message payload size.
 
#define LEN_MESSAGE_BYTES_DATAGRAM   72
 DATAGRAM message maximum payload size.
 
#define LEN_MESSAGE_BYTES_SNIP   256
 SNIP message payload size (also covers Events with Payload)
 
#define LEN_MESSAGE_BYTES_STREAM   512
 STREAM message payload size.
 
#define LEN_EVENT_ID   8
 Event ID size in bytes.
 
#define LEN_MESSAGE_BUFFER   (USER_DEFINED_BASIC_BUFFER_DEPTH + USER_DEFINED_DATAGRAM_BUFFER_DEPTH + USER_DEFINED_SNIP_BUFFER_DEPTH + USER_DEFINED_STREAM_BUFFER_DEPTH)
 Total number of message buffers (sum of all buffer types)
 
#define LEN_DATAGRAM_MAX_PAYLOAD   64
 Maximum datagram payload after protocol overhead.
 
#define LEN_EVENT_PAYLOAD   LEN_MESSAGE_BYTES_SNIP
 Event payload maximum size (uses SNIP buffer)
 

Detailed Description

Number of BASIC message buffers (16 bytes each) in the pool.

Number of DATAGRAM message buffers (72 bytes each) in the pool

Number of SNIP message buffers (256 bytes each) in the pool

Number of STREAM message buffers (512 bytes each) in the pool

Maximum number of virtual nodes that can be allocated

Size of CDI buffer in bytes

Size of FDI buffer in bytes (train nodes)

Maximum number of events a node can produce

Maximum number of producer event ranges (must be >= 1)

Maximum number of events a node can consume

Maximum number of consumer event ranges (must be >= 1)

Maximum number of train nodes that can be allocated

Maximum number of listeners (consist members) per train node

Number of DCC functions supported per train (29 = F0-F28)

Fixed payload sizes and SNIP field lengths.

Macro Definition Documentation

◆ LEN_CONFIG_MEM_OPTIONS_DESCRIPTION

#define LEN_CONFIG_MEM_OPTIONS_DESCRIPTION   (64 - 1)

Maximum description length for Configuration Options reply.

◆ LEN_CONFIG_MEM_ADDRESS_SPACE_DESCRIPTION

#define LEN_CONFIG_MEM_ADDRESS_SPACE_DESCRIPTION   (60 - 1)

Maximum description length for Address Space Info reply.

◆ NULL_NODE_ID

#define NULL_NODE_ID   0x000000000000

NULL/unassigned Node ID value.

◆ NULL_EVENT_ID

#define NULL_EVENT_ID   0x0000000000000000

NULL/unassigned Event ID value.

◆ LEN_SNIP_NAME_BUFFER

#define LEN_SNIP_NAME_BUFFER   41

SNIP manufacturer name field length (including null)

◆ LEN_SNIP_MODEL_BUFFER

#define LEN_SNIP_MODEL_BUFFER   41

SNIP model name field length (including null)

◆ LEN_SNIP_HARDWARE_VERSION_BUFFER

#define LEN_SNIP_HARDWARE_VERSION_BUFFER   21

SNIP hardware version field length (including null)

◆ LEN_SNIP_SOFTWARE_VERSION_BUFFER

#define LEN_SNIP_SOFTWARE_VERSION_BUFFER   21

SNIP software version field length (including null)

◆ LEN_SNIP_USER_NAME_BUFFER

#define LEN_SNIP_USER_NAME_BUFFER   63

SNIP user-assigned name field length (including null)

◆ LEN_SNIP_USER_DESCRIPTION_BUFFER

#define LEN_SNIP_USER_DESCRIPTION_BUFFER   64

SNIP user description field length (including null)

◆ LEN_SNIP_USER_DATA

#define LEN_SNIP_USER_DATA   (LEN_SNIP_USER_NAME_BUFFER + LEN_SNIP_USER_DESCRIPTION_BUFFER)

Total SNIP user data size (name + description)

◆ LEN_SNIP_VERSION

#define LEN_SNIP_VERSION   1

SNIP manufacturer version field length (1 byte)

◆ LEN_SNIP_USER_VERSION

#define LEN_SNIP_USER_VERSION   1

SNIP user version field length (1 byte)

◆ LEN_SNIP_STRUCTURE

#define LEN_SNIP_STRUCTURE   264

Maximum SNIP structure size (256 payload + 8 Event ID)

◆ LEN_MESSAGE_BYTES_BASIC

#define LEN_MESSAGE_BYTES_BASIC   16

BASIC message payload size.

◆ LEN_MESSAGE_BYTES_DATAGRAM

#define LEN_MESSAGE_BYTES_DATAGRAM   72

DATAGRAM message maximum payload size.

◆ LEN_MESSAGE_BYTES_SNIP

#define LEN_MESSAGE_BYTES_SNIP   256

SNIP message payload size (also covers Events with Payload)

◆ LEN_MESSAGE_BYTES_STREAM

#define LEN_MESSAGE_BYTES_STREAM   512

STREAM message payload size.

◆ LEN_EVENT_ID

#define LEN_EVENT_ID   8

Event ID size in bytes.

◆ LEN_MESSAGE_BUFFER

#define LEN_MESSAGE_BUFFER   (USER_DEFINED_BASIC_BUFFER_DEPTH + USER_DEFINED_DATAGRAM_BUFFER_DEPTH + USER_DEFINED_SNIP_BUFFER_DEPTH + USER_DEFINED_STREAM_BUFFER_DEPTH)

Total number of message buffers (sum of all buffer types)

◆ LEN_DATAGRAM_MAX_PAYLOAD

#define LEN_DATAGRAM_MAX_PAYLOAD   64

Maximum datagram payload after protocol overhead.

◆ LEN_EVENT_PAYLOAD

#define LEN_EVENT_PAYLOAD   LEN_MESSAGE_BYTES_SNIP

Event payload maximum size (uses SNIP buffer)


Copyright (c) 2026 Jim Kueneman all rights reserved. See the License