|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Namespaces | |
| namespace | openlcb |
Functions | |
| string | openlcb::node_id_to_buffer (NodeID id) |
| Convenience function to render a 48-bit NMRAnet node ID into a new buffer. | |
| void | openlcb::node_id_to_data (NodeID id, void *data) |
| Convenience function to render a 48-bit NMRAnet node ID into an existing buffer. | |
| NodeID | openlcb::data_to_node_id (const void *d) |
| Converts 6 bytes of big-endian data to a node ID. | |
| NodeID | openlcb::buffer_to_node_id (const string &buf) |
| Converts a 6-byte-long buffer to a node ID. | |
| Payload | openlcb::eventid_to_buffer (uint64_t eventid) |
| Converts an Event ID to a Payload suitable to be sent as an event report. | |
| void | openlcb::error_to_data (uint16_t error_code, void *data) |
| Writes an error code into a payload object at a given pointer. | |
| uint16_t | openlcb::data_to_error (const void *data) |
| Parses an error code from a payload object at a given pointer. | |
| string | openlcb::error_to_buffer (uint16_t error_code, uint16_t mti) |
| Formats a payload for response of error response messages such as OPtioanl Interaction Rejected or Terminate Due To Error. | |
| string | openlcb::error_to_buffer (uint16_t error_code) |
| Formats a payload for response of error response messages such as Datagram Rejected. | |
| void | openlcb::append_error_to_buffer (uint16_t error_code, Payload *p) |
| Appends an error to the end of an existing buffer. | |
| void | openlcb::buffer_to_error (const Payload &payload, uint16_t *error_code, uint16_t *mti, string *error_message) |
| Parses the payload of an Optional Interaction Rejected or Terminate Due To Error message. | |
| Payload | openlcb::error_payload (uint16_t error_code, Defs::MTI incoming_mti) |
| Generates the payload for an OIR or TDE message. | |
| void | openlcb::send_event (Node *src_node, uint64_t event_id) |
| Helper function to send an event report to the bus. | |
Variables | |
| const unsigned | LARGEST_BUFFERPOOL_BUCKET = sizeof(Buffer<openlcb::GenMessage>) |
| Ensures that the largest bucket in the main buffer pool is exactly the size of a GenMessage. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Asynchronous NMRAnet interface.
Definition in file If.cxx.
| const unsigned LARGEST_BUFFERPOOL_BUCKET = sizeof(Buffer<openlcb::GenMessage>) |