Public Member Functions | |
BlackboardObject (void) | |
~BlackboardObject (void) | |
void | Initialize (void) |
Initializes object. | |
void | Free (void) |
Frees allocated memory. | |
void | Create (Blackboard *board, const char *name) |
void | Create (Blackboard *board, const char *name, const char *description) |
void | Create (Blackboard *board, const char *name, const char *description, enum BODataType type) |
void | Create (Blackboard *board, const char *name, enum BODataType) |
void | SetBlackboard (Blackboard *board) |
void | AddToBlackboard (void) |
int | Send (void) |
void | AddToCategory (SADBu64 CUID) |
void | AddToCategory (const char *Cat) |
void | RemoveFromCategory (SADBu64 CUID) |
void | RemoveFromCategory (const char *Cat) |
void | CreateIfNonExistant (const char *name) |
void | GetByName (const char *name) |
int | GetLatestValue (void) |
int | GetValueAtNearestTimestamp (Timestamp *Time) |
int | GetValueAtTimestampNoInterpolation (Timestamp *Time) |
int | GetValueAtTimestamp (Timestamp *Time) |
int | GetValueAtTimestamp (Timestamp *Time, int Interpolation) |
int | GetValueAtTimestamp (Timestamp *Time, int Interpolation, int nPoints) |
int | GetValueAtNextTimestamp (Timestamp *Time) |
int | GetValueAtPreviousTimestamp (Timestamp *Time) |
int | GetLatestTimestamp (Timestamp *Time) |
int | GetPreviousTimestamp (Timestamp *Current, Timestamp *Previous) |
int | GetNextTimestamp (Timestamp *Current, Timestamp *Next) |
int | GetNearestTimestamp (Timestamp *Target, Timestamp *Result) |
void | SetDataType (enum BODataType) |
int | SetDimensionsf (SADBu32 D,...) |
int | OnlySetDimensionsf (SADBu32 D,...) |
int | SetDimensions (SADBu32 D, SADBu32 *Ds) |
SADBu32 | GetDimension (SADBu32 D) |
int | SetName (const char *name) |
void | GetName (void) |
Get Human Readable name of the object from the blackboard. | |
int | SetDescription (const char *desc) |
void | GetDescription (void) |
Get Human Readable description of the object from the blackboard. | |
void | CreateWithInitialValueFromCSV (Timestamp *Time, const char *Filename, enum BODataType DataType, char Delimiter) |
void | CreateWithInitialValueFromCSV (const char *Filename, enum BODataType DataType) |
void | CreateWithInitialValueFromCSV (const char *Filename, enum BODataType DataType, char Delimiter) |
void | CreateWithValuesFromCSV (const char *Filename, enum BODataType DataType) |
void | CreateWithValuesFromCSV (const char *Filename, enum BODataType DataType, char Delimiter) |
void | ExportAllValuesToCSV (const char *Filename) |
void | ExportRaw (const char *Filename) |
void | ImportRaw (const char *Filename) |
void | ImportRaw (const char *Filename, float A, float B) |
void | SetByte (SADBu8 Value,...) |
void | SetInteger (SADBu32 Value,...) |
void | SetFloat (SADBfl Value,...) |
void | SetDouble (SADBdfl Value,...) |
void | SetString (const char *str) |
void | SetStringElement (const char *str,...) |
void | SetBoolean (bool Value,...) |
SADBu8 | GetByte (int X,...) |
SADBu32 | GetInteger (int X,...) |
SADBfl | GetFloat (int X,...) |
SADBdfl | GetDouble (int X,...) |
const char * | GetString (void) |
char * | GetNewString (void) |
bool | GetBoolean (int X,...) |
char * | GetStringElement (int X,...) |
void | RemoveOldestValue (void) |
Remove oldest value from the blackboard. | |
void | KeepOnlyLatestValues (int nValues) |
int | CheckForNewValue (void) |
void | Information (void) |
Print Human Readable information about the object. | |
void | SetTimestamp (Timestamp *time) |
void | SetTimestampNow (void) |
Set the timestamp to the current time. | |
Public Attributes | |
Blackboard * | Board |
Blackboard where the object resides. | |
SADBu8 * | Name |
Human Readable Object Name. | |
SADBu8 * | Description |
Human Readable Object Description. | |
void * | Data |
Pointer to Memory Location of the data. | |
SADBu32 | Dimensionality |
Dimensionality of the data (number of dimensiosns) | |
SADBu32 * | Dimensions |
Dimensions of the data. | |
int | TotalNumberOfElements |
Total number of elements (Product of all dimensions) | |
enum BODataType | DataType |
Data Type. | |
int | ElementSize |
Element Size (in bytes) | |
SADBu64 | ID |
Object ID on the blackboard. | |
Timestamp | Time |
Timestamp of the data. | |
BlackboardObject::BlackboardObject | ( | void | ) |
Constructor, initializes object
BlackboardObject::~BlackboardObject | ( | void | ) |
Destructor, deinitializes object
void BlackboardObject::AddToBlackboard | ( | void | ) |
Add the object to a blackboard
board | Pointer to the target blackboard object |
void BlackboardObject::AddToCategory | ( | SADBu64 | CUID | ) |
Add the object to a category
CUID | ID of the category |
void BlackboardObject::AddToCategory | ( | const char * | Cat | ) |
Add the object to a category
Cat | Name of the category |
int BlackboardObject::CheckForNewValue | ( | void | ) |
Check to see if there is a new value on the SADB server, without retrieving it
void BlackboardObject::Create | ( | Blackboard * | board, |
const char * | name | ||
) |
Create an object (convenience function)
board | Pointer to the target blackboard object |
name | Name of the object |
void BlackboardObject::Create | ( | Blackboard * | board, |
const char * | name, | ||
const char * | description | ||
) |
Create an object (convenience function)
board | Pointer to the target blackboard object |
name | Name of the object |
description | Description of the object |
void BlackboardObject::Create | ( | Blackboard * | board, |
const char * | name, | ||
const char * | description, | ||
enum BODataType | type | ||
) |
Create an object (convenience function)
board | Pointer to the target blackboard object |
name | Name of the object |
description | Description of the object |
type | Datatype of the object |
void BlackboardObject::Create | ( | Blackboard * | board, |
const char * | name, | ||
enum BODataType | type | ||
) |
Create an object (convenience function)
board | Pointer to the target blackboard object |
name | Name of the object |
type | Datatype of the object |
void BlackboardObject::CreateIfNonExistant | ( | const char * | name | ) |
Get an object from the blackboard or create it if it doesn't already exist
name | Name of the object |
void BlackboardObject::CreateWithInitialValueFromCSV | ( | Timestamp * | time, |
const char * | Filename, | ||
enum BODataType | DataType, | ||
char | Delimiter | ||
) |
Initialize the object with data from a comma separated values (CSV) file
Time | Pointer to a timestamp object |
Filename | Path to the CSV file |
DataType | Type of the data in the CSV File |
Delimiter | Delimiter (normally ',') |
void BlackboardObject::CreateWithInitialValueFromCSV | ( | const char * | Filename, |
enum BODataType | DataType | ||
) |
Initialize the object with data from a comma separated values (CSV) file
Filename | Path to the CSV file |
DataType | Type of the data in the CSV File |
void BlackboardObject::CreateWithInitialValueFromCSV | ( | const char * | Filename, |
enum BODataType | DataType, | ||
char | Delimiter | ||
) |
Initialize the object with data from a comma separated values (CSV) file
Filename | Path to the CSV file |
DataType | Type of the data in the CSV File |
Delimiter | Delimiter (normally ',') |
void BlackboardObject::CreateWithValuesFromCSV | ( | const char * | Filename, |
enum BODataType | DataType | ||
) |
Initialize the object with data from a comma separated values (CSV) file
Filename | Path to the CSV file |
DataType | Type of the data in the CSV File (other than the first column, which MUST be a double/float) |
void BlackboardObject::CreateWithValuesFromCSV | ( | const char * | Filename, |
enum BODataType | DataType, | ||
char | Delimiter | ||
) |
Initialize the object with data from a comma separated values (CSV) file
Filename | Path to the CSV file |
DataType | Type of the data in the CSV File (other than the first column, which MUST be a double/float) |
Delimiter | Delimiter (normally ',') |
void BlackboardObject::ExportAllValuesToCSV | ( | const char * | Filename | ) |
Write the values of the object to a CSV file. The first element of each line is the timestamp and the remaining cells of the line contain the value.
Filename | Path to the CSV file |
void BlackboardObject::ExportRaw | ( | const char * | Filename | ) |
Write the values of the object to a raw file. Similar to the exportCSV function, but this one also stores information about the dimensions of objects. The first element of each line is the timestamp, the second element is the data type, the third column is the number of dimensions, the next few columns are the dimensions, and the remaining cells contain the value.
Filename | Path to the output file |
bool BlackboardObject::GetBoolean | ( | int | X, |
... | |||
) |
Get the value of a boolean in the object at a given location
X | Position in the first dimension (required as a first argument to va_start) |
... | Position of the element in the other dimensions |
void BlackboardObject::GetByName | ( | const char * | name | ) |
Get the object Id from the associated blackboard from the name
name | Name of the object on the blackboard |
SADBu8 BlackboardObject::GetByte | ( | int | X, |
... | |||
) |
Get the value of a byte in the object at a given location
X | Position in the first dimension (required as a first argument to va_start) |
... | Position of the element in the other dimensions |
SADBu32 BlackboardObject::GetDimension | ( | SADBu32 | D | ) |
The the size in the nth dimension
D | Index of the desired dimension (starts at 0) |
SADBdfl BlackboardObject::GetDouble | ( | int | X, |
... | |||
) |
Get the value of a double precision float in the object at a given location
X | Position in the first dimension (required as a first argument to va_start) |
... | Position of the element in the other dimensions |
SADBfl BlackboardObject::GetFloat | ( | int | X, |
... | |||
) |
Get the value of a float in the object at a given location
X | Position in the first dimension (required as a first argument to va_start) |
... | Position of the element in the other dimensions |
SADBu32 BlackboardObject::GetInteger | ( | int | X, |
... | |||
) |
Get the value of an integer in the object at a given location
X | Position in the first dimension (required as a first argument to va_start) |
... | Position of the element in the other dimensions |
int BlackboardObject::GetLatestTimestamp | ( | Timestamp * | Time | ) |
Get the latest timestamp on the server
[out] | Time | Pointer to a Timestamp object to store result |
int BlackboardObject::GetLatestValue | ( | void | ) |
Get the latest value form the SADB server
char * BlackboardObject::GetNewString | ( | void | ) |
Get the content of the object as a string
const char * BlackboardObject::GetString | ( | void | ) |
Get the content of the object as a string
char * BlackboardObject::GetStringElement | ( | int | X, |
... | |||
) |
Get the value of a float in the object at a given location
X | Position in the first dimension (required as a first argument to va_start) |
... | Position of the element in the other dimensions |
int BlackboardObject::GetValueAtNearestTimestamp | ( | Timestamp * | Time | ) |
Get the value at the nearest timestamp
Time | Requested Timestamp |
int BlackboardObject::GetValueAtNextTimestamp | ( | Timestamp * | Time | ) |
Get the value at the next timestamp
Time | Target Timestamp |
int BlackboardObject::GetValueAtPreviousTimestamp | ( | Timestamp * | Time | ) |
Get the value at the previous timestamp
Time | Target Timestamp |
int BlackboardObject::GetValueAtTimestamp | ( | Timestamp * | Time | ) |
Get the value at the exact timestamp with default interpolation method (linear)
Time | Requested Timestamp |
int BlackboardObject::GetValueAtTimestamp | ( | Timestamp * | Time, |
int | Interpolation | ||
) |
Get the value at the nearest timestamp
Time | Requested Timestamp |
Interpolation | Requested Interpolation method |
int BlackboardObject::GetValueAtTimestamp | ( | Timestamp * | Time, |
int | Interpolation, | ||
int | nPoints | ||
) |
Get the value at the nearest timestamp
Time | Requested Timestamp |
Interpolation | Requested Interpolation method |
nPoints | Number of points to use for interpolation |
int BlackboardObject::GetValueAtTimestampNoInterpolation | ( | Timestamp * | Time | ) |
Get the value at a given timestamp, if such a value exists
Time | Requested Timestamp |
void BlackboardObject::ImportRaw | ( | const char * | Filename | ) |
Initialize the object with data from a raw data file (exported with exportraw)
Filename | Path to the raw file |
void BlackboardObject::ImportRaw | ( | const char * | Filename, |
float | A, | ||
float | B | ||
) |
Initialize the object with data from a raw data file (exported with exportraw)
Filename | Path to the raw file |
A | Beginning Percentage |
A | End Percentage |
void BlackboardObject::KeepOnlyLatestValues | ( | int | nValues | ) |
Discard earliest values and keep only the n most recent
nValues | Number of Values to be kept |
int BlackboardObject::OnlySetDimensionsf | ( | SADBu32 | D, |
... | |||
) |
Sets the size of the object by defining its dimensionality and its dimensions, without allocating memory
D | Number of Dimensions |
... | Dimensions (Height, Width, etc) |
void BlackboardObject::RemoveFromCategory | ( | SADBu64 | CUID | ) |
Add the object to a category
CUID | ID of the category |
void BlackboardObject::RemoveFromCategory | ( | const char * | Cat | ) |
Add the object to a category
Cat | Name of the category |
int BlackboardObject::Send | ( | void | ) |
Send the object data to the blackboard
void BlackboardObject::SetBlackboard | ( | Blackboard * | board | ) |
Associate the object to a blackboard
board | Pointer to the target blackboard object |
void BlackboardObject::SetBoolean | ( | bool | Value, |
... | |||
) |
Sets the value of an element in the object
Value | Value to set |
... | Position of the element to receive the value (X,Y,Z,...) |
void BlackboardObject::SetByte | ( | SADBu8 | Value, |
... | |||
) |
Sets the value of an element in the object
Value | Value to set |
... | Position of the element to receive the value (X,Y,Z,...) |
void BlackboardObject::SetDataType | ( | enum BODataType | Type | ) |
Sets the type of data that the object will contain
Type | Data Type |
int BlackboardObject::SetDescription | ( | const char * | desc | ) |
Set Human Readable description of the object
desc | Description |
int BlackboardObject::SetDimensions | ( | SADBu32 | D, |
SADBu32 * | Ds | ||
) |
Sets the size of the object by defining its dimensionality and its dimensions
D | Number of Dimensions |
Ds | list of Dimensions (Height, Width, etc) |
int BlackboardObject::SetDimensionsf | ( | SADBu32 | D, |
... | |||
) |
Sets the size of the object by defining its dimensionality and its dimensions
D | Number of Dimensions |
... | Dimensions (Height, Width, etc) |
void BlackboardObject::SetDouble | ( | SADBdfl | Value, |
... | |||
) |
Sets the value of an element in the object
Value | Value to set |
... | Position of the element to receive the value (X,Y,Z,...) |
void BlackboardObject::SetFloat | ( | SADBfl | Value, |
... | |||
) |
Sets the value of an element in the object
Value | Value to set |
... | Position of the element to receive the value (X,Y,Z,...) |
void BlackboardObject::SetInteger | ( | SADBu32 | Value, |
... | |||
) |
Sets the value of an element in the object
Value | Value to set |
... | Position of the element to receive the value (X,Y,Z,...) |
int BlackboardObject::SetName | ( | const char * | name | ) |
Set Human Readable name of the object
name | Name |
void BlackboardObject::SetString | ( | const char * | str | ) |
Set a string as the content of the object.
str | Desired string |
void BlackboardObject::SetStringElement | ( | const char * | str, |
... | |||
) |
Sets a string in an object
str | String |
... | Position of the element to receive the value (X,Y,Z,...), the last dimension stores the string |
void BlackboardObject::SetTimestamp | ( | Timestamp * | time | ) |
Set the timestamp
time | Desired timestamp |