00001 00021 #ifndef __NEW_SIM_DIMI_H__ 00022 #define __NEW_SIM_DIMI_H__ 00023 00024 00025 extern "C" { 00026 #include "SaHpi.h" 00027 } 00028 00029 00030 #ifndef __NEW_SIM_RDR_H__ 00031 #include "new_sim_rdr.h" 00032 #endif 00033 00034 #ifndef __NEW_SIM_DIMI_DATA_H__ 00035 #include "new_sim_dimi_data.h" 00036 #endif 00037 00038 class NewSimulatorDomain; 00039 00046 class NewSimulatorDimi : public NewSimulatorRdr { 00047 00048 private: 00050 SaHpiDimiRecT m_dimi_rec; 00052 SaHpiDimiInfoT m_dimi_info; 00054 cArray<NewSimulatorDimiTest> m_tests; 00056 SaHpiDimiTestNumT m_test_id; 00057 00058 NewSimulatorDimiTest *GetTest( SaHpiDimiTestNumT num ); 00059 00060 00061 00062 public: 00063 NewSimulatorDimi( NewSimulatorResource *res ); 00064 NewSimulatorDimi( NewSimulatorResource *res, SaHpiRdrT rdr ); 00065 virtual ~NewSimulatorDimi(); 00066 00067 00069 virtual unsigned int Num() const { return ( unsigned int ) m_dimi_rec.DimiNum; } 00070 00072 SaHpiDimiTestNumT GetTestId() { return m_test_id++; } 00073 bool SetData( SaHpiDimiRecT dimiRec ); 00074 bool SetInfo( SaHpiDimiInfoT spec ); 00075 bool AddTest( NewSimulatorDimiTest *test ); 00076 00077 // create a RDR record 00078 virtual bool CreateRdr( SaHpiRptEntryT &resource, SaHpiRdrT &rdr ); 00079 00080 // Official HPI functions 00081 SaErrorT GetResults( SaHpiDimiTestNumT id, SaHpiDimiTestResultsT &results); 00082 SaErrorT GetStatus( SaHpiDimiTestNumT id, SaHpiDimiTestPercentCompletedT &perc, 00083 SaHpiDimiTestRunStatusT &status ); 00084 SaErrorT CancelTest( SaHpiDimiTestNumT id ); 00085 SaErrorT StartTest( SaHpiDimiTestNumT id, SaHpiUint8T number, 00086 SaHpiDimiTestVariableParamsT *param); 00087 SaErrorT GetReadiness( SaHpiDimiTestNumT id, SaHpiDimiReadyT &ready ); 00088 SaErrorT GetTestInfo( SaHpiDimiTestNumT id, SaHpiDimiTestT &tinfo ); 00089 SaErrorT GetInfo( SaHpiDimiInfoT &info ); 00090 00091 virtual void Dump( NewSimulatorLog &dump ) const; 00092 }; 00093 00094 00095 #endif