Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*----- PROTECTED REGION ID(USB2Class.h) ENABLED START -----*/
//=============================================================================
//
// file : USB2Class.h
//
// description : Include for the USB2 root class.
// This class is the singleton class for
// the USB2 device class.
// It contains all properties and methods which the
// USB2 requires only once e.g. the commands.
//
// project :
//
// This file is part of Tango device class.
//
// Tango is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tango is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Tango. If not, see <http://www.gnu.org/licenses/>.
//
// $Author: alessio $
//
// $Revision: 1.1.1.1 $
// $Date: 2018-01-16 15:32:20 $
//
// $HeadURL: $
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#ifndef USB2Class_H
#define USB2Class_H
#include <tango.h>
#include <USB2.h>
/*----- PROTECTED REGION END -----*/ // USB2Class.h
namespace USB2_ns
{
/*----- PROTECTED REGION ID(USB2Class::classes for dynamic creation) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // USB2Class::classes for dynamic creation
//=========================================
// Define classes for attributes
//=========================================
// Attribute InputLength class definition
class InputLengthAttrib: public Tango::Attr
{
public:
InputLengthAttrib():Attr("InputLength",
Tango::DEV_LONG, Tango::READ) {}
~InputLengthAttrib() {}
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<USB2 *>(dev))->read_InputLength(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<USB2 *>(dev))->is_InputLength_allowed(ty);}
};
// Attribute OutputLength class definition
class OutputLengthAttrib: public Tango::Attr
{
public:
OutputLengthAttrib():Attr("OutputLength",
Tango::DEV_LONG, Tango::READ) {}
~OutputLengthAttrib() {}
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<USB2 *>(dev))->read_OutputLength(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<USB2 *>(dev))->is_OutputLength_allowed(ty);}
};
// Attribute Reconnections class definition
class ReconnectionsAttrib: public Tango::Attr
{
public:
ReconnectionsAttrib():Attr("Reconnections",
Tango::DEV_LONG, Tango::READ) {}
~ReconnectionsAttrib() {}
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<USB2 *>(dev))->read_Reconnections(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<USB2 *>(dev))->is_Reconnections_allowed(ty);}
};
//=========================================
// Define classes for commands
//=========================================
// Command Write class definition
class WriteClass : public Tango::Command
{
public:
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(cmd_name,in,out,in_desc,out_desc, level) {}
:Command(cmd_name,in,out) {}
~WriteClass() {}
virtual CORBA::Any *execute (Tango::DeviceImpl *dev, const CORBA::Any &any);
virtual bool is_allowed (Tango::DeviceImpl *dev, const CORBA::Any &any)
{return (static_cast<USB2 *>(dev))->is_Write_allowed(any);}
};
// Command Read class definition
class ReadClass : public Tango::Command
{
public:
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(cmd_name,in,out,in_desc,out_desc, level) {}
:Command(cmd_name,in,out) {}
~ReadClass() {}
virtual CORBA::Any *execute (Tango::DeviceImpl *dev, const CORBA::Any &any);
virtual bool is_allowed (Tango::DeviceImpl *dev, const CORBA::Any &any)
{return (static_cast<USB2 *>(dev))->is_Read_allowed(any);}
};
// Command ReadUntil class definition
class ReadUntilClass : public Tango::Command
{
public:
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(cmd_name,in,out,in_desc,out_desc, level) {}
:Command(cmd_name,in,out) {}
~ReadUntilClass() {}
virtual CORBA::Any *execute (Tango::DeviceImpl *dev, const CORBA::Any &any);
virtual bool is_allowed (Tango::DeviceImpl *dev, const CORBA::Any &any)
{return (static_cast<USB2 *>(dev))->is_ReadUntil_allowed(any);}
};
/**
* The USB2Class singleton definition
*/
#ifdef _TG_WINDOWS_
class __declspec(dllexport) USB2Class : public Tango::DeviceClass
#else
class USB2Class : public Tango::DeviceClass
#endif
{
/*----- PROTECTED REGION ID(USB2Class::Additional DServer data members) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // USB2Class::Additional DServer data members
public:
// write class properties data members
Tango::DbData cl_prop;
Tango::DbData cl_def_prop;
Tango::DbData dev_def_prop;
// Method prototypes
static USB2Class *init(const char *);
static USB2Class *instance();
~USB2Class();
Tango::DbDatum get_class_property(std::string &);
Tango::DbDatum get_default_device_property(std::string &);
Tango::DbDatum get_default_class_property(std::string &);
static USB2Class *_instance;
void command_factory();
void attribute_factory(std::vector<Tango::Attr *> &);
void pipe_factory();
void write_class_property();
void set_default_property();
void get_class_property();
std::string get_cvstag();
std::string get_cvsroot();
void device_factory(TANGO_UNUSED(const Tango::DevVarStringArray *));
void create_static_attribute_list(std::vector<Tango::Attr *> &);
void erase_dynamic_attributes(const Tango::DevVarStringArray *,std::vector<Tango::Attr *> &);
std::vector<std::string> defaultAttList;
Tango::Attr *get_attr_object_by_name(std::vector<Tango::Attr *> &att_list, std::string attname);
};
} // End of namespace
#endif // USB2_H