Appendix F — OpenLCB Specification Traceability

This appendix maps OpenLCB specification requirements to the implementing source files and documentation chapters. It is intended to verify spec coverage, identify unimplemented requirements, and aid compliance auditing.

Spec documents (Standards "S" + Technical Notes "TN") are located in OpenLcb Documents/standards/. Unreleased standards (Stream Transport, TCP/IP Transport) are in drafts/ and not yet implemented.

F.1 Message Network Standard (MessageNetworkS.pdf)

Spec SectionRequirementSource File(s)Ch
3.1All messages shall contain source Node ID and MTIopenlcb_types.h (openlcb_msg_t)3
3.1.2Message fully decodable from MTI flag bitsopenlcb_defines.h3
3.2Nodes start in Uninitialized stateopenlcb_node.h (openlcb_node_state_t)5
3.2Uninitialized node shall not transmit except Init Completeopenlcb_login_statemachine.c9
3.3Node ID in data content shall be full 48-bit on all transportsopenlcb_utilities.c7
3.3.4Nodes shall process OIR even if not all contents providedprotocol_message_network.c12
3.3.5Nodes shall process Terminate Due to Error even if incompleteprotocol_message_network.c12
3.3.7Missing Protocol Support Reply bits interpreted as zeroprotocol_message_network.c12
3.4All nodes shall take part in all standard interactionsopenlcb_main_statemachine.c8
3.4.1Newly functional nodes shall send Init Completeopenlcb_login_statemachine.c9
3.4.2Addressed Verify Node ID replies Verified Node IDprotocol_message_network.c12
3.4.2Global Verify Node ID replies Verified Node IDprotocol_message_network.c12
3.5.1Unknown addressed MTI sends OIRopenlcb_main_statemachine.c8
3.5.3Error during addressed interaction sends Terminate Due to Errorprotocol_message_network.c12
3.5.4Detect incoming message with own Source Node ID indicates errorprotocol_message_network.c12
3.6Global messages forwarded to all nodesopenlcb_main_statemachine.c8
7.3.1.3First/Middle CAN frames carry 8 data bytescan_tx_message_handler.c11
7.3.7CAN message frames sent consecutivelycan_tx_statemachine.c11

F.2 Event Transport Standard (EventTransportS.pdf)

Spec SectionRequirementSource File(s)Ch
5Messages only sent when node is Initializedopenlcb_login_statemachine.c9
6Before PCER, node shall emit Producer Identifiedopenlcb_login_statemachine.c9
6.1To produce event, emit PCER with Event IDprotocol_event_transport.c13
6.2On Identify Events, reply with all Producer/Consumer Identifiedprotocol_event_transport.c13
6.3On Identify Producer, reply if producedprotocol_event_transport.c13
6.4On Identify Consumer, reply if consumedprotocol_event_transport.c13
7PCER with payload CAN frames sent togethercan_tx_statemachine.c11

F.3 Datagram Transport Standard (DatagramTransportS.pdf)

Spec SectionRequirementSource File(s)Ch
4.2Reserved Datagram OK flag bits sent as zeroprotocol_datagram_handler.c14
6Valid Datagram received sends Datagram OK or Rejectedprotocol_datagram_handler.c14
6.1Shall not send second Datagram before reply/timeoutprotocol_datagram_handler.c14
6.2Permanent Error: abandon, do not resendprotocol_datagram_handler.c14
7.2Maintain Datagram-started state for each receiving datagramcan_rx_message_handler.c11
7.3.1No lower-priority frames between datagram framescan_tx_statemachine.c11
7.3.2Invalid datagram frame sequence sends Rejectedcan_rx_message_handler.c11

F.4 CAN Frame Transfer Standard (CanFrameTransferS.pdf)

Spec SectionRequirementSource File(s)Ch
3Each node shall have unique NodeIDopenlcb_node.h5
4CAN extended format only (29-bit header)can_types.h3b
5Nodes start in Inhibited statecan_login_statemachine.c22
6.2.1Alias reservation: CID7/6/5/4, wait 200ms, RIDcan_login_message_handler.c22
6.2.1Restart reservation if matching alias receivedcan_rx_message_handler.c22
6.2.2Inhibited to Permitted: reserved alias + transmit AMDcan_login_message_handler.c22
6.2.3AME with matching Node ID replies AMDcan_rx_message_handler.c11
6.2.3AME with no data: discard cached alias mappingsalias_mappings.c, alias_mapping_listener.c19, 20
6.2.4On receiving AMR, stop using that alias within 100msalias_mappings.c19
6.2.5Compare source alias in each received frame against reservedcan_rx_statemachine.c11
6.3Alias values shall not be zerocan_login_message_handler.c22

F.5 Simple Node Information Protocol (SimpleNodeInformationS.pdf)

Spec SectionRequirementSource File(s)Ch
5.1Mfg name max 41 bytes null-terminatedprotocol_snip.c15
5.1Model name max 41 bytes null-terminatedprotocol_snip.c15
5.1HW version max 21 bytes null-terminatedprotocol_snip.c15
5.1SW version max 21 bytes null-terminatedprotocol_snip.c15
5.1User name max 63 bytes null-terminatedprotocol_snip.c15
5.1User description max 64 bytes null-terminatedprotocol_snip.c15
6.1SNIP support indicated in Protocol Support Replyprotocol_message_network.c12
6.3SNIP Reply constant; change requires re-initializationprotocol_snip.c15

F.6 Memory Configuration Standard (MemoryConfigurationS.pdf)

Spec SectionRequirementSource File(s)Ch
4.132-bit addresses, byte-addressableprotocol_config_mem_read_handler.c14
4.4Read command: Reply Pending in Datagram OKprotocol_config_mem_read_handler.c14
4.5Read reply may return less data but at least 1 byteprotocol_config_mem_read_handler.c14
4.24Reset/Reboot returns to power-on-reset stateprotocol_config_mem_operations_handler.c14
4.25Factory Reset: Node ID in payload for redundancyprotocol_config_mem_operations_handler.c14

F.7 Train Control Protocol (TrainControlS.pdf)

Spec SectionRequirementSource File(s)Ch
3Train Control node shall implement Event Transport and SNIPprotocol_event_transport.c, protocol_snip.c13, 15
4.3P bit = 0 for Throttle-to-Train, P bit = 1 for Train-to-Listenerprotocol_train_handler.c17
5E-Stop state entered on E-Stop command, exited on Set Speedprotocol_train_handler.c17
6.1Non-Controller commands produce Terminate Due to Errorprotocol_train_handler.c17
6.1Listener messages (P=1) shall never be rejectedprotocol_train_handler.c17
6.2E-Stop sets Speed 0, preserves directionprotocol_train_handler.c17
6.5Set speed always forwarded to listeners; Reverse flag flips directionprotocol_train_handler.c17
6.6Heartbeat timeout sets Speed 0protocol_train_handler.c17

F.8 Train Search Protocol (TrainSearchS.pdf)

Spec SectionRequirementSource File(s)Ch
5.1Event ID range 09.00.99.FF.xx reserved for Train Searchopenlcb_defines.h3
5.2Search query: 6 nibbles MSB-firstopenlcb_utilities.c7
6.1Match produces Producer Identifiedprotocol_train_search_handler.c17
6.2Allocate bit: create Train Node if no reply in 200msprotocol_train_search_handler.c17

F.9 Broadcast Time Protocol (BroadcastTimeS.pdf)

Spec SectionRequirementSource File(s)Ch
4Upper 6 bytes of event ID from specified clock rangeopenlcb_defines.h, openlcb_utilities.c3, 7
6.1Clock generator sends Range Identified at startupopenlcb_application_broadcast_time.c18
6.2Running clock sends Report Time at least once/houropenlcb_application_broadcast_time.c18
6.4Query Event triggers synchronization sequenceprotocol_broadcast_time_handler.c18
6.5Set commands produce Report eventprotocol_broadcast_time_handler.c18

F.10 CDI Standard (ConfigurationDescriptionInformationS.pdf)

Spec SectionRequirementSource File(s)Ch
4CDI invariant while node has Initialized connectionsprotocol_config_mem_read_handler.c16
5.1.1SNIP Reply matches CDI identification elementprotocol_snip.c15
5.1.4.2Integer stored unsigned unless min < 0, big-endianApplication config memory16
5.1.4.4Event ID stored big-endianopenlcb_utilities.c7

F.11 FDI Standard (FunctionDescriptionInformationS.pdf)

Spec SectionRequirementSource File(s)Ch
4FDI constant while node Initializedprotocol_config_mem_read_handler.c16
5.1.4Function number 0-16777215protocol_train_handler.c17

F.12 Firmware Upgrade Standard (FirmwareUpgradeS.pdf)

Spec SectionRequirementSource File(s)Ch
5.2Freeze command transitions to Firmware Upgradeprotocol_config_mem_operations_handler.c14
5.2Unfreeze transitions to Operatingprotocol_config_mem_operations_handler.c14
5.3Firmware Upgrade Protocol bit in PSIprotocol_message_network.c12
5.4.2Datagram transfer: 64-byte writes at offset 0protocol_config_mem_write_handler.c14

F.13 Unique Identifiers Standard (UniqueIdentifiersS.pdf)

Spec SectionRequirementSource File(s)Ch
4Unique Identifier is 6 bytes, MSB transmitted firstopenlcb_types.h3
4Every node shall have a Unique Identifier as Node IDopenlcb_node.h5

F.14 Event Identifiers Standard (EventIdentifiersS.pdf)

Spec SectionRequirementSource File(s)Ch
4Event identifier is 8 bytes, MSB firstopenlcb_types.h3
4Byte order significant, MSB transmitted firstopenlcb_utilities.c7
5Well-known events allocated per tableopenlcb_defines.h3

F.15 CAN Physical Layer Standard (CanPhysicalS.pdf)

Hardware-level requirements (bus termination, cable, connector, bit rate). Implemented by CAN transceiver hardware, not by this library. Application wiring guide references these requirements (Ch 23, Ch 28).

F.16 Unreleased Standards (in drafts/)

StandardStatus
Stream TransportDraft -- not yet released, not implemented
TCP/IP TransportDraft -- not yet released, not implemented
← Prev: Appendix E — Compile-Time Config Next: Appendix G — Glossary →