Main Page | Class Hierarchy | Class List | Class Members

BlueSense::DacOutputDevice Class Reference

Inheritance diagram for BlueSense::DacOutputDevice:

BlueSense::Device List of all members.

Public Types

enum  PortEnum

Public Member Functions

 DacOutputDevice (Master master, ushort deviceId)
void requestSetOutputs (byte relevantOutputs, byte[] values)
void requestSetOutput (PortEnum port, byte value)
void requestGetOutputs ()
void getPendingOutputs (byte[] values)
byte getPendingOutput (PortEnum port)
bool getRequestSetOutputsDone ()
byte getCurrentOutput (PortEnum port)
void getCurrentOutputs (byte[] valueArray)
uint getTimeOutUs ()
void setTimeOutUs (uint timeOutUs)

Static Public Attributes

static byte OUTPUTCOUNT = (byte)bluesense.BLUESENSE_ANALOGOUTPUT_OUTPUTCOUNT

Detailed Description

Interface to the DacOutput device BM7006.

The BM7006 can be used to drive 6 analog outputs. Via software you can control the output values of the different ports.

Author:
Dinne Bosman


Member Enumeration Documentation

enum BlueSense::DacOutputDevice::PortEnum
 

Enum describing the output ports


Constructor & Destructor Documentation

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

Creates a 'software' output device proxy with a given id. The device will inacessible until a physical device with the same id is detected.

Parameters:
master 
deviceId 


Member Function Documentation

byte BlueSense::DacOutputDevice::getCurrentOutput PortEnum  port  )  [inline]
 

Returns the current set value of a specific output.

Parameters:
port the port pin of the output. Must lie between 0 and BLUESENSE_OUTPUTCONTROLLER_OUTPUTCOUNT.
See also:
PortEnum
Returns:
the value off the output.

void BlueSense::DacOutputDevice::getCurrentOutputs byte[]  valueArray  )  [inline]
 

Fills an array with the current set values.

Parameters:
valueArray a pointer to an array of uint8_t values with enough space for all outputs.
See also:
BLUESENSE_OUTPUTCONTROLLER_OUTPUTCOUNT

byte BlueSense::DacOutputDevice::getPendingOutput PortEnum  port  )  [inline]
 

Returns the value of a specific output, which is currently underway to the device

Parameters:
port the output port.
See also:
PortEnum
Returns:
the value to be set on the output.

void BlueSense::DacOutputDevice::getPendingOutputs byte[]  values  )  [inline]
 

Fills an array with values which are currently underway to the device

Parameters:
values a pointer to an array of uint8_t values with enough space for all outputs.
See also:
BLUESENSE_OUTPUTCONTROLLER_OUTPUTCOUNT

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

Checks if the value set request is finished

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

uint BlueSense::DacOutputDevice::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::DacOutputDevice::requestGetOutputs  )  [inline]
 

Sends a request to retrieve the current set values

void BlueSense::DacOutputDevice::requestSetOutput PortEnum  port,
byte  value
[inline]
 

Requests the device to set one of its outputs to a new value

Parameters:
port the output port.
See also:
PortEnum
Parameters:
value an uint8_t representing the new value of the output. Note that each value is value between 0 and 255, the actual physical value depends on the specifications of the connected output.

void BlueSense::DacOutputDevice::requestSetOutputs byte  relevantOutputs,
byte[]  values
[inline]
 

Requests the output device to set its outputs to new values

Parameters:
relevantOutputs a bit mask indicating which outputs to update
values a pointer to an array of uint8_t values with enough space for all outputs.
See also:
OUTPUTCOUNT Only those values for which a bit in the bit mask is set will be sent to the device.

void BlueSense::DacOutputDevice::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.


Member Data Documentation

byte BlueSense::DacOutputDevice::OUTPUTCOUNT = (byte)bluesense.BLUESENSE_ANALOGOUTPUT_OUTPUTCOUNT [static]
 

The number of outputs that can be controlled


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