Commit b84315f7 authored by nikolajev's avatar nikolajev
Browse files

Additional header file for base subtyped defined in LibAtsIot

parent 829fe28f
Loading
Loading
Loading
Loading
+110 −0
Original line number Diff line number Diff line
#ifndef  LIBATSIOTCODETS_H
#define  LIBATSIOTCODETS_H

#include <t3devlib/t3devlib.h>

namespace t3devlib {
namespace gen {

//type charstring	RessourceRecord;
T3DEVLIB_BASIC_DEFINITION (AtsImsIot_TypesAndValues, RessourceRecord, Charstring);
//type charstring	TN;
T3DEVLIB_BASIC_DEFINITION (AtsImsIot_TypesAndValues, TN, Charstring);
//type Int32		TTL;
T3DEVLIB_BASIC_DEFINITION (AtsImsIot_TypesAndValues, TTL, Signed);
//type UInt16		ServiceType;
T3DEVLIB_BASIC_DEFINITION (AtsImsIot_TypesAndValues, ServiceType, Unsigned);
//type charstring	Regexp;
T3DEVLIB_BASIC_DEFINITION (AtsImsIot_TypesAndValues, Regexp, Charstring);
/*
tmp/gen/gen_classes.h:7954: error: ISO C++ forbids declaration of `ServiceType' with no type
tmp/gen/gen_classes.h:7954: error: expected `;' before '&' token
tmp/gen/gen_classes.h:7956: error: ISO C++ forbids declaration of `Regexp' with no type
*/

//
// Implementation of subtypes defined in the module LibIot_TypesAndValues
//
/*
// aliases (subtypes without restrictions)
T3DEVLIB_BASIC_DEFINITION (LibUpperTester, EquipmentCommand, Charstring);
T3DEVLIB_BASIC_DEFINITION (LibIot_TypesAndValues, IpAddress, Charstring);
T3DEVLIB_BASIC_DEFINITION (LibIot_TypesAndValues, PortNumber, Unsigned);
//Janek:for making it compile
//type charstring	RessourceRecord;
T3DEVLIB_BASIC_DEFINITION (AtsImsIot_TypesAndValues, RessourceRecord, Charstring);
//
  // Implementation of enumerated types (not handled by the generator yet)
  //
  
  class FncRetCode : public t3devlib::Enum {
  private:
    static const char* msFncRetCodeModes[];
  public:
    FncRetCode() : Enum (msFncRetCodeModes) {}
    
    const char* GetModuleName() const { return "LibCommon_VerdictControl"; }
    const char* GetTypeName() const   { return "FncRetCode"; }
    
    void Encode (Buffer& buffer) throw (EncodeError);
    void Decode (Buffer& buffer) throw (DecodeError);
  };
  
  
  class IOTExecMode : public t3devlib::Enum {
  private:
    static const char* msExecModes[];
  public:
    IOTExecMode() : Enum (msExecModes) {}
    
    const char* GetModuleName() const { return "LibIot_TypesAndValues"; }
    const char* GetTypeName() const   { return "IOTExecMode"; }
    
    void Encode (Buffer& buffer) throw (EncodeError);
    void Decode (Buffer& buffer) throw (DecodeError);
  };
  
  
  class IOTVerdictType : public t3devlib::Enum {
  private:
    static const char* msVerdictTypes[];
  public:
    IOTVerdictType() : Enum (msVerdictTypes) {}
    
    const char* GetModuleName() const { return "LibIot_TypesAndValues"; }
    const char* GetTypeName() const   { return "IOTVerdictType"; }
    
    void Encode (Buffer& buffer) throw (EncodeError);
    void Decode (Buffer& buffer) throw (DecodeError);
  };

  class RecordMode : public t3devlib::Enum {
  private:
    static const char* msRecordModes[];
  public:
    RecordMode() : Enum (msRecordModes) {}
    
    const char* GetModuleName() const { return "LibIot_TypesAndValues"; }
    const char* GetTypeName() const   { return "RecordMode"; }
    
    void Encode (Buffer& buffer) throw (EncodeError);
    void Decode (Buffer& buffer) throw (DecodeError);
  };

  class ProtocolFilter : public t3devlib::Enum {
  private:
    static const char* msProtocolFilterModes[];
  public:
    ProtocolFilter() : Enum (msProtocolFilterModes) {}
    
    const char* GetModuleName() const { return "LibIot_TypesAndValues"; }
    const char* GetTypeName() const   { return "ProtocolFilter"; }
    
    void Encode (Buffer& buffer) throw (EncodeError);
    void Decode (Buffer& buffer) throw (DecodeError);
  };

*/    
}} //namespaces

#endif