UNPKG

@wildboar/copp

Version:

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

31 lines (30 loc) 1.29 kB
import * as $ from '@wildboar/asn1/functional'; import { _decode_PDV_list, _encode_PDV_list, } from '../ISO8823-PRESENTATION/PDV-list.ta.mjs'; let _cached_decoder_for_Fully_encoded_data = null; /** * @summary Decodes an ASN.1 element into a(n) Fully_encoded_data * @function * @param {_Element} el The element being decoded. * @returns {Fully_encoded_data} The decoded data structure. */ export function _decode_Fully_encoded_data(el) { if (!_cached_decoder_for_Fully_encoded_data) { _cached_decoder_for_Fully_encoded_data = $._decodeSequenceOf(() => _decode_PDV_list); } return _cached_decoder_for_Fully_encoded_data(el); } let _cached_encoder_for_Fully_encoded_data = null; /** * @summary Encodes a(n) Fully_encoded_data 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 Fully_encoded_data, encoded as an ASN.1 Element. */ export function _encode_Fully_encoded_data(value, elGetter) { if (!_cached_encoder_for_Fully_encoded_data) { _cached_encoder_for_Fully_encoded_data = $._encodeSequenceOf(() => _encode_PDV_list, $.BER); } return _cached_encoder_for_Fully_encoded_data(value, elGetter); } /* eslint-enable */