Skip to content
Snippets Groups Projects
Commit c1620c03 authored by Giulio Gaio's avatar Giulio Gaio
Browse files

First import

parent 0b45c472
Branches master
Tags 1.0.0
No related merge requests found
NAME_SRV = sequtils-srv
CXXFLAGS =
LDFLAGS =
include ../makefiles/Make-9.3.3.in
/*----- PROTECTED REGION ID(SeqUtils::ClassFactory.cpp) ENABLED START -----*/
//=============================================================================
//
// file : ClassFactory.cpp
//
// description : C++ source for the class_factory method of the DServer
// device class. This method is responsible for the creation of
// all class singleton for a device server. It is called
// at device server startup.
//
// project : SeqUtils
//
// 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/>.
//
//
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include <tango.h>
#include <SeqUtilsClass.h>
// Add class header files if needed
/**
* Create SeqUtils Class singleton and store it in DServer object.
*/
void Tango::DServer::class_factory()
{
// Add method class init if needed
add_class(SeqUtils_ns::SeqUtilsClass::init("SeqUtils"));
}
/*----- PROTECTED REGION END -----*/ // SeqUtils::ClassFactory.cpp
This diff is collapsed.
/*----- PROTECTED REGION ID(SeqUtils.h) ENABLED START -----*/
//=============================================================================
//
// file : SeqUtils.h
//
// description : Include file for the SeqUtils class
//
// project : SeqUtils
//
// 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/>.
//
//
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#ifndef SeqUtils_H
#define SeqUtils_H
#include <tango.h>
/*----- PROTECTED REGION END -----*/ // SeqUtils.h
/**
* SeqUtils class description:
* It returns a random generated number, sec/nsec date
*/
namespace SeqUtils_ns
{
/*----- PROTECTED REGION ID(SeqUtils::Additional Class Declarations) ENABLED START -----*/
// Additional Class Declarations
/*----- PROTECTED REGION END -----*/ // SeqUtils::Additional Class Declarations
class SeqUtils : public TANGO_BASE_CLASS
{
/*----- PROTECTED REGION ID(SeqUtils::Data Members) ENABLED START -----*/
// Add your own data members
/*----- PROTECTED REGION END -----*/ // SeqUtils::Data Members
// Attribute data members
public:
Tango::DevDouble *attr_DRand_read;
Tango::DevDouble *attr_DRandMin_read;
Tango::DevDouble *attr_DRandMax_read;
Tango::DevLong *attr_LRand_read;
Tango::DevLong *attr_LRandMin_read;
Tango::DevLong *attr_LRandMax_read;
Tango::DevDouble *attr_Data_read;
Tango::DevDouble *attr_Data1_read;
Tango::DevLong *attr_LData_read;
Tango::DevLong *attr_Date_read;
Tango::DevLong *attr_LDate_read;
// Constructors and destructors
public:
/**
* Constructs a newly device object.
*
* @param cl Class.
* @param s Device Name
*/
SeqUtils(Tango::DeviceClass *cl,string &s);
/**
* Constructs a newly device object.
*
* @param cl Class.
* @param s Device Name
*/
SeqUtils(Tango::DeviceClass *cl,const char *s);
/**
* Constructs a newly device object.
*
* @param cl Class.
* @param s Device name
* @param d Device description.
*/
SeqUtils(Tango::DeviceClass *cl,const char *s,const char *d);
/**
* The device object destructor.
*/
~SeqUtils() {delete_device();};
// Miscellaneous methods
public:
/*
* will be called at device destruction or at init command.
*/
void delete_device();
/*
* Initialize the device
*/
virtual void init_device();
/*
* Always executed method before execution command method.
*/
virtual void always_executed_hook();
// Attribute methods
public:
//--------------------------------------------------------
/*
* Method : SeqUtils::read_attr_hardware()
* Description : Hardware acquisition for attributes.
*/
//--------------------------------------------------------
virtual void read_attr_hardware(vector<long> &attr_list);
//--------------------------------------------------------
/*
* Method : SeqUtils::write_attr_hardware()
* Description : Hardware writing for attributes.
*/
//--------------------------------------------------------
virtual void write_attr_hardware(vector<long> &attr_list);
/**
* Attribute DRand related methods
* Description:
*
* Data type: Tango::DevDouble
* Attr type: Scalar
*/
virtual void read_DRand(Tango::Attribute &attr);
virtual bool is_DRand_allowed(Tango::AttReqType type);
/**
* Attribute DRandMin related methods
* Description:
*
* Data type: Tango::DevDouble
* Attr type: Scalar
*/
virtual void read_DRandMin(Tango::Attribute &attr);
virtual void write_DRandMin(Tango::WAttribute &attr);
virtual bool is_DRandMin_allowed(Tango::AttReqType type);
/**
* Attribute DRandMax related methods
* Description:
*
* Data type: Tango::DevDouble
* Attr type: Scalar
*/
virtual void read_DRandMax(Tango::Attribute &attr);
virtual void write_DRandMax(Tango::WAttribute &attr);
virtual bool is_DRandMax_allowed(Tango::AttReqType type);
/**
* Attribute LRand related methods
* Description:
*
* Data type: Tango::DevLong
* Attr type: Scalar
*/
virtual void read_LRand(Tango::Attribute &attr);
virtual bool is_LRand_allowed(Tango::AttReqType type);
/**
* Attribute LRandMin related methods
* Description:
*
* Data type: Tango::DevLong
* Attr type: Scalar
*/
virtual void read_LRandMin(Tango::Attribute &attr);
virtual void write_LRandMin(Tango::WAttribute &attr);
virtual bool is_LRandMin_allowed(Tango::AttReqType type);
/**
* Attribute LRandMax related methods
* Description:
*
* Data type: Tango::DevLong
* Attr type: Scalar
*/
virtual void read_LRandMax(Tango::Attribute &attr);
virtual void write_LRandMax(Tango::WAttribute &attr);
virtual bool is_LRandMax_allowed(Tango::AttReqType type);
/**
* Attribute Data related methods
* Description:
*
* Data type: Tango::DevDouble
* Attr type: Scalar
*/
virtual void read_Data(Tango::Attribute &attr);
virtual void write_Data(Tango::WAttribute &attr);
virtual bool is_Data_allowed(Tango::AttReqType type);
/**
* Attribute Data1 related methods
* Description:
*
* Data type: Tango::DevDouble
* Attr type: Scalar
*/
virtual void read_Data1(Tango::Attribute &attr);
virtual void write_Data1(Tango::WAttribute &attr);
virtual bool is_Data1_allowed(Tango::AttReqType type);
/**
* Attribute LData related methods
* Description:
*
* Data type: Tango::DevLong
* Attr type: Scalar
*/
virtual void read_LData(Tango::Attribute &attr);
virtual void write_LData(Tango::WAttribute &attr);
virtual bool is_LData_allowed(Tango::AttReqType type);
/**
* Attribute Date related methods
* Description:
*
* Data type: Tango::DevLong
* Attr type: Spectrum max = 2
*/
virtual void read_Date(Tango::Attribute &attr);
virtual bool is_Date_allowed(Tango::AttReqType type);
/**
* Attribute LDate related methods
* Description:
*
* Data type: Tango::DevLong
* Attr type: Spectrum max = 2
*/
virtual void read_LDate(Tango::Attribute &attr);
virtual bool is_LDate_allowed(Tango::AttReqType type);
//--------------------------------------------------------
/**
* Method : SeqUtils::add_dynamic_attributes()
* Description : Add dynamic attributes if any.
*/
//--------------------------------------------------------
void add_dynamic_attributes();
// Command related methods
public:
/**
* Command On related method
* Description:
*
*/
virtual void on();
virtual bool is_On_allowed(const CORBA::Any &any);
/**
* Command Off related method
* Description:
*
*/
virtual void off();
virtual bool is_Off_allowed(const CORBA::Any &any);
/**
* Command Reset related method
* Description:
*
*/
virtual void reset();
virtual bool is_Reset_allowed(const CORBA::Any &any);
/**
* Command SetFault related method
* Description:
*
*/
virtual void set_fault();
virtual bool is_SetFault_allowed(const CORBA::Any &any);
/**
* Command Start related method
* Description:
*
*/
virtual void start();
virtual bool is_Start_allowed(const CORBA::Any &any);
/**
* Command Stop related method
* Description:
*
*/
virtual void stop();
virtual bool is_Stop_allowed(const CORBA::Any &any);
//--------------------------------------------------------
/**
* Method : SeqUtils::add_dynamic_commands()
* Description : Add dynamic commands if any.
*/
//--------------------------------------------------------
void add_dynamic_commands();
/*----- PROTECTED REGION ID(SeqUtils::Additional Method prototypes) ENABLED START -----*/
// Additional Method prototypes
/*----- PROTECTED REGION END -----*/ // SeqUtils::Additional Method prototypes
};
/*----- PROTECTED REGION ID(SeqUtils::Additional Classes Definitions) ENABLED START -----*/
// Additional Classes Definitions
/*----- PROTECTED REGION END -----*/ // SeqUtils::Additional Classes Definitions
} // End of namespace
#endif // SeqUtils_H
<?xml version="1.0" encoding="ASCII"?>
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://www.esrf.fr/tango/pogo/PogoDsl">
<classes name="SeqUtils" pogoRevision="9.4">
<description description="It returns a random generated number, sec/nsec date" title="SeqUtils" sourcePath="/home/giulio/fermi/servers/sequtils/src" language="Cpp" filestogenerate="XMI file,Code files,Protected Regions" license="GPL" copyright="" hasMandatoryProperty="false" hasConcreteProperty="false" hasAbstractCommand="false" hasAbstractAttribute="false">
<inheritances classname="Device_Impl" sourcePath=""/>
<identification contact="at elettra.eu - giulio.gaio" author="giulio.gaio" emailDomain="elettra.eu" classFamily="System" siteSpecific="" platform="All Platforms" bus="Not Applicable" manufacturer="none" reference=""/>
</description>
<commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="Device state">
<type xsi:type="pogoDsl:StateType"/>
</argout>
<status abstract="true" inherited="true" concrete="true"/>
</commands>
<commands name="Status" description="This command gets the device status (stored in its device_status data member) and returns it to the caller." execMethod="dev_status" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="Device status">
<type xsi:type="pogoDsl:ConstStringType"/>
</argout>
<status abstract="true" inherited="true" concrete="true"/>
</commands>
<commands name="On" description="" execMethod="on" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<excludedStates>FAULT</excludedStates>
</commands>
<commands name="Off" description="" execMethod="off" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<excludedStates>FAULT</excludedStates>
</commands>
<commands name="Reset" description="" execMethod="reset" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<commands name="SetFault" description="" execMethod="set_fault" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<commands name="Start" description="" execMethod="start" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<commands name="Stop" description="" execMethod="stop" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description="">
<type xsi:type="pogoDsl:VoidType"/>
</argin>
<argout description="">
<type xsi:type="pogoDsl:VoidType"/>
</argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands>
<attributes name="DRand" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="%f" maxValue="500000000000" minValue="-500000000000" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="DRandMin" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" memorizedAtInit="true" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="%f" maxValue="500000000000" minValue="-500000000000" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="DRandMax" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" memorizedAtInit="true" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="%f" maxValue="500000000000" minValue="-500000000000" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="LRand" attType="Scalar" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:IntType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="2147483647" minValue="-2147483648" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="LRandMin" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" memorizedAtInit="true" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:IntType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="2147483647" minValue="-2147483648" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="LRandMax" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" memorizedAtInit="true" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:IntType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="2147483647" minValue="-2147483648" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Data" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<writeExcludedStates>OFF</writeExcludedStates>
<writeExcludedStates>FAULT</writeExcludedStates>
</attributes>
<attributes name="Data1" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="LData" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:IntType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<writeExcludedStates>OFF</writeExcludedStates>
<writeExcludedStates>FAULT</writeExcludedStates>
</attributes>
<attributes name="Date" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="2" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:IntType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="LDate" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="2" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:IntType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<states name="ON" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="OFF" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="FAULT" description="">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<preferences docHome="./doc_html" makefileHome="/usr/local/tango-9.2.5a/share/pogo/preferences"/>
</classes>
</pogoDsl:PogoSystem>
This diff is collapsed.
/*----- PROTECTED REGION ID(SeqUtilsClass.h) ENABLED START -----*/
//=============================================================================
//
// file : SeqUtilsClass.h
//
// description : Include for the SeqUtils root class.
// This class is the singleton class for
// the SeqUtils device class.
// It contains all properties and methods which the
// SeqUtils requires only once e.g. the commands.
//
// project : SeqUtils
//
// 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/>.
//
//
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#ifndef SeqUtilsClass_H
#define SeqUtilsClass_H
#include <tango.h>
#include <SeqUtils.h>
/*----- PROTECTED REGION END -----*/ // SeqUtilsClass.h
namespace SeqUtils_ns
{
/*----- PROTECTED REGION ID(SeqUtilsClass::classes for dynamic creation) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtilsClass::classes for dynamic creation
//=========================================
// Define classes for attributes
//=========================================
// Attribute DRand class definition
class DRandAttrib: public Tango::Attr
{
public:
DRandAttrib():Attr("DRand",
Tango::DEV_DOUBLE, Tango::READ) {};
~DRandAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_DRand(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_DRand_allowed(ty);}
};
// Attribute DRandMin class definition
class DRandMinAttrib: public Tango::Attr
{
public:
DRandMinAttrib():Attr("DRandMin",
Tango::DEV_DOUBLE, Tango::READ_WRITE) {};
~DRandMinAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_DRandMin(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_DRandMin(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_DRandMin_allowed(ty);}
};
// Attribute DRandMax class definition
class DRandMaxAttrib: public Tango::Attr
{
public:
DRandMaxAttrib():Attr("DRandMax",
Tango::DEV_DOUBLE, Tango::READ_WRITE) {};
~DRandMaxAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_DRandMax(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_DRandMax(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_DRandMax_allowed(ty);}
};
// Attribute LRand class definition
class LRandAttrib: public Tango::Attr
{
public:
LRandAttrib():Attr("LRand",
Tango::DEV_LONG, Tango::READ) {};
~LRandAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_LRand(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_LRand_allowed(ty);}
};
// Attribute LRandMin class definition
class LRandMinAttrib: public Tango::Attr
{
public:
LRandMinAttrib():Attr("LRandMin",
Tango::DEV_LONG, Tango::READ_WRITE) {};
~LRandMinAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_LRandMin(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_LRandMin(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_LRandMin_allowed(ty);}
};
// Attribute LRandMax class definition
class LRandMaxAttrib: public Tango::Attr
{
public:
LRandMaxAttrib():Attr("LRandMax",
Tango::DEV_LONG, Tango::READ_WRITE) {};
~LRandMaxAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_LRandMax(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_LRandMax(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_LRandMax_allowed(ty);}
};
// Attribute Data class definition
class DataAttrib: public Tango::Attr
{
public:
DataAttrib():Attr("Data",
Tango::DEV_DOUBLE, Tango::READ_WRITE) {};
~DataAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_Data(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_Data(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_Data_allowed(ty);}
};
// Attribute Data1 class definition
class Data1Attrib: public Tango::Attr
{
public:
Data1Attrib():Attr("Data1",
Tango::DEV_DOUBLE, Tango::READ_WRITE) {};
~Data1Attrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_Data1(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_Data1(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_Data1_allowed(ty);}
};
// Attribute LData class definition
class LDataAttrib: public Tango::Attr
{
public:
LDataAttrib():Attr("LData",
Tango::DEV_LONG, Tango::READ_WRITE) {};
~LDataAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_LData(att);}
virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att)
{(static_cast<SeqUtils *>(dev))->write_LData(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_LData_allowed(ty);}
};
// Attribute Date class definition
class DateAttrib: public Tango::SpectrumAttr
{
public:
DateAttrib():SpectrumAttr("Date",
Tango::DEV_LONG, Tango::READ, 2) {};
~DateAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_Date(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_Date_allowed(ty);}
};
// Attribute LDate class definition
class LDateAttrib: public Tango::SpectrumAttr
{
public:
LDateAttrib():SpectrumAttr("LDate",
Tango::DEV_LONG, Tango::READ, 2) {};
~LDateAttrib() {};
virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att)
{(static_cast<SeqUtils *>(dev))->read_LDate(att);}
virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty)
{return (static_cast<SeqUtils *>(dev))->is_LDate_allowed(ty);}
};
//=========================================
// Define classes for commands
//=========================================
// Command On class definition
class OnClass : public Tango::Command
{
public:
OnClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(name,in,out,in_desc,out_desc, level) {};
OnClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out)
:Command(name,in,out) {};
~OnClass() {};
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<SeqUtils *>(dev))->is_On_allowed(any);}
};
// Command Off class definition
class OffClass : public Tango::Command
{
public:
OffClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(name,in,out,in_desc,out_desc, level) {};
OffClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out)
:Command(name,in,out) {};
~OffClass() {};
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<SeqUtils *>(dev))->is_Off_allowed(any);}
};
// Command Reset class definition
class ResetClass : public Tango::Command
{
public:
ResetClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(name,in,out,in_desc,out_desc, level) {};
ResetClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out)
:Command(name,in,out) {};
~ResetClass() {};
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<SeqUtils *>(dev))->is_Reset_allowed(any);}
};
// Command SetFault class definition
class SetFaultClass : public Tango::Command
{
public:
SetFaultClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(name,in,out,in_desc,out_desc, level) {};
SetFaultClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out)
:Command(name,in,out) {};
~SetFaultClass() {};
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<SeqUtils *>(dev))->is_SetFault_allowed(any);}
};
// Command Start class definition
class StartClass : public Tango::Command
{
public:
StartClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(name,in,out,in_desc,out_desc, level) {};
StartClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out)
:Command(name,in,out) {};
~StartClass() {};
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<SeqUtils *>(dev))->is_Start_allowed(any);}
};
// Command Stop class definition
class StopClass : public Tango::Command
{
public:
StopClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out,
const char *in_desc,
const char *out_desc,
Tango::DispLevel level)
:Command(name,in,out,in_desc,out_desc, level) {};
StopClass(const char *name,
Tango::CmdArgType in,
Tango::CmdArgType out)
:Command(name,in,out) {};
~StopClass() {};
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<SeqUtils *>(dev))->is_Stop_allowed(any);}
};
/**
* The SeqUtilsClass singleton definition
*/
#ifdef _TG_WINDOWS_
class __declspec(dllexport) SeqUtilsClass : public Tango::DeviceClass
#else
class SeqUtilsClass : public Tango::DeviceClass
#endif
{
/*----- PROTECTED REGION ID(SeqUtilsClass::Additionnal DServer data members) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtilsClass::Additionnal 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 SeqUtilsClass *init(const char *);
static SeqUtilsClass *instance();
~SeqUtilsClass();
Tango::DbDatum get_class_property(string &);
Tango::DbDatum get_default_device_property(string &);
Tango::DbDatum get_default_class_property(string &);
protected:
SeqUtilsClass(string &);
static SeqUtilsClass *_instance;
void command_factory();
void attribute_factory(vector<Tango::Attr *> &);
void pipe_factory();
void write_class_property();
void set_default_property();
void get_class_property();
string get_cvstag();
string get_cvsroot();
private:
void device_factory(const Tango::DevVarStringArray *);
void create_static_attribute_list(vector<Tango::Attr *> &);
void erase_dynamic_attributes(const Tango::DevVarStringArray *,vector<Tango::Attr *> &);
vector<string> defaultAttList;
Tango::Attr *get_attr_object_by_name(vector<Tango::Attr *> &att_list, string attname);
};
} // End of namespace
#endif // SeqUtils_H
/*----- PROTECTED REGION ID(SeqUtilsStateMachine.cpp) ENABLED START -----*/
//=============================================================================
//
// file : SeqUtilsStateMachine.cpp
//
// description : State machine file for the SeqUtils class
//
// project : SeqUtils
//
// 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/>.
//
//
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include <SeqUtils.h>
/*----- PROTECTED REGION END -----*/ // SeqUtils::SeqUtilsStateMachine.cpp
//================================================================
// States | Description
//================================================================
// ON |
// OFF |
// FAULT |
namespace SeqUtils_ns
{
//=================================================
// Attributes Allowed Methods
//=================================================
//--------------------------------------------------------
/**
* Method : SeqUtils::is_DRand_allowed()
* Description : Execution allowed for DRand attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_DRand_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for DRand attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::DRandStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DRandStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_DRandMin_allowed()
* Description : Execution allowed for DRandMin attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_DRandMin_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for DRandMin attribute in Write access.
/*----- PROTECTED REGION ID(SeqUtils::DRandMinStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DRandMinStateAllowed_WRITE
// Not any excluded states for DRandMin attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::DRandMinStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DRandMinStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_DRandMax_allowed()
* Description : Execution allowed for DRandMax attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_DRandMax_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for DRandMax attribute in Write access.
/*----- PROTECTED REGION ID(SeqUtils::DRandMaxStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DRandMaxStateAllowed_WRITE
// Not any excluded states for DRandMax attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::DRandMaxStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DRandMaxStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_LRand_allowed()
* Description : Execution allowed for LRand attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_LRand_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for LRand attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::LRandStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LRandStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_LRandMin_allowed()
* Description : Execution allowed for LRandMin attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_LRandMin_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for LRandMin attribute in Write access.
/*----- PROTECTED REGION ID(SeqUtils::LRandMinStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LRandMinStateAllowed_WRITE
// Not any excluded states for LRandMin attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::LRandMinStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LRandMinStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_LRandMax_allowed()
* Description : Execution allowed for LRandMax attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_LRandMax_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for LRandMax attribute in Write access.
/*----- PROTECTED REGION ID(SeqUtils::LRandMaxStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LRandMaxStateAllowed_WRITE
// Not any excluded states for LRandMax attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::LRandMaxStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LRandMaxStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Data_allowed()
* Description : Execution allowed for Data attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Data_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Check access type.
if ( type!=Tango::READ_REQ )
{
// Compare device state with not allowed states for WRITE
if (get_state()==Tango::OFF ||
get_state()==Tango::FAULT)
{
/*----- PROTECTED REGION ID(SeqUtils::DataStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DataStateAllowed_WRITE
return false;
}
return true;
}
else
// Not any excluded states for Data attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::DataStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DataStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Data1_allowed()
* Description : Execution allowed for Data1 attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Data1_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for Data1 attribute in Write access.
/*----- PROTECTED REGION ID(SeqUtils::Data1StateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::Data1StateAllowed_WRITE
// Not any excluded states for Data1 attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::Data1StateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::Data1StateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_LData_allowed()
* Description : Execution allowed for LData attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_LData_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Check access type.
if ( type!=Tango::READ_REQ )
{
// Compare device state with not allowed states for WRITE
if (get_state()==Tango::OFF ||
get_state()==Tango::FAULT)
{
/*----- PROTECTED REGION ID(SeqUtils::LDataStateAllowed_WRITE) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LDataStateAllowed_WRITE
return false;
}
return true;
}
else
// Not any excluded states for LData attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::LDataStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LDataStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Date_allowed()
* Description : Execution allowed for Date attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Date_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for Date attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::DateStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::DateStateAllowed_READ
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_LDate_allowed()
* Description : Execution allowed for LDate attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_LDate_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
// Not any excluded states for LDate attribute in read access.
/*----- PROTECTED REGION ID(SeqUtils::LDateStateAllowed_READ) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::LDateStateAllowed_READ
return true;
}
//=================================================
// Commands Allowed Methods
//=================================================
//--------------------------------------------------------
/**
* Method : SeqUtils::is_On_allowed()
* Description : Execution allowed for On attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT)
{
/*----- PROTECTED REGION ID(SeqUtils::OnStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::OnStateAllowed
return false;
}
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Off_allowed()
* Description : Execution allowed for Off attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Off_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Compare device state with not allowed states.
if (get_state()==Tango::FAULT)
{
/*----- PROTECTED REGION ID(SeqUtils::OffStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::OffStateAllowed
return false;
}
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Reset_allowed()
* Description : Execution allowed for Reset attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Reset_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Not any excluded states for Reset command.
/*----- PROTECTED REGION ID(SeqUtils::ResetStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::ResetStateAllowed
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_SetFault_allowed()
* Description : Execution allowed for SetFault attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_SetFault_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Not any excluded states for SetFault command.
/*----- PROTECTED REGION ID(SeqUtils::SetFaultStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::SetFaultStateAllowed
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Start_allowed()
* Description : Execution allowed for Start attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Start_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Not any excluded states for Start command.
/*----- PROTECTED REGION ID(SeqUtils::StartStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::StartStateAllowed
return true;
}
//--------------------------------------------------------
/**
* Method : SeqUtils::is_Stop_allowed()
* Description : Execution allowed for Stop attribute
*/
//--------------------------------------------------------
bool SeqUtils::is_Stop_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
// Not any excluded states for Stop command.
/*----- PROTECTED REGION ID(SeqUtils::StopStateAllowed) ENABLED START -----*/
/*----- PROTECTED REGION END -----*/ // SeqUtils::StopStateAllowed
return true;
}
/*----- PROTECTED REGION ID(SeqUtils::SeqUtilsStateAllowed.AdditionalMethods) ENABLED START -----*/
// Additional Methods
/*----- PROTECTED REGION END -----*/ // SeqUtils::SeqUtilsStateAllowed.AdditionalMethods
} // End of namespace
/*----- PROTECTED REGION ID(SeqUtils::main.cpp) ENABLED START -----*/
//=============================================================================
//
// file : main.cpp
//
// description : C++ source for the SeqUtils device server main.
// The main rule is to initialise (and create) the Tango
// system and to create the DServerClass singleton.
// The main should be the same for every Tango device server.
//
// project : SeqUtils
//
// 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/>.
//
//
//
//=============================================================================
// This file is generated by POGO
// (Program Obviously used to Generate tango Object)
//=============================================================================
#include <tango.h>
// Check if crash reporting is used.
#if defined(ENABLE_CRASH_REPORT)
# include <crashreporting/crash_report.h>
#else
# define DECLARE_CRASH_HANDLER
# define INSTALL_CRASH_HANDLER
#endif
DECLARE_CRASH_HANDLER;
int main(int argc,char *argv[])
{
INSTALL_CRASH_HANDLER
try
{
// Initialise the device server
//----------------------------------------
Tango::Util *tg = Tango::Util::init(argc,argv);
// Create the device server singleton
// which will create everything
//----------------------------------------
tg->server_init(false);
// Run the endless loop
//----------------------------------------
cout << "Ready to accept request" << endl;
tg->server_run();
}
catch (bad_alloc &)
{
cout << "Can't allocate memory to store device object !!!" << endl;
cout << "Exiting" << endl;
}
catch (CORBA::Exception &e)
{
Tango::Except::print_exception(e);
cout << "Received a CORBA_Exception" << endl;
cout << "Exiting" << endl;
}
Tango::Util::instance()->server_cleanup();
return(0);
}
/*----- PROTECTED REGION END -----*/ // SeqUtils::main.cpp
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment