UNPKG

@wildboar/copp

Version:

Connection-oriented presentation protocol (COPP) data structures and business logic in TypeScript

48 lines (47 loc) 2.39 kB
import { ASN1Element as _Element } from 'asn1-ts'; import * as $ from 'asn1-ts/dist/node/functional'; import { CPR_PPDU_x400_mode_parameters } from '../ISO8823-PRESENTATION/CPR-PPDU-x400-mode-parameters.ta'; export { CPR_PPDU_x400_mode_parameters, _decode_CPR_PPDU_x400_mode_parameters, _encode_CPR_PPDU_x400_mode_parameters, } from '../ISO8823-PRESENTATION/CPR-PPDU-x400-mode-parameters.ta'; import { CPR_PPDU_normal_mode_parameters } from '../ISO8823-PRESENTATION/CPR-PPDU-normal-mode-parameters.ta'; export { CPR_PPDU_normal_mode_parameters, _decode_CPR_PPDU_normal_mode_parameters, _encode_CPR_PPDU_normal_mode_parameters, } from '../ISO8823-PRESENTATION/CPR-PPDU-normal-mode-parameters.ta'; /** * @summary CPR_PPDU * @description * * ### ASN.1 Definition: * * ```asn1 * CPR-PPDU ::= CHOICE { * x400-mode-parameters SET {COMPONENTS OF Reliable-Transfer-APDU.RTORJapdu}, * normal-mode-parameters SEQUENCE { * protocol-version [0] IMPLICIT Protocol-version DEFAULT {version-1}, * responding-presentation-selector [3] IMPLICIT Responding-presentation-selector OPTIONAL, * presentation-context-definition-result-list [5] IMPLICIT Presentation-context-definition-result-list OPTIONAL, * default-context-result [7] IMPLICIT Default-context-result OPTIONAL, * provider-reason [10] IMPLICIT Provider-reason OPTIONAL, * user-data User-data OPTIONAL * } * -- Shall be used for normal mode only. * } * ``` */ export declare type CPR_PPDU = { x400_mode_parameters: CPR_PPDU_x400_mode_parameters; } | { normal_mode_parameters: CPR_PPDU_normal_mode_parameters; }; /** * @summary Decodes an ASN.1 element into a(n) CPR_PPDU * @function * @param {_Element} el The element being decoded. * @returns {CPR_PPDU} The decoded data structure. */ export declare function _decode_CPR_PPDU(el: _Element): CPR_PPDU; /** * @summary Encodes a(n) CPR_PPDU into an ASN.1 Element. * @function * @param {value} el The element being decoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The CPR_PPDU, encoded as an ASN.1 Element. */ export declare function _encode_CPR_PPDU(value: CPR_PPDU, elGetter: $.ASN1Encoder<CPR_PPDU>): _Element;