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_statusvalues (IEC 62056-6-2, Association LN attribute 8).- initiate_
error π initiateErrorvalues of the ConfirmedServiceError sent when the InitiateRequest is rejected (IEC 62056-5-3).
StructsΒ§
- Pending
Blocks - Block-transfer state that must survive across APDUs on the same AA.
- Pending
Get - An outbound GET result being delivered in blocks.
- Pending
Set - An inbound SET value being reassembled from datablocks.
- Request
Dispatcher - 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_erradds aninitiateErrorConfirmedServiceError to the user-information.diagnostic_is_providerselects 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.