UpperTesterCodec.hh 1.01 KB
Newer Older
garciay's avatar
garciay committed
#ifndef UpperTesterCODEC_H
#define UpperTesterCODEC_H

#include "Codec.hh"
#include "loggers.hh" // TODO To be removed
#include "Params.hh"

class Base_Type;
class Record_Type;
class TTCN_Typedescriptor_t;
class TTCN_Buffer;

garciay's avatar
garciay committed
namespace LibItsGeoNetworking__TypesAndValues {
  class UtGnResults;
garciay's avatar
garciay committed
}

class UpperTesterCodec: public Codec <
  Record_Type,
  Record_Type>
{
garciay's avatar
garciay committed
  int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);

garciay's avatar
garciay committed
public:
  UpperTesterCodec() : Codec<Record_Type, Record_Type>() { loggers::get_instance().log("UpperTesterCodec::UpperTesterCodec(D)"); };
  virtual ~UpperTesterCodec() { loggers::get_instance().log("UpperTesterCodec::~UpperTesterCodec"); };

  virtual int encode (const Record_Type&, OCTETSTRING& data);
  virtual int decode (const OCTETSTRING& data, Record_Type&, Params* params = NULL);
garciay's avatar
garciay committed
  int decode (const OCTETSTRING& data, LibItsGeoNetworking__TypesAndValues::UtGnResults& msg, Params* params = NULL);
garciay's avatar
garciay committed
};
#endif