@wildboar/copp
Version:
Connection-oriented presentation protocol (COPP) data structures and business logic in TypeScript
150 lines (149 loc) • 5.99 kB
TypeScript
import { OPTIONAL, ASN1Element as _Element } from 'asn1-ts';
import * as $ from 'asn1-ts/dist/node/functional';
import { Mode_selector } from '../ISO8823-PRESENTATION/Mode-selector.ta';
export { Mode_selector, _decode_Mode_selector, _encode_Mode_selector, } from '../ISO8823-PRESENTATION/Mode-selector.ta';
import { CPA_PPDU_x410_mode_parameters } from '../ISO8823-PRESENTATION/CPA-PPDU-x410-mode-parameters.ta';
export { CPA_PPDU_x410_mode_parameters, _decode_CPA_PPDU_x410_mode_parameters, _encode_CPA_PPDU_x410_mode_parameters, } from '../ISO8823-PRESENTATION/CPA-PPDU-x410-mode-parameters.ta';
import { CPA_PPDU_normal_mode_parameters } from '../ISO8823-PRESENTATION/CPA-PPDU-normal-mode-parameters.ta';
export { CPA_PPDU_normal_mode_parameters, _decode_CPA_PPDU_normal_mode_parameters, _encode_CPA_PPDU_normal_mode_parameters, } from '../ISO8823-PRESENTATION/CPA-PPDU-normal-mode-parameters.ta';
/**
* @summary CPA_PPDU
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* CPA-PPDU ::= SET {
* mode-selector [0] IMPLICIT Mode-selector,
* x410-mode-parameters
* [1] IMPLICIT SET {COMPONENTS OF Reliable-Transfer-APDU.RTOACapdu} OPTIONAL-- This OPTIONAL element shall be absent for a
* -- nested presentation connection.
* -- Shall be used for X.410 mode only. Shall be bitwise
* -- compatible with CCITT Recommendation X.410-1984.
* -- This shall be the User data parameter of the CPA PPDU1) --,
* normal-mode-parameters
* [2] IMPLICIT 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,
* presentation-requirements
* [8] IMPLICIT Presentation-requirements OPTIONAL,
* user-session-requirements
* [9] IMPLICIT User-session-requirements OPTIONAL,
* -- shall not be present if equal to the Revised session
* -- requirements parameter
* protocol-options
* [11] Protocol-options DEFAULT {},
* -- shall be absent if no options are selected
* responders-nominated-context
* [13] Presentation-context-identifier OPTIONAL,
* -- shall only be present if nominated-context is
* -- selected in protocol-options
* user-data
* User-data OPTIONAL} OPTIONAL
* -- Shall be used for normal mode only.
* }
* ```
*
* @class
*/
export declare class CPA_PPDU {
/**
* @summary `mode_selector`.
* @public
* @readonly
*/
readonly mode_selector: Mode_selector;
/**
* @summary `x410_mode_parameters`.
* @public
* @readonly
*/
readonly x410_mode_parameters: OPTIONAL<CPA_PPDU_x410_mode_parameters>;
/**
* @summary `normal_mode_parameters`.
* @public
* @readonly
*/
readonly normal_mode_parameters: OPTIONAL<CPA_PPDU_normal_mode_parameters>;
constructor(
/**
* @summary `mode_selector`.
* @public
* @readonly
*/
mode_selector: Mode_selector,
/**
* @summary `x410_mode_parameters`.
* @public
* @readonly
*/
x410_mode_parameters: OPTIONAL<CPA_PPDU_x410_mode_parameters>,
/**
* @summary `normal_mode_parameters`.
* @public
* @readonly
*/
normal_mode_parameters: OPTIONAL<CPA_PPDU_normal_mode_parameters>);
/**
* @summary Restructures an object into a CPA_PPDU
* @description
*
* This takes an `object` and converts it to a `CPA_PPDU`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `CPA_PPDU`.
* @returns {CPA_PPDU}
*/
static _from_object(_o: {
[_K in keyof CPA_PPDU]: CPA_PPDU[_K];
}): CPA_PPDU;
}
/**
* @summary The Leading Root Component Types of CPA_PPDU
* @description
*
* This is an array of `ComponentSpec`s that define how to decode the leading root component type list of a SET or SEQUENCE.
*
* @constant
*/
export declare const _root_component_type_list_1_spec_for_CPA_PPDU: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of CPA_PPDU
* @description
*
* This is an array of `ComponentSpec`s that define how to decode the trailing root component type list of a SET or SEQUENCE.
*
* @constant
*/
export declare const _root_component_type_list_2_spec_for_CPA_PPDU: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of CPA_PPDU
* @description
*
* This is an array of `ComponentSpec`s that define how to decode the extension addition component type list of a SET or SEQUENCE.
*
* @constant
*/
export declare const _extension_additions_list_spec_for_CPA_PPDU: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) CPA_PPDU
* @function
* @param {_Element} el The element being decoded.
* @returns {CPA_PPDU} The decoded data structure.
*/
export declare function _decode_CPA_PPDU(el: _Element): CPA_PPDU;
/**
* @summary Encodes a(n) CPA_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 CPA_PPDU, encoded as an ASN.1 Element.
*/
export declare function _encode_CPA_PPDU(value: CPA_PPDU, elGetter: $.ASN1Encoder<CPA_PPDU>): _Element;