unit NMRAnetAppDefines; // ****************************************************************************** // // * Copyright: // (c) Mustangpeak Software 2012. // // The contents of this file are subject to the GNU GPL v3 licence/ you maynot use // this file except in compliance with the License. You may obtain a copy of the // License at http://www.gnu.org/licenses/gpl.html // // * Revision History: // 2012-02-01: Created // // * Description: // Implements program specific information such as Consumer/Producer EventIDs, // Buffer allocation sizes, CDI and ACDI Information, Protocol Support IDs, vNode // counts, etc. // // AppDefines for the Mustangpeak Xpressent Adapter // // ****************************************************************************** uses NMRAnetDefinesShared; {$I Options.inc} const MAX_NODE_COUNT = 66; // The number of Physical and vNodes this physical node support. Note that these nodes are defined as the Node ID defined + 1 up to VIRTUAL_NODE_COUNT past that // If the lower bits of this node are $0300 then the first Virtual Node is $0301 and the last is $0309 if the VIRTUAL_NODE_COUNT = 9 // It also MUST fall within the lower 3 byte boundry (this is due to the way I have defined HI/LO as 3 byte) so the max virtual nodes is 4095 with a base // physical node starting at $0000; // ************************************************************************************************************************************************************** // Buffer Pool Allocation // ************************************************************************************************************************************************************** const MAX_BASE_BUFFER_POOL = 2*MAX_NODE_COUNT; // Number of Base Buffers to allocate for Messages , JMRI Interleaves all the nodes so we need a Buffer for every Node <;^( MAX_DATAGRAM_BUFFER_POOL = 10; // Number of Datagram Buffers to allocate for Messages MAX_CONFIG_MEM_BUFFER_POOL = 2; // Number of Configuration Memory Access buffers to allocate MAX_DATA_BUFFER_POOL = 10; // Number of Buffers that require the 8 CAN bytes to be passed to the main state machine for processing // ************************************************************************************************************************************************************** // Memory Configuration Protocol Supported Options // ************************************************************************************************************************************************************** const MEMORY_CONFIG_OPTIONS: TMemConfigurationOptions = ( MCO_UNALIGNED_READS or MCO_ACDI_MFG_READS or MCO_ACDI_USER_READS or MCO_ACDI_USER_WRITES or MCO_UNALIGNED_WRITES, // MemoryConfigOptions MCWL_ARBITRARY_BYTE, // MemoryConfigWriteLength MSI_CDI, // MemoryConfigHighestSpace MSI_ACDI_USER // MemoryConfigLowestSpace ); const MEMORY_CONFIG_OPTIONS_VNODE: TMemConfigurationOptions = ( MCO_UNALIGNED_READS or MCO_ACDI_MFG_READS or MCO_ACDI_USER_READS or MCO_ACDI_USER_WRITES or MCO_UNALIGNED_WRITES, // MemoryConfigOptions MCWL_ARBITRARY_BYTE, // MemoryConfigWriteLength MSI_CDI, // MemoryConfigHighestSpace MSI_ACDI_USER // MemoryConfigLowestSpace ); // ************************************************************************************************************************************************************** // CDI Memory ($FF) Space Implementation // ************************************************************************************************************************************************************** const MAX_CDI_ARRAY = 1724; CDI_ARRAY: array[0..MAX_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, $75, $74, $66, $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, $27, $74, $65, $78, $74, $2F, $78, $73, $6C, $27, $20, $68, $72, $65, $66, $3D, $27, $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, $27, $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, $70, $72, $6F, $74, $6F, $74, $79, $70, $65, $73, $2F, $78, $6D, $6C, $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, $4E, $41, $31, $30, $30, $3C, $2F, $6D, $6F, $64, $65, $6C, $3E, // NA100 $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, $30, $2E, $32, $3C, $2F, $73, $6F, $66, $74, $77, $61, $72, $65, $56, $65, $72, $73, $69, $6F, $6E, $3E, // 0.2 $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, $4E, $43, $45, $20, $41, $64, $61, $70, $74, $65, $72, $20, $4E, $6F, $64, $65, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // Mustangpeak NCE Adapter 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, $20, $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, $4F, $70, $74, $69, $6F, $6E, $73, $3C, $2F, $6E, $61, $6D, $65, $3E, // Options $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $4F, $70, $74, $69, $6F, $6E, $73, $20, $66, $6F, $72, $20, $74, $68, $65, $20, $4E, $43, $45, $20, $74, $6F, $20, $4F, $70, $65, $6E, $4C, $43, $42, $20, $41, $64, $61, $70, $74, $65, $72, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Options for the NCE to OpenLCB Adapter $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, $30, $22, $20, $73, $70, $61, $63, $65, $3D, $22, $32, $35, $32, $22, $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, $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 // ); const MAX_CDI_ARRAY_VNODE = 1708; CDI_ARRAY_VNODE: array[0..MAX_CDI_ARRAY_VNODE-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, $75, $74, $66, $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, $27, $74, $65, $78, $74, $2F, $78, $73, $6C, $27, $20, $68, $72, $65, $66, $3D, $27, $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, $27, $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, $70, $72, $6F, $74, $6F, $74, $79, $70, $65, $73, $2F, $78, $6D, $6C, $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, $4E, $44, $31, $30, $30, $3C, $2F, $6D, $6F, $64, $65, $6C, $3E, // ND100 $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, $30, $2E, $32, $3C, $2F, $73, $6F, $66, $74, $77, $61, $72, $65, $56, $65, $72, $73, $69, $6F, $6E, $3E, // 0.2 $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, $4E, $43, $45, $20, $44, $65, $76, $69, $63, $65, $20, $4E, $6F, $64, $65, $3C, $2F, $76, $61, $6C, $75, $65, $3E, // Mustangpeak NCE Device 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, $20, $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, $4F, $70, $74, $69, $6F, $6E, $73, $3C, $2F, $6E, $61, $6D, $65, $3E, // Options $3C, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, $4F, $70, $74, $69, $6F, $6E, $73, $20, $66, $6F, $72, $20, $74, $68, $65, $20, $4E, $43, $45, $20, $43, $61, $62, $3C, $2F, $64, $65, $73, $63, $72, $69, $70, $74, $69, $6F, $6E, $3E, // Options for the NCE Cab $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, $30, $22, $20, $73, $70, $61, $63, $65, $3D, $22, $32, $35, $32, $22, $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, $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 // ); // ************************************************************************************************************************************************************** // All Memory ($FE) Implementation // ************************************************************************************************************************************************************** type TAllMap = record LowMem, HighMem: Word; end; const ALL_MAP: TAllMap = ( $0000, // Lowest Address in the MCU memory the Memory Confguration Protocol can access (NOT USED TODAY, REPLY ASSUMES $00 IS THE LOWEST ADDRESS) $7FFF // Highest Address in the MCU memory the Memory Confguration Protocol can access ); // ************************************************************************************************************************************************************** // Configuration Memory ($FD) Implementation // ************************************************************************************************************************************************************** const MAX_USER_NAME = 63; MAX_USER_DESC = 64; const MAX_USER_CONFIG_DATA = MAX_USER_NAME + MAX_USER_DESC; // ************************************************************************************************************************************************************** // ACDI Mfg Memory ($FC) Implementation // ************************************************************************************************************************************************************** const ACDI_MFG_VERSION = 1; const MAX_ACDI_MFG_ARRAY = 26; ACDI_MFG_STRINGS: array[0..MAX_ACDI_MFG_ARRAY - 1] of byte = ( $4D,$75,$73,$74,$61,$6E,$67,$70,$65,$61,$6B,$00, // Mustangpeak $4E,$41,$31,$30,$30,$00, // NA100 $30,$2E,$31,$00, // 0.1 $30,$2E,$32,$00 // 0.2 ); const MAX_ACDI_MFG_ARRAY_VNODE = 26; ACDI_MFG_STRINGS_VNODE: array[0..MAX_ACDI_MFG_ARRAY_VNODE - 1] of byte = ( $4D,$75,$73,$74,$61,$6E,$67,$70,$65,$61,$6B,$00, // Mustangpeak $4E,$44,$31,$30,$30,$00, // ND100 $31,$2E,$30,$00, // 1.0 $30,$2E,$32,$00 // 0.2 ); // ************************************************************************************************************************************************************** // ACDI User Memory ($FB) Implementation // // See the Config Data area // ************************************************************************************************************************************************************** const ACDI_USER_VERSION = 1; // ************************************************************************************************************************************************************** // Protocol Identification Protocol (PIP) // ************************************************************************************************************************************************************** PIV_SUPPORTED_PROTOCOL_COUNT = 7; // UPDATE THIS IF ADDING OR SUBTRACTING SUPPORTED PROTOCOLS PIV_SUPPORTED_PROTOCOLS: array[0..PIV_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 ); PIV_VNODE_SUPPORTED_PROTOCOL_COUNT = 8; // UPDATE THIS IF ADDING OR SUBTRACTING SUPPORTED PROTOCOLS PIV_VNODE_SUPPORTED_PROTOCOLS: array[0..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 ); // ************************************************************************************************************************************************************** // Events Flags for Physical AND Virtual Nodes (consumed and produced) // ************************************************************************************************************************************************************** MAX_EVENTS_CONSUMED_BIT_BYTES = 1; // Set to the number of BYTES required to hold the max number of Events Consumed between Physical and Virtual MAX_EVENTS_PRODUCED_BIT_BYTES = 1; // Set to the number of BYTES required to hold the max number of Events Produced between Physical and Virtual MAX_PCER_BIT_BYTES = 1; // Set to the number of BYTES required to hold the max number of PCERs of Physical/Virtual Events Produced (1 bit per Produced Event, signals that the indexed Event needs a PCER set for it) // ************************************************************************************************************************************************************** // Events for Physical Node (consumed and produced) // ************************************************************************************************************************************************************** // Set the number of Events that are Consumed and Produced by this Node {$IFDEF SUPPORT_AT_LEAST_ONE_CONSUMED_EVENT}MAX_SUPPORTED_EVENTS_CONSUMED = 1;{$ELSE}MAX_SUPPORTED_EVENTS_CONSUMED = 0;{$ENDIF} {$IFDEF SUPPORT_AT_LEAST_ONE_PRODUCED_EVENT}MAX_SUPPORTED_EVENTS_PRODUCED = 3;{$ELSE}MAX_SUPPORTED_EVENTS_PRODUCED = 0;{$ENDIF} // Defined the Values of the Events that are Consumed and Produced by this Node {$IFDEF SUPPORT_AT_LEAST_ONE_CONSUMED_EVENT} SUPPORTED_EVENTS_CONSUMED: array[0..MAX_SUPPORTED_EVENTS_CONSUMED-1] of TEventID = ( ($01, $01, $00, $00, $00, $00, $FF, $FF) // EVENT_EMERGENCY_STOP ); {$ENDIF} {$IFDEF SUPPORT_AT_LEAST_ONE_PRODUCED_EVENT} SUPPORTED_EVENTS_PRODUCED: array[0..MAX_SUPPORTED_EVENTS_PRODUCED-1] of TEventID = ( ($01, $10, $00, $00, $00, $00, $01, $00), // EVENT_LC_DISTRICT_NODE ($01, $10, $00, $00, $00, $00, $01, $01), // EVENT_LC_PROGRAMMING_NODE ($01, $10, $00, $00, $00, $00, $FF, $FF) // EVENT_EMERGENCY_STOP ); {$ENDIF} // ************************************************************************************************************************************************************** // Events for Virtual Nodes (consumed and produced) // ************************************************************************************************************************************************************** // Set the number of Events that are Consumed and Produced by this Node {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_CONSUMED_EVENT}MAX_VNODE_SUPPORTED_EVENTS_CONSUMED = 1;{$ELSE}MAX_VNODE_SUPPORTED_EVENTS_CONSUMED = 0;{$ENDIF} {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_PRODUCED_EVENT}MAX_VNODE_SUPPORTED_EVENTS_PRODUCED = 2;{$ELSE}MAX_VNODE_SUPPORTED_EVENTS_PRODUCED = 0;{$ENDIF} // Defined the Values of the Events that are Consumed and Produced by this Node {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_CONSUMED_EVENT} SUPPORTED_VNODE_EVENTS_CONSUMED: array[0..MAX_VNODE_SUPPORTED_EVENTS_CONSUMED-1] of TEventID = ( ); {$ENDIF} {$IFDEF SUPPORT_AT_LEAST_ONE_VNODE_PRODUCED_EVENT} SUPPORTED_VNODE_EVENTS_PRODUCED: array[0..MAX_VNODE_SUPPORTED_EVENTS_PRODUCED-1] of TEventID = ( ); {$ENDIF} implementation end.