// ***************************************************************************** // // This file is the template for the application to define the Virtual Nodes // that can be implemented above and beyond the Physical Node. They can have // completely different attributes than the Physical Node but they all must share // the these attributes. // // ***************************************************************************** unit template_vnode; // This file contains application layer variabile the user can change to customize // features of OPStack including number of Nodes implemented by the library, // Hardcoded Events for physical node, etc {$IFDEF FPC} interface {$ENDIF} {$I Options.inc} uses nmranetdefines, opstacktypes; // Set the number of Events that are Consumed by this Node, if none then remove the SUPPORT_AT_LEAST_ONE_CONSUMED_EVENT // conditional define from the Options.inc file {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_CONSUMED_EVENT} const USER_MAX_VNODE_SUPPORTED_EVENTS_CONSUMED = 1; {$ELSE} const USER_MAX_VNODE_SUPPORTED_EVENTS_CONSUMED = 0; {$ENDIF} // Dynamic events are events whos IDs are not known at compile time. When enabled // the library will callback on the AppCallback_DynamicEvent_Produced with and index from // 0 to USER_MAX_SUPPORTED_DYNAMIC_EVENTS_CONSUMED - 1. const USER_MAX_VNODE_SUPPORTED_DYNAMIC_EVENTS_CONSUMED = 0; // Define the UIDs of Events that are Consumed by this Node, if none then remove the SUPPORT_AT_LEAST_ONE_CONSUMED_EVENT // conditional define from the Options.inc file {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_CONSUMED_EVENT} const USER_VNODE_SUPPORTED_EVENTS_CONSUMED: array[0..USER_MAX_VNODE_SUPPORTED_EVENTS_CONSUMED-1] of TEventID = ( ($01, $01, $00, $00, $00, $00, $FF, $FF) // EVENT_EMERGENCY_STOP ); {$ENDIF} // Set the number of Events that are Produced by this Node, if none then remove the SUPPORT_AT_LEAST_ONE_PRODUCED_EVENT // conditional define from the Options.inc file {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_PRODUCED_EVENT} const USER_MAX_VNODE_SUPPORTED_EVENTS_PRODUCED = 2; {$ELSE} const USER_MAX_VNODE_SUPPORTED_EVENTS_PRODUCED = 0; {$ENDIF} // Dynamic events are events whos IDs are not known at compile time. When enabled // the library will callback on the AppCallback_DynamicEvent_Produced with and index from // 0 to USER_MAX_SUPPORTED_DYNAMIC_EVENTS_PRODUCED - 1. const USER_MAX_VNODE_SUPPORTED_DYNAMIC_EVENTS_PRODUCED = 0; // Define the UIDs of Events that are Produced by this Node {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_PRODUCED_EVENT} const USER_VNODE_SUPPORTED_EVENTS_PRODUCED: array[0..USER_MAX_VNODE_SUPPORTED_EVENTS_PRODUCED-1] of TEventID = ( ($01, $01, $00, $00, $00, $00, $FF, $FF), // EVENT_EMERGENCY_STOP ($01, $01, $00, $00, $00, $00, $03, $03) // IsTrain ); {$ENDIF} // Set Protocols that the node(s) will support and return in the Protocol Identification Protcol const USER_PIV_VNODE_SUPPORTED_PROTOCOL_COUNT = 10; // UPDATE THIS IF ADDING OR SUBTRACTING SUPPORTED PROTOCOLS USER_PIV_VNODE_SUPPORTED_PROTOCOLS: array[0..USER_PIV_VNODE_SUPPORTED_PROTOCOL_COUNT-1] of TPIVProtocolValueArray = ( // Look at the PIV_xxxx constants for more Protocols ($80, $00, $00, $00, $00, $00), // Protocol ($40, $00, $00, $00, $00, $00), // Datagram Protocol ($04, $00, $00, $00, $00, $00), // Producer Consumer Protocol ($10, $00, $00, $00, $00, $00), // Memory Configruation Protocol ($00, $08, $00, $00, $00, $00), // CDI Protocol ($00, $10, $00, $00, $00, $00), // SNIP Protocol ($00, $40, $00, $00, $00, $00), // ACDI Protocol ($00, $04, $00, $00, $00, $00), // Traction Protocol ($00, $02, $00, $00, $00, $00), // FDI Protocol ($00, $00, $80, $00, $00, $00) // STNIP Protocol ); // Set options and configurations of the Configuration Memory Protocol. Most depend on the // capabilities of the device/EEPROM/Flash being used and what the application wants to support const USER_VNODE_CONFIGMEM_OPTIONS = MCO_UNALIGNED_READS or MCO_ACDI_MFG_READS or MCO_ACDI_USER_READS or MCO_ACDI_USER_WRITES or MCO_UNALIGNED_WRITES; // The commands that are avialable to the system, see the MCO_xxx constants USER_VNODE_CONFIGMEM_WRITE_LENGTH = MCWL_ONE_BYTE or MCWL_TWO_BYTE or MCWL_FOUR_BYTE or MCWL_64_BYTE or MCWL_ARBITRARY_BYTE; // The length of writes supported by the EEPROM, see the MCWL_xxx constants USER_VNODE_CONFIGMEM_HIGHEST_SPACE = MSI_CDI; // Highest space, see MSI_xxx constants USER_VNODE_CONFIGMEM_LOWEST_SPACE = MSI_FDI; // Lowest space, see MSI_xxx constants // ************************************************************************************************************************************************************** // ACDI Manufacturer Memory ($FC) Space Implementation // ************************************************************************************************************************************************************** const USER_VNODE_MAX_ACDI_MFG_ARRAY = 27; USER_VNODE_ACDI_MFG_STRINGS: array[0..USER_VNODE_MAX_ACDI_MFG_ARRAY - 1] of byte = ( $01, // Version ID $4D,$75,$73,$74,$61,$6E,$67,$70,$65,$61,$6B,$00, // Mustangpeak $56,$4E,$31,$30,$30,$00, // VN100 $31,$2E,$30,$00, // 1.0 $31,$2E,$30,$00 // 1.0 ); // ************************************************************************************************************************************************************** // ACDI User Memory ($FB) Space Implementation // Defines the Configuration Memory size and offsets into the configuration memory // where the user definable string is found. There are 2 user definable strings: // User Name: // User Description: // The spec defines a version number which is 1 byte so a datagram can carry // the version number + the Name Data (63 bytes) in the example. The example // uses an offset of 0 into the memory for the Name as well. The Description // will fill the next datagram (64 Bytes) and the offset is 63 since it will // occupy the memory immediately following the Name in this example. This // all can be overridden in the template_configuration.mpas file // ************************************************************************************************************************************************************** const USER_MAX_VNODE_ACDI_USER_NAME_CONFIG_DATA_OFFSET = 0; USER_MAX_VNODE_ACDI_USER_NAME_CONFIG_DATA = 63; // This MUST MATCH the value defined in the CDI segment for $FB USER_MAX_VNODE_ACDI_USER_DESC_CONFIG_DATA = 64; // This MUST MATCH the value defined in the CDI segment for $FB // ************************************************************************************************************************************************************** // CDI Memory ($FF) Space Implementation // ************************************************************************************************************************************************************** const USER_MAX_VNODE_CDI_ARRAY = 3570; USER_CDI_VNODE_ARRAY: array[0..USER_MAX_VNODE_CDI_ARRAY-1] of byte = ( $3C, $3F, $78, $6D, $6C, $20, $76, $65, $72, $73, $69, $6F, $6E, $3D, $22, $31, $2E, $30, $22, $20, $65, $6E, $63, $6F, $64, $69, $6E, $67, $3D, $22, $55, $54, $46, $2D, $38, $22, $3F, $3E, // $3C, $3F, $78, $6D, $6C, $2D, $73, $74, $79, $6C, $65, $73, $68, $65, $65, $74, $20, $74, $79, $70, $65, $3D, $22, $74, $65, $78, $74, $2F, $78, $73, $6C, $22, $20, $68, $72, $65, $66, $3D, $22, $68, $74, $74, $70, $3A, $2F, $2F, $6F, $70, $65, $6E, $6C, $63, $62, $2E, $6F, $72, $67, $2F, $74, $72, $75, $6E, $6B, $2F, $70, $72, $6F, $74, $6F, $74, $79, $70, $65, $73, $2F, $78, $6D, $6C, $2F, $78, $73, $6C, $74, $2F, $63, $64, $69, $2E, $78, $73, $6C, $22, $3F, $3E, // $3C, $63, $64, $69, $20, $78, $6D, $6C, $6E, $73, $3A, $78, $73, $69, $3D, $22, $68, $74, $74, $70, $3A, $2F, $2F, $77, $77, $77, $2E, $77, $33, $2E, $6F, $72, $67, $2F, $32, $30, $30, $31, $2F, $58, $4D, $4C, $53, $63, $68, $65, $6D, $61, $2D, $69, $6E, $73, $74, $61, $6E, $63, $65, $22, $20, $78, $73, $69, $3A, $6E, $6F, $4E, $61, $6D, $65, $73, $70, $61, $63, $65, $53, $63, $68, $65, $6D, $61, $4C, $6F, $63, $61, $74, $69, $6F, $6E, $3D, $22, $68, $74, $74, $70, $3A, $2F, $2F, $6F, $70, $65, $6E, $6C, $63, $62, $2E, $6F, $72, $67, $2F, $74, $72, $75, $6E, $6B, $2F, $73, $70, $65, $63, $73, $2F, $73, $63, $68, $65, $6D, $61, $2F, $63, $64, $69, $2E, $78, $73, $64, $22, $3E, // $3C, $69, $64, $65, $6E, $74, $69, $66, $69, $63, $61, $74, $69, $6F, $6E, $3E, // $3C, $6D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $3E, $4D, $75, $73, $74, $61, $6E, $67, $70, $65, $61, $6B, $3C, $2F, $6D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $3E, // Mustangpeak $3C, $6D, $6F, $64, $65, $6C, $3E, $44, $4E, $31, $30, $30, $3C, $2F, $6D, $6F, $64, $65, $6C, $3E, // DN100 $3C, $68, $61, $72, $64, $77, $61, $72, $65, $56, $65, $72, $73, $69, $6F, $6E, $3E, $31, $2E, $30, $3C, $2F, $68, $61, $72, $64, $77, $61, $72, $65, $56, $65, $72, $73, $69, $6F, $6E, $3E, // 1.0 $3C, $73, $6F, $66, $74, $77, $61, $72, $65, $56, $65, $72, $73, $69, $6F, $6E, $3E, $31, $2E, $30, $3C, $2F, $73, $6F, $66, $74, $77, $61, $72, $65, $56, $65, $72, $73, $69, $6F, $6E, $3E, // 1.0 $3C, $6D, $61, $70, $3E, // $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $44, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // Description $3C, $76, $61, $6C, $75, $65, $3E, $4D, $75, $73, $74, $61, $6E, $67, $70, $65, $61, $6B, $20, $44, $61, $74, $61, $62, $61, $73, $65, $20, $54, $72, $61, $69, $6E, $20, $4E, $6F, $64, $65, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // Mustangpeak Database Train Node $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $53, $74, $61, $74, $75, $73, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // Status $3C, $76, $61, $6C, $75, $65, $3E, $50, $72, $6F, $74, $6F, $74, $79, $70, $65, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // Prototype $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $2F, $6D, $61, $70, $3E, // $3C, $2F, $69, $64, $65, $6E, $74, $69, $66, $69, $63, $61, $74, $69, $6F, $6E, $3E, // $3C, $61, $63, $64, $69, $20, $66, $69, $78, $65, $64, $3D, $22, $31, $22, $20, $76, $61, $72, $3D, $22, $31, $22, $2F, $3E, // $3C, $73, $65, $67, $6D, $65, $6E, $74, $20, $6F, $72, $69, $67, $69, $6E, $3D, $22, $30, $22, $20, $73, $70, $61, $63, $65, $3D, $22, $32, $35, $33, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $43, $75, $73, $74, $6F, $6D, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Custom Information $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $55, $73, $65, $20, $74, $68, $65, $73, $65, $20, $66, $69, $65, $6C, $64, $73, $20, $66, $6F, $72, $20, $61, $6E, $79, $20, $75, $73, $65, $72, $20, $64, $61, $74, $61, $20, $79, $6F, $75, $20, $64, $65, $73, $69, $72, $65, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Use these fields for any user data you desire $3C, $67, $72, $6F, $75, $70, $20, $6F, $66, $66, $73, $65, $74, $3D, $22, $31, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $44, $61, $74, $61, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Data $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $41, $64, $64, $20, $79, $6F, $75, $72, $20, $6F, $77, $6E, $20, $75, $6E, $69, $71, $75, $65, $20, $6E, $6F, $64, $65, $20, $69, $6E, $66, $6F, $20, $68, $65, $72, $65, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Add your own unique node info here $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $36, $33, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $4E, $61, $6D, $65, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Name $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $36, $34, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $44, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Description $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $2F, $73, $65, $67, $6D, $65, $6E, $74, $3E, // $3C, $73, $65, $67, $6D, $65, $6E, $74, $20, $6F, $72, $69, $67, $69, $6E, $3D, $22, $31, $32, $38, $22, $20, $73, $70, $61, $63, $65, $3D, $22, $32, $35, $33, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $44, $61, $74, $61, $62, $61, $73, $65, $20, $54, $72, $61, $69, $6E, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Database Train Information $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $55, $73, $65, $72, $20, $64, $65, $66, $69, $6E, $61, $62, $6C, $65, $20, $69, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $20, $74, $6F, $20, $75, $6E, $69, $71, $75, $65, $6C, $79, $20, $69, $64, $65, $6E, $74, $69, $66, $79, $20, $74, $68, $69, $73, $20, $54, $72, $61, $69, $6E, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // User definable information to uniquely identify this Train $3C, $67, $72, $6F, $75, $70, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4C, $6F, $63, $6F, $6D, $6F, $74, $69, $76, $65, $20, $53, $70, $65, $63, $69, $66, $69, $63, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Locomotive Specific Information $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $33, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $52, $6F, $61, $64, $20, $4E, $61, $6D, $65, $3C, $2F, $6E, $61, $6D, $65, $3E, // Road Name $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $33, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4C, $6F, $63, $6F, $20, $43, $6C, $61, $73, $73, $3C, $2F, $6E, $61, $6D, $65, $3E, // Loco Class $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $33, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $52, $6F, $61, $64, $20, $4E, $75, $6D, $62, $65, $72, $3C, $2F, $6E, $61, $6D, $65, $3E, // Road Number $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $33, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $54, $72, $61, $69, $6E, $20, $4E, $61, $6D, $65, $3C, $2F, $6E, $61, $6D, $65, $3E, // Train Name $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $67, $72, $6F, $75, $70, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4D, $6F, $64, $65, $6C, $20, $53, $70, $65, $63, $69, $66, $69, $63, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Model Specific Information $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $45, $6E, $74, $65, $72, $20, $74, $68, $65, $20, $75, $73, $65, $72, $20, $69, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $20, $74, $6F, $20, $64, $65, $73, $63, $72, $69, $62, $65, $20, $74, $68, $69, $73, $20, $6D, $6F, $64, $65, $6C, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Enter the user information to describe this model $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $33, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $3C, $2F, $6E, $61, $6D, $65, $3E, // Manufacturer $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $33, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4F, $77, $6E, $65, $72, $3C, $2F, $6E, $61, $6D, $65, $3E, // Owner $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $67, $72, $6F, $75, $70, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4E, $4D, $52, $41, $20, $44, $43, $43, $20, $53, $70, $65, $63, $69, $66, $69, $63, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // NMRA DCC Specific Information $3C, $69, $6E, $74, $20, $73, $69, $7A, $65, $3D, $22, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4E, $4D, $52, $41, $20, $44, $43, $43, $20, $41, $64, $64, $72, $65, $73, $73, $3C, $2F, $6E, $61, $6D, $65, $3E, // NMRA DCC Address $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $45, $6E, $74, $65, $72, $20, $74, $68, $65, $20, $4E, $4D, $52, $41, $20, $44, $43, $43, $20, $61, $64, $64, $72, $65, $73, $73, $20, $66, $6F, $72, $20, $74, $68, $65, $20, $54, $72, $61, $69, $6E, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Enter the NMRA DCC address for the Train $3C, $2F, $69, $6E, $74, $3E, // $3C, $69, $6E, $74, $20, $73, $69, $7A, $65, $3D, $22, $31, $22, $3E, // $3C, $6D, $61, $70, $3E, // $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $53, $65, $6C, $65, $63, $74, $20, $74, $68, $65, $20, $4E, $4D, $52, $41, $20, $44, $43, $43, $20, $61, $64, $64, $72, $65, $73, $73, $20, $74, $79, $70, $65, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Select the NMRA DCC address type $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $30, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // 0 $3C, $76, $61, $6C, $75, $65, $3E, $53, $68, $6F, $72, $74, $20, $41, $64, $64, $72, $65, $73, $73, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // Short Address $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $31, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // 1 $3C, $76, $61, $6C, $75, $65, $3E, $4C, $6F, $6E, $67, $20, $41, $64, $64, $72, $65, $73, $73, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // Long Address $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $2F, $6D, $61, $70, $3E, // $3C, $2F, $69, $6E, $74, $3E, // $3C, $69, $6E, $74, $20, $73, $69, $7A, $65, $3D, $22, $31, $22, $3E, // $3C, $6D, $61, $70, $3E, // $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $53, $65, $6C, $65, $63, $74, $20, $74, $68, $65, $20, $4E, $4D, $52, $41, $20, $44, $43, $43, $20, $53, $70, $65, $65, $64, $20, $53, $74, $65, $70, $73, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Select the NMRA DCC Speed Steps $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $31, $34, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // 14 $3C, $76, $61, $6C, $75, $65, $3E, $31, $34, $20, $53, $74, $65, $70, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // 14 Step $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $32, $38, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // 28 $3C, $76, $61, $6C, $75, $65, $3E, $32, $38, $20, $53, $74, $65, $70, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // 28 Step $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, $31, $32, $38, $3C, $2F, $70, $72, $6F, $70, $65, $72, $74, $79, $3E, // 128 $3C, $76, $61, $6C, $75, $65, $3E, $31, $32, $38, $20, $53, $74, $65, $70, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // 128 Step $3C, $2F, $72, $65, $6C, $61, $74, $69, $6F, $6E, $3E, // $3C, $2F, $6D, $61, $70, $3E, // $3C, $2F, $69, $6E, $74, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $67, $72, $6F, $75, $70, $3E, // $3C, $6E, $61, $6D, $65, $3E, $46, $75, $6E, $63, $74, $69, $6F, $6E, $20, $61, $6E, $64, $20, $44, $65, $63, $6F, $64, $65, $72, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $20, $41, $73, $73, $69, $67, $6E, $6D, $65, $6E, $74, $73, $3C, $2F, $6E, $61, $6D, $65, $3E, // Function and Decoder Information Assignments $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $55, $52, $4C, $73, $20, $74, $68, $61, $74, $20, $70, $6F, $69, $6E, $74, $20, $74, $6F, $20, $74, $68, $65, $20, $46, $75, $6E, $63, $74, $69, $6F, $6E, $20, $44, $65, $66, $69, $6E, $69, $74, $69, $6F, $6E, $20, $46, $69, $6C, $65, $20, $28, $46, $44, $49, $29, $20, $61, $6E, $64, $20, $54, $72, $61, $69, $6E, $20, $44, $65, $66, $69, $6E, $69, $74, $69, $6F, $6E, $20, $46, $69, $6C, $65, $20, $28, $54, $44, $49, $29, $20, $75, $73, $65, $64, $20, $62, $79, $20, $74, $68, $69, $73, $20, $54, $72, $61, $69, $6E, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // URLs that point to the Function Definition File (FDI) and Train Definition File (TDI) used by this Train $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $35, $31, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $46, $44, $49, $3C, $2F, $6E, $61, $6D, $65, $3E, // FDI $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $45, $6E, $74, $65, $72, $20, $74, $68, $65, $20, $55, $52, $4C, $20, $74, $6F, $20, $74, $68, $65, $20, $46, $75, $6E, $63, $74, $69, $6F, $6E, $20, $44, $65, $66, $69, $6E, $69, $74, $69, $6F, $6E, $20, $52, $65, $73, $6F, $75, $72, $63, $65, $20, $66, $6F, $72, $20, $74, $68, $69, $73, $20, $54, $72, $61, $69, $6E, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Enter the URL to the Function Definition Resource for this Train $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $35, $31, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $54, $44, $49, $3C, $2F, $6E, $61, $6D, $65, $3E, // TDI $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $45, $6E, $74, $65, $72, $20, $74, $68, $65, $20, $55, $52, $4C, $20, $74, $6F, $20, $74, $68, $65, $20, $54, $72, $61, $69, $6E, $20, $44, $65, $66, $69, $6E, $69, $74, $69, $6F, $6E, $20, $52, $65, $73, $6F, $75, $72, $63, $65, $20, $66, $6F, $72, $20, $74, $68, $65, $20, $54, $72, $61, $69, $6E, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Enter the URL to the Train Definition Resource for the Train $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $2F, $73, $65, $67, $6D, $65, $6E, $74, $3E, // $3C, $73, $65, $67, $6D, $65, $6E, $74, $20, $6F, $72, $69, $67, $69, $6E, $3D, $22, $30, $22, $20, $73, $70, $61, $63, $65, $3D, $22, $32, $35, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $2F, $3E, // $3C, $67, $72, $6F, $75, $70, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $20, $49, $6E, $66, $6F, $72, $6D, $61, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Manufacturer Information $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $4D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $2D, $70, $72, $6F, $76, $69, $64, $65, $64, $20, $66, $69, $78, $65, $64, $20, $6E, $6F, $64, $65, $20, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Manufacturer-provided fixed node description $3C, $69, $6E, $74, $20, $73, $69, $7A, $65, $3D, $22, $31, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $56, $65, $72, $73, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Version $3C, $2F, $69, $6E, $74, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $31, $32, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $20, $4E, $61, $6D, $65, $3C, $2F, $6E, $61, $6D, $65, $3E, // Manufacturer Name $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $36, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $4D, $61, $6E, $75, $66, $61, $63, $74, $75, $72, $65, $72, $20, $49, $6E, $66, $6F, $3C, $2F, $6E, $61, $6D, $65, $3E, // Manufacturer Info $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $34, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $48, $61, $72, $64, $77, $61, $72, $65, $20, $56, $65, $72, $73, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Hardware Version $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $34, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $53, $6F, $66, $74, $77, $61, $72, $65, $20, $56, $65, $72, $73, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Software Version $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $2F, $73, $65, $67, $6D, $65, $6E, $74, $3E, // $3C, $73, $65, $67, $6D, $65, $6E, $74, $20, $6F, $72, $69, $67, $69, $6E, $3D, $22, $30, $22, $20, $73, $70, $61, $63, $65, $3D, $22, $32, $35, $31, $22, $3E, // $3C, $6E, $61, $6D, $65, $2F, $3E, // $3C, $67, $72, $6F, $75, $70, $20, $6F, $66, $66, $73, $65, $74, $3D, $22, $30, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $44, $61, $74, $61, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Data $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $41, $64, $64, $20, $79, $6F, $75, $72, $20, $6F, $77, $6E, $20, $75, $6E, $69, $71, $75, $65, $20, $6E, $6F, $64, $65, $20, $69, $6E, $66, $6F, $20, $68, $65, $72, $65, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Add your own unique node info here $3C, $69, $6E, $74, $20, $73, $69, $7A, $65, $3D, $22, $31, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $56, $65, $72, $73, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // Version $3C, $2F, $69, $6E, $74, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $36, $33, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $4E, $61, $6D, $65, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Name $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $73, $74, $72, $69, $6E, $67, $20, $73, $69, $7A, $65, $3D, $22, $36, $34, $22, $3E, // $3C, $6E, $61, $6D, $65, $3E, $55, $73, $65, $72, $20, $44, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3C, $2F, $6E, $61, $6D, $65, $3E, // User Description $3C, $2F, $73, $74, $72, $69, $6E, $67, $3E, // $3C, $2F, $67, $72, $6F, $75, $70, $3E, // $3C, $2F, $73, $65, $67, $6D, $65, $6E, $74, $3E, // $3C, $2F, $63, $64, $69, $3E, $00 // ); // ************************************************************************************************************************************************************** // Size of Configuration Memory block, // This may need to be a multiple of some 2^n number depending on what the // harware implementation of the Configuration Memory is. This allows the library // to linearly line up the configruation memory block for multiple nodes, i.e. // defines the offsets to the start of the configuration memory for the next // virtual node // xxxxxxxxxxxxxxxxxxxx|yyyyyyyyy|yyyyyyyyy|yyyyyyyyy|yyyyyyyyy| // | Physical Node | VNode 1 | Vnode 2 | Vnode 3 | Vnode 4 | // | USER_NODE_SIZE | USER_VNODE_SIZE * 4 | // ************************************************************************************************************************************************************** const USER_VNODE_CONFIGURATION_MEMORY_SIZE = 2048; implementation end.