Main Page | Class Hierarchy | Class List | Class Members

BlueSense::Master Class Reference

List of all members.

Public Member Functions

 Master ()
 Master (int id)
void close ()
void start (uint intervalMs)
void stop ()
byte getMessageCount ()
string getLastMessage (byte i)
void clearMessages ()
void addIPAddress (String ip, String usrName, String password)
void requestDeviceTable ()
void yield ()
void aSyncYield (uint intervalUs)
void autoYield (uint duration, uint interval)
void clearDeviceTable ()
Device getFirstDevice ()
Device getNextDevice (Device dev)
int getListedDeviceCount ()
Device getDeviceById (int id)
Device detectDevice (ushort id, uint timeOut)
int detectDevices (ushort count, uint timeOut)
long getTimeUs ()

Detailed Description

The master represents the gateway between the computer and the BlueSense network
Author:
Dinne Bosman


Constructor & Destructor Documentation

BlueSense::Master::Master  )  [inline]
 

Constructs a Master with id 0 (default).

BlueSense::Master::Master int  id  )  [inline]
 

Constructs a Master a given id.

Parameters:
id Not used at the moment, supply 0.


Member Function Documentation

void BlueSense::Master::addIPAddress String  ip,
String  usrName,
String  password
[inline]
 

Connects with a BlueSense internet master ip the ip address usrNae the username password the password

void BlueSense::Master::aSyncYield uint  intervalUs  )  [inline]
 

Takes care of data transmission/reception from the BlueSense network. This method ensures that even if you call aSyncYield more often then every intervalUs, yield is actually still called at the specified interval. Call this method manually or use the communication process.

See also:
start.

void BlueSense::Master::autoYield uint  duration,
uint  interval
[inline]
 

Calls yield every interval us for a total of duration us.

Parameters:
duration duration of the call
interval yield is called every interval us.

void BlueSense::Master::clearDeviceTable  )  [inline]
 

Clears the device table. Can be usefull if you unplugged some devices as they are not automatically removed from the table.

void BlueSense::Master::clearMessages  )  [inline]
 

Clears last occurred errors

void BlueSense::Master::close  )  [inline]
 

Closes the master. If the communication was started it will be stopped as well.

Device BlueSense::Master::detectDevice ushort  id,
uint  timeOut
[inline]
 

Try to detect a device with a given identifier.

Parameters:
id The identifier of the device to detect.
timeOut The maximum amount of time which detection can take.
Returns:
an object of type Device. You can cast this object denpending on its type to a UnknownDevice, AdcInputDevice, etc.

int BlueSense::Master::detectDevices ushort  count,
uint  timeOut
[inline]
 

Detects a number of devices

Parameters:
count The number of devices to detect.
timeOut The maximum amount of time which detection can take.
Returns:
the number of new found devices.

Device BlueSense::Master::getDeviceById int  id  )  [inline]
 

Returns the device with the given id. If the device is not found or if it's not registered with the master an UnknownDevice will be returned

Parameters:
id the id of the device
Returns:
an object of type Device. You can cast this object denpending on its type to a UnknownDevice, AdcInputDevice, etc.

Device BlueSense::Master::getFirstDevice  )  [inline]
 

Gets the first found device from the table. Can be used in conjunction with

See also:
getNextDevice to iterate over the devices.
Returns:
the first Device.

string BlueSense::Master::getLastMessage byte  i  )  [inline]
 

Returns a message

Parameters:
i index of the error
Returns:
error message i

int BlueSense::Master::getListedDeviceCount  )  [inline]
 

Return the total number of found devices in the table.

Returns:
the number of found devices

byte BlueSense::Master::getMessageCount  )  [inline]
 

Get the number of last occurred messages

Returns:
the number of errors

Device BlueSense::Master::getNextDevice Device  dev  )  [inline]
 

Gets the next device from the table. Can be used in conjunction with

See also:
getFirstDevice to iterate over the devices.
Parameters:
dev the current device
Returns:
the next device.

long BlueSense::Master::getTimeUs  )  [inline]
 

Returns:
absolute time in microseconds.

void BlueSense::Master::requestDeviceTable  )  [inline]
 

Checks if there are new devices.

void BlueSense::Master::start uint  intervalMs  )  [inline]
 

Starts communication process.

The communication process takes care of the sending and receiving of BlueSense data. The communication process actually automatically calls the yield

See also:
method from within a loop. Either use the automatic communication process or use yield manually. Do not use both!
Parameters:
intervalMs master.yield is called every intervalMs miliseconds.

void BlueSense::Master::stop  )  [inline]
 

Stops communication process.

void BlueSense::Master::yield  )  [inline]
 

Takes care of data transmission/reception from the BlueSense network. Call this method manually or use the communication process.

See also:
start.


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