Skip to main content

Module server

Module server 

Source
Expand description

Server-side request dispatcher: routes incoming GET/SET/ACTION APDUs to the addressed COSEM object and returns the response APDU. A server-side request dispatcher (IEC 62056-5-3 / IEC 62056-53 server CF).

crate::server::RequestDispatcher holds a set of COSEM interface objects and turns an incoming GET / SET / ACTION request APDU into the matching response APDU by routing it to the addressed object: GET reads an attribute, SET writes one (via crate::interface::InterfaceClass::set_attribute), ACTION invokes a method. Objects are addressed by their (class-id, logical-name) pair; an unknown address yields a object-undefined data-access-result rather than an error.

Only the NORMAL and WITH-LIST variants are dispatched; block-transfer request types produce an EXCEPTION-RESPONSE, since block reassembly is the caller’s responsibility.

ModulesΒ§

association_status πŸ”’
association_status values (IEC 62056-6-2, Association LN attribute 8).
initiate_error πŸ”’
initiateError values of the ConfirmedServiceError sent when the InitiateRequest is rejected (IEC 62056-5-3).

StructsΒ§

PendingBlocks
Block-transfer state that must survive across APDUs on the same AA.
PendingGet
An outbound GET result being delivered in blocks.
PendingSet
An inbound SET value being reassembled from datablocks.
RequestDispatcher
A collection of COSEM objects that answers GET/SET/ACTION requests.

ConstantsΒ§

CONFORMANCE_CONFIGURATOR πŸ”’
CONFORMANCE_PUBLIC πŸ”’
SPODES AA role conformance (AND with the client’s proposal):
CONFORMANCE_READER πŸ”’
DEFAULT_MAX_PDU πŸ”’
Default block-transfer payload size. A GET result larger than this is sent in GET-RESPONSE-WITH-DATABLOCK blocks of at most this many octets.
DLMS_VERSION πŸ”’
The DLMS version number negotiated by RequestDispatcher::handle_aarq.
MIN_CLIENT_PDU πŸ”’
The smallest client-max-receive-pdu-size the server accepts.
SERVER_MAX_PDU πŸ”’
Server-max-receive-pdu-size offered in the negotiated InitiateResponse.

FunctionsΒ§

apply_selective_access πŸ”’
Applies GET selective access to a read result (IEC 62056-5-3 Β§7.4.1.6 / IEC 62056-6-2 Β§4.3.6.2). Only the ProfileGeneric buffer (class 7, attribute 2) is filtered:
is_hls_pass3_action πŸ”’
True when the APDU is Association LN reply_to_HLS_authentication (method 1).
not_possible πŸ”’
EXCEPTION-RESPONSE for a well-formed but unhandled request (e.g. block transfer).
reject_aare πŸ”’
Builds a permanently-rejecting AARE with the given diagnostic; initiate_err adds an initiateError ConfirmedServiceError to the user-information. diagnostic_is_provider selects the acse-service-provider CHOICE (e.g. no-common-acse-version).
selective_index πŸ”’
Reads a non-negative COSEM integer used as a selective-access entry index.
unsupported πŸ”’
EXCEPTION-RESPONSE for an unsupported service tag.