00001 #ifndef Se_Interface_Included
00002 #define Se_Interface_Included
00003
00004 #include <iostream>
00005 #include "se_ipc.h"
00006 #include "se_message.h"
00007 #include "se_sim_data.h"
00008 #include "se_sim_data_vector.h"
00009 #include "se_tools.h"
00010
00011 namespace Se{
00012
00013 class Interface{
00014
00015
00016 int sim_id;
00017 int master_msq_key;
00018 int master_msq_id;
00019
00020
00021 int slave_msq_key;
00022 int slave_msq_id;
00023 Message *message_out;
00024 Message *message_in;
00025
00026
00027 Sim_Data_Vector *my_variables;
00028
00029 protected:
00030
00031 bool start_ordered;
00032 bool step_ordered;
00033 bool reset_ordered;
00034 bool stop_ordered;
00035 bool show_ordered;
00036 bool hide_ordered;
00037
00038 bool step_n_ordered;
00039 int n;
00040
00041
00042
00043
00044 public:
00045
00046 Interface();
00047 virtual ~Interface();
00048
00049
00050
00051
00052
00053 void check_messages();
00054 void send_simulation_info();
00055
00056
00057
00058
00059
00060 void new_data(const char *name,
00061 Sim_Data::Type type,
00062 Sim_Data::Mode mode,
00063 Sim_Data::Access access);
00064
00065
00066 void clear_variable(const char *name);
00067 void set_int_variable(const char *name, int value);
00068 void set_float_variable(const char *name,float value);
00069 void set_double_variable(const char *name,double value);
00070 void set_int_table(const char *name, int *value,int size);
00071 void set_float_table(const char *name,float *value,int size);
00072 void set_double_table(const char *name,double *value,int size);
00073 void add_int(const char *name,int value);
00074 void add_float(const char *name,float value);
00075 void add_double(const char *name,double value);
00076
00077
00078
00079
00080 void notify_before_step();
00081 void notify_after_step();
00082
00083 void notify_can_change_double_data(String name,
00084 double *d);
00085
00086 };
00087
00088 }
00089
00090 #endif