UNPKG

@wildboar/copp

Version:

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

31 lines (30 loc) 1.25 kB
import * as $ from '@wildboar/asn1/functional'; import { _decode_Context_list_Item, _encode_Context_list_Item, } from '../ISO8823-PRESENTATION/Context-list-Item.ta.mjs'; let _cached_decoder_for_Context_list = null; /** * @summary Decodes an ASN.1 element into a(n) Context_list * @function * @param {_Element} el The element being decoded. * @returns {Context_list} The decoded data structure. */ export function _decode_Context_list(el) { if (!_cached_decoder_for_Context_list) { _cached_decoder_for_Context_list = $._decodeSequenceOf(() => _decode_Context_list_Item); } return _cached_decoder_for_Context_list(el); } let _cached_encoder_for_Context_list = null; /** * @summary Encodes a(n) Context_list into an ASN.1 Element. * @function * @param value The element being encoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The Context_list, encoded as an ASN.1 Element. */ export function _encode_Context_list(value, elGetter) { if (!_cached_encoder_for_Context_list) { _cached_encoder_for_Context_list = $._encodeSequenceOf(() => _encode_Context_list_Item, $.BER); } return _cached_encoder_for_Context_list(value, elGetter); } /* eslint-enable */