Skip to main content

Module acse

Module acse 

Source
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-diagnostic values 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-diagnostic values 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Β§

AssociationRequest
An AARQ (application association request) APDU.
AssociationResponse
An AARE (application association response) APDU.
ReleaseRequest
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 value 06 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Β§

ReleaseResponse
An RLRE (association release response) APDU.