ETSI STF525 / Internal Testing test suite This project provides an internal testing test suite and its associated Test Adapter/Codec

per_code.hh
Go to the documentation of this file.
1
11 #pragma once
12
13 #include "Params.hh"
14 #include "asn1_recode_per.hh"
15
16 class BITSTRING;
17 class TTCN_Typedescriptor_t;
18
19 struct asn_TYPE_descriptor_s;
20
26 template<typename TPDU>
27 class per_code : public asn1_recode_per
28 {
29 public:
30
37 virtual int encode(const TPDU& p_message, BITSTRING& p_bitstring) = 0;
45 virtual int decode(const BITSTRING& p_bitstring, TPDU& p_message) = 0;
46
47 protected:
48 int _decode (const TTCN_Typedescriptor_t& ttcn, const asn_TYPE_descriptor_s & td, const BITSTRING& p_data, TPDU& msg);
49 int _encode (const TTCN_Typedescriptor_t& ttcn, const asn_TYPE_descriptor_s & td, const TPDU& msg, BITSTRING& p_data);
50 }; // End of class per_code
51
52 #include "per_code.t.hh"
53
per_code::encode
virtual int encode(const TPDU &p_message, BITSTRING &p_bitstring)=0
Encode TITAN message into ASN.1 PER message.
asn1_recode_per
Forward declaration of asn1c class.
Definition: asn1_recode_per.hh:24
Params.hh
Header file for the parameter dictionary.
per_code::decode
virtual int decode(const BITSTRING &p_bitstring, TPDU &p_message)=0
Decode ASN.1 PER message into TITAN message.
per_code::_encode
int _encode(const TTCN_Typedescriptor_t &ttcn, const asn_TYPE_descriptor_s &td, const TPDU &msg, BITSTRING &p_data)
Definition: per_code.t.hh:16
per_code
Declare asn1c class.
Definition: per_code.hh:27
per_code::_decode
int _decode(const TTCN_Typedescriptor_t &ttcn, const asn_TYPE_descriptor_s &td, const BITSTRING &p_data, TPDU &msg)
Definition: per_code.t.hh:4
per_code.t.hh
asn1_recode_per.hh
Header file ASN.1 PER codec based on asn1c external tool.