blob: a1f898e4c3a327c187047832cc4c3557a8cdacb4 [file] [log] [blame]
Harald Weltefaa42922019-03-04 18:31:11 +01001#include "RSPRO.hh"
2
3namespace RSPRO__Types {
4
5using namespace RSPRO;
6
7TTCN_Module RSPRO__EncDec("RSPRO_EncDec", __DATE__, __TIME__);
8
9OCTETSTRING enc__RsproPDU(const RsproPDU& pdu) {
10 TTCN_Buffer buf;
11
12 buf.clear();
13 pdu.encode(RsproPDU_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER);
14 return OCTETSTRING(buf.get_len(), buf.get_data());
15}
16
17RsproPDU dec__RsproPDU(const OCTETSTRING &stream) {
18 TTCN_Buffer buf;
19 RsproPDU pdu;
20 buf.put_os(stream);
21
22 pdu.decode(RsproPDU_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL);
23 return pdu;
24}
25
26}