blackboard

The blackboard proxy provides an interface to a simple data-store in a similar fashion to a hash-map. More...


Detailed Description

The blackboard proxy provides an interface to a simple data-store in a similar fashion to a hash-map.

Data is set and retrieved by using a label. Any player message structure can be stored in the blackboard. At this time it is up to the user to pack and unpack the entry data. The xdr functions can be used to do this.

Classes

struct  playerc_blackboard
 BlackBoard proxy. More...

Defines

#define PLAYERC_BLACKBOARD_DATA_TYPE_NONE   0
#define PLAYERC_BLACKBOARD_DATA_TYPE_SIMPLE   1
#define PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX   2
#define PLAYERC_BLACKBOARD_DATA_SUBTYPE_NONE   0
#define PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING   1
#define PLAYERC_BLACKBOARD_DATA_SUBTYPE_INT   2
#define PLAYERC_BLACKBOARD_DATA_SUBTYPE_DOUBLE   3

Typedefs

typedef struct playerc_blackboard playerc_blackboard_t
 BlackBoard proxy.

Functions

PLAYERC_EXPORT
playerc_blackboard_t
playerc_blackboard_create (playerc_client_t *client, int index)
 Create a blackboard proxy.
PLAYERC_EXPORT void playerc_blackboard_destroy (playerc_blackboard_t *device)
 Destroy a blackboard proxy.
PLAYERC_EXPORT int playerc_blackboard_subscribe (playerc_blackboard_t *device, int access)
 Subscribe to the blackboard device.
PLAYERC_EXPORT int playerc_blackboard_unsubscribe (playerc_blackboard_t *device)
 Un-subscribe from the blackboard device.
PLAYERC_EXPORT int playerc_blackboard_subscribe_to_key (playerc_blackboard_t *device, const char *key, const char *group, player_blackboard_entry_t **entry)
 Subscribe to a key.
PLAYERC_EXPORT int playerc_blackboard_get_entry (playerc_blackboard_t *device, const char *key, const char *group, player_blackboard_entry_t **entry)
 Get the current value of a key, without subscribing.
PLAYERC_EXPORT int playerc_blackboard_unsubscribe_from_key (playerc_blackboard_t *device, const char *key, const char *group)
 Unsubscribe from a key.
PLAYERC_EXPORT int playerc_blackboard_subscribe_to_group (playerc_blackboard_t *device, const char *group)
 Subscribe to a group.
PLAYERC_EXPORT int playerc_blackboard_unsubscribe_from_group (playerc_blackboard_t *device, const char *group)
 Unsubscribe from a group.
PLAYERC_EXPORT int playerc_blackboard_set_entry (playerc_blackboard_t *device, player_blackboard_entry_t *entry)
 Set an entry value.
PLAYERC_EXPORT int playerc_blackboard_set_string (playerc_blackboard_t *device, const char *key, const char *group, const char *value)
PLAYERC_EXPORT int playerc_blackboard_set_int (playerc_blackboard_t *device, const char *key, const char *group, const int value)
PLAYERC_EXPORT int playerc_blackboard_set_double (playerc_blackboard_t *device, const char *key, const char *group, const double value)

Typedef Documentation

BlackBoard proxy.


Function Documentation

PLAYERC_EXPORT playerc_blackboard_t* playerc_blackboard_create ( playerc_client_t client,
int  index 
)

Create a blackboard proxy.

PLAYERC_EXPORT void playerc_blackboard_destroy ( playerc_blackboard_t device)

Destroy a blackboard proxy.

PLAYERC_EXPORT int playerc_blackboard_get_entry ( playerc_blackboard_t device,
const char *  key,
const char *  group,
player_blackboard_entry_t **  entry 
)

Get the current value of a key, without subscribing.

If entry is none null it will be filled in with the response. The caller is responsible for freeing it.

PLAYERC_EXPORT int playerc_blackboard_set_entry ( playerc_blackboard_t device,
player_blackboard_entry_t entry 
)

Set an entry value.

PLAYERC_EXPORT int playerc_blackboard_subscribe ( playerc_blackboard_t device,
int  access 
)

Subscribe to the blackboard device.

PLAYERC_EXPORT int playerc_blackboard_subscribe_to_group ( playerc_blackboard_t device,
const char *  group 
)

Subscribe to a group.

The current entries are sent as data messages.

PLAYERC_EXPORT int playerc_blackboard_subscribe_to_key ( playerc_blackboard_t device,
const char *  key,
const char *  group,
player_blackboard_entry_t **  entry 
)

Subscribe to a key.

If entry is none null it will be filled in with the response. The caller is responsible for freeing it.

PLAYERC_EXPORT int playerc_blackboard_unsubscribe ( playerc_blackboard_t device)

Un-subscribe from the blackboard device.

PLAYERC_EXPORT int playerc_blackboard_unsubscribe_from_group ( playerc_blackboard_t device,
const char *  group 
)

Unsubscribe from a group.

PLAYERC_EXPORT int playerc_blackboard_unsubscribe_from_key ( playerc_blackboard_t device,
const char *  key,
const char *  group 
)

Unsubscribe from a key.