34 #ifndef __ENKI_BLUETOOTHBASE_H 35 #define __ENKI_BLUETOOTHBASE_H std::queue< Connections > disconnectbuffer
Queue of the connection to be closed.
Definition: BluetoothBase.h:93
unsigned destaddress
Destination address of the connection.
Definition: BluetoothBase.h:72
Implementation of a Bluetooth base coordinating the Bluetooth modules.
Definition: BluetoothBase.h:54
No error occured during the last step.
Definition: BluetoothBase.h:114
unsigned address
Address of the associated bluetooth module.
Definition: BluetoothBase.h:63
bool bbConnectTo(Bluetooth *source, unsigned address)
Execute the previously scheduled connections.
Definition: BluetoothBase.cpp:153
bool bbCloseConnection(Bluetooth *source, unsigned address)
Execute the previously scheduled disconnections.
Definition: BluetoothBase.cpp:191
std::list< BtClients > clients
List of registered Bluetooth module.
Definition: BluetoothBase.h:89
char * data
Pointer to a buffer containing the data to be sent.
Definition: BluetoothBase.h:83
bool registerClient(Bluetooth *owner, unsigned address)
Register a module Bluetooth with its associated address.
Definition: BluetoothBase.cpp:67
BluetoothBase()
Constructor.
Definition: BluetoothBase.cpp:46
Structure associating a pointer to a bluetooth module to its address.
Definition: BluetoothBase.h:58
The address used was unknown.
Definition: BluetoothBase.h:116
unsigned size
Size in byte of the data to be sent.
Definition: BluetoothBase.h:85
The reception buffer is full and no additional data can be written.
Definition: BluetoothBase.h:122
bool bbSendDataTo(Bluetooth *source, unsigned address, char *data, unsigned size)
Execute the previously scheduled transfer of data.
Definition: BluetoothBase.cpp:107
Bluetooth * owner
Pointer to a bluetooth module.
Definition: BluetoothBase.h:61
Enki is the namespace of the Enki simulator. All Enki functions and classes excepted the math one are...
Definition: BluetoothBase.cpp:44
void closeConnection(Bluetooth *source, unsigned address)
Schedule a disconnection between two Bluetooth Module.
Definition: BluetoothBase.cpp:263
void connectTo(Bluetooth *source, unsigned address)
Schedule a connection to another Bluetooth module.
Definition: BluetoothBase.cpp:252
Errors
Bluetooth transmission errors.
Definition: BluetoothBase.h:111
No additional connection can be made as the robot is already at maximum.
Definition: BluetoothBase.h:120
unsigned address
Address of the module receiving the data.
Definition: BluetoothBase.h:81
Information needed to establish a connection or a disconnection.
Definition: BluetoothBase.h:67
The world is the container of all objects and robots.
Definition: PhysicalEngine.h:411
bool checkDistance(Bluetooth *source, Bluetooth *destination)
Check if the distance between the two modules is small enough for communication.
Definition: BluetoothBase.cpp:226
bool removeClient(Bluetooth *owner)
Remove a previously registered Bluetooth module.
Definition: BluetoothBase.cpp:93
void sendDataTo(Bluetooth *source, unsigned address, char *data, unsigned size)
Schedule a transmission of data to be sent during the next step.
Definition: BluetoothBase.cpp:241
Implementation of an onboard Bluetooth module.
Definition: Bluetooth.h:52
Bluetooth * getAddress(unsigned address)
Return the pointer of the Bluetooth module associated with "address".
Definition: BluetoothBase.cpp:56
The distance between the 2 robots is too great.
Definition: BluetoothBase.h:118
Information needed to send data along an established connection.
Definition: BluetoothBase.h:76
Bluetooth * source
Pointer to the Bluetooth module acting as the source.
Definition: BluetoothBase.h:70
virtual void step(double dt, World *w)
Execute the previously scheduled operations.
Definition: BluetoothBase.cpp:275
virtual ~BluetoothBase()
Destructor.
Definition: BluetoothBase.cpp:51
std::queue< Transmissions > transmissions
Queue of the data to be transmitted.
Definition: BluetoothBase.h:95
Bluetooth * source
Pointer to the module sending the data.
Definition: BluetoothBase.h:79
std::queue< Connections > connectbuffer
Queue of the connection to be established.
Definition: BluetoothBase.h:91