scheduler.h File Reference

This file contains functions for the scheduler. More...

#include <ncurses.h>

Include dependency graph for scheduler.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  schedulerCommand
 Full scheduler command, with arguments. More...

Defines

#define CMDARRAYALLOCBLOCK   10
 The schedule structure will be enlarged by this amount of commands.
#define DEFAULT_SCHEDULE_FILE_NAME   "schedule.txt"
 Default file name for the schedule.

Enumerations

enum  schedulerPlainCommand {
  finished = 0, edges, distance, watch,
  wait, changeSide
}
 Plain scheduler commands, without arguments. More...

Functions

schedulerCommandcomputeSchedule (const void *polygon)
 Compute schedule from the given polygon.
schedulerCommandreadSchedule (const char *filename)
 Read and parse a precompiled schedule from a file.
void discardSchedule (schedulerCommand *schedule)
 Discards the schedule and frees the memory.
void printSchedule (schedulerCommand *schedule)
 Prints the given schedule on stdout.

Variables

WINDOW * schedulerLogWindow


Detailed Description

This file contains functions for the scheduler.

The scheduler is responsible for computing and keeping the movements schedule.

Version:
Id
scheduler.h,v 1.12 2008/09/18 12:59:02 prokop Exp

Definition in file scheduler.h.


Define Documentation

#define CMDARRAYALLOCBLOCK   10

The schedule structure will be enlarged by this amount of commands.

Definition at line 33 of file scheduler.h.

#define DEFAULT_SCHEDULE_FILE_NAME   "schedule.txt"

Default file name for the schedule.

Definition at line 36 of file scheduler.h.


Enumeration Type Documentation

Plain scheduler commands, without arguments.

Those are the basis for the later schedule.

Enumerator:
finished  guard has finished its plan.
edges  go over the next x edges
distance  walk the given distance in [mm] but at most to the next edge
watch  change to parter watcher mode
wait  wait for go (initial command for the first running guard)
changeSide  turn around and perform backtracking

Definition at line 41 of file scheduler.h.


Function Documentation

schedulerCommand* computeSchedule ( const void *  polygon  ) 

Compute schedule from the given polygon.

Parameters:
polygon pointer to the polygon. Ignored at the moment.
Returns:
computed schedule, as array of type schedulerCommand Schedule ends with the finished plain command. May be NULL, which indicates an error.

Definition at line 35 of file scheduler.c.

void discardSchedule ( schedulerCommand schedule  ) 

Discards the schedule and frees the memory.

Parameters:
schedule Schedule to free

Definition at line 148 of file scheduler.c.

void printSchedule ( schedulerCommand schedule  ) 

Prints the given schedule on stdout.

Mainly for debugging and testing purposes.

Parameters:
schedule schedule to print

Definition at line 155 of file scheduler.c.

schedulerCommand* readSchedule ( const char *  filename  ) 

Read and parse a precompiled schedule from a file.

Parameters:
filename File containing the schedule
Returns:
read schedule, as array of type schedulerCommand Schedule ends with the finished plain command. May be NULL, which indicates a fatal error.

Definition at line 39 of file scheduler.c.


Variable Documentation

Definition at line 33 of file scheduler.c.


Generated on Sun Sep 28 21:20:01 2008 for Guard by  doxygen 1.5.6