![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2001 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: alert.h,v $ $Revision: 1.9 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtAlertInteraction_H_ 00013 #define DtAlertInteraction_H_ 00014 #ifdef DtMOM 00015 #ifdef DtIFSPEC13 00016 00017 #include "rtiMsConfig.h" 00018 #include "internalTypes.h" 00019 #include "mInteraction.h" 00020 #include <vlutil/vlList.h> 00021 00022 class DtMomInterCbMgr; 00023 class DtAlertInteraction; 00024 typedef void (*DtAlertInteractionCb) 00025 (const DtAlertInteraction& inter, void* usr); 00026 00027 class DT_DLL_LRC DtAlertInteraction : 00028 public DtReportInteraction 00029 { 00030 public: 00031 00033 DtAlertInteraction(); 00034 00036 virtual ~DtAlertInteraction(); 00037 00039 DtAlertInteraction( 00040 const DtAlertInteraction& orig); 00041 00043 DtAlertInteraction& operator=( 00044 const DtAlertInteraction& orig); 00045 00048 virtual const DtPhvps& phvps(); 00049 00052 virtual bool setFromPhvps(const DtPhvps& phvps); 00053 00055 virtual long alertID() const; 00056 virtual void setAlertID(long data); 00057 00059 virtual enum DtMomAlertTypes alertSeverity() const; 00060 virtual void setAlertSeverity(enum DtMomAlertTypes data); 00061 00063 virtual MAKRti::DtString const & alertDescription() const; 00064 virtual void setAlertDescription(MAKRti::DtString const & data); 00065 00066 00067 public: 00069 static DtReportInteraction* create(); 00070 00072 static void addCallback(DtMomInterCbMgr* callBackManager, 00073 DtAlertInteractionCb cb, void* usr); 00074 static void removeCallback(DtMomInterCbMgr* callBackManager, 00075 DtAlertInteractionCb cb, void* usr); 00076 00077 protected: 00078 00080 virtual void encodeAlertID( 00081 const DtMomInteraction& data, 00082 DtPhvps* parameters, 00083 DtParameterHandle parameterHandle); 00084 00086 virtual void encodeAlertSeverity( 00087 const DtMomInteraction& data, 00088 DtPhvps* parameters, 00089 DtParameterHandle parameterHandle); 00090 00092 virtual void encodeAlertDescription( 00093 const DtMomInteraction& data, 00094 DtPhvps* parameters, 00095 DtParameterHandle parameterHandle); 00096 00098 virtual void decodeAlertID( 00099 DtMomInteraction* data, 00100 const DtPhvps& parameters, 00101 int index); 00102 00104 virtual void decodeAlertSeverity( 00105 DtMomInteraction* data, 00106 const DtPhvps& parameters, 00107 int index); 00108 00110 virtual void decodeAlertDescription( 00111 DtMomInteraction* data, 00112 const DtPhvps& parameters, 00113 int index); 00114 00115 public: 00116 static const char* theInteractionName; 00117 00118 protected: 00120 long myAlertID; 00121 enum DtMomAlertTypes myAlertSeverity; 00122 MAKRti::DtString myServiceName; 00123 MAKRti::DtString myAlertDescription; 00124 00125 const char *ALERT_I_D_PARAMETER_NAME; 00126 const char *ALERT_SEVERITY_PARAMETER_NAME; 00127 const char *ALERT_DESCRIPTION_PARAMETER_NAME; 00128 00129 }; 00130 00131 #endif //! !DtIFSPEC1516 00132 #endif //! DtMOM 00133 #endif //! DtAlertInteraction_H_