The BlackBoardProxy class is used to subscribe to a blackboard device. More...
#include <playerc++.h>
Public Member Functions | |
BlackBoardProxy (PlayerClient *aPc, uint32_t aIndex=0) | |
Constructor. | |
~BlackBoardProxy () | |
Destructor. | |
player_blackboard_entry_t * | SubscribeToKey (const char *key, const char *group="") |
Subscribe to a key. | |
void | UnsubscribeFromKey (const char *key, const char *group="") |
Stop receiving updates about this key. | |
void | SubscribeToGroup (const char *key) |
Subscribe to a group. | |
void | UnsubscribeFromGroup (const char *group) |
Stop receiving updates about this group. | |
void | SetEntry (const player_blackboard_entry_t &entry) |
Set a key value. | |
player_blackboard_entry_t * | GetEntry (const char *key, const char *group) |
Get a value for a key. | |
void | SetEventHandler (void(*on_blackboard_event)(playerc_blackboard_t *, player_blackboard_entry_t)) |
Set the function pointer which will be called when an entry is updated. | |
Private Member Functions | |
void | Subscribe (uint32_t aIndex) |
void | Unsubscribe () |
Private Attributes | |
playerc_blackboard_t * | mDevice |
Detailed Description
The BlackBoardProxy class is used to subscribe to a blackboard device.
A blackboard is a data-store which sends updates when an entry is changed. It also returns the current value of an entry when a proxy first subcribes to that entries key. If an entry does not exist, the default value of that entry is returned.
Member Function Documentation
void PlayerCc::BlackBoardProxy::SetEventHandler | ( | void(*)(playerc_blackboard_t *, player_blackboard_entry_t) | on_blackboard_event | ) |
Set the function pointer which will be called when an entry is updated.
void PlayerCc::BlackBoardProxy::SubscribeToGroup | ( | const char * | key | ) |
Subscribe to a group.
The event handler must be set to retrieve the current group entries.
player_blackboard_entry_t* PlayerCc::BlackBoardProxy::SubscribeToKey | ( | const char * | key, |
const char * | group = "" |
||
) |
Subscribe to a key.
If the key does not exist the default value is returned. The user must free the entry.
void PlayerCc::BlackBoardProxy::UnsubscribeFromGroup | ( | const char * | group | ) |
Stop receiving updates about this group.
void PlayerCc::BlackBoardProxy::UnsubscribeFromKey | ( | const char * | key, |
const char * | group = "" |
||
) |
Stop receiving updates about this key.
The documentation for this class was generated from the following file: