MAK RTIspy API Documentation for HLA 1.3
simpleTimeInteraction1516.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2006 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: simpleTimeInteraction1516.h,v $ $Revision: 1.2 $ $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 // 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    enum interaction_type{ Unknown, FireType, DetonationType };
00027    
00028    
00029    interactionEvent(const rti1516::InteractionClassHandle theHandle,
00030         const rti1516::ParameterHandleValueMap& pvhps,
00031                   const rti1516::VariableLengthData& userSuppliedTag,
00032                   const rti1516::OrderType sentOrder,
00033                   const rti1516::TransportationType theType,
00034                   const rti1516::LogicalTime& fedTime,
00035                   const rti1516::OrderType receivedOrder,        
00036                   rti1516::MessageRetractionHandle theRetractionHandle,
00037                   interaction_type theInteractionType = Unknown
00038                   );
00039   
00040   interactionEvent(const rti1516::InteractionClassHandle theHandle,
00041                   const rti1516::ParameterHandleValueMap& pvhps,
00042                   const rti1516::VariableLengthData& userSuppliedTag,
00043                   const rti1516::OrderType sentOrder,
00044                   const rti1516::TransportationType theType,
00045                   const rti1516::LogicalTime& fedTime,
00046                   const rti1516::OrderType receivedOrder,
00047                   interaction_type theInteractionType = Unknown
00048                   );
00049   interactionEvent(const rti1516::InteractionClassHandle theHandle,
00050                   const rti1516::ParameterHandleValueMap& pvhps,
00051                   const rti1516::VariableLengthData& userSuppliedTag,
00052                   const rti1516::OrderType sentOrder,
00053                   const rti1516::TransportationType theType,
00054                   interaction_type theInteractionType = Unknown
00055                  );
00056 
00057   
00058   ~interactionEvent();
00059   
00060   rti1516::InteractionClassHandle getHandle();
00061 //  const std::map<rti1516::ParameterHandle, std::string>& getPhvps();
00062   bool isFireInteraction();
00063   bool isDetonateInteraction();  
00064   const std::string& getFedTime();
00065   const std::string& getTag();
00066   const rti1516::MessageRetractionHandle& getRetractionHandle();
00067   int getTypeOfInteraction();
00068 
00069 private:
00070   rti1516::InteractionClassHandle myHandle;
00071   std::map<rti1516::ParameterHandle, std::string> myPhvps;
00072   std::string myFedTime;
00073   std::string myTag;
00074   rti1516::MessageRetractionHandle myRetractionHandle;
00075   int myInteractionType;
00076   
00077 };
00078 #endif

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)