[Dfsm-devel] dFSM/include/libdfsm tfsm.h,1.22,1.23 tfsm_monitor_sensor.h,1.2,1.3 tinput.h,1.15,1.16
Status: Beta
Brought to you by:
amoreno
|
From: Andreu M. <am...@us...> - 2004-03-31 16:54:10
|
Update of /cvsroot/dfsm/dFSM/include/libdfsm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14362/include/libdfsm Modified Files: tfsm.h tfsm_monitor_sensor.h tinput.h Log Message: Tinput interface supports send and send_to (useful for utilities) and change monitor as service Index: tfsm_monitor_sensor.h =================================================================== RCS file: /cvsroot/dfsm/dFSM/include/libdfsm/tfsm_monitor_sensor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tfsm_monitor_sensor.h 3 Aug 2003 21:12:07 -0000 1.2 --- tfsm_monitor_sensor.h 31 Mar 2004 16:42:19 -0000 1.3 *************** *** 30,33 **** --- 30,36 ---- * $Revision$ * $Log$ + * Revision 1.3 2004/03/31 16:42:19 amoreno + * Tinput interface supports send and send_to (useful for utilities) and change monitor as service + * * Revision 1.2 2003/08/03 21:12:07 jvalduvieco * Major cleaning: *************** *** 47,52 **** #define TFSM_MONITOR_SENSOR_H - #include "libdfsm/sm_lists.h" using namespace std; --- 50,55 ---- #define TFSM_MONITOR_SENSOR_H #include "libdfsm/sm_lists.h" + #include "libdfsm/singleton.h" using namespace std; *************** *** 60,64 **** * */ ! class tfsm_monitor_sensor: public tsm_list { public: --- 63,67 ---- * */ ! class tfsm_monitor_sensor { public: *************** *** 67,74 **** * Class constructor * - * @param machine Machine number - * @param init Flag to clear list */ ! tfsm_monitor_sensor(u_int16_t machine, bool init); /** --- 70,75 ---- * Class constructor * */ ! tfsm_monitor_sensor(); /** *************** *** 78,81 **** --- 79,90 ---- /** + * Initializz + * + * @param machine Machine number + * @param init Flag to clear list + */ + bool init(u_int16_t machine, bool init); + + /** * Generic push * *************** *** 110,116 **** --- 119,145 ---- */ bool push_entry_state(u_int16_t state); + private: + tsm_list *list; + }; + class tFsm_monitor_sensor_service : public Singleton <tFsm_monitor_sensor_service> + { + public: + tFsm_monitor_sensor_service(){}; + ~tFsm_monitor_sensor_service(){}; + tfsm_monitor_sensor *get_pointer(){ return &monitor_sensor; }; + protected: + private: + tfsm_monitor_sensor monitor_sensor; }; + #define tfsm_monitor_sensor_service tFsm_monitor_sensor_service::getInstance() + #define monitor_sensors tFsm_monitor_sensor_service::getInstance()->get_pointer() + #define monitor_init monitor_sensors->init + #define monitor_push monitor_sensors->push + #define monitor_push_send_event monitor_sensors->push_send_event + #define monitor_push_receive_event monitor_sensors->push_receive_event + #define monitor_push_entry_state monitor_sensors->push_entry_state + #endif Index: tinput.h =================================================================== RCS file: /cvsroot/dfsm/dFSM/include/libdfsm/tinput.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tinput.h 19 Mar 2004 21:05:09 -0000 1.15 --- tinput.h 31 Mar 2004 16:42:19 -0000 1.16 *************** *** 32,35 **** --- 32,38 ---- * $Revision$ * $Log$ + * Revision 1.16 2004/03/31 16:42:19 amoreno + * Tinput interface supports send and send_to (useful for utilities) and change monitor as service + * * Revision 1.15 2004/03/19 21:05:09 jvalduvieco * Prerelease cleanup. *************** *** 145,149 **** * @return Bytes sended */ ! int send_to(u_int16_t id_msg, const char *data, u_int16_t len); /** --- 148,163 ---- * @return Bytes sended */ ! int send(u_int16_t id_msg, const char *data, u_int16_t len); ! ! /** ! * Send a message to a machines ! * ! * @param machine Machine id to send the message. ! * @param id_msg Message id. ! * @param data Extra data ! * @param len Length data ! * @return Bytes sended ! */ ! int send_to(u_int16_t machine, u_int16_t id_msg, const char *data, u_int16_t len); /** *************** *** 206,209 **** #define tinput_service tInput_service::getInstance() #define tinputs tInput_service::getInstance()->get_pointer() ! #define send_event tInput_service::getInstance()->get_pointer()->send_to #endif --- 220,224 ---- #define tinput_service tInput_service::getInstance() #define tinputs tInput_service::getInstance()->get_pointer() ! #define send_event tInput_service::getInstance()->get_pointer()->send ! #define send_event_to tInput_service::getInstance()->get_pointer()->send_to #endif Index: tfsm.h =================================================================== RCS file: /cvsroot/dfsm/dFSM/include/libdfsm/tfsm.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** tfsm.h 19 Mar 2004 21:05:09 -0000 1.22 --- tfsm.h 31 Mar 2004 16:42:19 -0000 1.23 *************** *** 30,33 **** --- 30,36 ---- * $Revision$ * $Log$ + * Revision 1.23 2004/03/31 16:42:19 amoreno + * Tinput interface supports send and send_to (useful for utilities) and change monitor as service + * * Revision 1.22 2004/03/19 21:05:09 jvalduvieco * Prerelease cleanup. *************** *** 303,312 **** static tLog state_log; - /** - * Monitor system - * - */ - static tfsm_monitor_sensor *monitor; - protected: --- 306,309 ---- |