Rover Group and Sensor Group API and Stub code
Page 1 of 1
Rover Group and Sensor Group API and Stub code
--This is the API for the Rover Group--
--This is the stub code for the Rover Group--
- Code:
// ECE 453 - Spring 2009
// Communication group
// Rover API
// Describes the application programming interface between the communication
// group and rover movement applications.
//This is the API the rover is using since it will be all in the same header file.
//We just call the functions
//Moves forward at a constant speed, one tick.
//Returns true if command was executed
bool moveForward();
//Moves backwards at a constant speed, one tick.
//Returns true if command was executed
bool moveBackward();
//Turns left at a constant speed, one tick.
//Returns true if command was executed
bool turnLeft();
//Turns right at a constant speed, one tick.
//Returns true if command was executed
bool turnRight();
--This is the stub code for the Rover Group--
- Code:
This is our stub code for their header file-
//This is the stub code for the rover group’s functions
//Moves forward at a constant speed, one tick.
//Returns true if command was executed
bool moveForward()
{
printf(“Rover moved forward one tick\n”);
return true;
}
//Moves backwards at a constant speed, one tick.
//Returns true if command was executed
bool moveBackward()
{
printf(“Rover moved backward one tick\n”);
return true;
}
//Turns left at a constant speed, one tick.
//Returns true if command was executed
bool turnLeft()
{
printf(“Rover turned left one tick\n”);
return true;
}
//Turns right at a constant speed, one tick.
//Returns true if command was executed
bool turnRight()
{
printf(“Rover turned right one tick\n”);
return true;
}
dsmarsh- Posts : 54
Join date : 2009-01-08
Age : 38
Re: Rover Group and Sensor Group API and Stub code
--This is the API for the Sensor Group--
There is not stub code since we will be writing this code ourselves.
- Code:
// ECE 453 - Spring 2009
// Communication group
// Rover API
// Describes the application programming interface between the communication
// group and rover movement applications.
//the Sensor group calls this function when there is a hit registered on either robot
//dead == true when robot was hit
void RoverDead(bool dead);
There is not stub code since we will be writing this code ourselves.
dsmarsh- Posts : 54
Join date : 2009-01-08
Age : 38
Similar topics
» Rover group's stub code
» Sensor Group's Function
» Rover group needs.
» Rover group header file.
» Rover group meetup times.
» Sensor Group's Function
» Rover group needs.
» Rover group header file.
» Rover group meetup times.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|