Main Page | Class Hierarchy | Class List | Class Members

BlueSense::RouterDevice Class Reference

Inheritance diagram for BlueSense::RouterDevice:

BlueSense::Device List of all members.

Public Member Functions

 RouterDevice (Master master, ushort deviceId)
int getCurrentChannel ()
bool configPending ()
bool getRequestGetConfigDone ()
bool getRequestSetConfigDone ()
void requestGetConfiguration ()
void requestSetChannel (byte channel)
void requestSetSerialConfiguration (uint baudrate, byte stopbits, byte parity, byte databits)
uint getCurrentSerialBaudRate ()
byte getCurrentSerialDataBits ()
byte getCurrentSerialStopBits ()
byte getCurrentSerialParity ()
void setSerialBufferSizes (ushort receiveSize, ushort writeSize)
ushort popReceivedSerialData (int[] receiveArray)
ushort bsRouterDevice_writeSerialData (int[] data)
uint getSerialWriteBufferPendingData ()
void setSerialReceiveAsciiMode (bool asciiMode)
bool getSerialReceiveAsciiMode ()
uint getTimeOutUs ()
void setTimeOutUs (uint timeOutUs)

Detailed Description

Interface for BlueSense routers (usb, wireless, ethernet)
Author:
Dinne Bosman


Constructor & Destructor Documentation

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

Creates a 'software' motor 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

ushort BlueSense::RouterDevice::bsRouterDevice_writeSerialData int[]  data  )  [inline]
 

Writes serial data into the writebuffer which will be copied to the serial extension board. Data is written at each bsmaster yield call.

Parameters:
data an array of data bytes (values between 0-255).
Returns:
number of bytes actually written.

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

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

Returns:
1 if busy, 0 if done

int BlueSense::RouterDevice::getCurrentChannel  )  [inline]
 

Obtain the last retrieved wireless channel settings.

Returns:
the last retrieved channel settings

uint BlueSense::RouterDevice::getCurrentSerialBaudRate  )  [inline]
 

Returns:
Returns the configured baudrate for serial communication (when using the serial extension board)

byte BlueSense::RouterDevice::getCurrentSerialDataBits  )  [inline]
 

Returns:
Returns the configured number of databits for serial communication (when using the serial extension board)

byte BlueSense::RouterDevice::getCurrentSerialParity  )  [inline]
 

Returns:
the configured parity mode 4 = even, 3 = odd, 2 = mark, 1 = space, 0 = none, for serial communication (when using the serial extension board).

byte BlueSense::RouterDevice::getCurrentSerialStopBits  )  [inline]
 

Returns:
the configured number of stopbits for serial communication (when using the serial extenstion board)

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

Checks if the configuration request is finished

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

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

Checks if the configuration set request is finished

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

bool BlueSense::RouterDevice::getSerialReceiveAsciiMode  )  [inline]
 

Returns the serial receive mode. true depicts line oriented ASCII mode, false binary mode.

uint BlueSense::RouterDevice::getSerialWriteBufferPendingData  )  [inline]
 

Returns:
Returns the number of bytes waiting in the write buffer

uint BlueSense::RouterDevice::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.

ushort BlueSense::RouterDevice::popReceivedSerialData int[]  receiveArray  )  [inline]
 

Retrieves received buffered data from the serial extension board. Data is received into a receive buffer in each bsmaster yield call. If serial communication is in ascii mode the data will be returned delimited by ascii code 13, otherwise all pending data is returned.

Parameters:
receiveArray an array which will be filled with the received data
Returns:
the number of received bytes

void BlueSense::RouterDevice::requestGetConfiguration  )  [inline]
 

Request to obtain the configuration settings from a adcInput Device.

void BlueSense::RouterDevice::requestSetChannel byte  channel  )  [inline]
 

Request the router device to set a new wireless channel

Parameters:
channel the new channel, should lie between 0 and BLUESENSE_WRTR_MAX_CHANNEL.
See also:
BLUESENSE_WRTR_MAX_CHANNEL

void BlueSense::RouterDevice::requestSetSerialConfiguration uint  baudrate,
byte  stopbits,
byte  parity,
byte  databits
[inline]
 

Sets the configuration parameters for the serial extension board. Note that not all options are available on all devices.

Parameters:
baudrate the speed of serial communication default is 38400
stopbits number of stopbits, choose 2 or 1
parity parity bits: 4 = even, 3 = odd, 2 = mark, 1 = space, 0 = none
databits number of databits: 5,6,7 or 8

void BlueSense::RouterDevice::setSerialBufferSizes ushort  receiveSize,
ushort  writeSize
[inline]
 

Sets buffer sizes to be used for receiving and writing data from/to the serial extension board

void BlueSense::RouterDevice::setSerialReceiveAsciiMode bool  asciiMode  )  [inline]
 

* Set serial receive mode. When set to '1' data will be received line oriented (delimited by character 13). When set to '0' no interpretation is done of the data.

Parameters:
asciiMode true to set line oriented mode, false for no interpretation.

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