Main Page | Class Hierarchy | Class List | Class Members

BlueSense::OCOutputDevice Class Reference

Inheritance diagram for BlueSense::OCOutputDevice:

BlueSense::Device List of all members.

Public Types

enum  PortEnum

Public Member Functions

 OCOutputDevice (Master master, ushort deviceId)
void requestGetOutputs ()
bool getCurrentOutput (PortEnum port)
ushort getCurrentOutputs ()
byte getCurrentPWMDutyCycle (PortEnum port)
void getCurrentPWMDutyCycles (byte[] dutyCycles)
void requestSetOutput (PortEnum port, bool state)
void requestSetDutyCycles (ushort relevantDutyCycles, byte[] duryCycles)
void requestSetDutyCycle (PortEnum port, byte dutyCycle)
bool getRequestSetOutputsDone ()
long getTimeOutUs ()
void setTimeOutUs (uint timeOutUs)
void requestSetOutputs (int mask, int states)
int getPendingOutputs ()
bool getPendingOutput (PortEnum port)
void getPendingPWMDutyCycles (byte[] dutyCycles)
byte getPendingPWMDutyCycle (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::OCOutputDevice::PortEnum
 

Enumeration describing the open collector output ports


Constructor & Destructor Documentation

BlueSense::OCOutputDevice::OCOutputDevice 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::OCOutputDevice::getCurrentOutput PortEnum  port  )  [inline]
 

Returns the output state of a pin

Parameters:
port the output port.
See also:
PortEnum

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

Returns the output states

byte BlueSense::OCOutputDevice::getCurrentPWMDutyCycle PortEnum  port  )  [inline]
 

Firmware: 2+ Returns the current set duty cycle of a specific port. A duty cycle of 0 indicates that PWM is disabled for this port.

Parameters:
port the port pin of the output.
See also:
PortEnum
Returns:
the duty cycle of pwm pin.

void BlueSense::OCOutputDevice::getCurrentPWMDutyCycles byte[]  dutyCycles  )  [inline]
 

Firmware: 2+ Fills an array with the current set duty cycle values for PWM (pulse width modulation) signals. A duty cycle of 0 indicates that the corresponding pwm signal is disabled.

Parameters:
dutyCycles a pointer to an array of uint8_t values with enough space for all output pins.
See also:
OUTPUTCOUNT

bool BlueSense::OCOutputDevice::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::OCOutputDevice::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

byte BlueSense::OCOutputDevice::getPendingPWMDutyCycle PortEnum  port  )  [inline]
 

Firmware: 2+ Returns the duty cycle of a specific pwm signal. This value is in the process of being sent to the device.

Parameters:
port the output port.
See also:
PortEnum
Returns:
the duty cycle to be sent to the module.

void BlueSense::OCOutputDevice::getPendingPWMDutyCycles byte[]  dutyCycles  )  [inline]
 

Firmware: 2+ Fills an array with PWM duty cycle values. These values are in the process of being sent to the device.

Parameters:
dutyCycles a pointer to an array of uint8_t values with enough space for all pins.
See also:
OUTPUTCOUNT

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

Checks if the output set request is finished

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

long BlueSense::OCOutputDevice::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::OCOutputDevice::requestGetOutputs  )  [inline]
 

Sends a request to retrieve the current set output states

void BlueSense::OCOutputDevice::requestSetDutyCycle PortEnum  port,
byte  dutyCycle
[inline]
 

Firmware: version 2+ Sets the dutycycle for PWM (pulse width modulation) for the specified pin

Parameters:
port port pin value.
See also:
bsOCOutput_pA_1
Parameters:
dutyCycle the new dutyCycle value (0-255). A dutyCycle of 0 disables PWM for the corresponding pin

void BlueSense::OCOutputDevice::requestSetDutyCycles ushort  relevantDutyCycles,
byte[]  duryCycles
[inline]
 

Firmware: version 2+ Sets the duty cycles of pwm (pulse width modulation) pins

Parameters:
relevantDutyCycles a bit mask indicating which pwm duty Cycle to update
duryCycles an array of size OUTPUTCOUNT containing byte values (0-255) of the new duty cycles. A duty cycle of 0 will disable pwm for the coreesponding pin.
See also:
OUTPUTCOUNT

void BlueSense::OCOutputDevice::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::OCOutputDevice::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::OCOutputDevice::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