English part of API

Go down

English part of API Empty English part of API

Post  pflegel on Wed Feb 04, 2009 7:16 pm

Code:
// External Functions

//Codes for commands
#define ROVER_FORWARDS 101
   This will be used in SendCommand to inform the Rover group to    move the rover forwards
#define ROVER_BACKWARDS 102
   This will be used in SendCommand to inform the Rover group to    move the rover backwards
#define ROVER_RIGHT 103
   This will be used in SendCommand to inform the Rover group to    move the rover right
#define ROVER_LEFT 104
   This will be used in SendCommand to inform the Rover group to    move the rover left
#define ROVER_STOP 105
   This will be used in SendCommand to inform the Rover group to    make the rover stop

#define FRONT_CAMERA_UP 201
   This will be used in SendCommand to inform the Camera group to
   move the front camera up
#define FRONT_CAMERA_DOWN 202
   This will be used in SendCommand to inform the Camera group to
   move the front camera down
#define FRONT_CAMERA_RIGHT 203
   This will be used in SendCommand to inform the Camera group to
   move the front camera right
#define FRONT_CAMERA_LEFT 204
   This will be used in SendCommand to inform the Camera group to
   move the front camera left
#define FRONT_CAMERA_ZOOM_IN 205
   This will be used in SendCommand to inform the Camera group to
   zoom the front camera in
#define FRONT_CAMERA_ZOOM_OUT 206
   This will be used in SendCommand to inform the Camera group to
   zoom the front camera out

#define GUN_UP 301
   This will be used in SendCommand to inform the Nerf group to
   move the gun up
#define GUN_DOWN 302
   This will be used in SendCommand to inform the Nerf group to
   move the gun down
#define GUN_RIGHT 303
   This will be used in SendCommand to inform the Nerf group to
   move the gun right
#define GUN_LEFT 304
   This will be used in SendCommand to inform the Nerf group to
   move the gun left
#define GUN_FIRE 305
   This will be used in SendCommand to inform the Nerf group to
   fire a dart.
#define GUN_STOP 306
   This will be used in SendCommand to inform the Nerf group to
   stop the gun from moving.

#define INITALIZE -111
   This command is sent to the Comm group to inform the other
   groups that a user has logged in and will start sending
   commands.
#define KILL -555
   This command is sent to the Comm group to say that something
   has gone wrong and the system needs to be shut down.
#define RESET -999
   This command is sent to the Comm group so they can inform the
   other groups that the users wish to reset the cameras and    rovers.

//codes for in-room camera select
#define CAMERA_TOP 501
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the top camera angle
#define CAMERA_TOP_LEFT 502
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the top left camera angle
#define CAMERA_TOP_RIGHT 503
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the top right camera angle
#define CAMERA_BOTTOM 504
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the bottom camera angle
#define CAMERA_BOTTOM_LEFT 505
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the bottom left camera angle
#define CAMERA_BOTTOM_RIGHT 506
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the bottom right camera angle
#define CAMERA_ROBOT1_FRONT 507
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the camera angle from the front of the rover
#define CAMERA_ROBOT1_GUN 508
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the camera angle from the nerf gun
#define CAMERA_ROBOT2_FRONT 509
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the camera angle from the front of the rover
#define CAMERA_ROBOT2_GUN 510
   This will be used in RecieveImageOverhead to inform the Comm    group to   send the camera angle from the front of the rover

//rover ID is which rover to send to
//command name is the command as seen above
SendCommand(int rover_ID, int command_name);
   This command will be sent to the Comm group, who will pass it on
   to the corresponding group.  The command_name will tell the    group what the user has selected.  The rover_ID will specify
   which rover needs to be controlled.

//all cameras
RecieveImage(int camera_feed);
   This command will be sent and returned by the Comm group to tell
   which camera feed the user has selected and to also return the
   feed from the camera.

RecieveDart(int status);
   This command will be received by the GUI and will tell if the
   dart hit the target or if the dart missed.

pflegel

Posts : 4
Join date : 2009-01-09

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum