Skip to main content

Module error_code

Module error_code 

Source
Expand description

Error codes used in Optional Interaction Rejected / Datagram Rejected.

Codes are 16 bits. The top nibble classifies the error: 0x1xxx is permanent (do not retry the same request), 0x2xxx is temporary (the request may succeed if retried later). Lower bits refine the reason. Only the codes this crate uses or that applications commonly need are named here; see the Message Network Standard for the full list and the reference table.

Constants§

BUFFER_UNAVAILABLE
Temporary: the receiver has no buffer available right now.
NOT_IMPLEMENTED
Permanent: not implemented, no further detail.
NOT_IMPLEMENTED_COMMAND
Permanent: the command is not known.
NOT_IMPLEMENTED_SUBCOMMAND
Permanent: the sub-command is not known.
NOT_IMPLEMENTED_UNKNOWN_MTI
Permanent: the MTI or transport protocol is not implemented. Sent by Node for addressed messages it does not support, for Traction Control Commands to a node that is not a train, and in Datagram Rejected when it has no datagram support.
OUT_OF_ORDER
Temporary: frames arrived out of order (multi-frame reassembly failed).
OUT_OF_ORDER_NO_START
Temporary, out of order: a middle or final frame arrived without a first frame.
OUT_OF_ORDER_START_BEFORE_END
Temporary, out of order: a first frame arrived before the previous message from the same source had ended.
PERMANENT
Permanent error, no further detail.
SOURCE_NOT_PERMITTED
Permanent: source not permitted (the sender may not make this request, e.g. it is not the train’s controller).
TEMPORARY
Temporary error, no further detail; retrying may succeed.
TIMEOUT
Temporary: timed out waiting for the rest of a multi-frame message or for a reply.