VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
vlcb_defs.h File Reference
#include <stdint.h>
Include dependency graph for vlcb_defs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint8_t VlcbRocRailModuleType
 
typedef uint8_t VlcbSpectrumModuleType
 
typedef uint8_t VlcbSprogModuleType
 
typedef uint8_t VlcbDccServiceModeStatus
 
typedef uint8_t VlcbDccThrottleSpeedMode
 
typedef uint8_t VlcbSysPixieModuleType
 
typedef uint8_t VlcbGenericResponseStatus
 
typedef uint8_t VlcbModuleMode
 
typedef uint8_t VlcbServiceType
 
typedef uint8_t VlcbOpCode
 

Enumerations

enum  VlcbRocRailModuleType {
  VLCB_ROCRAIL_MODULE_CANGC1 = 1 , VLCB_ROCRAIL_MODULE_CANGC2 = 2 , VLCB_ROCRAIL_MODULE_CANGC3 = 3 , VLCB_ROCRAIL_MODULE_CANGC4 = 4 ,
  VLCB_ROCRAIL_MODULE_CANGC5 = 5 , VLCB_ROCRAIL_MODULE_CANGC6 = 6 , VLCB_ROCRAIL_MODULE_CANGC7 = 7 , VLCB_ROCRAIL_MODULE_CANGC1E = 11
}
 
enum  VlcbSpectrumModuleType { VLCB_SPECTRUM_MODULE_AMCTRLR = 1 , VLCB_SPECTRUM_MODULE_DUALCAB = 2 }
 
enum  VlcbSprogModuleType {
  VLCB_SPROG_MODULE_CANPI_SPRG3 = 1 , VLCB_SPROG_MODULE_CANSPROG3P = 2 , VLCB_SPROG_MODULE_CANSPROG = 3 , VLCB_SPROG_MODULE_CANSBOOST = 4 ,
  VLCB_SPROG_MODULE_CANPI_SPRGP = 5 , VLCB_SPROG_MODULE_CANSOLNOID = 8 , VLCB_SPROG_MODULE_CANSERVOIO = 50 , VLCB_SPROG_MODULE_CANISB = 100 ,
  VLCB_SPROG_MODULE_CANSOLIO = 101
}
 
enum  VlcbDccServiceModeStatus {
  VLCB_DCC_SVC_MODE_STAT_NO_ACK = 1 , VLCB_DCC_SVC_MODE_STAT_OVLD = 2 , VLCB_DCC_SVC_MODE_STAT_WRITE_ACK = 3 , VLCB_DCC_SVC_MODE_STAT_BUSY = 4 ,
  VLCB_DCC_SVC_MODE_STAT_CV_ERROR = 5
}
 
enum  VlcbDccThrottleSpeedMode { VLCB_DCC_THROTTLE_MODE_STEP128 = 0 , VLCB_DCC_THROTTLE_MODE_STEP14 = 1 , VLCB_DCC_THROTTLE_MODE_STEP28INTERLEAVED = 2 , VLCB_DCC_THROTTLE_MODE_STEP28 = 3 }
 
enum  VlcbSysPixieModuleType { VLCB_SYSPIXIE_MODULE_CANPMSENSE = 1 }
 
enum  VlcbGenericResponseStatus {
  VLCB_GENERIC_RESPONSE_STAT_OK = 0 , VLCB_GENERIC_RESPONSE_INVALID_COMMAND = 1 , VLCB_GENERIC_RESPONSE_NOT_IN_LEARN_MODE = 2 , VLCB_GENERIC_RESPONSE_NOT_IN_SETUP_MODE = 3 ,
  VLCB_GENERIC_RESPONSE_TOO_MANY_EVENTS = 4 , VLCB_GENERIC_RESPONSE_NO_EV = 5 , VLCB_GENERIC_RESPONSE_INVALID_EV_INDEX = 6 , VLCB_GENERIC_RESPONSE_INVALID_EVENT = 7 ,
  VLCB_GENERIC_RESPONSE_INVALID_PARAM_INDEX = 9 , VLCB_GENERIC_RESPONSE_INVALID_NV_INDEX = 10 , VLCB_GENERIC_RESPONSE_INVALID_EV_VALUE = 11 , VLCB_GENERIC_RESPONSE_INVALID_NV_VALUE = 12 ,
  VLCB_GENERIC_RESPONSE_ANOTHER_MODULE_IS_IN_LEARN_MODE = 13 , VLCB_GENERIC_RESPONSE_STAT_UNKNOWN_NVM_TYPE = 254 , VLCB_GENERIC_RESPONSE_STAT_INVALID_DIAGNOSTIC = 253 , VLCB_GENERIC_RESPONSE_STAT_INVALID_SERVICE = 252 ,
  VLCB_GENERIC_RESPONSE_STAT_INVALID_COMMAND_PARAMETER = 251 , VLCB_GENERIC_RESPONSE_STAT_INVALID_MODE = 250
}
 
enum  VlcbModuleMode {
  VLCB_MODULE_MODE_UNINITIALIZED = 255 , VLCB_MODULE_MODE_IN_SETUP = 0 , VLCB_MODULE_MODE_NORMAL = 1 , VLCB_MODULE_MODE_ENABLE_LEARN_MODE = 8 ,
  VLCB_MODULE_MODE_DISABLE_LEARN_MODE = 9 , VLCB_MODULE_MODE_ENABLE_EVENT_ACK = 10 , VLCB_MODULE_MODE_DISABLE_EVENT_ACK = 11 , VLCB_MODULE_MODE_ENABLE_HEARTBEAT = 12 ,
  VLCB_MODULE_MODE_DISABLE_HEARTBEAT = 13 , VLCB_MODULE_MODE_BOOTLOADER = 14
}
 
enum  VlcbServiceType {
  VLCB_SVC_TYPE_INTERNAL = 0 , VLCB_SVC_TYPE_MINIMUM_NODE_SERVICE = 1 , VLCB_SVC_TYPE_NODE_VARIABLE = 2 , VLCB_SVC_TYPE_CAN_BUS = 3 ,
  VLCB_SVC_TYPE_LEGACY_EVENT_TEACHING = 4 , VLCB_SVC_TYPE_EVENT_PRODUCER = 5 , VLCB_SVC_TYPE_EVENT_CONSUMER = 6 , VLCB_SVC_TYPE_EVENT_TEACHING = 7 ,
  VLCB_SVC_TYPE_CONSUME_OWN_EVENTS = 8 , VLCB_SVC_TYPE_EVENT_ACKNOWLEDGE = 9 , VLCB_SVC_TYPE_BOOTLOADER = 10 , VLCB_SVC_TYPE_STREAMING = 17
}
 
enum  VlcbOpCode {
  VLCB_OPC_GENERAL_ACK = 0 , VLCB_OPC_GENERAL_NACK = 1 , VLCB_OPC_BUS_HALT = 2 , VLCB_OPC_BUS_RESUME = 3 ,
  VLCB_OPC_DCC_TRACK_POWERED_OFF = 4 , VLCB_OPC_DCC_TRACK_POWERED_ON = 5 , VLCB_OPC_DCC_EMERGENCY_STOP_ENGAGED = 6 , VLCB_OPC_RESTART_ALL_NODES = 7 ,
  VLCB_OPC_DCC_TRACK_POWER_OFF = 8 , VLCB_OPC_DCC_TRACK_POWER_ON = 9 , VLCB_OPC_DCC_EMERGENCY_STOP = 10 , VLCB_OPC_DCC_QUERY_COMMAND_STATION_STATUS = 12 ,
  VLCB_OPC_QUERY_MODULE_INFO = 13 , VLCB_OPC_QUERY_MODULE_PARAMETERS = 16 , VLCB_OPC_QUERY_MODULE_NAME = 17 , VLCB_OPC_DCC_RELEASE_SESSION = 33 ,
  VLCB_OPC_DCC_QUERY_LOCO_STATUS = 34 , VLCB_OPC_DCC_SESSION_KEEP_ALIVE = 35 , VLCB_OPC_DEBUG_MSG1 = 48 , VLCB_OPC_EXT_OP_CODE = 63 ,
  VLCB_OPC_DCC_REQUEST_NEW_SESSION = 64 , VLCB_OPC_DCC_QUERY_CONSIST = 65 , VLCB_OPC_SET_NODE_NUMBER = 66 , VLCB_OPC_DCC_ALLOCATE_LOCO_TO_ACTIVITY = 67 ,
  VLCB_OPC_DCC_SET_THROTTLE_MODE = 68 , VLCB_OPC_DCC_CONSIST_ADD_LOCO = 69 , VLCB_OPC_DCC_CONSIST_REMOVE_LOCO = 70 , VLCB_OPC_DCC_SET_LOCO_THROTTLE = 71 ,
  VLCB_OPC_DCC_SET_LOCO_FLAGS = 72 , VLCB_OPC_DCC_LOCO_FUNCTION_ON = 73 , VLCB_OPC_DCC_LOCO_FUNCTION_OFF = 74 , VLCB_OPC_DCC_SERVICE_MODE_STATUS = 76 ,
  VLCB_OPC_RESET_MODULE_TO_FACTORY = 79 , VLCB_OPC_REQUEST_NEW_NODE_NUMBER = 80 , VLCB_OPC_NODE_NUMBER_RELEASED = 81 , VLCB_OPC_NODE_NUMBER_ACK = 82 ,
  VLCB_OPC_PUT_NODE_INTO_LEARN_MODE = 83 , VLCB_OPC_RELEASE_NODE_FROM_LEARN_MODE = 84 , VLCB_OPC_FORGET_ALL_LEARNED_EVENTS = 85 , VLCB_OPC_QUERY_AVAILABLE_EVENT_SLOTS = 86 ,
  VLCB_OPC_QUERY_ALL_LEARNED_EVENTS = 87 , VLCB_OPC_QUERY_LEARNED_EVENT_COUNT = 88 , VLCB_OPC_WRITE_ACK = 89 , VLCB_OPC_QUERY_NODE_DATA = 90 ,
  VLCB_OPC_REQUEST_DEVICE_DATA_SHORT_MODE = 91 , VLCB_OPC_REBOOT_INTO_BOOTLOADER = 92 , VLCB_OPC_FORCE_CAN_ENUMERATION = 93 , VLCB_OPC_RESTART_NODE = 94 ,
  VLCB_OPC_EXT_OP_CODE1 = 95 , VLCB_OPC_DCC_SET_LOCO_FUNCTIONS = 96 , VLCB_OPC_DCC_QUERY_LOCO_SESSION = 97 , VLCB_OPC_DCC_COMMAND_STATION_ERROR = 99 ,
  VLCB_OPC_COMMAND_ERROR = 111 , VLCB_OPC_AVAILABLE_EVENT_SLOTS = 112 , VLCB_OPC_QUERY_NODE_VARIABLE = 113 , VLCB_OPC_QUERY_LEARNED_EVENT_BY_INDEX = 114 ,
  VLCB_OPC_QUERY_NODE_PARAMETER_BY_INDEX = 115 , VLCB_OPC_LEARNED_EVENT_COUNT = 116 , VLCB_OPC_SET_NODE_CAN_ID = 117 , VLCB_OPC_CHANGE_MODULE_MODE = 118 ,
  VLCB_OPC_QUERY_SERVICE_DISCOVERY = 120 , VLCB_OPC_EXT_OP_CODE2 = 127 , VLCB_OPC_DCC_SEND_RAW_PACKET3 = 128 , VLCB_OPC_DCC_WRITE_CV_BYTE_IN_OPS_MODE = 130 ,
  VLCB_OPC_DC_WRITE_CV_BIT_IN_OPS_MODE = 131 , VLCB_OPC_DCC_READ_CV = 132 , VLCB_OPC_DCC_CV_VALUE = 133 , VLCB_OPC_QUERY_DIAGNOSTIC_DATA = 135 ,
  VLCB_OPC_SET_NODE_VARIABLE = 142 , VLCB_OPC_LONG_EVENT_ACCESSORY_ON = 144 , VLCB_OPC_LONG_EVENT_ACCESSORY_OFF = 145 , VLCB_OPC_QUERY_LONG_EVENT_ACCESSORY_STATE = 146 ,
  VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON = 147 , VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF = 148 , VLCB_OPC_FORGET_LEARNED_EVENT = 149 , VLCB_OPC_LEGACY_SET_NODE_VARIABLE = 150 ,
  VLCB_OPC_NODE_VARIABLE_VALUE = 151 , VLCB_OPC_SHORT_EVENT_ACCESSORY_ON = 152 , VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF = 153 , VLCB_OPC_QUERY_SHORT_EVENT_ACCESSORY_STATE = 154 ,
  VLCB_OPC_NODE_PARAMETER_VALUE = 155 , VLCB_OPC_QUERY_EVENT_VARIABLE = 156 , VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON = 157 , VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF = 158 ,
  VLCB_OPC_EXT_OP_CODE3 = 159 , VLCB_OPC_DCC_SEND_RAW_PACKET4 = 160 , VLCB_OPC_DCC_WRITE_CV_IN_SERVICE_MODE = 162 , VLCB_OPC_HEARTBEAT = 171 ,
  VLCB_OPC_SERVICE_DISCOVERY_RESPONSE = 172 , VLCB_OPC_GENERIC_RESPONSE = 175 , VLCB_OPC_LONG_EVENT_ACCESSORY_ON1 = 176 , VLCB_OPC_LONG_EVENT_ACCESSORY_OFF1 = 177 ,
  VLCB_OPC_QUERY_EVENT_VARIABLE_BY_IDEX = 178 , VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON1 = 179 , VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF1 = 180 , VLCB_OPC_EVENT_VARIABLE_VALUE = 181 ,
  VLCB_OPC_NODE_INFO = 182 , VLCB_OPC_SHORT_EVENT_ACCESSORY_ON1 = 184 , VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF1 = 185 , VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON1 = 189 ,
  VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF1 = 190 , VLCB_OPC_EXT_OP_CODE4 = 191 , VLCB_OPC_DCC_SEND_RAW_PACKET5 = 192 , VLCB_OPC_DCC_WRITE_CV_BYTE_IN_OPS_MODE_BY_ADDRESS = 193 ,
  VLCB_OPC_DCC_SEND_DATA_TO_CAB = 194 , VLCB_OPC_DIAGNOSTIC_DATA = 199 , VLCB_OPC_FAST_CLOCK = 207 , VLCB_OPC_LONG_EVENT_ACCESSORY_ON2 = 208 ,
  VLCB_OPC_LONG_EVENT_ACCESSORY_OFF2 = 209 , VLCB_OPC_TEACH_EVENT = 210 , VLCB_OPC_EVENT_VARIABLE_VALUE_IN_LEARN_MODE = 211 , VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON2 = 212 ,
  VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF2 = 213 , VLCB_OPC_SHORT_EVENT_ACCESSORY_ON2 = 216 , VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF2 = 217 , VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON2 = 221 ,
  VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF2 = 222 , VLCB_OPC_EXT_OP_CODE5 = 223 , VLCB_OPC_DCC_SEND_RAW_PACKET6 = 224 , VLCB_OPC_DCC_LOCO_REPORT = 225 ,
  VLCB_OPC_MODULE_NAME = 226 , VLCB_OPC_DCC_COMMAND_STATION_STATUS = 227 , VLCB_OPC_EVENT_ACK = 230 , VLCB_OPC_EXTENDED_SERVICE_DISCOVERY_RESPONSE = 231 ,
  VLCB_OPC_STREAM_PACKET = 233 , VLCB_OPC_NODE_PARAMETERS_REPORT = 239 , VLCB_OPC_LONG_EVENT_ACCESSORY_ON3 = 240 , VLCB_OPC_LONG_EVENT_ACCESSORY_OFF3 = 241 ,
  VLCB_OPC_LEARNED_EVENT_RESPONSE = 242 , VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON3 = 243 , VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF3 = 244 , VLCB_OPC_TEACH_EVENT_BY_INDEX = 245 ,
  VLCB_OPC_DATA_EVENT_ACCESSORY = 246 , VLCB_OPC_NODE_DATA_EVENT_RESPONSE = 247 , VLCB_OPC_SHORT_EVENT_ACCESSORY_ON3 = 248 , VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF3 = 249 ,
  VLCB_OPC_DEVICE_DATA_EVENT_SHORT_MODE = 250 , VLCB_OPC_DEVICE_DATA_RESPONSE_SHORT_MODE = 251 , VLCB_OPC_WRITE_DATA = 252 , VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON3 = 253 ,
  VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF3 = 254 , VLCB_OPC_EXT_OP_CODE6 = 255
}
 

Typedef Documentation

◆ VlcbDccServiceModeStatus

typedef uint8_t VlcbDccServiceModeStatus

Status codes for SSTAT message

Definition at line 146 of file vlcb_defs.h.

◆ VlcbDccThrottleSpeedMode

typedef uint8_t VlcbDccThrottleSpeedMode

Modes for STMOD

Definition at line 164 of file vlcb_defs.h.

◆ VlcbGenericResponseStatus

typedef uint8_t VlcbGenericResponseStatus

GRSP codes

Definition at line 210 of file vlcb_defs.h.

◆ VlcbModuleMode

typedef uint8_t VlcbModuleMode

Parameters to the MODE op-code

Exclusive modes

Definition at line 333 of file vlcb_defs.h.

◆ VlcbOpCode

typedef uint8_t VlcbOpCode

VLCB opcodes

Definition at line 492 of file vlcb_defs.h.

◆ VlcbRocRailModuleType

typedef uint8_t VlcbRocRailModuleType

Rocrail Module types

Definition at line 8 of file vlcb_defs.h.

◆ VlcbServiceType

typedef uint8_t VlcbServiceType

VLCB Service Types

Definition at line 401 of file vlcb_defs.h.

◆ VlcbSpectrumModuleType

typedef uint8_t VlcbSpectrumModuleType

Spectrum Engineering Animated Modeller module types

Definition at line 64 of file vlcb_defs.h.

◆ VlcbSprogModuleType

typedef uint8_t VlcbSprogModuleType

Sprog Module types

Definition at line 84 of file vlcb_defs.h.

◆ VlcbSysPixieModuleType

typedef uint8_t VlcbSysPixieModuleType

SysPixie Module types (Konrad Orlowski)

Definition at line 196 of file vlcb_defs.h.

Enumeration Type Documentation

◆ VlcbDccServiceModeStatus

Enumerator
VLCB_DCC_SVC_MODE_STAT_NO_ACK 
VLCB_DCC_SVC_MODE_STAT_OVLD 
VLCB_DCC_SVC_MODE_STAT_WRITE_ACK 
VLCB_DCC_SVC_MODE_STAT_BUSY 
VLCB_DCC_SVC_MODE_STAT_CV_ERROR 

Definition at line 147 of file vlcb_defs.h.

◆ VlcbDccThrottleSpeedMode

Enumerator
VLCB_DCC_THROTTLE_MODE_STEP128 

128-step speed mode

VLCB_DCC_THROTTLE_MODE_STEP14 

14-step speed mode

VLCB_DCC_THROTTLE_MODE_STEP28INTERLEAVED 

interleaved 28-step speed mode

VLCB_DCC_THROTTLE_MODE_STEP28 

28-step speed mode

Definition at line 165 of file vlcb_defs.h.

◆ VlcbGenericResponseStatus

Enumerator
VLCB_GENERIC_RESPONSE_STAT_OK 

Success

VLCB_GENERIC_RESPONSE_INVALID_COMMAND 

Invalid command

VLCB_GENERIC_RESPONSE_NOT_IN_LEARN_MODE 

The mode is not currently in learn mode

VLCB_GENERIC_RESPONSE_NOT_IN_SETUP_MODE 

The mode is not currently in setup mode

VLCB_GENERIC_RESPONSE_TOO_MANY_EVENTS 

Too many events provisioned in module

The event storage is exhausted

VLCB_GENERIC_RESPONSE_NO_EV 

No Event-Variable

VLCB_GENERIC_RESPONSE_INVALID_EV_INDEX 

Invalid EV index

VLCB_GENERIC_RESPONSE_INVALID_EVENT 

Invalid event

VLCB_GENERIC_RESPONSE_INVALID_PARAM_INDEX 

Invalid param index

VLCB_GENERIC_RESPONSE_INVALID_NV_INDEX 

Invalid NV index

VLCB_GENERIC_RESPONSE_INVALID_EV_VALUE 

Invalid EV value

VLCB_GENERIC_RESPONSE_INVALID_NV_VALUE 

Invalid NV value

VLCB_GENERIC_RESPONSE_ANOTHER_MODULE_IS_IN_LEARN_MODE 

Another module is already in learn mode

Sent when module in learn mode sees NNLRN for different module (also exits learn mode)

VLCB_GENERIC_RESPONSE_STAT_UNKNOWN_NVM_TYPE 

Unknown non volatile memory type

VLCB_GENERIC_RESPONSE_STAT_INVALID_DIAGNOSTIC 

Invalid diagnostic

VLCB_GENERIC_RESPONSE_STAT_INVALID_SERVICE 

Invalid service

VLCB_GENERIC_RESPONSE_STAT_INVALID_COMMAND_PARAMETER 

Invalid parameter in command

VLCB_GENERIC_RESPONSE_STAT_INVALID_MODE 

Invalid Mode

Definition at line 211 of file vlcb_defs.h.

◆ VlcbModuleMode

Enumerator
VLCB_MODULE_MODE_UNINITIALIZED 

Uninitialized / factory settings

VLCB_MODULE_MODE_IN_SETUP 

Set up mode

VLCB_MODULE_MODE_NORMAL 

Normal operation mode

VLCB_MODULE_MODE_ENABLE_LEARN_MODE 

Turn on learn mode

VLCB_MODULE_MODE_DISABLE_LEARN_MODE 

Turn off learn mode

VLCB_MODULE_MODE_ENABLE_EVENT_ACK 

Turn on event acknowledgements

VLCB_MODULE_MODE_DISABLE_EVENT_ACK 

Turn off event acknowledgements

VLCB_MODULE_MODE_ENABLE_HEARTBEAT 

Turn on heartbeat

VLCB_MODULE_MODE_DISABLE_HEARTBEAT 

Turn off heartbeat

VLCB_MODULE_MODE_BOOTLOADER 

PIC Boot loader mode

Definition at line 334 of file vlcb_defs.h.

◆ VlcbOpCode

enum VlcbOpCode
Enumerator
VLCB_OPC_GENERAL_ACK 

General Acknowledgement.

Positive response to query/ request performed or report of availability on-line.

VLCB_OPC_GENERAL_NACK 

General No Ack.

Negative response to query/ request denied.

VLCB_OPC_BUS_HALT 

Bus Halt.

Commonly broadcasted to all nodes to indicate CBUS is not available and no further packets should be sent until a BON or ARST is received.

VLCB_OPC_BUS_RESUME 

Bus ON

Commonly broadcasted to all nodes to indicate CBUS is available after a HLT message was transmitted.

VLCB_OPC_DCC_TRACK_POWERED_OFF 

DCC track off.

Commonly broadcasted to all nodes by a command station to indicate track power is off and no further command packets should be sent, except inquiries.

VLCB_OPC_DCC_TRACK_POWERED_ON 

DCC track on.

Commonly broadcasted to all nodes by a command station to indicate track power is on.

VLCB_OPC_DCC_EMERGENCY_STOP_ENGAGED 

DCC emergency stop.

Commonly broadcast to all nodes by a command station to indicate all engines have been emergency stopped.

VLCB_OPC_RESTART_ALL_NODES 

Perform reboot on all nodes.

Commonly broadcasted to all nodes to indicate a full system restart. Similar to NNRST which directs a single node to be restarted.

VLCB_OPC_DCC_TRACK_POWER_OFF 

DCC request track off.

Sent to request change of track power state to “off”.

VLCB_OPC_DCC_TRACK_POWER_ON 

DCC request track on.

Sent to request change of track power state to “on”.

VLCB_OPC_DCC_EMERGENCY_STOP 

DCC request emergency stop.

Sent to request an emergency stop to all trains. Does not affect accessory control.

VLCB_OPC_DCC_QUERY_COMMAND_STATION_STATUS 

Request Command Station Status.

Sent to query the status of the command station. See description of (STAT) for the response from the command station.

VLCB_OPC_QUERY_MODULE_INFO 

Query node number.

Requests a PNN reply from each node on the bus.

VLCB_OPC_QUERY_MODULE_PARAMETERS 

Request node parameters.

Sent to a node while in Setup mode to read its parameter set. Used when initially configuring a node.

VLCB_OPC_QUERY_MODULE_NAME 

Request module name.

Sent by a node to request the name of the type of module that is in setup mode or Learn mode. The module in setup mode or learn mode will reply with opcode NAME.

VLCB_OPC_DCC_RELEASE_SESSION 

Release Engine.

Sent by a CAB to the Command Station. The engine with that Session number is removed from the active engine list.

VLCB_OPC_DCC_QUERY_LOCO_STATUS 

Query engine.

Used to determine if the command station session is valid and to obtain information about the status of the locomotive.

VLCB_OPC_DCC_SESSION_KEEP_ALIVE 

Session keep alive.

The cab sends a keep alive at regular intervals for the active session. The interval between keep alive messages must be less than the session timeout implemented by the command station.

VLCB_OPC_DEBUG_MSG1 

Debug message with one data byte.

Freeform status byte for debugging during CBUS module development. Not used during normal operation.

VLCB_OPC_EXT_OP_CODE 

Extended opcode with zero additional bytes. Reserved to allow the 0 additional bytes range to be extended by a further 256 opcodes.

VLCB_OPC_DCC_REQUEST_NEW_SESSION 

Request engine session.

This command is typically sent by a cab to the command station following a change of the controlled decoder address. RLOC is exactly equivalent to GLOC with all flag bits set to zero, but command stations

VLCB_OPC_DCC_QUERY_CONSIST 

Query Consist.

Allows enumeration of a consist. Command station responds with PLOC if an engine exists at the specified index, otherwise responds

VLCB_OPC_SET_NODE_NUMBER 

Set Node Number.

Sent by a configuration tool to assign a node number to a requesting node in response to a RQNN message. The target node must be in

VLCB_OPC_DCC_ALLOCATE_LOCO_TO_ACTIVITY 

Allocate loco to activity.

VLCB_OPC_DCC_SET_THROTTLE_MODE 

Set CAB session mode.

Bits 0–1: speed mode

  • 00 =128 speed steps
  • 01 =14 speed steps
  • 10 =28 speed steps with interleave steps
  • 11 =28 speed steps

Bit 2: service mode Bit 3:sound control mode

VLCB_OPC_DCC_CONSIST_ADD_LOCO 

Consist Engine.

Adds a decoder specified by Session to a consist. Consist# has bit 7 set if consist direction is reversed.

VLCB_OPC_DCC_CONSIST_REMOVE_LOCO 

Removes a loco from a consist.

VLCB_OPC_DCC_SET_LOCO_THROTTLE 

Set Engine Speed/Dir.

Speed/dir value, where the most significant bit is direction and the 7ls bits are the unsigned speed value. Sent by a CAB or equivalent to request an engine speed/dir change.

VLCB_OPC_DCC_SET_LOCO_FLAGS 

Set Engine Flags.

Sent by a cab to notify the command station of a change in engine flags.

Bits 0-1: Speed Mode (00 =128 speed steps, 01 =14 speed steps,10 =28 speed steps with interleave steps, 11 =28 speed steps) Bit 2:Lights On/OFF Bit 3:Engine relative direction Bits 4-5: Engine state (active =0 , consisted =1, consist master=2, inactive=3) Bits 6-7: Reserved.

VLCB_OPC_DCC_LOCO_FUNCTION_ON 

Set Engine function on.

Sent by a cab to turn on a specific loco function. This provides an alternative method to DFUN for controlling loco functions. A command

VLCB_OPC_DCC_LOCO_FUNCTION_OFF 

Set Engine function off.

Sent by a cab to turn off a specific loco function. This provides an alternative method to DFUN for controlling loco functions. A command

VLCB_OPC_DCC_SERVICE_MODE_STATUS 

Service mode status.

Status returned by command station/programmer at the end of a programming operation that does not return data. Response to QCVS to indicate no data.

VLCB_OPC_RESET_MODULE_TO_FACTORY 

Reset to manufacturer settings. Reset a module back to manufacturer settings.

VLCB_OPC_REQUEST_NEW_NODE_NUMBER 

Request node number.

The module is requesting that it is provided with a new node number. A configuration tool should respond with SNN to provide the requesting

VLCB_OPC_NODE_NUMBER_RELEASED 

Node number release.

A node signals that it no longer requires a node number by sending NNREL. The module will do this upon moving from normal mode to setup mode.

VLCB_OPC_NODE_NUMBER_ACK 

Node number acknowledge.

This message is sent in response to SNN. A node signals that it will

VLCB_OPC_PUT_NODE_INTO_LEARN_MODE 

Set node into learn mode.

Sent by a configuration tool to put a specific node into learn mode.

VLCB_OPC_RELEASE_NODE_FROM_LEARN_MODE 

Release node from learn mode.

Sent by a configuration tool to take the module out of learn mode and revert to normal operation.

VLCB_OPC_FORGET_ALL_LEARNED_EVENTS 

Clear all events from a node.

Sent by a configuration tool to clear all events from a specific node. Must be in learn mode first to safeguard against accidental erasure of all events

VLCB_OPC_QUERY_AVAILABLE_EVENT_SLOTS 

Read the number of event slots available in a node.

Sent by a configuration tool to read the number of available event slots in a node.

VLCB_OPC_QUERY_ALL_LEARNED_EVENTS 

Read back all stored events in a node.

There MUST be no hidden events. Sent by a configuration tool to read all the stored events in a node.

VLCB_OPC_QUERY_LEARNED_EVENT_COUNT 

Request to read number of stored events.

Sent by a configuration tool to read the number of stored events in a node.

VLCB_OPC_WRITE_ACK 

Write acknowledge.

Sent by a node to indicate the completion of a write to memory operation. All nodes must issue WRACK when a write operation to node variables, events or event variables has completed. This allows for teaching nodes where the processing time may be slow.

VLCB_OPC_QUERY_NODE_DATA 

Request node data event.

Sent by one node to read the data event from another node.(eg: RFID data).

VLCB_OPC_REQUEST_DEVICE_DATA_SHORT_MODE 

Request device data –short mode.

To request a ‘data set’ from a device using the short event method where DN is the device number.

VLCB_OPC_REBOOT_INTO_BOOTLOADER 

Put node into bootloading mode. For modules with no NN then the NN of the command must be zero. For nodes in Normal mode the command must contain the NN of the target node. Sent by a configuration tool to prepare for loading a new program.

VLCB_OPC_FORCE_CAN_ENUMERATION 

Force a self enumeration cycle for use with CAN.

For nodes in Normal mode using CAN as a transport. This message will force a self-enumeration cycle for the specified node. A new CAN_ID will be allocated if needed.

VLCB_OPC_RESTART_NODE 

Reset module’s CPU.

Reset a module’s microprocessor.

VLCB_OPC_EXT_OP_CODE1 

Extended opcode with 1 additional byte.

Reserved to allow the 1 additional bytes range to be extended by a further 256 opcodes.

VLCB_OPC_DCC_SET_LOCO_FUNCTIONS 

Set Engine functions.

<Fn1>is the function range 1 is F0(FL) to F4, 2 is F5 to F8, 3 is F9 to F12, 4 is F13 to F20, 5 is F21to F28) <Fn2> is the NMRA DCC format function byte for that range in corresponding bits. A bit set to 1 turns function “on” and a cleared bit sets function “off”. Sent by a CAB or equivalent to request an engine Fn state change.

VLCB_OPC_DCC_QUERY_LOCO_SESSION 

Get engine session.

<Flags> contains flag bits as follows: Bit 0: Set for "Steal" mode Bit 1: Set for "Share" mode. Both bits set to 0 is exactly equivalent to an RLOC request but

VLCB_OPC_DCC_COMMAND_STATION_ERROR 

Command Station Error report.

Sent in response to an error situation by a command station. See Appendix A - DCC ERR error codes for a list of error codes.

VLCB_OPC_COMMAND_ERROR 

Error messages from nodes during configuration.

Sent by node if there is an error when a configuration command is sent. See Appendix C - CMDERR error codes for the list of supported codes.

VLCB_OPC_AVAILABLE_EVENT_SLOTS 

Event space left reply from node.

Spaces is a one byte value giving the number of available event spaces left in the node’s event table. This is the maximum number of additional events that can be stored by the module.

VLCB_OPC_QUERY_NODE_VARIABLE 

Request read of a node variable.

NV# is the index for the node variable value requested. Response is NVANS.

VLCB_OPC_QUERY_LEARNED_EVENT_BY_INDEX 

Request read of stored event by event index.

EN# is the index for the stored event requested.

VLCB_OPC_QUERY_NODE_PARAMETER_BY_INDEX 

Request read of a node parameter by index.

Para# is the index for the parameter requested. Reading Index 0 first returns a PARAN with the number of available

VLCB_OPC_LEARNED_EVENT_COUNT 

Number of events stored by node.

Response to request RQEVN

VLCB_OPC_SET_NODE_CAN_ID 

Set the CAN_ID in the node.

Used to force a specified CAN_ID into a node. Value range is from 1 to 0x63 (99 decimal). This OPC must be used with care as duplicate CAN_IDs are not allowed.

VLCB_OPC_CHANGE_MODULE_MODE 

Request a change to a module’s operating mode.

Request to change the operational mode of the module.

VLCB_OPC_QUERY_SERVICE_DISCOVERY 

Request service discovery.

Request service data from a module. If the ServiceIndex is zero then the module responds with a SD

VLCB_OPC_EXT_OP_CODE2 

Extended opcode with 2 additional bytes.

Reserved to allow the 2 additional bytes range to be extended by a further 256 opcodes.

VLCB_OPC_DCC_SEND_RAW_PACKET3 

Request 3-byte DCC Packet.

Allows a CAB or equivalent to request a 3 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis. Note: a 3 byte DCC packet is the minimum allowed.

VLCB_OPC_DCC_WRITE_CV_BYTE_IN_OPS_MODE 

Write CV (byte) in OPS mode.

Sent to the command station to write a DCC CV byte in OPS mode to a specific loco (on the main).

VLCB_OPC_DC_WRITE_CV_BIT_IN_OPS_MODE 

Write CV (bit) in OPS mode. Sent to the command station to write a DCC CV in OPS mode to specific loco (on the main). The format for Value is that specified in RP 9.2.1 for OTM bit manipulation in a DCC packet. This is ‘111CDBBB’ where C here is always 1 as only ‘writes’ are possible OTM (unless some loco ACK scheme like RailCom is used). D is the bit value, either 0 or 1 and BBB is the bit position in the CV byte. 000 to 111 for bits 0 to 7.

VLCB_OPC_DCC_READ_CV 

Read CV. This command is used exclusively with service mode. Sent by the cab to the command station in order to read a CV value.

VLCB_OPC_DCC_CV_VALUE 

Report CV.

This command is used exclusively with service mode. Sent by the command station to report a read CV in response to QCVS.

VLCB_OPC_QUERY_DIAGNOSTIC_DATA 

Request diagnostic data.

Request diagnostic data from a module. If the requested diagnostic data is zero then a response for all diagnostic data is returned.

VLCB_OPC_SET_NODE_VARIABLE 

Set a NV value with read back. Sets a NV value and additionally responds with the new value.nvset The new value may not be the value which was requested to be written.

VLCB_OPC_LONG_EVENT_ACCESSORY_ON 

Accessory ON long event.

Indicates an ‘ON’ event using the full event number of 4 bytes (long event). An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions.

VLCB_OPC_LONG_EVENT_ACCESSORY_OFF 

Accessory OFF long event.

Indicates an ‘OFF’ event using the full event number of 4 bytes (long event). An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions.

VLCB_OPC_QUERY_LONG_EVENT_ACCESSORY_STATE 

Accessory Request Event.

Indicates a ‘request’ event using the full event number of 4 bytes (long event). A request event is used to elicit a status response from a producer when it is required to know the ‘state’ of the producer without producing an ON or OFF event.

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON 

Accessory Response Event.

Indicates an ‘ON’ response. A response is a reply to a status request (AREQ) without producing an ON or OFF event.

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF 

Accessory Response Event (AROF).

Indicates an ‘OFF’ response. A response is a reply to a status request (AREQ) without producing an ON or OFF event.

VLCB_OPC_FORGET_LEARNED_EVENT 

Unlearn an event in learn mode.

Sent by a configuration tool to remove an event from a node.

VLCB_OPC_LEGACY_SET_NODE_VARIABLE 

Set a node variable.

Sent by a configuration tool to set a node variable. NV# is the NV index number.

VLCB_OPC_NODE_VARIABLE_VALUE 

Response to a request for a node variable value.

Sent by node in response to request NVRD or NVSETRD.

VLCB_OPC_SHORT_EVENT_ACCESSORY_ON 

Accessory Short ON.

Indicates an ‘ON’ event using the short event number of 2 LS bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF 

Accessory Short OFF.

Indicates an ‘OFF’ event using the short event number of 2 LS bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event.

VLCB_OPC_QUERY_SHORT_EVENT_ACCESSORY_STATE 

Accessory Short Request Event.

Indicates a ‘request’ event using the short event number of 2 LS bytes. A request event is used to elicit a status response from a producer when it is required to know the ‘state’ of the producer without producing an ON or OFF event.

VLCB_OPC_NODE_PARAMETER_VALUE 

Response to request for individual node parameter RQNPN.

NN is the node number of the sending node. Para# is the index of the parameter and Para val is the parameter value. Returns a parameter value. Parameter index is the parameter number and matches that in the RQNPN request.

VLCB_OPC_QUERY_EVENT_VARIABLE 

Request for read of an event variable.

This request differs from B2 (REQEV) as it doesn’t need to be in learn

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON 

Accessory Short Response Event.

Indicates an ‘ON’ response. A response is a reply to a status request (ASRQ) without producing an ON or OFF event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF 

Accessory Short Response Event.

Indicates an ‘OFF’ response. A response is a reply to a status request (ASRQ) without producing an ON or OFF event.

VLCB_OPC_EXT_OP_CODE3 

Extended opcode with 3 additional bytes. Reserved to allow the 3 additional bytes range to be extended by a further 256 opcodes.

VLCB_OPC_DCC_SEND_RAW_PACKET4 

Request 4-byte DCC Packet. Allows a CAB or equivalent to request a 4 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.

VLCB_OPC_DCC_WRITE_CV_IN_SERVICE_MODE 

Write CV in Service mode. Sent to the command station to write a DCC CV in service mode.

VLCB_OPC_HEARTBEAT 

Heartbeat from module.

Heartbeat message from module indicating that the module is alive and communicating on the bus. Sent every 5 seconds by a module to confirm it is alive and connected to the network along with an indication of module status. Sequence is a count from 0 incrementing on each message transmitted and wrapping around to zero, It facilitates detection of missing frames. Status: This is a binary representation of the module’s diagnostic status as outlined in MNS Specification Section 8.3. 0x00 Shall always represent “normal“ operation. StatusBits: Reserved for future expansion, set to 0x00

VLCB_OPC_SERVICE_DISCOVERY_RESPONSE 

Service discovery response.

The version of a service supported by a module. Sent in response to RQSD with ServiceIndex = 0. A number of SD

VLCB_OPC_GENERIC_RESPONSE 

Generic Response.

Generic response for a configuration change request. Result byte indicates ok for success or an error code in case of failure. Indicates the module is ready for further configuration. The CMDERR codes are supported and in addition service specific

VLCB_OPC_LONG_EVENT_ACCESSORY_ON1 

Accessory ON.

Indicates an ‘ON’ event using the full event number of 4 bytes with one additional data byte. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_LONG_EVENT_ACCESSORY_OFF1 

Accessory OFF.

Indicates an ‘OFF’ event using the full event number of 4 bytes with one additional databyte. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_QUERY_EVENT_VARIABLE_BY_IDEX 

Read event variable in learn mode.

Allows a configuration tool to read stored event variables from a node. EV# is the EV variable index. NN and EN identify the event and not the module. Reading EV#0 shall first return the number of EVs followed by a series of EVANS with the value for each EV.

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON1 

Accessory Response Event.

Indicates an ‘ON’ response with one additional data byte. A response is a reply to a status request (AREQ) without producing an ON or OFF

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF1 

Accessory Response Event. Indicates an ‘OFF’ response with one additional data byte. A response is a reply to a status request (AREQ) without producing an ON or OFF

VLCB_OPC_EVENT_VARIABLE_VALUE 

Response to request for read of EV value.

This is the response to the request to read an EV - REVAL.

VLCB_OPC_NODE_INFO 

Response to Query Node - QNN.

Sent in response to a QNN request.

VLCB_OPC_SHORT_EVENT_ACCESSORY_ON1 

Accessory Short ON.

Indicates an ‘ON’ event using the short event number of 2 LS bytes with one added data byte. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF1 

Accessory Short OFF.

Indicates an ‘OFF’ event using the short event number of 2 LS bytes with one added data byte. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON1 

Accessory Short Response Event. Indicates an ‘ON’ response with one added data byte. A response is a reply to a status request (ASRQ)without producing an ON or OFF

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF1 

Accessory Short Response Event with one data byte. Indicates an ‘OFF’ response with one added data byte. A response is a reply to a status request (ASRQ) without producing an ON or OFF event. A response event is a reply to a status request (ASRQ)without

VLCB_OPC_EXT_OP_CODE4 

Extended opcode with 4 additional bytes. Reserved to allow the 4 additional bytes range to be extended by a further 256 opcodes.

VLCB_OPC_DCC_SEND_RAW_PACKET5 

Request 5-byte DCC Packet. Allows a CAB or equivalent to request a 5 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.

VLCB_OPC_DCC_WRITE_CV_BYTE_IN_OPS_MODE_BY_ADDRESS 

Write CV (byte) in OPS mode by address.

Sent to the command station to write a DCC CV byte in OPS mode to specific loco (on the main). Used by computer based ops mode programmer that does not have a valid throttle handle.

VLCB_OPC_DCC_SEND_DATA_TO_CAB 

Send data to the DCC CAB which is controlling a particular loco.

addrH and addrL are the loco address in the same format as RLOC and GLOC 7 bit addresses have (addrH=0). 14 bit addresses have bits 6,7 of addrH set to 1. dataCode defines the meaning of the remaining 3 bytes. The following values for dataCod have currently been defined: ● 01 - CABSIG - Transmitted by a layout control system to send signal aspects to be displayed on a cab handset as cab signalling. Parameter data1 is used for aspect1 Parameter data2 is used for aspect2 Parameter data3 is used for speed aspect1 is signalling system independent, and is defined as follows (colours in brackets correspond to UK colour light signalling, the given aspect names may be displayed differently in other signalling systems): Bits 0-1 - 2 bit aspect code 00=danger (red), 01=caution (yellow), 10=preliminary caution (double yellow), 11=proceed (green) Bit 2 - set 1 for calling on or shunt aspect (bits 0-1 would be set to 00 for danger when calling on) Bit 3 - Set 0 to indicate upper nibble is feather location, set 1 for upper nibble is theatre type route indicator Bits 4-7 - 0 - no route indicated, 1 to 6 = feather position or 1 to 16 for theatre route indication aspect1 should be set to 0xFF if no signal information is available. This can be used, for example, to indicate leaving a cab signalling area. A cab should extinguish any currently showing aspect on receipt of this code. Note that because bits 0 and 1 should be set to zero when bit 2 is set, the code 0xFF is not otherwise a valid aspect. <aspect2> may be used as required for specific signalling systems. The meaning will vary for each signalling system. For the UK 2003 rulebook, bit 0 set indicates a flashing aspect, applicable to caution, preliminary caution or proceed. For UK semaphore signalling, where there are multiple arms for

VLCB_OPC_DIAGNOSTIC_DATA 

Diagnostic data response.

Diagnostic data value from a module. Sent in response to RDGN.

VLCB_OPC_FAST_CLOCK 

Fast Clock.

Used to implement a fast clock for the layout.

VLCB_OPC_LONG_EVENT_ACCESSORY_ON2 

Accessory ON.

Indicates an ‘ON’ event using the full event number of 4 bytes with two additional data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_LONG_EVENT_ACCESSORY_OFF2 

Accessory OFF.

Indicates an ‘OFF’ event using the full event number of 4 bytes with two additional data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_TEACH_EVENT 

Teach an event in learn mode.

Sent by a configuration tool to a node in learn mode to teach it an event variable. Also teaches it the associated event. This command is repeated for each EV required.

VLCB_OPC_EVENT_VARIABLE_VALUE_IN_LEARN_MODE 

Response to a request for an EV value in a node in learn mode.

A node response to a request from a configuration tool for the EVs associated with an event (REQEV). For multiple EVs, there will be one

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON2 

Accessory Response Event.

Indicates an ‘ON’ response event with two added data bytes. A response is a reply to a status request (AREQ) without producing an

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF2 

Accessory Response Event.

Indicates an ‘OFF’ response event with two added data bytes. A response is a reply to a status request (AREQ) without producing an

VLCB_OPC_SHORT_EVENT_ACCESSORY_ON2 

Accessory Short ON. Indicates an ‘ON’ event using the short event number of 2 LS bytes with two added data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF2 

Accessory Short OFF. Indicates an ‘OFF’ event using the short event number of 2 LS bytes with two added data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON2 

Accessory Short Response Event ON with two data bytes.

Indicates an ‘ON’ response event with two added data bytes. A response is a reply to a status request (ASRQ)without producing an ON

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF2 

Accessory Short Response Event OFF with two data bytes.

Indicates an ‘OFF’ response event with two added data bytes. A response is a reply to a status request (ASRQ) without producing an

VLCB_OPC_EXT_OP_CODE5 

Extended opcode with 5 additional bytes.

Reserved to allow the 5 additional bytes range to be extended by a further 256 opcodes.

VLCB_OPC_DCC_SEND_RAW_PACKET6 

Request 6-byte DCC Packet.

Allows a CAB or equivalent to request a 6 byte DCC packet to be sent to the track. The packet is sent <REP> times and is not refreshed on a regular basis.

VLCB_OPC_DCC_LOCO_REPORT 

Engine report.

A report of an engine entry sent by the command station. Sent in response to QLOC or as an acknowledgement of acquiring an engine

VLCB_OPC_MODULE_NAME 

Response to request for node name string.

Returns the type name for the module in response to RQMN. Any

VLCB_OPC_DCC_COMMAND_STATION_STATUS 

Command Station status report.

Sent by the command station in response to RSTAT.

VLCB_OPC_EVENT_ACK 

Event Acknowledge.

Sent by a module to acknowledge the consumption of an event. Used for diagnostic purposes.

VLCB_OPC_EXTENDED_SERVICE_DISCOVERY_RESPONSE 

Extended service discovery response.

Detailed information about a service supported by a module. The data supplied is service specific. Sent in response to RQSD with ServiceIndex is not zero. A single ESD

VLCB_OPC_STREAM_PACKET 

Streaming protocol (RFC0005).

Used to transport a relatively large block of data. StreamID is a unique layout wide identifier of a particular message stream. It is the responsibility of the layout installer/module installer to ensure that any StreamIDs are unique across the installation. StreamIDs 0~20 are reserved as CBUS system wide IDs. Users would not allocate these IDs to private streams. SequenceNum is a 0x00 to 0xFF identification of the frame sequence . 0x00 is used to denote a header frame , any number != 0x00 indicates a continuation frame. MessageLen is a 16 bit size in bytes of the transmitted message , However as only 254 continuation frames are possible the Message Len is limited to a count of 1275. However private protocols may be deployed to send larger messages and the full extent of these fields can be used. A Message length of Zero is supported, albeit rather pointless. 16 15 2 CRC16 is a standard implementation of CRC, ie P(x) = x +x +x +1. CRC fields are optional and set to 0x00 if not implemented. Continuation frames merely contain the StreamID and SequenceNum and 5 bytes of message data It is recommended that continuation frames are throttled at 1 over 20ms.

VLCB_OPC_NODE_PARAMETERS_REPORT 

Response to request for node parameters.

Returns the first 7 parameters for the module in response to RQNP.

VLCB_OPC_LONG_EVENT_ACCESSORY_ON3 

Accessory ON.

Indicates an ‘ON’ event using the full event number of 4 bytes with three additional data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_LONG_EVENT_ACCESSORY_OFF3 

Accessory OFF.

Indicates an ‘OFF’ event using the full event number of 4 bytes with three additional data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_LEARNED_EVENT_RESPONSE 

Response to request to read node events.

This is a response to either NERD or NENRD.

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_ON3 

Accessory Response Event.

Indicates an ‘ON’ response event with three added data bytes. A response is a reply to a status request (AREQ) without producing an

VLCB_OPC_LONG_EVENT_ACCESSORY_STATE_OFF3 

Accessory Response Event.

Indicates an ‘OFF’ response event with three added data bytes. A response is a reply to a status request (AREQ) without producing an

VLCB_OPC_TEACH_EVENT_BY_INDEX 

Teach an event in learn mode using event indexing.

Sent by a configuration tool to a node in learn mode to teach it an event. The event index must be known. Also teaches it the associated event variables (EVs). This command is repeated for each EV required. Parameter EN# is ignored and this request is similar to EVLRN.

VLCB_OPC_DATA_EVENT_ACCESSORY 

Accessory node data event.

Indicates an event from this node with 5 bytes of data. For example, this can be used to send the 40 bits of an RFID tag. There is no event number in order to allow space for 5 bytes of data in the packet, so there can only be one data event per node. The meaning of the event is therefore dependent upon the type and use of the module.

VLCB_OPC_NODE_DATA_EVENT_RESPONSE 

Accessory node data Response.

Indicates a node data response. A response event is a reply to a status request (RQDAT) without producing a new data event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_ON3 

Accessory Short ON.

Indicates an ‘ON’ event using the short event number of 2 LS bytes with three added data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_SHORT_EVENT_ACCESSORY_OFF3 

Accessory Short OFF.

Indicates an ‘OFF’ event using the short event number of 2 LS bytes with three added data bytes. An event is sent by a module when it detects a change of state. Modules may consume the event and perform actions. The NN is not used to match events, the NN normally indicates the source of the event. The meaning of the additional data is dependent upon the application and must be agreed between the producer and consumer of the event.

VLCB_OPC_DEVICE_DATA_EVENT_SHORT_MODE 

Device data event (short mode).

Function is the same as ACDAT but uses device addressing so it can

VLCB_OPC_DEVICE_DATA_RESPONSE_SHORT_MODE 

Device data response (short mode).

The response to a RQDDS request for data from a device.

VLCB_OPC_WRITE_DATA 

Write data.

Used to write data to a device such as a RFID tag. data1 ~ data5 is data to be written to the device. RC522 devices should have data1 set to 0

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_ON3 

Accessory Short Response Event.

Indicates an ‘ON’ response event with three added data bytes.A response is a reply to a status request (ASRQ)without producing an ON

VLCB_OPC_SHORT_EVENT_ACCESSORY_STATE_OFF3 

Accessory Short Response Event.

Indicates an ‘OFF’ response event with three added data bytes.A response is a reply to a status request (ASRQ) without producing an

VLCB_OPC_EXT_OP_CODE6 

Extended opcode with 6 additional bytes.

Reserved to allow the 6 additional bytes range to be extended by a further 256 opcodes.

Definition at line 493 of file vlcb_defs.h.

◆ VlcbRocRailModuleType

Enumerator
VLCB_ROCRAIL_MODULE_CANGC1 

RS232 PC interface

VLCB_ROCRAIL_MODULE_CANGC2 

16 I/O

VLCB_ROCRAIL_MODULE_CANGC3 

Command station (derived from cancmd)

VLCB_ROCRAIL_MODULE_CANGC4 

8 channel RFID reader

VLCB_ROCRAIL_MODULE_CANGC5 

Cab for fixed panels (derived from cancab)

VLCB_ROCRAIL_MODULE_CANGC6 

4 channel servo controller

VLCB_ROCRAIL_MODULE_CANGC7 

Fast clock module

VLCB_ROCRAIL_MODULE_CANGC1E 

CAN<->Ethernet interface

Definition at line 9 of file vlcb_defs.h.

◆ VlcbServiceType

Enumerator
VLCB_SVC_TYPE_INTERNAL 

Internal service.

Can be used for implementing certain behaviors while using the service pattern for the implementation.

Will not be shown in list of services requested by RQSD.

VLCB_SVC_TYPE_MINIMUM_NODE_SERVICE 

The minimum node service.

All modules must implement this.

VLCB_SVC_TYPE_NODE_VARIABLE 

The NV service.

VLCB_SVC_TYPE_CAN_BUS 

CAN service.

Deals with CANID enumeration.

VLCB_SVC_TYPE_LEGACY_EVENT_TEACHING 

Old (CBUS) event teaching service.

VLCB_SVC_TYPE_EVENT_PRODUCER 

Event producer service.

VLCB_SVC_TYPE_EVENT_CONSUMER 

Event comsumer service.

VLCB_SVC_TYPE_EVENT_TEACHING 

New event teaching service.

VLCB_SVC_TYPE_CONSUME_OWN_EVENTS 

Consume own events service.

VLCB_SVC_TYPE_EVENT_ACKNOWLEDGE 

Event acknowledge service.

Useful for debugging event configuration.

VLCB_SVC_TYPE_BOOTLOADER 

FCU/PIC bootloader service.

VLCB_SVC_TYPE_STREAMING 

Streaming (Long Messages) service.

Definition at line 402 of file vlcb_defs.h.

◆ VlcbSpectrumModuleType

Enumerator
VLCB_SPECTRUM_MODULE_AMCTRLR 

Animation controller (firmware derived from cancmd)

VLCB_SPECTRUM_MODULE_DUALCAB 

Dual cab based on cancab

Definition at line 65 of file vlcb_defs.h.

◆ VlcbSprogModuleType

Enumerator
VLCB_SPROG_MODULE_CANPI_SPRG3 

Pi-SPROG 3 programmer/command station

VLCB_SPROG_MODULE_CANSPROG3P 

SPROG 3 Plus programmer/command station

VLCB_SPROG_MODULE_CANSPROG 

CAN SPROG programmer/command station

VLCB_SPROG_MODULE_CANSBOOST 

System Booster

VLCB_SPROG_MODULE_CANPI_SPRGP 

Pi-SPROG 3 Plus programmer/command station

VLCB_SPROG_MODULE_CANSOLNOID 

8-channel (4-pairs) Solenoid I/O module

VLCB_SPROG_MODULE_CANSERVOIO 

8-channel Servo I/O module

VLCB_SPROG_MODULE_CANISB 

CAN ISB Isolated CAN USB Interface

VLCB_SPROG_MODULE_CANSOLIO 

8-channel (4-pairs) Solenoid I/O module

Definition at line 85 of file vlcb_defs.h.

◆ VlcbSysPixieModuleType

Enumerator
VLCB_SYSPIXIE_MODULE_CANPMSENSE 

Motorised point motor driver with current sense

Definition at line 197 of file vlcb_defs.h.