zoo.h

Go to the documentation of this file.
00001 #ifndef _STAGE_ZOO_H
00002 #define _STAGE_ZOO_H
00003 
00004 #include <libplayercore/playercore.h>
00005 #include <stage.h>
00006 
00007 class ZooDriver;
00008 class ZooSpecies;
00009 class ZooController;
00010 class ZooReferee;
00011 
00012 #define ZOO_DRIVER_NAME "zoo"
00013 #define ZOO_SPECIES_SECTYPE "species"
00014 #define ZOO_CONTROLLER_SECTYPE "controller"
00015 
00016 #define ZOO_DEFAULT_SPECIES "planktron"
00017 #define ZOO_DEFAULT_FREQUENCY 1
00018 
00019 #define ZOO_DIAGNOSTIC_LEVEL 5
00020 #define ZOO_DEBUGMSG(f, a, b) PLAYER_MSG2(ZOO_DIAGNOSTIC_LEVEL, f, a, b)
00021 
00022 #define ZOO_RUN_IND_PROP "zoo_run"
00023 #define ZOO_RUN_IND_TIME 5000 /* milliseconds */
00024 
00025 /* general stuff */
00026 extern "C" { int zoo_err(const char *, ...); }
00027 
00028 extern bool player_quiet_startup;
00029 
00030 /* maps */
00031 typedef struct {
00032         const char *model_name;
00033         int port;
00034         ZooController *controller;
00035         stg_model_t *model;
00036 } rmap_t;
00037 
00038 /* referee stuff */
00039 #define ZOOREF_CREATE "zooref_create"
00040 #define ZOOREF_SCORE_FIG_NAME "zooref_score_fig"
00041 #define ZOO_SCORE_BUFFER_SIZE   256
00042 #define ZOO_SCORE_PROPERTY_NAME "zoo_score"
00043 #define ZOO_SCORE_LABEL "score from Zoo"
00044 typedef int (*zooref_init_t)(ConfigFile *, int, ZooDriver *);
00045 typedef int (*zooref_score_draw_t)(stg_model_t *, const char *propname,
00046                          const void *sdata, size_t, void *, int mindex);
00047 typedef ZooReferee *(*zooref_create_t)(ConfigFile *, int, ZooDriver *);
00048 
00049 #include "zoo_driver.h"
00050 #include "zoo_species.h"
00051 #include "zoo_controller.h"
00052 #include "zoo_referee.h"
00053 
00054 /* FIXME: what happened to properties? */
00055 #define stg_model_set_property(a,b,c,d)
00056 #define stg_model_get_property_fixed(a,b,c) (0)
00057 #define stg_model_add_property_toggles(a,b,c,d,e,f,g,h)
00058 #define stg_model_add_property_callback(a,b,c,d)
00059 typedef stg_model_callback_t stg_property_callback_t;
00060 
00061 #endif

Generated on Thu Dec 13 14:35:18 2007 for Stage by  doxygen 1.4.6