• Main Page
  • Modules
  • Classes
  • Files
  • File List

cd_control_system.h

00001 /*
00002  *  cd_control_system.h
00003  *  ControlDeck
00004  *
00005  *  Created by David Wilson on 2/13/08.
00006  *  Copyright 2008 Princeton Satellite Systems. All rights reserved.
00007  *
00008  */
00009 
00010 #ifndef __CD_CONTROL_SYSTEM__
00011 #define __CD_CONTROL_SYSTEM__
00012 
00013 #include "cd_control_module.h"
00014 #include <DSUtils/DSUtils.h>
00015 
00016 class cd_control_deck;
00017 
00029 class cd_control_system
00030 {
00031     public:
00033         cd_control_system(const char *system_name);
00034         ~cd_control_system();
00035         
00037         bool add_control_module(cd_control_module *module);
00039         void remove_control_module(const char *name);
00040         
00041         void initialize_data();
00042         void initialize();
00043         
00044         void request_timer(const char *module,double period,int code);
00045         void remove_timer(const char *module,int code);
00046         void trigger_timer(const char *module,int code);
00047         
00048         void request_event_notification(const char *module,const char *group,const char *event_name,int code);
00049         void trigger_event(const char *group,const char *event_name);
00050         void handle_event(const char *module,int code);
00051         
00052         CD_DATA_REF create_data(const char *group,const char *path,int type,const char *units,const char *description,void *initial_value);
00053         CD_DATA_REF request_data(const char *group,const char *path,int type);
00054         const char *path_for_data(CD_DATA_REF point, const char *&group) const;
00055         bool delete_data(CD_DATA_REF point);
00056         
00057         void plog(const char *format,...);
00058         void error(const char *file,int line,const char *format,...);
00059         void vlog(const char *module,const char *format,va_list arg);
00060         void verror(const char *module,const char *file,int line,const char *format,va_list arg);
00061         
00062         ds_date current_time();
00063         
00064         void note_background_task_finished(const char *module,void *data,int code);
00065         void handle_background_task_finished(const char *module,void *data,int code);
00066         void note_background_task_data(const char *module,void *data,int code);
00067         void handle_background_task_data(const char *module,void *data,int code);
00068                 
00069     private:
00070                 cd_control_system (const cd_control_system &r);
00071                 cd_control_system &operator= (const cd_control_system &r);
00072 
00073     private:
00074         char *_name;
00075         char *_group;
00076         ds_character_hash _modules;
00077         cd_control_deck *_deck;
00078     
00079     friend class cd_control_deck;
00080 };
00081 
00082 #endif

Generated on Fri Apr 5 2013 17:06:31 for ControlDeck by  doxygen 1.7.2