Public Member Functions | |
Blackboard (void) | |
~Blackboard (void) | |
void | Initialize (void) |
Initializes object. | |
void | Free (void) |
Frees allocated memory. | |
int | ConnectToServer (void) |
Connect to the SADB Server. | |
int | ConnectToServer (const char *address, int port=SADBPort) |
void | ConnectToServerWithRetry (void) |
Connect to the SADB Server and retry to connect until the connection is established. | |
void | ConnectToServerWithRetry (const char *address, int port=SADBPort) |
void | GenerateHeader (SADBu8 *Header, SADBu8 CMD, SADBu64 OUID1, SADBu64 OUID2, SADBu64 Second, SADBu16 Millisecond, SADBu32 DataLength) |
void | Disconnect (void) |
Disconnect from the SADB Server. | |
SADBs64 | Ping (void) |
SADBu64 | CreateObject (void) |
void | DeleteObject (SADBu64 OUID) |
int | IsValidObject (SADBu64 OUID) |
void | SetObjectName (SADBu64 OUID, const char *Name) |
void | GetObjectName (SADBu64 OUID, SADBu8 **Name) |
void | SetObjectDescription (SADBu64 OUID, const char *Description) |
void | GetObjectDescription (SADBu64 OUID, SADBu8 **Description) |
SADBu64 | GetObjectByName (const char *Name) |
int | SendObjectValue (SADBu64 OUID, BlackboardObject *Object) |
int | GetLatestObjectValue (SADBu64 OUID, BlackboardObject *Object) |
int | GetLatestObjectTimestamp (SADBu64 OUID, Timestamp *time) |
int | GetNextObjectTimestamp (SADBu64 OUID, Timestamp *Current, Timestamp *Next) |
int | GetPreviousObjectTimestamp (SADBu64 OUID, Timestamp *Current, Timestamp *Previous) |
int | GetNearestObjectTimestamp (SADBu64 OUID, Timestamp *Target, Timestamp *Result) |
int | GetObjectValueAtTimestamp (SADBu64 OUID, BlackboardObject *Object, Timestamp *Time, int Interpolation, int nPoints) |
int | GetObjectValueAtNearestTimestamp (SADBu64 OUID, Timestamp *Time, BlackboardObject *Object) |
int | RemoveOldestValue (SADBu64 OUID) |
int | KeepOnlyLatestValues (SADBu64 OUID, int nValues) |
int | GetObjectValueAtNextTimestamp (SADBu64 OUID, Timestamp *Time, BlackboardObject *Object) |
int | GetObjectValueAtPreviousTimestamp (SADBu64 OUID, Timestamp *Time, BlackboardObject *Object) |
SADBu64 | CreateCategory (void) |
SADBu64 | CreateCategoryIfNonExistant (const char *Name) |
void | DeleteCategory (SADBu64 CUID) |
int | IsValidCategory (SADBu64 CUID) |
void | SetCategoryName (SADBu64 CUID, const char *Name) |
void | GetCategoryName (SADBu64 CUID, SADBu8 **Name) |
void | SetCategoryDescription (SADBu64 CUID, const char *Description) |
void | GetCategoryDescription (SADBu64 CUID, SADBu8 **Description) |
SADBu64 | GetCategoryByName (const char *Name) |
void | AddObjectToCategory (SADBu64 CUID, SADBu64 OUID) |
void | RemoveObjectFromCategory (SADBu64 CUID, SADBu64 OUID) |
int | FindObjects (const char *Request, SADBu64 **Objects) |
SADBu64 | GetNextObjectID (void) |
SADBu64 | GetNextCategoryID (void) |
void | Reset (void) |
Public Attributes | |
char * | Address |
int | Port |
Blackboard::Blackboard | ( | void | ) |
Constructor, initializes object
Blackboard::~Blackboard | ( | void | ) |
Destructor, deinitializes object
void Blackboard::AddObjectToCategory | ( | SADBu64 | CUID, |
SADBu64 | OUID | ||
) |
Add an object to a category
CUID | ID of the category |
OUID | ID of the object |
int Blackboard::ConnectToServer | ( | const char * | address, |
int | port = SADBPort |
||
) |
Connect to the SADB Server
Address | Address of the server |
Port | Port of the server |
void Blackboard::ConnectToServerWithRetry | ( | const char * | address, |
int | port = SADBPort |
||
) |
Connect to the SADB Server and retry to connect until the connection is established
Address | Address of the server |
Port | Port of the server |
SADBu64 Blackboard::CreateCategory | ( | void | ) |
Create a new category on the blackboard
SADBu64 Blackboard::CreateCategoryIfNonExistant | ( | const char * | Name | ) |
Get the ID of a category given its name. If the category does not exist, create a new one and return its ID.
Name | Name of the category |
SADBu64 Blackboard::CreateObject | ( | void | ) |
Create a new object on the blackboard
void Blackboard::DeleteCategory | ( | SADBu64 | CUID | ) |
Delete an existing category from the blackboard
CUID | ID of the category to remove |
void Blackboard::DeleteObject | ( | SADBu64 | OUID | ) |
delete an existing object from the blackboard
OUID | ID of the object to remove |
int Blackboard::FindObjects | ( | const char * | Request, |
SADBu64 ** | Objects | ||
) |
Find IDs of objects matching a query
Request | String representation of the request |
Objects | Pointer to a list of objet IDs |
SADBu64 Blackboard::GetCategoryByName | ( | const char * | Name | ) |
Get the CUID of a category given its name
Name | Name of the category CUID of the object, or 0 if not found |
void Blackboard::GetCategoryDescription | ( | SADBu64 | CUID, |
SADBu8 ** | Description | ||
) |
Get the Description of a category on the blackboard
CUID | ID of the target category |
Name | Return address |
void Blackboard::GetCategoryName | ( | SADBu64 | CUID, |
SADBu8 ** | Name | ||
) |
Get the name of a category on the blackboard
CUID | ID of the target category |
Name | Return address |
int Blackboard::GetLatestObjectTimestamp | ( | SADBu64 | OUID, |
Timestamp * | time | ||
) |
Get the latest timestamp of an object
OUID | ID of the object in SADB |
time | Pointer to a Timestamp object |
int Blackboard::GetLatestObjectValue | ( | SADBu64 | OUID, |
BlackboardObject * | Object | ||
) |
Get the latest value of an object
OUID | ID of the object in SADB |
Object | Pointer to an object that will contain the latest value |
SADBu64 Blackboard::GetNextCategoryID | ( | void | ) |
Get the next Category ID.
SADBu64 Blackboard::GetNextObjectID | ( | void | ) |
Get the next Object ID.
SADBu64 Blackboard::GetObjectByName | ( | const char * | Name | ) |
Get the OUID of an object given its name
Name | Name of the object OUID of the object, or 0 if not found |
void Blackboard::GetObjectDescription | ( | SADBu64 | OUID, |
SADBu8 ** | Description | ||
) |
Get the Description of an object on the blackboard
OUID | ID of the target object |
Name | Return address |
void Blackboard::GetObjectName | ( | SADBu64 | OUID, |
SADBu8 ** | Name | ||
) |
Get the name of an object on the blackboard
OUID | ID of the target object |
Name | Return address |
int Blackboard::GetObjectValueAtNearestTimestamp | ( | SADBu64 | OUID, |
Timestamp * | Time, | ||
BlackboardObject * | Object | ||
) |
int Blackboard::GetObjectValueAtNextTimestamp | ( | SADBu64 | OUID, |
Timestamp * | Time, | ||
BlackboardObject * | Object | ||
) |
Get the value of an object at the next Timestamp after the target time
OUID | ID of the object in SADB |
Time | Target Timestamp |
Object | Pointer to an object that will contain the value |
int Blackboard::GetObjectValueAtPreviousTimestamp | ( | SADBu64 | OUID, |
Timestamp * | Time, | ||
BlackboardObject * | Object | ||
) |
Get the value of an object at the next Timestamp after the target time
OUID | ID of the object in SADB |
Time | Target Timestamp |
Object | Pointer to an object that will contain the value |
int Blackboard::GetObjectValueAtTimestamp | ( | SADBu64 | OUID, |
BlackboardObject * | Object, | ||
Timestamp * | Time, | ||
int | Interpolation, | ||
int | nPoints | ||
) |
Get the latest value of an object at a given timestamp
OUID | ID of the object in SADB |
Object | Pointer to an object that will contain the value |
Time | Requested timestamp |
Interpolation | Requested interpolation method |
nPoints | Number of points to use for interpolation |
int Blackboard::IsValidCategory | ( | SADBu64 | CUID | ) |
Check if a Category exists (has been created and not deleted)
CUID | ID of the category |
int Blackboard::IsValidObject | ( | SADBu64 | OUID | ) |
Check if an Object exists (has been created and not deleted)
OUID | ID of the Object |
int Blackboard::KeepOnlyLatestValues | ( | SADBu64 | OUID, |
int | nValues | ||
) |
Tell the SADB server to discard older values of an object and to keep only the nValues latest values.
OUID | ID of the target object |
nValues | number of values to keep |
SADBs64 Blackboard::Ping | ( | void | ) |
Ping the SADB Server for testing purposes and to determine latency
void Blackboard::RemoveObjectFromCategory | ( | SADBu64 | CUID, |
SADBu64 | OUID | ||
) |
Remove an object from a category
CUID | ID of the category |
OUID | ID of the object |
int Blackboard::RemoveOldestValue | ( | SADBu64 | OUID | ) |
Tell the SADB server to discard the oldest value of an object.
OUID | ID of the target object |
void Blackboard::Reset | ( | void | ) |
Reset the SADB Server
int Blackboard::SendObjectValue | ( | SADBu64 | OUID, |
BlackboardObject * | Object | ||
) |
Send the value of an object
OUID | ID of the object in SADB |
Object | Pointer to an object |
void Blackboard::SetCategoryDescription | ( | SADBu64 | CUID, |
const char * | Description | ||
) |
Set the description of a category on the blackboard
CUID | ID of the category to edit |
Description | Null-terminated string to set |
void Blackboard::SetCategoryName | ( | SADBu64 | CUID, |
const char * | Name | ||
) |
Set the name of a category on the blackboard
CUID | ID of the category to edit |
Name | Null-terminated string to set |
void Blackboard::SetObjectDescription | ( | SADBu64 | OUID, |
const char * | Description | ||
) |
Set the description of an object on the blackboard
OUID | ID of the object to edit |
Description | Null-terminated string to set |
void Blackboard::SetObjectName | ( | SADBu64 | OUID, |
const char * | Name | ||
) |
Set the name of an object on the blackboard
OUID | ID of the object to edit |
Name | Null-terminated string to set |