Main Page | Class Hierarchy | Class List | Class Members

BlueSense::AdcInputDevice Class Reference

Inheritance diagram for BlueSense::AdcInputDevice:

BlueSense::Device List of all members.

Public Types

enum  PortEnum

Public Member Functions

 AdcInputDevice (Master master, ushort deviceId)
ushort getLastSampledInput (PortEnum port)
uint getSampleCount ()
byte getCurrentResolution ()
ushort getCurrentSampleDelay ()
ushort getCurrentVoltageReference ()
bool configPending ()
bool getRequestGetConfigDone ()
bool getRequestSetConfigDone ()
void requestGetConfiguration ()
void requestSetConfiguration (ushort voltageReference, ushort sampleDelay, byte resolution)
void requestSetResolution (byte resolution)
void requestSetSampleDelay (ushort sampleDelay)
void requestSetVoltageReference (ushort voltageReference)
uint getTimeOutUs ()
void setTimeOutUs (uint timeOutUs)

Detailed Description

Interface to the analog input device BM7003.

The BM7003 can be used to convert analogue signals into digital values. The module contains six inputs for different analogue signals. Via software you can configure the resolution of the AD coversion from 1 to 10 bits. The sample rate canbe adjusted in steps of 1 ms to a maximum of 1000 samples per second.

Author:
Dinne Bosman


Member Enumeration Documentation

enum BlueSense::AdcInputDevice::PortEnum
 

Enumeration describing the sample ports


Constructor & Destructor Documentation

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

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

Parameters:
master 
deviceId 


Member Function Documentation

bool BlueSense::AdcInputDevice::configPending  )  [inline]
 

Checks if a configuration is being currently being set or being retrieved

Returns:
1 if busy, 0 if done

byte BlueSense::AdcInputDevice::getCurrentResolution  )  [inline]
 

Obtain the last retrieved resolution settings.

Returns:
the last retrieved resolution settings

ushort BlueSense::AdcInputDevice::getCurrentSampleDelay  )  [inline]
 

Obtain the last retrieved sample delay settings.

Returns:
the last retrieved sample delay settings

ushort BlueSense::AdcInputDevice::getCurrentVoltageReference  )  [inline]
 

Obtain the last retrieved voltage reference settings.

Returns:
the last retrieved voltage reference settings

ushort BlueSense::AdcInputDevice::getLastSampledInput PortEnum  port  )  [inline]
 

Gets the analog input value of a certain port.

Parameters:
port port pin value.
See also:
PortEnum
Returns:
the last sampled value

bool BlueSense::AdcInputDevice::getRequestGetConfigDone  )  [inline]
 

Checks if the configuration request is finished

Returns:
1 if configuration was retrieved, 0 if still busy

bool BlueSense::AdcInputDevice::getRequestSetConfigDone  )  [inline]
 

Checks if the configuration set request is finished

Returns:
1 if request finished, 0 if request still busy

uint BlueSense::AdcInputDevice::getSampleCount  )  [inline]
 

Returns:
returns the total number of samples received since the start of the application

uint BlueSense::AdcInputDevice::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::AdcInputDevice::requestGetConfiguration  )  [inline]
 

Request to obtain the configuration settings from a adcInput Device.

void BlueSense::AdcInputDevice::requestSetConfiguration ushort  voltageReference,
ushort  sampleDelay,
byte  resolution
[inline]
 

Request the adcInput device to set a new reference voltage, sample delay and resolution

Parameters:
voltageReference the new reference voltage in mv, should lie between 1000 and ADC_MAX_VREF.
See also:
ADC_MAX_VREF
Parameters:
sampleDelay sets the delay in ms (0-65535) between samples.
resolution the sample resolution in bits, should lie between 1 and BLUESENSE_ADCIN_MAX_RESOLUTION.
See also:
BLUESENSE_ADCIN_MAX_RESOLUTION

void BlueSense::AdcInputDevice::requestSetResolution byte  resolution  )  [inline]
 

Requests the adcInput device to set a new sample resolution

Parameters:
resolution the sample resolution in bits, should lie between 1 and BLUESENSE_ADCIN_MAX_RESOLUTION.
See also:
BLUESENSE_ADCIN_MAX_RESOLUTION

void BlueSense::AdcInputDevice::requestSetSampleDelay ushort  sampleDelay  )  [inline]
 

Requests the adcInput device to set a new sample delay

Parameters:
sampleDelay sets the delay in ms (0-65535) between samples.

void BlueSense::AdcInputDevice::requestSetVoltageReference ushort  voltageReference  )  [inline]
 

Requests the adcInput device to set a new reference voltage

Parameters:
voltageReference the new reference voltage in mv, should lie between 1000 and ADC_MAX_VREF.
See also:
ADC_MAX_VREF

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