@wildboar/copp
Version:
Connection-oriented presentation protocol (COPP) data structures and business logic in TypeScript
30 lines (29 loc) • 1.05 kB
JavaScript
import { _decode_User_data, _encode_User_data, } from '../ISO8823-PRESENTATION/User-data.ta.mjs';
let _cached_decoder_for_CPC_type = null;
/**
* @summary Decodes an ASN.1 element into a(n) CPC_type
* @function
* @param {_Element} el The element being decoded.
* @returns {CPC_type} The decoded data structure.
*/
export function _decode_CPC_type(el) {
if (!_cached_decoder_for_CPC_type) {
_cached_decoder_for_CPC_type = _decode_User_data;
}
return _cached_decoder_for_CPC_type(el);
}
let _cached_encoder_for_CPC_type = null;
/**
* @summary Encodes a(n) CPC_type 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 CPC_type, encoded as an ASN.1 Element.
*/
export function _encode_CPC_type(value, elGetter) {
if (!_cached_encoder_for_CPC_type) {
_cached_encoder_for_CPC_type = _encode_User_data;
}
return _cached_encoder_for_CPC_type(value, elGetter);
}
/* eslint-enable */