@wildboar/copp
Version:
Connection-oriented presentation protocol (COPP) data structures and business logic in TypeScript
45 lines (44 loc) • 1.76 kB
TypeScript
import { ASN1Element as _Element } from 'asn1-ts';
import * as $ from 'asn1-ts/dist/node/functional';
import { AC_PPDU } from '../ISO8823-PRESENTATION/AC-PPDU.ta';
export { AC_PPDU, _decode_AC_PPDU, _encode_AC_PPDU, } from '../ISO8823-PRESENTATION/AC-PPDU.ta';
import { ACA_PPDU } from '../ISO8823-PRESENTATION/ACA-PPDU.ta';
export { ACA_PPDU, _decode_ACA_PPDU, _encode_ACA_PPDU, } from '../ISO8823-PRESENTATION/ACA-PPDU.ta';
import { User_data } from '../ISO8823-PRESENTATION/User-data.ta';
export { User_data, _decode_User_data, _encode_User_data, } from '../ISO8823-PRESENTATION/User-data.ta';
/**
* @summary Typed_data_type
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* Typed-data-type ::= CHOICE {
* acPPDU [0] IMPLICIT AC-PPDU-- P-ALTER-CONTEXT request and indication -- ,
* acaPPDU [1] IMPLICIT ACA-PPDU-- P-ALTER-CONTEXT response and confirm -- ,
* ttdPPDU User-data -- P-TYPED-DATA request and indication
* }
* ```
*/
export declare type Typed_data_type = {
acPPDU: AC_PPDU;
} | {
acaPPDU: ACA_PPDU;
} | {
ttdPPDU: User_data;
};
/**
* @summary Decodes an ASN.1 element into a(n) Typed_data_type
* @function
* @param {_Element} el The element being decoded.
* @returns {Typed_data_type} The decoded data structure.
*/
export declare function _decode_Typed_data_type(el: _Element): Typed_data_type;
/**
* @summary Encodes a(n) Typed_data_type 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 Typed_data_type, encoded as an ASN.1 Element.
*/
export declare function _encode_Typed_data_type(value: Typed_data_type, elGetter: $.ASN1Encoder<Typed_data_type>): _Element;