![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: makRti.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 // This file contains extensions to the standard RTI interface 00010 // that are supported by the MAK RTI. 00011 00012 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E) 00013 #include "RTI/RTI1516.h" 00014 #else 00015 #ifdef DtIFSPEC13DLC 00016 #include "RTI13.h" 00017 #define RTI rti13 00018 #else 00019 #include "RTI.hh" 00020 #endif 00021 #endif 00022 00023 namespace MAKRti 00024 { 00025 class DtString; 00026 } 00027 00028 00030 void RTI_EXPORT checkVersion(const MAKRti::DtString& version); 00031 00032 00033 // Dynamically set the RTI notify level 00034 // 0 - Fatal, 1 - Warning, 2 - Info, 3 - Verbose, 4+ - Debug 00035 #ifdef DtIFSPEC1516 00036 void RTI_EXPORT setRtiNotifyLevel(rti1516::RTIambassador* amb, int level); 00037 #elif defined(DtIFSPEC1516E) 00038 void RTI_EXPORT setRtiNotifyLevel(rti1516e::RTIambassador* amb, int level); 00039 #else 00040 void RTI_EXPORT setRtiNotifyLevel(RTI::RTIambassador* amb, int level); 00041 #endif 00042 00044 void RTI_EXPORT DtPrintAboutInfo(); 00045 00047 void RTI_EXPORT DtPrintAboutInfoWithoutHlaVersion(); 00048 00049 // Depreciated: Only for best effort 00050 // Returns a file descriptor on which data will be present whenever 00051 // there is incoming data waiting to be read by the RTI. This can be 00052 // used in a call to select to avoid calling RTI::tick until there 00053 // is actually data waiting. Returns -1 if no such file descriptor. 00054 #ifdef DtIFSPEC1516 00055 int RTI_EXPORT DtReadFileDescriptor(rti1516::RTIambassador* amb); 00056 #elif defined(DtIFSPEC1516E) 00057 int RTI_EXPORT DtReadFileDescriptor(rti1516e::RTIambassador* amb); 00058 #else 00059 int RTI_EXPORT DtReadFileDescriptor(RTI::RTIambassador* amb); 00060 #endif 00061 00062 // Returns a file descriptor on which data will be present for the given 00063 // transport type whenever there is incoming data waiting to be read by the RTI. This can be 00064 // The file descriptors can be used in a call to select to avoid 00065 // calling RTI::tick until there is actually data waiting. 00066 // Returns -1 if no such file descriptor. 00067 // 00068 // (Note: when running in asynchronous mode (RTI_asynchronousIO = 1) 00069 // this function will return -1 on windows, use DtReadFileEvent instead. 00070 // On unix it will return the file descriptor of the pipe used for 00071 // inter-thread communication instead of the socket file descriptor.) 00072 #ifdef DtIFSPEC1516 00073 int RTI_EXPORT DtReadFileDescriptor(rti1516::RTIambassador* amb, 00074 rti1516::TransportationType transport); 00075 #elif defined(DtIFSPEC1516E) 00076 int RTI_EXPORT DtReadFileDescriptor(rti1516e::RTIambassador* amb, 00077 rti1516e::TransportationType transport); 00078 #else 00079 int RTI_EXPORT DtReadFileDescriptor(RTI::RTIambassador* amb, 00080 RTI::TransportType transport); 00081 #endif 00082 00083 00084 #if defined(_WIN32) 00085 // Returns a WIN32 event handle that signals when data is present for 00086 // the given transport type. It can be used in calls such as 00087 // WaitForSingleObject to avoid calling RTI::Tick until there is 00088 // data waiting. When operating synchronously the event returned 00089 // is based upon the socket specified by transport. In asynchronous 00090 // mode it returns the event used for inter-thread signalling 00091 // regardless of the transport type. 00092 #include "winsock2.h" 00093 #ifdef DtIFSPEC1516 00094 WSAEVENT RTI_EXPORT DtReadFileEvent(rti1516::RTIambassador* amb, 00095 rti1516::TransportationType transport); 00096 #elif defined(DtIFSPEC1516E) 00097 WSAEVENT RTI_EXPORT DtReadFileEvent(rti1516e::RTIambassador* amb, 00098 rti1516e::TransportationType transport); 00099 #else 00100 WSAEVENT RTI_EXPORT DtReadFileEvent(RTI::RTIambassador* amb, 00101 RTI::TransportType transport); 00102 #endif 00103 00104 #endif