Skip to main content

Module service

Module service 

Source
Expand description

Application-layer xDLMS services (GET/SET/ACTION) and association establishment (AARQ/AARE), per IEC 62056-5-3, using LN referencing. Application-layer xDLMS services with LN referencing (IEC 62056-5-3).

Each service is modelled as request/response APDUs that encode to and decode from the byte payloads carried by the crate::transport data-link layer. Common building blocks — the invoke-id-and-priority octet, the COSEM attribute/method descriptors and the data-access-result codes — live here; the individual services are in the sub-modules.

Modules§

acse
ACSE association establishment: the AARQ and AARE APDUs (IEC 62056-5-3, 7.2).
action
The xDLMS ACTION service (IEC 62056-5-3, 6.11): invoke a COSEM object method.
ciphering
Service-specific glo-/ded-ciphering of xDLMS APDUs (IEC 62056-5-3, 5.7).
data_access_result
Data-Access-Result codes (IEC 62056-5-3). Returned by GET/SET and, for the optional return parameters, by ACTION.
error
Error-reporting APDUs (IEC 62056-5-3): the EXCEPTION-RESPONSE used with LN referencing and the ConfirmedServiceError used with SN referencing.
gbt
General block transfer (IEC 62056-5-3, 7.3.13): a transport-independent mechanism that carries any (partial) xDLMS APDU in blocks.
general_ciphering
General ciphering APDUs (IEC 62056-5-3, 5.7.2): the address-carrying wrappers that transport a protected xDLMS APDU independently of the service.
get
The xDLMS GET service (IEC 62056-5-3, 6.9): read one or more COSEM object attributes.
initiate
The xDLMS InitiateRequest / InitiateResponse APDUs (IEC 62056-5-3, 11.2).
notification
Unsolicited notification services (IEC 62056-5-3): the server-initiated EVENT-NOTIFICATION and DATA-NOTIFICATION APDUs.
set
The xDLMS SET service (IEC 62056-5-3, 6.10): write one or more COSEM object attributes.
tag
APDU tags of the xDLMS services (LN referencing), IEC 62056-5-3 Table 60.

Structs§

AttributeDescriptor
A COSEM attribute descriptor: the (class-id, instance-id, attribute-id) triple that references one attribute of one object instance. Encoded as 2 + 6 + 1 = 9 raw octets.
DataBlockSa
DataBlock-SA: one block of a SET/ACTION block transfer. Encoded as last-block (boolean) ‖ block-number (u32) ‖ raw-data (A-XDR octet-string).
MethodDescriptor
A COSEM method descriptor: the (class-id, instance-id, method-id) triple that references one method of one object instance. Encoded as 9 raw octets.
RawApdu
A raw APDU with an arbitrary tag and body.

Enums§

ServiceError
Errors that can occur while decoding a service APDU.

Functions§

invoke_id_and_priority
Builds the invoke-id-and-priority octet: bits 0..3 the invoke id, bit 6 the service class (1 = confirmed), bit 7 the priority (1 = high).
push_length 🔒
Writes an A-XDR length octet (short or long form).
read_length 🔒
Reads an A-XDR length octet, returning the length and octets consumed.