Expand description
ACSE association establishment: the AARQ and AARE APDUs (IEC 62056-5-3, 7.2).
These are BER-encoded (not A-XDR). The AARQ ([APPLICATION 0], tag 0x60) is sent by the client to open an application association; the AARE ([APPLICATION 1], tag 0x61) is the serverβs response.
The user_information field carries the xDLMS InitiateRequest /
InitiateResponse APDU; it is treated here as an opaque octet string.
Validated against the LLS AARQ of IEC 62056-5-3 Annex D.4.
ModulesΒ§
- acse_
diagnostic - ACSE
result-source-diagnosticvalues of the acse-service-user CHOICE (ISO 8650 / IEC 62056-5-3, Table 74), reported in a rejecting AARE. - acse_
provider_ diagnostic - ACSE
result-source-diagnosticvalues of the acse-service-provider CHOICE. - application_
context - COSEM application-context-name identifiers (last arc of the OID
2.16.756.5.8.1.x). - mechanism
- COSEM authentication-mechanism-name identifiers (last arc of the OID
2.16.756.5.8.2.x). - release_
reason - Release-request/response reason values (ACSE field
[0]). - result
- Association result (AARE field
[2]).
StructsΒ§
- Association
Request - An AARQ (application association request) APDU.
- Association
Response - An AARE (application association response) APDU.
- Release
Request - An RLRQ (association release request) or RLRE (release response) APDU. Both share the same shape: an optional reason and optional user-information (which carries a ciphered InitiateRequest/Response when the AA used ciphering).
- TlvIter π
- Iterates over the top-level BER TLVs of a content buffer, yielding
(tag, value)pairs. Malformed trailing bytes stop the iteration.
ConstantsΒ§
- AARE_
TAG - AARE APDU tag ([APPLICATION 1], constructed).
- AARQ_
TAG - AARQ APDU tag ([APPLICATION 0], constructed).
- OID_
PREFIX_ πAPP_ CONTEXT - OID_
PREFIX_ πMECHANISM - PROTOCOL_
VERSION_ 1 - BER BIT STRING value for ACSE protocol-version
{version1 (0)}. - RLRE_
TAG - RLRE APDU tag ([APPLICATION 3], constructed).
- RLRQ_
TAG - RLRQ APDU tag ([APPLICATION 2], constructed).
FunctionsΒ§
- ber_tlv π
- object_
identifier π - Builds an OBJECT IDENTIFIER TLV value:
06 07 <prefix(6) last_arc>. - octet_
string π - Builds an OCTET STRING TLV value:
04 <len> <bytes>. - outer_
content π - Verifies the outer APDU tag and returns its content octets.
- parse_
auth_ πvalue - Extracts the authentication value from a
[12]/[10]CHOICE (80 <len> <bytes>). - parse_
octet_ πstring - Extracts the bytes of an inner OCTET STRING (
04 <len> <bytes>). - parse_
oid_ πlast_ arc - Extracts the last arc of an application-context or mechanism OID from an
A1/context value06 07 <prefix> <arc>. - push_
length π - Writes a BER length octet (short or long form).
- raw_oid π
- The raw 7-octet OID value (no tag), for IMPLICIT contexts.
- read_
length π - Reads a BER length, returning the length and the number of octets it took.
Type AliasesΒ§
- Release
Response - An RLRE (association release response) APDU.