Harald Welte | faa4292 | 2019-03-04 18:31:11 +0100 | [diff] [blame] | 1 | #include "RSPRO.hh" |
| 2 | |
| 3 | namespace RSPRO__Types { |
| 4 | |
| 5 | using namespace RSPRO; |
| 6 | |
| 7 | TTCN_Module RSPRO__EncDec("RSPRO_EncDec", __DATE__, __TIME__); |
| 8 | |
| 9 | OCTETSTRING 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 | |
| 17 | RsproPDU 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 | } |