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

OSCAR::Relay Class Reference
[Device]

#include <Relay.h>

Inheritance diagram for OSCAR::Relay:

Inheritance graph
[legend]
List of all members.

Public Methods

 Relay (unsigned int lineNo, DIO &dio, OSCARError &err=DUMMY_ERROR(noError))
bool Initialize ()
virtual ~Relay ()
bool On ()
bool Off ()

Private Methods

 Relay (const Relay &)
Relay & operator= (const Relay &)

Private Attributes

unsigned int lineNo
DIOdio

Constructor & Destructor Documentation

OSCAR::Relay::Relay unsigned int    lineNo,
DIO   dio,
OSCARError   err = DUMMY_ERROR(noError)
 

Constructor for Saw. This class uses abstract class DIO for digitial IO. Drivers for specific instantiation of DIO shouldb be installed on your system for this class to work.

Parameters:
lineNo The number of the digital line that is used to interface with the relay.
dio An object that implements the interface defined in DIO
err An OSCARError object that on return will hold the value of the error code that was generated when the constructor was called. If this error was not 'noError' you can call GetError() to get the details of the error code.

virtual OSCAR::Relay::~Relay   [inline, virtual]
 

Destructor.

If relay is not closed, it calls Close()

OSCAR::Relay::Relay const Relay &    [private]
 


Member Function Documentation

bool OSCAR::Relay::Initialize   [virtual]
 

Initializes the relay. A call to this method is required before On() and Off() can be called. This method also sets the switch to Off when initialize is called. This may cause adverse effects in the system to which this relay is connected. User should make sure that on powerup, an off setting of the Relay is safe.

Returns:
true or false. if false, call GetError() to get detailed error information
Exceptions:
nidaqError nidaqError

Reimplemented from OSCAR::Device.

bool OSCAR::Relay::Off   [virtual]
 

This will turn off the relay.

Returns:
true or false. if false, call GetError() to get detailed error information
Exceptions:
notInitialized notInitialized

Implements OSCAR::TwoStateSwitch.

bool OSCAR::Relay::On   [virtual]
 

This will turn on the relay.

Returns:
true or false. if false, call GetError() to get detailed error information
Exceptions:
notInitialized notInitialized

Reimplemented from OSCAR::TwoStateSwitch.

Relay& OSCAR::Relay::operator= const Relay &    [private]
 


Member Data Documentation

DIO* OSCAR::Relay::dio [private]
 

unsigned int OSCAR::Relay::lineNo [private]
 


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