Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::Device Class Reference
[Device]

#include <Device.h>

Inheritance diagram for OSCAR::Device:

Inheritance graph
[legend]
List of all members.

Public Methods

 Device (const String &name=String(), OSCARError &err=DUMMY_ERROR(noError))
 Device (const Device &device)
Device & operator= (const Device &device)
virtual ~Device ()
virtual bool Initialize ()
virtual bool Close ()

Protected Attributes

bool isInitialized
bool isClosed

Constructor & Destructor Documentation

OSCAR::Device::Device const String   name = String(),
OSCARError   err = DUMMY_ERROR(noError)
 

OSCAR::Device::Device const Device &    device
 

virtual OSCAR::Device::~Device   [virtual]
 

Destructor that calls Close() if the device has not been closed by a call to the Close() method The destructor checks to see whether isClosed is false, in which case it will call the Close() method.

See also:
Close()


Member Function Documentation

virtual bool OSCAR::Device::Close   [virtual]
 

Generic close device function, could be overriden and implemented according to specific application in derivative class. This function provides a method to close a device after finishing use it. "isClosed" is false if this function is not executed.

Returns:
true if the device close succeed. false if device close failed. Call GetError() to get detailed error information
See also:
~Device()

Reimplemented in OSCAR::ATISensor, OSCAR::KB2017Interface, OSCAR::PCRoboworksInterface, OSCAR::RobixInterface, and OSCAR::RoboworksInterface.

virtual bool OSCAR::Device::Initialize   [virtual]
 

Generic initialize function, could be overriden and implemented according to specific application in derivative class This function must be called every time after an object is created, otherwise an error will happen which indicates not initialized.

In derived classes, check must be done to see if data member"isInitialized" is true in member functions in order to judge whether initialize has been executed.

Returns:
true if initialization succeeds. false if initialization fails. Call GetError() to get detailed error information

Reimplemented in OSCAR::ATISensor, OSCAR::Drill, OSCAR::KB2017Interface, OSCAR::PCRoboworksInterface, OSCAR::Relay, OSCAR::RobixInterface, OSCAR::RoboworksInterface, OSCAR::Saw, OSCAR::SprayGun, and OSCAR::ToolChanger.

Device& OSCAR::Device::operator= const Device &    device
 


Member Data Documentation

bool OSCAR::Device::isClosed [protected]
 

data member to indicate whether Close() is executed.

true -- has been closed false-- not be closed yet

bool OSCAR::Device::isInitialized [protected]
 

Data member to indicate whether Initialize() is executed.

true -- has been initialized false-- not be initialized yet


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations