![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2010 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: simpleTimeInteraction1516e.h,v $ $Revision: 1.0 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef _INTERACTIONDEFINITION_ 00009 #define _INTERACTIONDEFINITION_ 00010 00011 // A simple container class for an interaction event 00012 #include <map> 00013 #include <string> 00014 #include <RTI/RTI1516.h> 00015 #include <RTI/RTIambassadorFactory.h> 00016 #include "simpleTimeStringUtil.h" 00017 00018 using namespace rti1516e; 00019 00020 // An interactionEvent object encapsulates the contents of a 00021 // receiveInteraction callback. Note, that not all contents of the 00022 // callback are stored, only those required for our specific application. 00023 00024 // That information can then be stored and later retrieved to be processed. 00025 class interactionEvent 00026 { 00027 public: 00028 enum interaction_type{ Unknown, FireType, DetonationType }; 00029 00030 00031 interactionEvent(const rti1516e::InteractionClassHandle theHandle, 00032 const rti1516e::ParameterHandleValueMap& pvhps, 00033 const rti1516e::VariableLengthData& userSuppliedTag, 00034 const rti1516e::OrderType sentOrder, 00035 const rti1516e::TransportationType theType, 00036 const rti1516e::LogicalTime& fedTime, 00037 const rti1516e::OrderType receivedOrder, 00038 rti1516e::MessageRetractionHandle theRetractionHandle, 00039 const SupplementalReceiveInfo theReceiveInfo, 00040 interaction_type theInteractionType = Unknown 00041 ); 00042 00043 interactionEvent(const rti1516e::InteractionClassHandle theHandle, 00044 const rti1516e::ParameterHandleValueMap& pvhps, 00045 const rti1516e::VariableLengthData& userSuppliedTag, 00046 const rti1516e::OrderType sentOrder, 00047 const rti1516e::TransportationType theType, 00048 const rti1516e::LogicalTime& fedTime, 00049 const rti1516e::OrderType receivedOrder, 00050 const SupplementalReceiveInfo theReceiveInfo, 00051 interaction_type theInteractionType = Unknown 00052 ); 00053 interactionEvent(const rti1516e::InteractionClassHandle theHandle, 00054 const rti1516e::ParameterHandleValueMap& pvhps, 00055 const rti1516e::VariableLengthData& userSuppliedTag, 00056 const rti1516e::OrderType sentOrder, 00057 const rti1516e::TransportationType theType, 00058 const SupplementalReceiveInfo theReceiveInfo, 00059 interaction_type theInteractionType = Unknown 00060 ); 00061 00062 00063 ~interactionEvent(); 00064 00065 rti1516e::InteractionClassHandle getHandle(); 00066 // const std::map<rti1516e::ParameterHandle, std::string>& getPhvps(); 00067 bool isFireInteraction(); 00068 bool isDetonateInteraction(); 00069 const std::string& getFedTime(); 00070 const std::string& getTag(); 00071 const rti1516e::MessageRetractionHandle& getRetractionHandle(); 00072 int getTypeOfInteraction(); 00073 const SupplementalReceiveInfo getReceiveInfo(); 00074 00075 private: 00076 rti1516e::InteractionClassHandle myHandle; 00077 std::map<rti1516e::ParameterHandle, std::string> myPhvps; 00078 std::string myFedTime; 00079 std::string myTag; 00080 rti1516e::MessageRetractionHandle myRetractionHandle; 00081 int myInteractionType; 00082 SupplementalReceiveInfo myReceiveInfo; 00083 00084 }; 00085 #endif 00086 00087