![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2009 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: simpleTimeInteraction13dlc.h,v $ $Revision: 1.1 $ $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 "RTI13.h" 00015 00016 00017 00018 // An interactionEvent object encapsulates the contents of a 00019 // receiveInteraction callback. Note, that not all contents of the 00020 // callback are stored, only those required for our specific application. 00021 00022 // That information can then be stored and later retrieved to be processed. 00023 class interactionEvent 00024 { 00025 public: 00026 00027 enum interaction_type{ Unknown, FireType, DetonationType }; 00028 00029 interactionEvent(rti13::InteractionClassHandle theHandle, 00030 const rti13::ParameterHandleValuePairSet& pvhps, 00031 const rti13::FedTime& fedTime, 00032 const char* tag, 00033 interaction_type theInteractionType = Unknown 00034 ); 00035 00036 // Constructor for an interaction with no reported FedTime. 00037 interactionEvent(rti13::InteractionClassHandle theHandle, 00038 const rti13::ParameterHandleValuePairSet& pvhps, 00039 const char* tag, 00040 interaction_type theInteractionType = Unknown 00041 ); 00042 00043 ~interactionEvent(); 00044 00045 rti13::InteractionClassHandle getHandle(); 00046 // const std::map<unsigned long, std::string>& getPhvps(); 00047 bool isFireInteraction(); 00048 bool isDetonateInteraction(); 00049 const std::string& getFedTime(); 00050 const std::string& getTag(); 00051 rti13::EventRetractionHandle getRetractionHandle(); 00052 int getTypeOfInteraction(); 00053 00054 private: 00055 rti13::InteractionClassHandle myHandle; 00056 std::map<unsigned long, std::string> myPhvps; 00057 std::string myFedTime; 00058 std::string myTag; 00059 int myInteractionType; 00060 00061 }; 00062 00063 00064 class requestUnit 00065 { 00066 public: 00067 requestUnit( rti13::ObjectHandle, 00068 const rti13::AttributeHandleSet& attrHandSet ); 00069 00070 ~requestUnit(); 00071 00072 const rti13::AttributeHandleSet& getAttrHandSet(); 00073 const rti13::ObjectHandle getHandle(); 00074 00075 private: 00076 const rti13::AttributeHandleSet& myAttrHandleSet; 00077 rti13::ObjectHandle myHandle; 00078 }; 00079 00080 00081 00082 00083 00084 #endif