|
|
Handles update signals from the memory system and distributes it to its subsribers. More...
#include <RobotAPI/libraries/armem/client/util/MemoryListener.h>
Inheritance diagram for MemoryListener:Classes | |
| struct | ManagedCallback |
Public Types | |
| using | Callback |
| using | CallbackUpdatedOnly |
| template<class CalleeT> | |
| using | MemberCallback |
| template<class CalleeT> | |
| using | MemberCallbackUpdatedOnly |
Public Member Functions | |
| MemoryListener (ManagedIceObject *component=nullptr) | |
| void | setComponent (ManagedIceObject *component) |
| SubscriptionHandle | subscribe (const MemoryID &subscriptionID, Callback Callback) |
| SubscriptionHandle | subscribe (const MemoryID &subscriptionID, CallbackUpdatedOnly Callback) |
| template<class CalleeT> | |
| SubscriptionHandle | subscribe (const MemoryID &subscriptionID, CalleeT *callee, MemberCallback< CalleeT > callback) |
| Subscribe with a class member function: | |
| template<class CalleeT> | |
| SubscriptionHandle | subscribe (const MemoryID &subscriptionID, CalleeT *callee, MemberCallbackUpdatedOnly< CalleeT > callback) |
| void | unsubscribe (SubscriptionHandle &subscriptionHandle) |
| void | updated (const std::vector< data::MemoryID > &updatedIDs) const |
| void | updated (const std::vector< MemoryID > &updatedIDs) const |
| Function handling updates from the MemoryListener ice topic. | |
Static Public Member Functions | |
| static std::string | MakeMemoryTopicName (const MemoryID &memoryID) |
Protected Attributes | |
| std::unordered_map< MemoryID, std::vector< ManagedCallback > > | callbacks |
| std::unordered_map< std::string, int > | memoryRefCount |
| memoryName -> callbacks needing memory topic | |
| long | nextId = 0 |
| std::mutex | subscribeMutex |
Handles update signals from the memory system and distributes it to its subsribers.
Definition at line 26 of file MemoryListener.h.
| using Callback |
Definition at line 30 of file MemoryListener.h.
| using CallbackUpdatedOnly |
Definition at line 32 of file MemoryListener.h.
| using MemberCallback |
Definition at line 36 of file MemoryListener.h.
| using MemberCallbackUpdatedOnly |
Definition at line 39 of file MemoryListener.h.
| MemoryListener | ( | ManagedIceObject * | component = nullptr | ) |
|
static |
| void setComponent | ( | ManagedIceObject * | component | ) |
| SubscriptionHandle subscribe | ( | const MemoryID & | subscriptionID, |
| Callback | Callback ) |
Definition at line 118 of file MemoryListener.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| SubscriptionHandle subscribe | ( | const MemoryID & | subscriptionID, |
| CallbackUpdatedOnly | Callback ) |
|
inline |
Subscribe with a class member function:
Definition at line 61 of file MemoryListener.h.
Here is the call graph for this function:
|
inline |
| void unsubscribe | ( | SubscriptionHandle & | subscriptionHandle | ) |
Definition at line 148 of file MemoryListener.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void updated | ( | const std::vector< data::MemoryID > & | updatedIDs | ) | const |
| void updated | ( | const std::vector< MemoryID > & | updatedIDs | ) | const |
Function handling updates from the MemoryListener ice topic.
Definition at line 41 of file MemoryListener.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 103 of file MemoryListener.h.
|
protected |
memoryName -> callbacks needing memory topic
Definition at line 106 of file MemoryListener.h.
|
protected |
Definition at line 94 of file MemoryListener.h.
|
mutableprotected |
Definition at line 102 of file MemoryListener.h.