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 
virtual int encode(const TPDU &p_message, BITSTRING &p_bitstring)=0
Encode TITAN message into ASN.1 PER message.
Forward declaration of asn1c class.
Definition: asn1_recode_per.hh:24
Header file for the parameter dictionary.
virtual int decode(const BITSTRING &p_bitstring, TPDU &p_message)=0
Decode ASN.1 PER message into TITAN message.
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
Declare asn1c class.
Definition: per_code.hh:27
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
Header file ASN.1 PER codec based on asn1c external tool.