Data Structures | |
struct | SensorMatrix |
struct | SensorMatrix |
Functions | |
SensorMatrix * | sensor_matrix_create (void) |
Create a sensor matrix. | |
void | sensor_matrix_destroy (SensorMatrix *m) |
Destroy a sensor matrix. | |
void | sensor_matrix_add_robot (SensorMatrix *m, unsigned int id) |
Add a robot to a sensor matrix. | |
void | sensor_matrix_remove_robot (SensorMatrix *m, unsigned int id) |
Remove a robot from a sensor matrix. | |
void | sensor_matrix_set_reading (SensorMatrix *m, int observer, int robot, int reading) |
Set a reading in a sensor matrix. | |
int | sensor_matrix_get_reading (SensorMatrix *m, int observer, int robot) |
Get a reading in a sensor matrix. | |
void | sensor_matrix_set_in_ring (SensorMatrix *m, int robot, int in) |
Set whether the robot is in the token ring. | |
int | sensor_matrix_get_in_ring (SensorMatrix *m, int robot) |
Get whether the robot is in the sensor ring. | |
int | sensor_matrix_get_size (SensorMatrix *m) |
Get the size of the sensor matrix. | |
int | sensor_matrix_get_joined (SensorMatrix *m) |
Get the number of robots which have joined the token ring. |
These functions and structures are used for localization to determine the relative directions of robots.
|
Add a robot to a sensor matrix. Adds robot with XBee id id to the sensor matrix.
|
|
Create a sensor matrix. Initializes the sensor matrix.
|
|
Destroy a sensor matrix. Deletes and frees memory from the sensor matrix.
|
|
Get whether the robot is in the sensor ring. Checks if the given robot is in the token ring.
|
|
Get the number of robots which have joined the token ring. Returns the number of robots which have joined the token ring.
|
|
Get a reading in a sensor matrix. Gets the sensor reading for a robot to another robot.
|
|
Get the size of the sensor matrix. Returns the size of the sensor matrix.
|
|
Remove a robot from a sensor matrix. Removes robot with id from the sensor matrix, and removes all sensor information regarding the robot.
|
|
Set whether the robot is in the token ring. Sets whether or not the given robot is part of the token ring.
|
|
Set a reading in a sensor matrix. Sets the sensor reading for robot robot to reading.
|