Skip to main content

Module initiate

Module initiate 

Source
Expand description

The xDLMS InitiateRequest / InitiateResponse APDUs (IEC 62056-5-3, 11.2).

These A-XDR SEQUENCEs are carried opaquely in the user-information field of the ACSE AARQ / AARE APDUs (see super::acse). This module gives them a structured form so callers can negotiate the DLMS version, conformance block and PDU size without hand-assembling bytes.

Reference (DLMS Green Book 11.2, LN referencing, no ciphering):

request:  01 00 00 00 06 5F1F 04 00 00 7E 1F 04B0
response: 08    00 06 5F1F 04 00 00 7E 1F 01F4 0007

conformance is the 24-bit block of the [APPLICATION 30] BIT STRING; it is kept here as the low 24 bits of a u32.

Structsยง

InitiateRequest
An xDLMS InitiateRequest APDU.
InitiateResponse
An xDLMS InitiateResponse APDU.

Constantsยง

CONFORMANCE_TAG ๐Ÿ”’
The [APPLICATION 30] conformance BIT STRING identifier (two octets).
INITIATE_REQUEST_TAG
InitiateRequest APDU tag.
INITIATE_RESPONSE_TAG
InitiateResponse APDU tag.

Functionsยง

push_conformance ๐Ÿ”’
Encodes the conformance block: 5F 1F 04 <unused=00> <3 octets>.
take_conformance ๐Ÿ”’
Decodes a conformance block, returning its 24-bit value and octets consumed.