ALMemoryFastAccess is a fast access in Read/Write to some variables of ALMemory.
More...
#include <almemoryfastaccess/almemoryfastaccess.h>
List of all members.
Public Member Functions |
| ALMemoryFastAccess () |
| Default constructor.
|
| ~ALMemoryFastAccess () |
| Default destructor.
|
void | StopAllAccess (void) |
| Remove all pointer.
|
void | insertBuffer (const std::string &pName, const ALValue &pBuff) |
| Insert a binary ALValue in ALMemory.
|
void | ConnectToVariables (const boost::shared_ptr< AL::ALBroker > pBroker, const std::vector< std::string > &pListVariables, bool bAllowNonExistantVariable=false) |
| First time, you must "connect" to variables to access later, many times.
|
void | ConnectToIntVariables (const boost::shared_ptr< AL::ALBroker > pBroker, const std::vector< std::string > &pListVariables) |
| First time, you must "connect" to int variables to access later, many times.
|
void | directConnectToVariables (const boost::shared_ptr< AL::ALBroker > pBroker, const std::vector< std::string > &pListVariables, bool bAllowUnexistantVariable=false) |
| FIXME: No implementation.
|
void | GetValues (std::vector< float > &pListValue) const |
| Get previous "connected" variables.
|
void | SetValues (const std::vector< float > &pListValue) |
| Set previous "connected" variables.
|
void | GetValues (std::vector< int > &pListValue) const |
| Get previous "connected" variables.
|
void | SetValues (const std::vector< int > &pListValue) |
| Set previous "connected" variables.
|
Static Public Member Functions |
static void * | getDataPtr (boost::shared_ptr< AL::ALBroker > pBroker, const std::string &pStrValue, bool bAllowUnexistantVariable) |
| Get pointer on 32bit data.
|
template<typename T > |
static T * | getSafeDataPtr (boost::shared_ptr< ALMemoryProxy > pMemoryProxy, const std::string &pStrValue, T pValue) |
| Get pointer on 32bit data.
|
static bool | InnerTest (const boost::shared_ptr< AL::ALBroker > pBroker) |
| Test function.
|
Detailed Description
ALMemoryFastAccess is a fast access in Read/Write to some variables of ALMemory.
ALMemoryFastAccess is a fast access in Read/Write to some variables of ALMemory regularily accessed, with a unified interface.
- if ALMemory is in same broker than the caller: store directly pointer to data (hack* method)
- if ALMemory is remote with the caller: standard call (not so optimised, but the more optimal possible access)
- ASSUME: variables never disappear.
- ASSUME: variables are all floats or ints.
Definition at line 40 of file almemoryfastaccess.h.
Member Function Documentation
First time, you must "connect" to int variables to access later, many times.
- Parameters:
-
pBroker | a pointer to the broker |
pListVariables | list of variable names, eg: {"DCM/Sensor1", "DCM/Sensor2"} ... |
First time, you must "connect" to variables to access later, many times.
- Parameters:
-
pBroker | a pointer to the broker |
pListVariables | list of variable names, eg: {"DCM/Sensor1", "DCM/Sensor2"} ... |
bAllowNonExistantVariable | unused parameter |
FIXME: No implementation.
- Parameters:
-
pBroker | a pointer to the broker |
pListVariables | list of variable names, eg: {"DCM/Sensor1", "DCM/Sensor2"} ... |
bAllowUnexistantVariable | unused parameter |
Get pointer on 32bit data.
- Parameters:
-
pBroker | a pointer to the broker |
pStrValue | value name |
bAllowUnexistantVariable | unused parameter |
Get pointer on 32bit data.
- Parameters:
-
pMemoryProxy | a pointer to the memory |
pStrValue | value name |
pValue | value to insert if pStrValue is non-existent |
Definition at line 132 of file almemoryfastaccess.h.
Get previous "connected" variables.
- Parameters:
-
pListValue | where to put the gathered value of variables |
Get previous "connected" variables.
- Parameters:
-
pListValue | where to put the gathered value of variables |
Test function.
- Parameters:
-
pBroker | a pointer to the broker |
- Returns:
- true if test ok, false otherwise
Insert a binary ALValue in ALMemory.
- Parameters:
-
Set previous "connected" variables.
- Parameters:
-
pListValue | Value of variables to put into memory. |
Set previous "connected" variables.
- Parameters:
-
pListValue | Value of variables to put into memory. |
The documentation for this class was generated from the following file:
- /home/opennao/work/master/sdk/libnaoqi/libalmemoryfastaccess/almemoryfastaccess/almemoryfastaccess.h