![]() |
roneos
Operating System for the r-one robot
|
Init, setter, and getter functions for the nbrData structure. More...
Go to the source code of this file.
Functions | |
void | nbrDataCreate (NbrData *nbrDataPtr, const char *name, uint8 size, uint8 value) |
Create a neighbor data. This is transmitted using the radio each neighbor round. More... | |
void | nbrDataCreateIR (NbrData *nbrDataPtr, const char *name, uint8 size, uint8 value) |
Create a IR neighbor data. This is transmitted via IR. The neighbor system makes one 7-bit data by default for the robot ID. Only data that need to share the fate of an IR message should go here. The rest should use radio (See nbrDataCreate()) More... | |
void | nbrDataSet (NbrData *nbrDataPtr, uint8 value) |
Set the value of the neighbor data. More... | |
uint8 | nbrDataGet (NbrData *nbrDataPtr) |
Get value in a neighbor message. More... | |
uint8 | nbrDataGetNbr (NbrData *nbrDataPtr, Nbr *nbrPtr) |
Get value of the local nbrData. More... | |
const char * | nbrDataGetName (NbrData *nbrDataPtr) |
Get name of neighbor message. More... | |
uint8 | nbrDataGetSize (NbrData *nbrDataPtr) |
Get size of neighbor message. More... | |
void | nbrDataPrintNbr (Nbr *nbrPtr) |
Print all the neighbor messages of a given neighbor. More... | |
void | nbrDataPrintNbrVerbose (Nbr *nbrPtr) |
Print all the neighbor messages of the given neighbor. Prints in verbose format, with names on separate lines. More... | |
void | nbrDataPrintHeaders (void) |
Print the names of all the nbr data in a header suitable for data logging. More... | |
uint8 | nbrDataCount (void) |
Get the total number of nbr data that have been created. More... | |
Init, setter, and getter functions for the nbrData structure.
nbrData is ideal for keeping track of messages sent between robots.
uint8 nbrDataCount | ( | void | ) |
Get the total number of nbr data that have been created.
void nbrDataCreate | ( | NbrData * | nbrDataPtr, |
const char * | name, | ||
uint8 | size, | ||
uint8 | value | ||
) |
Create a neighbor data. This is transmitted using the radio each neighbor round.
This function is called only once to init each neighbor data
nbrDataPtr | the pointer to the neighbor data |
name | the name for the type of neighbor data being stored |
size | the size of the neighbor data |
value | the value of the neighbor data |
void nbrDataCreateIR | ( | NbrData * | nbrDataPtr, |
const char * | name, | ||
uint8 | size, | ||
uint8 | value | ||
) |
Create a IR neighbor data. This is transmitted via IR. The neighbor system makes one 7-bit data by default for the robot ID. Only data that need to share the fate of an IR message should go here. The rest should use radio (See nbrDataCreate())
This function is called only once to init each neighbor data
nbrDataPtr | the pointer to the neighbor data |
name | the name for the neighbor data |
size | the size of the neighbor data |
value | the value of the neighbor data |
uint8 nbrDataGet | ( | NbrData * | nbrDataPtr) |
Get value in a neighbor message.
nbrDataPtr | pointer to neighbor message |
const char* nbrDataGetName | ( | NbrData * | nbrDataPtr) |
Get name of neighbor message.
As specified in NbrMsgCreate()
nbrDataPtr | pointer to neighbor message |
Get value of the local nbrData.
nbrDataPtr | pointer to neighbor message |
nbrPtr | neighbor pointer |
uint8 nbrDataGetSize | ( | NbrData * | nbrDataPtr) |
Get size of neighbor message.
As specified in NbrMsgCreate()
nbrDataPtr | pointer to neighbor message |
void nbrDataPrintHeaders | ( | void | ) |
Print the names of all the nbr data in a header suitable for data logging.
void nbrDataPrintNbr | ( | Nbr * | nbrPtr) |
Print all the neighbor messages of a given neighbor.
nbrPtr | neighbor pointer |
void nbrDataPrintNbrVerbose | ( | Nbr * | nbrPtr) |
Print all the neighbor messages of the given neighbor. Prints in verbose format, with names on separate lines.
nbrPtr | neighbor pointer |
void nbrDataSet | ( | NbrData * | nbrDataPtr, |
uint8 | value | ||
) |
Set the value of the neighbor data.
nbrDataPtr | the point to the nbrMsgPtr to be set. The size of the pointer must be 8 or smaller. |
value | the value the nbrMsgPtr should be set to |