Main Page | Class Hierarchy | Class List | Class Members

BlueSense::RelayOutputDevice Class Reference

Inheritance diagram for BlueSense::RelayOutputDevice:

BlueSense::Device List of all members.

Public Types

enum  PortEnum

Public Member Functions

 RelayOutputDevice (Master master, ushort deviceId)
void requestGetOutputs ()
bool getCurrentOutput (PortEnum port)
ushort getCurrentOutputs ()
void requestSetOutput (PortEnum port, bool state)
bool getRequestSetOutputsDone ()
long getTimeOutUs ()
void setTimeOutUs (uint timeOutUs)
void requestSetOutputs (int mask, int states)
int getPendingOutputs ()
bool getPendingOutput (PortEnum port)

Detailed Description

The device class holds common information for all BlueSense devices (eg. the identifier). It also defines some operations which can be done on all types of devices.
Author:
Dinne Bosman


Member Enumeration Documentation

enum BlueSense::RelayOutputDevice::PortEnum
 

Enumeration describing the open collector output ports


Constructor & Destructor Documentation

BlueSense::RelayOutputDevice::RelayOutputDevice Master  master,
ushort  deviceId
[inline]
 

Creates a bluesense device with id 'deviceid'

Parameters:
deviceId 
master a master
the new device has getFound() set to false until the device has been physically detected!


Member Function Documentation

bool BlueSense::RelayOutputDevice::getCurrentOutput PortEnum  port  )  [inline]
 

Returns the output state of a pin

Parameters:
port the output port.
See also:
PortEnum

ushort BlueSense::RelayOutputDevice::getCurrentOutputs  )  [inline]
 

Returns the output states

bool BlueSense::RelayOutputDevice::getPendingOutput PortEnum  port  )  [inline]
 

Returns the 'tobe set' state of an output

Parameters:
port the output port.
See also:
PortEnum
Returns:
true if the output will be activated, or false when it will be deactivated.

int BlueSense::RelayOutputDevice::getPendingOutputs  )  [inline]
 

Returns a bitmask containing which outputs are be set after the request finishes

Returns:
an uint16_t containing for each output a bit. If the bit is 1, then the output will be set when the request is completed

bool BlueSense::RelayOutputDevice::getRequestSetOutputsDone  )  [inline]
 

Checks if the output set request is finished

Returns:
true if request finished, false if request still busy

long BlueSense::RelayOutputDevice::getTimeOutUs  )  [inline]
 

Returns the current set time out delay. The time out delay is used to check if a request was acknowledged in the set time. If an answer to a request is not received within the set time, the request is resent.

Returns:
the time out value in microseconds.

void BlueSense::RelayOutputDevice::requestGetOutputs  )  [inline]
 

Sends a request to retrieve the current set output states

void BlueSense::RelayOutputDevice::requestSetOutput PortEnum  port,
bool  state
[inline]
 

Sends a request to set a single output to a new state

Parameters:
port the output port.
See also:
PortEnum
Parameters:
state the new state of the output. 1 activates, 0 disables.

void BlueSense::RelayOutputDevice::requestSetOutputs int  mask,
int  states
[inline]
 

Sends a request to update the output states of the device.

Parameters:
mask a bit mask indicating which outputs to update
states an uint16_t bit mask containing the new output states. Only those outputs will be updated for which a bit is set in the relevantBits parameter

void BlueSense::RelayOutputDevice::setTimeOutUs uint  timeOutUs  )  [inline]
 

Sets the time out value which is used to check if a request was acknowledged in the set time. If an answer to a request is not received within the set time, the request is resent.

Parameters:
timeOutUs the value in microseconds which is the maximum duraion between a request and its answer.


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 17:51:58 2008 for BlueSense.NET/Mono by  doxygen 1.4.4