#include <acsexmplLongDevIO.h>
Public Member Functions | |
LongDevIO () | |
virtual | ~LongDevIO () |
virtual bool | initializeValue () |
virtual CORBA::Long | read (unsigned long long ×tamp) |
virtual void | write (const CORBA::Long &value, unsigned long long ×tamp) |
This class provides an example of the implementation of a devIO subclass. Developers should use devIOs when you have a BACI property where you need to change the underlying value, but do not want the property to be read-write where anyone can change it. Please see the Ramped Power Supply example to see how this class is used in conjunction with BACI long properties.
LongDevIO::LongDevIO | ( | ) | [inline] |
Default constuctor - nothing to do.
virtual LongDevIO::~LongDevIO | ( | ) | [inline, virtual] |
Destructor - nothing to destroy.
virtual bool LongDevIO::initializeValue | ( | ) | [inline, virtual] |
virtual CORBA::Long LongDevIO::read | ( | unsigned long long & | timestamp | ) | [inline, virtual] |
Reads the long value from "somewhere". We could get this value from physical hardware, files on disk, etc. For the purpose of this simple example, 42 is returned. This implies every time the value of a BACI long property that uses this class is accessed, 42 will be returned.
Last but definitely not least, it is important to note that this method can be invoked from both ROlong and RWlong properties.
errcode | The error code (as defined in the ACS Error System) that occured while reading this value or 0 if no error occured. It's up to the developer to determine whether an error occured or not. | |
timestamp | The time when the long value was read (presumably from hardware). |
ACSErr::ACSbaseExImpl |
|
References getTimeStamp().
virtual void LongDevIO::write | ( | const CORBA::Long & | value, | |
unsigned long long & | timestamp | |||
) | [inline, virtual] |
Writes the long value to "someplace". This could be to physical hardware, files on disk, etc. Every time the value of a BACI RWlong property using this class is set, a message will be printed to standard out.
Last but definitely not least, it is important to note this method can be only be invoked from RWlong properties.
value | The long value some ACS client (human or software) is trying to set for a BACI RWlong property that uses this devIO subclass. | |
errcode | The error code (as defined in the ACS Error System) that occured while writing this value or 0 if no error occured. It's up to the developer to determine whether an error occured or not. | |
timestamp | The time when the long value was written (presumably to hardware). |
ACSErr::ACSbaseExImpl |
|
References getTimeStamp().