#include <OPENR/OPENRAPI.h>#include <OPENR/OPENRMessages.h>#include <iostream>#include <fstream>#include <map>#include <cstdlib>#include <cstring>#include <cctype>#include <pthread.h>#include <boot.h>#include <utils.h>#include <Platform.h>#include <Primitives.h>#include <MemoryMapAgent.h>#include <ModuleData.h>#include <opensdkAPI.h>Go to the source code of this file.
Defines | |
| #define | LOCK(m) pthread_mutex_lock(&m ##_mutex) |
| #define | UNLOCK(m) pthread_mutex_unlock(&m ##_mutex) |
| #define | sendPowerStatusNotifications(property, bitmask) |
Variables | |
| longword | myRobotStatus = orsbBATTERY_CONNECTED | orsbBATTERY_CAPACITY_FULL |
| word | myBatteryStatus = obsbFULLY_CHARGED |
| word | myRemainingCapacity = 100 |
| word | myTemperature = 300 |
| word | myFullyChargedCapacity = 55555 |
| word | myVoltage = 5000 |
| word | myCurrent = 1000 |
| OVolumeSwitch | myVolume = ovolumeSW3 |
| OPower | motorPower = opowerOFF |
| word | myBootCondition = 0 |
| map< OServiceEntry, OPowerStatus > | powerStatusObservers |
| pthread_mutex_t | powerStatusObservers_mutex = PTHREAD_MUTEX_INITIALIZER |
|
|
Definition at line 41 of file OPENRAPI.cc. |
|
|
Value: { \
LOCK(powerStatusObservers); \
\
for(map<OServiceEntry, OPowerStatus>::iterator it = powerStatusObservers.begin(); it != powerStatusObservers.end(); ++it) { \
if (it->second.property & bitmask) { \
OPowerStatusMessage *status = new OPowerStatusMessage(myRobotStatus, myBatteryStatus, myRemainingCapacity, myTemperature, myFullyChargedCapacity, myVoltage, myCurrent, ::GetTimeDifference(), myVolume); \
_sendMessage(it->first, status); \
} \
} \
\
UNLOCK(powerStatusObservers); \
}
Definition at line 60 of file OPENRAPI.cc. |
|
|
Definition at line 42 of file OPENRAPI.cc. |
|
|
Definition at line 53 of file OPENRAPI.cc. |
|
|
Definition at line 46 of file OPENRAPI.cc. |
|
|
Definition at line 54 of file OPENRAPI.cc. |
|
|
Definition at line 51 of file OPENRAPI.cc. |
|
|
Definition at line 49 of file OPENRAPI.cc. |
|
|
Definition at line 47 of file OPENRAPI.cc. |
|
|
Definition at line 45 of file OPENRAPI.cc. |
|
|
Definition at line 48 of file OPENRAPI.cc. |
|
|
Definition at line 50 of file OPENRAPI.cc. |
|
|
Definition at line 52 of file OPENRAPI.cc. |
|
|
Definition at line 57 of file OPENRAPI.cc. |
|
|
Definition at line 58 of file OPENRAPI.cc. |
1.3.9.1