Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
SimpleNodeInfoResponse.cxx
Go to the documentation of this file.
1
36
37namespace openlcb
38{
39
40const SimpleInfoDescriptor SNIPHandler::SNIP_RESPONSE[] =
41{
42 {SimpleInfoDescriptor::LITERAL_BYTE, 4, 0, nullptr},
43 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.manufacturer_name},
44 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.model_name},
45 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.hardware_version},
46 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.software_version},
47#if OPENMRN_HAVE_POSIX_FD
48 {SimpleInfoDescriptor::FILE_LITERAL_BYTE, 2, 0, SNIP_DYNAMIC_FILENAME},
49 {SimpleInfoDescriptor::FILE_C_STRING, 63, 1, SNIP_DYNAMIC_FILENAME},
50 {SimpleInfoDescriptor::FILE_C_STRING, 64, 64, SNIP_DYNAMIC_FILENAME},
51#else
53 {SimpleInfoDescriptor::LITERAL_BYTE, 2, 0, nullptr},
54 {SimpleInfoDescriptor::LITERAL_BYTE, 0, 0, nullptr},
55 {SimpleInfoDescriptor::LITERAL_BYTE, 0, 0, nullptr},
56#endif
57 {SimpleInfoDescriptor::END_OF_DATA, 0, 0, 0}
58};
59
60const SimpleInfoDescriptor SNIPHandler::SNIP_STATIC_RESPONSE[] =
61{
62 {SimpleInfoDescriptor::LITERAL_BYTE, 4, 0, nullptr},
63 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.manufacturer_name},
64 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.model_name},
65 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.hardware_version},
66 {SimpleInfoDescriptor::C_STRING, 0, 0, SNIP_STATIC_DATA.software_version},
67 {SimpleInfoDescriptor::LITERAL_BYTE, 2, 0, nullptr},
68 {SimpleInfoDescriptor::LITERAL_BYTE, 0, 0, nullptr},
69 {SimpleInfoDescriptor::LITERAL_BYTE, 0, 0, nullptr},
70 {SimpleInfoDescriptor::END_OF_DATA, 0, 0, 0}
71};
72
73}
74
static const SimpleInfoDescriptor SNIP_RESPONSE[]
Defines the SNIP response fields.
static const SimpleInfoDescriptor SNIP_STATIC_RESPONSE[]
Defines the SNIP response fields without dynamic file.
const SimpleNodeStaticValues SNIP_STATIC_DATA
This static data will be exported as the first block of SNIP.
const char *const SNIP_DYNAMIC_FILENAME
The SNIP dynamic data will be read from this file.