00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _C_GENERATOR_H
00021 #define _C_GENERATOR_H
00022
00023 #include "C_TaskControl.hpp"
00024
00025 #include "cmd_line_t.hpp"
00026
00027 #include "C_GeneratorConfig.hpp"
00028 #include "GeneratorXmlData.hpp"
00029 #include "C_ReadControl.hpp"
00030 #include "C_XmlData.hpp"
00031 #include "C_ScenarioControl.hpp"
00032 #include "C_RemoteControl.hpp"
00033
00034 #include "C_DisplayControl.hpp"
00035 #include "C_LogStatControl.hpp"
00036 #include "C_KeyboardControl.hpp"
00037
00038 #include "C_DataLogControl.hpp"
00039 #include "C_DataLogRTDistrib.hpp"
00040
00041 #include "C_ProtocolControl.hpp"
00042 #include "C_TransportControl.hpp"
00043 #include "C_ChannelControl.hpp"
00044
00045 #include "C_ExternalDataControl.hpp"
00046
00047 #include "C_DisplayTraffic.hpp"
00048 #include "C_DisplayRTime.hpp"
00049 #include "C_DisplayHelp.hpp"
00050
00051 #include "gen_operation_t.hpp"
00052 #include "C_LogProtocolStatControl.hpp"
00053
00054 #include "list_t.hpp"
00055
00056
00057 class C_Generator : public C_TaskControl {
00058
00059 public:
00060 C_Generator(cmd_line_pt P_cmd_line);
00061
00062 ~C_Generator();
00063
00064 void set_screen (char P_key) ;
00065
00066 void pause_traffic () ;
00067 void restart_traffic () ;
00068 void force_init () ;
00069 void pause_display () ;
00070 unsigned long get_call_rate() ;
00071 void change_call_rate(T_GenChangeOperation P_op, unsigned long P_rate);
00072 void change_rate_scale(unsigned long P_scale);
00073 void change_burst (unsigned long P_burst);
00074
00075 void change_display_period (long P_period);
00076
00077 C_LogProtocolStatControl* create_log_protocol_stats(C_ProtocolFrame *P_protocol,
00078 char *P_timechar,
00079 string_t& P_logProtocolStatFileName,
00080 unsigned long P_log_period_period,
00081 bool P_files_no_timestamp);
00082
00083 void reset_cumul_counters () ;
00084 void activate_percent_traffic () ;
00085
00086
00087 protected:
00088
00089 private:
00090
00091 int m_cmd_line_size ;
00092 char **m_cmd_line_values ;
00093 C_GeneratorConfig *m_config ;
00094 C_XmlData *m_xml_data ;
00095
00096 C_ReadControl *m_read_control ;
00097 C_ScenarioControl *m_scen_control ;
00098
00099 C_DataLogControl *m_data_log_control ;
00100 bool m_do_data_log_control ;
00101
00102 C_ExternalDataControl *m_external_data_control ;
00103
00104
00105
00106 C_DisplayControl *m_display_control ;
00107 bool m_do_display_control ;
00108
00109 long m_display_period ;
00110
00111
00112 C_DisplayTraffic *m_display_traffic ;
00113 C_DisplayRTime *m_display_rtime ;
00114 C_DisplayHelp *m_display_help ;
00115
00116 C_LogStatControl *m_log_stat_control ;
00117 bool m_do_log_stat_control ;
00118
00119 C_LogProtocolStatControl **m_log_protocol_stat_control ;
00120 int m_nb_log_protocol_stat_control ;
00121
00122 C_KeyboardControl *m_keyboard_control ;
00123 bool m_do_keyboard_control ;
00124
00125
00126 C_RemoteControl *m_remote_control ;
00127 bool m_do_remote_control ;
00128
00129
00130 int m_nb_forced ;
00131 pthread_t *m_keyboard_thread ;
00132
00133
00134
00135
00136
00137
00138 C_ProtocolControl *m_protocol_ctrl ;
00139 C_TransportControl *m_transport_ctrl ;
00140 C_ChannelControl *m_channel_ctrl ;
00141
00142
00143 T_GeneratorError TaskProcedure();
00144 T_GeneratorError InitProcedure();
00145 T_GeneratorError EndProcedure();
00146 T_GeneratorError StoppingProcedure();
00147 T_GeneratorError ForcedStoppingProcedure();
00148
00149 void ExitProcedure () ;
00150
00151 } ;
00152
00153 typedef C_Generator * T_pC_Generator ;
00154
00155 #endif // _C_GENERATOR_H
00156
00157
00158
00159
00160
00161
00162
00163
00164