pax_global_header00006660000000000000000000000064121075043230014507gustar00rootroot0000000000000052 comment=f947fa33a1938a4032a4aea78180af2a37f0a6fc cigi-ccl-3.3.3a+svn818/000077500000000000000000000000001210750432300143735ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/AUTHORS000066400000000000000000000000001210750432300154310ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/CMakeLists.txt000066400000000000000000000370121210750432300171360ustar00rootroot00000000000000PROJECT(ccl) SET(VERSION 3.3.3) #============================================================================ # Please note: # # This should be considered an experimental build system for the CCL. # # Linux: # When make installing with Linux it generates what you would typically expect # in the install prefix. If you want debugging symbols with your library # you should set CMAKE_BUILD_TYPE to Debug or RelWithDebInfo before building. # # Windows: # After building the Release and Debug configurations in Visual Studio and # running the INSTALL target for both it will generate the following # libraries: # # ${CMAKE_INSTALL_PREFIX}/lib: # # libcigicl.lib => DLL release version # libcigicl_debug.lib => DLL debugged version # libcigicl_static.lib => Statically linked release version # libcigicl_static_debug.lib => Statically linked debugged version # # ${CMAKE_INSTALL_PREFIX}/bin will include the DLLs you need at runtime if # you're linking against the shared build of the library. # #============================================================================ #CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7) SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1) SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) IF(MSVC OR MINGW) SET(CMAKE_DEBUG_POSTFIX "_debug") ENDIF() SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "The location where binaries go" FORCE) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib CACHE PATH "The location where libraries go" FORCE) # Starting with CMake 2.6.0 this will effectively have any DLL files # generated by CMake be placed in the specified directory. SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}) IF(CMAKE_COMPILER_IS_GNUCXX) CONFIGURE_FILE(cigicl.pc.in_cmake cigicl.pc) ENDIF() #========================================================== # Tests #========================================================== INCLUDE(TestBigEndian) TEST_BIG_ENDIAN(BIG_ENDIAN) #========================================================== # Global Preprocessor Definitions #========================================================== IF(BIG_ENDIAN) ADD_DEFINITIONS(-DCIGI_BIG_ENDIAN) ELSE() ADD_DEFINITIONS(-DCIGI_LITTLE_ENDIAN) ENDIF() IF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-Wall -fmessage-length=0) ENDIF() IF(MSVC80) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ENDIF() #========================================================== # Define CIGI Class Library Source/Header files. #========================================================== SET(CCL_PUBLIC_HDRS include/CigiAerosolRespV3.h include/CigiAllPackets.h include/CigiAnimationStopV3.h include/CigiAnimationTable.h include/CigiArtPartCtrlV1.h include/CigiArtPartCtrlV2.h include/CigiArtPartCtrlV3.h include/CigiAtmosCtrl.h include/CigiBaseAerosolResp.h include/CigiBaseAnimationStop.h include/CigiBaseArtPartCtrl.h include/CigiBaseCircleSymbolData.h include/CigiBaseCollDetSegDef.h include/CigiBaseCollDetSegResp.h include/CigiBaseCollDetVolDef.h include/CigiBaseCollDetVolResp.h include/CigiBaseCompCtrl.h include/CigiBaseConfClampEntityCtrl.h include/CigiBaseEarthModelDef.h include/CigiBaseEntityCtrl.h include/CigiBaseEnvCondReq.h include/CigiBaseEnvCtrl.h include/CigiBaseEnvRgnCtrl.h include/CigiBaseEventNotification.h include/CigiBaseEventProcessor.h include/CigiBaseHatHotReq.h include/CigiBaseHatHotResp.h include/CigiBaseIGCtrl.h include/CigiBaseIGMsg.h include/CigiBaseLosResp.h include/CigiBaseLosSegReq.h include/CigiBaseLosVectReq.h include/CigiBaseMaritimeSurfaceCtrl.h include/CigiBaseMaritimeSurfaceResp.h include/CigiBaseMotionTrackCtrl.h include/CigiBasePacket.h include/CigiBasePositionReq.h include/CigiBasePositionResp.h include/CigiBaseRateCtrl.h include/CigiBaseSOF.h include/CigiBaseSensorCtrl.h include/CigiBaseSensorResp.h include/CigiBaseShortArtPartCtrl.h include/CigiBaseShortSymbolCtrl.h include/CigiBaseSignalProcessing.h include/CigiBaseSpecEffDef.h include/CigiBaseSymbolCircleDef.h include/CigiBaseSymbolClone.h include/CigiBaseSymbolCtrl.h include/CigiBaseSymbolLineDef.h include/CigiBaseSymbolSurfaceDef.h include/CigiBaseSymbolTextDef.h include/CigiBaseTerrestrialSurfaceCtrl.h include/CigiBaseTerrestrialSurfaceResp.h include/CigiBaseTrajectoryDef.h include/CigiBaseVariableSizePckt.h include/CigiBaseVertexSymbolData.h include/CigiBaseViewCtrl.h include/CigiBaseViewDef.h include/CigiBaseWaveCtrl.h include/CigiBaseWeatherCondResp.h include/CigiBaseWeatherCtrl.h include/CigiCelestialCtrl.h include/CigiCircleSymbolDataV3_3.h include/CigiCnvtInfoType.h include/CigiCollDetSegDefV1.h include/CigiCollDetSegDefV2.h include/CigiCollDetSegDefV3.h include/CigiCollDetSegRespV1.h include/CigiCollDetSegRespV2.h include/CigiCollDetSegRespV3.h include/CigiCollDetVolDefV2.h include/CigiCollDetVolDefV3.h include/CigiCollDetVolRespV2.h include/CigiCollDetVolRespV3.h include/CigiCompCtrlV1.h include/CigiCompCtrlV2.h include/CigiCompCtrlV3.h include/CigiCompCtrlV3_3.h include/CigiConfClampEntityCtrlV3.h include/CigiDefaultPacket.h include/CigiEarthModelDefV3.h include/CigiEntityCtrlV1.h include/CigiEntityCtrlV2.h include/CigiEntityCtrlV3.h include/CigiEntityCtrlV3_3.h include/CigiEnvCondReqV3.h include/CigiEnvCtrlV1.h include/CigiEnvCtrlV2.h include/CigiEnvRgnCtrlV3.h include/CigiErrorCodes.h include/CigiEventNotificationV3.h include/CigiException.h include/CigiExceptions.h include/CigiHatHotReqV3.h include/CigiHatHotReqV3_2.h include/CigiHatHotRespV3.h include/CigiHatHotRespV3_2.h include/CigiHatHotXRespV3.h include/CigiHatHotXRespV3_2.h include/CigiHatReqV1.h include/CigiHatReqV2.h include/CigiHatRespV1.h include/CigiHatRespV2.h include/CigiHoldEnvCtrl.h include/CigiHostSession.h include/CigiHotReqV2.h include/CigiHotRespV2.h include/CigiIGCtrlV1.h include/CigiIGCtrlV2.h include/CigiIGCtrlV3.h include/CigiIGCtrlV3_2.h include/CigiIGCtrlV3_3.h include/CigiIGMsgV2.h include/CigiIGMsgV3.h include/CigiIGSession.h include/CigiIO.h include/CigiIncomingMsg.h include/CigiLosRespV1.h include/CigiLosRespV2.h include/CigiLosRespV3.h include/CigiLosRespV3_2.h include/CigiLosSegReqV1.h include/CigiLosSegReqV2.h include/CigiLosSegReqV3.h include/CigiLosSegReqV3_2.h include/CigiLosVectReqV1.h include/CigiLosVectReqV2.h include/CigiLosVectReqV3.h include/CigiLosVectReqV3_2.h include/CigiLosXRespV3.h include/CigiLosXRespV3_2.h include/CigiMaritimeSurfaceCtrlV3.h include/CigiMaritimeSurfaceRespV3.h include/CigiMessage.h include/CigiMessageBuffer.h include/CigiMotionTrackCtrlV3.h include/CigiOutgoingMsg.h include/CigiPositionReqV3.h include/CigiPositionRespV3.h include/CigiProcessType.h include/CigiRateCtrlV1.h include/CigiRateCtrlV2.h include/CigiRateCtrlV3.h include/CigiRateCtrlV3_2.h include/CigiSOFV1.h include/CigiSOFV2.h include/CigiSOFV3.h include/CigiSOFV3_2.h include/CigiSensorCtrlV1.h include/CigiSensorCtrlV2.h include/CigiSensorCtrlV3.h include/CigiSensorRespV1.h include/CigiSensorRespV2.h include/CigiSensorRespV3.h include/CigiSensorXRespV3.h include/CigiSession.h include/CigiShortArtPartCtrlV3.h include/CigiShortCompCtrlV3.h include/CigiShortCompCtrlV3_3.h include/CigiShortSymbolCtrlV3_3.h include/CigiSignalType.h include/CigiSpecEffDefV1.h include/CigiSpecEffDefV2.h include/CigiSwapping.h include/CigiSymbolCircleDefV3_3.h include/CigiSymbolCloneV3_3.h include/CigiSymbolCtrlV3_3.h include/CigiSymbolLineDefV3_3.h include/CigiSymbolSurfaceDefV3_3.h include/CigiSymbolTextDefV3_3.h include/CigiTerrestrialSurfaceCtrlV3.h include/CigiTerrestrialSurfaceRespV3.h include/CigiTrajectoryDefV1.h include/CigiTrajectoryDefV2.h include/CigiTrajectoryDefV3.h include/CigiTypes.h include/CigiTypes_Default.h include/CigiTypes_MSVS_Win32.h include/CigiVersionID.h include/CigiVertexSymbolDataV3_3.h include/CigiViewCtrlV1.h include/CigiViewCtrlV2.h include/CigiViewCtrlV3.h include/CigiViewDefV1.h include/CigiViewDefV2.h include/CigiViewDefV3.h include/CigiWaveCtrlV3.h include/CigiWeatherCondRespV3.h include/CigiWeatherCtrlV1.h include/CigiWeatherCtrlV2.h include/CigiWeatherCtrlV3.h ) SET(CCL_SRCS source/CigiAerosolRespV3.cpp source/CigiAnimationStopV3.cpp source/CigiAnimationTable.cpp source/CigiArtPartCtrlV1.cpp source/CigiArtPartCtrlV2.cpp source/CigiArtPartCtrlV3.cpp source/CigiAtmosCtrl.cpp source/CigiBaseAerosolResp.cpp source/CigiBaseArtPartCtrl.cpp source/CigiBaseCircleSymbolData.cpp source/CigiBaseCollDetSegResp.cpp source/CigiBaseCollDetVolDef.cpp source/CigiBaseCollDetVolResp.cpp source/CigiBaseConfClampEntityCtrl.cpp source/CigiBaseEntityCtrl.cpp source/CigiBaseEnvCondReq.cpp source/CigiBaseEnvCtrl.cpp source/CigiBaseEnvRgnCtrl.cpp source/CigiBaseEventNotification.cpp source/CigiBaseHatHotReq.cpp source/CigiBaseIGCtrl.cpp source/CigiBaseLosResp.cpp source/CigiBaseLosSegReq.cpp source/CigiBaseLosVectReq.cpp source/CigiBaseMaritimeSurfaceCtrl.cpp source/CigiBaseMaritimeSurfaceResp.cpp source/CigiBaseMotionTrackCtrl.cpp source/CigiBasePositionReq.cpp source/CigiBasePositionResp.cpp source/CigiBaseSOF.cpp source/CigiBaseSensorCtrl.cpp source/CigiBaseSensorResp.cpp source/CigiBaseShortArtPartCtrl.cpp source/CigiBaseShortSymbolCtrl.cpp source/CigiBaseSpecEffDef.cpp source/CigiBaseSymbolCircleDef.cpp source/CigiBaseSymbolClone.cpp source/CigiBaseSymbolCtrl.cpp source/CigiBaseSymbolLineDef.cpp source/CigiBaseSymbolSurfaceDef.cpp source/CigiBaseSymbolTextDef.cpp source/CigiBaseTerrestrialSurfaceCtrl.cpp source/CigiBaseTrajectoryDef.cpp source/CigiBaseViewCtrl.cpp source/CigiBaseViewDef.cpp source/CigiBaseWaveCtrl.cpp source/CigiBaseWeatherCondResp.cpp source/CigiBaseWeatherCtrl.cpp source/CigiCelestialCtrl.cpp source/CigiCircleSymbolDataV3_3.cpp source/CigiCollDetSegDefV1.cpp source/CigiCollDetSegDefV2.cpp source/CigiCollDetSegDefV3.cpp source/CigiCollDetSegRespV1.cpp source/CigiCollDetSegRespV2.cpp source/CigiCollDetSegRespV3.cpp source/CigiCollDetVolDefV2.cpp source/CigiCollDetVolDefV3.cpp source/CigiCollDetVolRespV2.cpp source/CigiCollDetVolRespV3.cpp source/CigiCompCtrlV1.cpp source/CigiCompCtrlV2.cpp source/CigiCompCtrlV3.cpp source/CigiCompCtrlV3_3.cpp source/CigiConfClampEntityCtrlV3.cpp source/CigiDefaultPacket.cpp source/CigiEarthModelDefV3.cpp source/CigiEntityCtrlV1.cpp source/CigiEntityCtrlV2.cpp source/CigiEntityCtrlV3.cpp source/CigiEntityCtrlV3_3.cpp source/CigiEnvCondReqV3.cpp source/CigiEnvCtrlV1.cpp source/CigiEnvCtrlV2.cpp source/CigiEnvRgnCtrlV3.cpp source/CigiEventNotificationV3.cpp source/CigiHatHotReqV3.cpp source/CigiHatHotReqV3_2.cpp source/CigiHatHotRespV3.cpp source/CigiHatHotRespV3_2.cpp source/CigiHatHotXRespV3.cpp source/CigiHatHotXRespV3_2.cpp source/CigiHatReqV1.cpp source/CigiHatReqV2.cpp source/CigiHatRespV1.cpp source/CigiHatRespV2.cpp source/CigiHostSession.cpp source/CigiHotReqV2.cpp source/CigiHotRespV2.cpp source/CigiIGCtrlV1.cpp source/CigiIGCtrlV2.cpp source/CigiIGCtrlV3.cpp source/CigiIGCtrlV3_2.cpp source/CigiIGCtrlV3_3.cpp source/CigiIGMsgV2.cpp source/CigiIGMsgV3.cpp source/CigiIGSession.cpp source/CigiIO.cpp source/CigiIncomingMsg.cpp source/CigiLosRespV1.cpp source/CigiLosRespV2.cpp source/CigiLosRespV3.cpp source/CigiLosRespV3_2.cpp source/CigiLosSegReqV1.cpp source/CigiLosSegReqV2.cpp source/CigiLosSegReqV3.cpp source/CigiLosSegReqV3_2.cpp source/CigiLosVectReqV1.cpp source/CigiLosVectReqV2.cpp source/CigiLosVectReqV3.cpp source/CigiLosVectReqV3_2.cpp source/CigiLosXRespV3.cpp source/CigiLosXRespV3_2.cpp source/CigiMaritimeSurfaceCtrlV3.cpp source/CigiMaritimeSurfaceRespV3.cpp source/CigiMessage.cpp source/CigiMotionTrackCtrlV3.cpp source/CigiOutgoingMsg.cpp source/CigiPositionReqV3.cpp source/CigiPositionRespV3.cpp source/CigiRateCtrlV1.cpp source/CigiRateCtrlV2.cpp source/CigiRateCtrlV3.cpp source/CigiRateCtrlV3_2.cpp source/CigiSOFV1.cpp source/CigiSOFV2.cpp source/CigiSOFV3.cpp source/CigiSOFV3_2.cpp source/CigiSensorCtrlV1.cpp source/CigiSensorCtrlV2.cpp source/CigiSensorCtrlV3.cpp source/CigiSensorRespV1.cpp source/CigiSensorRespV2.cpp source/CigiSensorRespV3.cpp source/CigiSensorXRespV3.cpp source/CigiSession.cpp source/CigiShortArtPartCtrlV3.cpp source/CigiShortCompCtrlV3.cpp source/CigiShortCompCtrlV3_3.cpp source/CigiShortSymbolCtrlV3_3.cpp source/CigiSpecEffDefV1.cpp source/CigiSpecEffDefV2.cpp source/CigiSwapping.cpp source/CigiSymbolCircleDefV3_3.cpp source/CigiSymbolCloneV3_3.cpp source/CigiSymbolCtrlV3_3.cpp source/CigiSymbolLineDefV3_3.cpp source/CigiSymbolSurfaceDefV3_3.cpp source/CigiSymbolTextDefV3_3.cpp source/CigiTerrestrialSurfaceCtrlV3.cpp source/CigiTerrestrialSurfaceRespV3.cpp source/CigiTrajectoryDefV1.cpp source/CigiTrajectoryDefV2.cpp source/CigiTrajectoryDefV3.cpp source/CigiVertexSymbolDataV3_3.cpp source/CigiViewCtrlV1.cpp source/CigiViewCtrlV2.cpp source/CigiViewCtrlV3.cpp source/CigiViewDefV1.cpp source/CigiViewDefV2.cpp source/CigiViewDefV3.cpp source/CigiWaveCtrlV3.cpp source/CigiWeatherCondRespV3.cpp source/CigiWeatherCtrlV1.cpp source/CigiWeatherCtrlV2.cpp source/CigiWeatherCtrlV3.cpp ) #========================================================== # Library Targets #========================================================== INCLUDE_DIRECTORIES(include) # # Compiling the CCL as a shared library # ADD_LIBRARY(cigicl-shared SHARED ${CCL_PUBLIC_HDRS} ${CCL_SRCS}) IF(MSVC OR MINGW) # Both the CCL_DLL and _CCL_EXPORTS_ defines are needed to export DLLs. SET_TARGET_PROPERTIES(cigicl-shared PROPERTIES COMPILE_FLAGS -DCCL_DLL DEFINE_SYMBOL _CCL_EXPORTS_ ) ENDIF() SET_TARGET_PROPERTIES(cigicl-shared PROPERTIES OUTPUT_NAME cigicl CLEAN_DIRECT_OUTPUT 1 VERSION ${VERSION} SOVERSION 1 ) # # Compiling the CCL as a static library # IF(MSVC OR MINGW) ADD_LIBRARY(cigicl-static STATIC ${CCL_PUBLIC_HDRS} ${CCL_SRCS}) SET_TARGET_PROPERTIES(cigicl-static PROPERTIES OUTPUT_NAME cigicl_static) ELSE() ADD_LIBRARY(cigicl-static STATIC ${CCL_PUBLIC_HDRS} ${CCL_SRCS}) SET_TARGET_PROPERTIES(cigicl-static PROPERTIES OUTPUT_NAME cigicl) ENDIF() SET_TARGET_PROPERTIES(cigicl-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) #========================================================== # Install #========================================================== INSTALL(TARGETS cigicl-static cigicl-shared RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) INSTALL(FILES ${CCL_PUBLIC_HDRS} DESTINATION include/cigicl) INSTALL(FILES COPYING ChangeLog license.html README ReleaseNotes.txt DESTINATION share/cigicl) IF(CMAKE_COMPILER_IS_GNUCXX) INSTALL(FILES ${CMAKE_BINARY_DIR}/cigicl.pc DESTINATION lib/pkgconfig) ENDIF() cigi-ccl-3.3.3a+svn818/COPYING000066400000000000000000000015711210750432300154320ustar00rootroot00000000000000The CIGI Class Library is licensed under the GNU Lesser General Public License (GPL). ---- This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330 Boston, MA 02111-1307 USA ---- Please see the accompanying license.html file for the full license. cigi-ccl-3.3.3a+svn818/ChangeLog000066400000000000000000000313721210750432300161530ustar00rootroot00000000000000Version 3.3.3 ------------- [02.02.2012] Changes/Additions: ------------------ - Corrected a bug in CigiOutgoingMsg that was corrupting the send buffer pointer. Used a temporary buffer to point to the outgoing buffer. Then conducts a validity check on the buffer. If it passes, then the outgoing buffer pointer is updated. - Corrected a bug in CigiIncomingMsg that was not incrementing through each of the Event, Signal, and Callback lists. - Added the const modifier to the GetCompState member function in each of the CigiCompCtrlV3.h, the CigiCompCtrlV3_3.h, the CigiShortCompCtrlV3.h, and the CigiShortCompCtrlV3_3.h files. Version 3.3.2 ------------- [12.09.2010] Changes/Additions: ------------------ - Updated CMakeLists.txt, configure.ac, and Doxyfile to reference the correct version number. - Changed CigiException and CigiExceptions so that the error message is based on the basic_string standard container instead of a pointer to a buffer containing a C type string. - Corrected a bug in CigiMessageBuffer calculating the needed size of the message buffers. - Changed CigiOutgoingMsg::ChangeBufferCigiVersion so that it nolonged needs the CIGI version number as a parameter. - Removed the inline modifier from CigiCopy8. - Changed #include to #include in CigiAnimationTable.cpp, CigiArtPartCtrlV1 & V2, CigiCollDetSegDefV1 & V2, CigiCollDetSegRespV1 & V2, CigiCollDetVolDefV2, CigiCollDetVolRespV2, CigiCompCtrlV1 & V2, CigiEntityCtrlV1, CigiEnvCtrlV1 & V2, CigiHatReqV1 & V2, CigiHatRespV1 & V2, CigiHotReqV2, CigiHotRespV2, CigiIGCtrlV1 & V2, CigiIGMsgV2, CigiLosRespV1 & V2, CigiLosSegReqV1 & V2, CigiLosVectReqV1 & V2, CigiRateCtrlV1 & V2, CigiSensorCtrlV1 & V2, CigiSensorRespV1 & V2, CigiSOFV1 & V2, CigiSpecEffDefV1 & V2, CigiTrajectoryDefV1 & V2, CigiViewCtrlV1 & V2, CigiViewDefV1 & V2, and CigiWeatherCtrlV1 & V2. - Corrected a bug in CigiIO::Recv. Removed the second MsgIn.AdvanceCrntBuffer call This should not have been called. It should only be called once at the beginning of the method. This was causing one buffer to be filled by the incoming and an empty buffer being read. - Changed CigiOutgoingMsg so that the Database version is not zeroed automatically. Also Corrected a few Outgoing version problems. - Corrected CigiSymbolLineDefV3_3. CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3 was being used where CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3 should have been used. It now uses the correct macros. Version 3.3.1 ------------- [04.27.2009] Changes/Additions: ------------------ - Corrected a bug in CigiIncomingMsg::AdvanceCrntBuffer discovered by and a patch submitted by Christopher Buell. This bug would not advance the buffer if the current buffer pointer was null. - Corrected a problem with component state. In CIGI V1 and V2 the component state is Cigi_uint16. In Cigi V3.0 and above the component state is Cigi_uint8. Converting between these can and probably will cause problems. In addition, the accessors should reflect the correct size of the value per the ICD - With few files in the examples and Testing, the compilers had problems resolving types and overloaded functions. The types were made more explicit to resolve this problem. Version 3.3.0 ------------- [12.16.2008] Changes/Additions: ------------------ - Changed the version numbering system for the CCL to Applicable CIGI major version, Applicable CIGI minor version, Bug fix version. - Corrected several bugs. - Changed CigiTypes header and added a types header for Windows Visual studio and a header for Linux. The types header for Linux takes advantage of stdint.h. - Added the Entity Control and IG Control for CIGI 3.3 which adds smoothing flags. Version 2.0.0 ------------- [04.04.2008] Changes/Additions: ------------------ - Added the Symbol Clone Packet. - Changed the Packet IDs for the Symbol Ctrl and Short Symbol Ctrl packets. Version 2.0.0 ------------- [03.11.2008] Changes/Additions: ------------------ - Changed the method of conversion. - Removed the Version Jump Table. - Added the symbology packets. - Changed the examples. - Added Testing programs. Version 1.7.5 ------------- [04.25.2007] Changes/Additions: ------------------ - Corrected a problem with Database request number adjustment. Changed V1 & V2 LOS requests to request extended responses if they are converted to V3. Changed the CigiHotReqV2 constructor to correctly set the request type to HOT instead of HAT. Corrected V3 & V3.2 SOF to correctly unpack the timestamp value. Removed the SetReqTyp member function from CigiHatHotXRespV3 & V3_2, because V3 and V3.2 does not have that parameter in the packet. Version 1.7.4 ------------- [12.06.2006] Changes/Additions: ------------------ - Corrects a bug with the Version Jump Table that was causing a memory leak. Corrected the way V3 Celestial Control and Atmosphere Control flags were being set by the V1 and V2 Environmental Control classes. Corrected a bug in CigiOutgoingMsg that now correctly zeros out the Host database id request under specific conditions. Version 1.7.3 ------------- [08.11.2006] Changes/Additions: ------------------ - Corrects a bug with IG Control and SOF that may have put the wrong Minor Version number in the CIGI messages. Corrected the CigiIGCtrlV3_2 and the CigiSOFV3_2 packing routines so that the Minor Version number is is packed from the packing object (a CigiIGCtrlV3_2 or CigiSOFV3_2 object when the current outgoing Cigi Version is 3.2) not the object with the user filled data. This will put the correct Minor Version number in the Cigi message. Version 1.7.2 ------------- [07.18.2006] Changes/Additions: ------------------ - Corrects several problems with the way the CCL has been recently released for Unix/Linux. The CCL will now be released in the .zip format for windows and the .tar.gz format for Unix/Linux. - Corrects several problems in CigiIncomingMsg involving setting the current CIGI version were corrected. Also, corrects the problem with the way the IterationVersion is initialized and used in the iteration method of incoming message processing. - In the examples, several errors in the networking code involving a stray pointer due to a #define were corrected. Also in the examples, a few errors involving the STL differences between MS6 and MS7 and detecting the compiler version were corrected. Version 1.7.1 ------------- [06.23.2006] Changes/Additions: ------------------ - Defined new CIGI types Cigi_int8 and Cigi_uint8. - Replaced use of native char and unsigned char types to use Cigi_int8 and Cigi_uint8 instead, to account for systems where char and unsigned char types are not 1 byte in size. Version 1.7.0 ------------- [04.14.2006] Changes/Additions: ------------------ - Added compatibility with CIGI version 3.2. - Introduced minor version numbers to the library to handle packet translations for CIGI version 3.2. Version 1.6.0 ------------- [03.02.2006] Changes/Additions: ------------------ - Added support in the CigiOutgoingMsg class for automatic frame counter synchronization with incoming messages. A new set of functions have been introduced to handle this: UpdateFrameCntr(), UpdateIGCtrl(), UpdateSOF(), PackageMsg(), FreeMsg(), and GetCurrentlyPackagedMsg(). - Modified the CigiMessage class to include a PackagedMsg member variable in support of automatic frame counter synchronization. - Updated the CigiDummyIG example to use the new frame counter synchrnoization methods. - Added the NewCigiMiniHost example to show usage of the new message synchronization calls. Bug Fixes: ------------------ - Fixed the unpacking of the polarity flag in the CigiSensorCtrlV3 packet class. Version 1.5.7 ------------- [11.08.2005] Changes/Additions: ------------------ - Added the CigiIODummyIG and CigiIOMiniHost examples, which illustrate use of the CigiIO class. - Added a Recv() function to the CigiIO class for receiving incoming messages without immediately processing them. Version 1.5.6 ------------- [10.06.2005] Changes/Additions: ------------------ - Added the CigiDummyIG example. - Added the CigiMiniHost example. Bug Fixes: ------------------ - Fixed the ProcessIncomingMsg and GetFirstPacket methods to correctly handle frame counter synchronization. Version 1.5.5 ------------- [08.12.2005] Bug Fixes: ------------------ - Modified the GetFirstPacket method in the CigiIncomingMsg class to get the pointer to the correct SOF and IG Control handling objects. Version 1.5.4 ------------- [07.05.2005] Bug Fixes: ------------------ - Detects a buffer overrun error condition when processing the incoming message buffer, and throws an exception when found. Version 1.5.3 ------------- [04.26.2005] Changes/Additions: ------------------ - Added license information to the download. - Split downloads up into binaries, source, and documentation. Version 1.5.2 ------------- [04.06.2005] Bug Fixes: ------------------ - Modified the CigiCopy2 and CigiCopy4 macros to use the cigi-defined data types instead of native types. - Fixed the GetFirstPacket function in the CigiIncomingMsg class to use the correct start of frame and IG control opcode values. - Fixed an error in the RegisterUserPacket function in the CigiVersionJumpTable class to properly handle user-defined packets when translating between different versions of CIGI. Version 1.5.1 ------------- [02.09.2005] Bug Fixes: ------------------ - Added the CIGI_LITTLE_ENDIAN preprocessor definition to the CIGI DLL and LIB Visual Studio projects. Version 1.5 ------------ [01.25.2005] Changes/Additions: ------------------ - Changed the CCL directory structure. - Added CIGI-defined data types (CigiTypes.h) for easier portability to other platforms, particularly 64-bit architectures. - Created and updated files for building the CCL on Linux platforms, and made the CCL files Linux (and UNIX) compatible. - Created Win32 DLLs for the CCL and a Visual Studio 6.0 project for building DLLs. - Added a common PackPointer union data type to CigiTypes.h for use in the packet implementation classes. Bug Fixes: ------------------ - Fixed a bug in the component and short component controls where data was erroneously converted to an unsigned int when it was packed. - Changed the data type for the database ID to a signed char from unsigned in the SOF and IG Control packets. Version 1.4a ------------ [11.15.2004] Changes/Additions: ------------------ - Changed the versoning convention from 'Version 3 Release 1.x' to 'Version 1.x', and removed the Beta status. - Added a GetValidIGCtrlSOF() accessor function to the CigiMessage class. - Restructured folders and paths in the package to reflect what is in CVS. Bug Fixes: ------------------ - Fixed incorrect cases in filenames for non-Windows systems. v3 Beta 1.4 ------------ [07.16.2004] Changes/Additions: ------------------ - Added examples of CIGI Host and IG applications using the CCL. Bug Fixes: ------------------ - The global GetMsgBuffer() function was changed to a member function of the CigiIncomingMsg class. - An error in the sprintf() function call was fixed in the overloaded constructor for the CigiInvalidUserPacketException class. - The 'Swap' member variable was changed to 'BSwapEn' in the CigiBaseIGCtrl and CigiBaseSOF classes. Constructors and Unpack() member functions were also updated to reflect the new variable name. - The Unpack() method in the CigiSensorCtrlV3 class was fixed to assign the correct value of 0x02 to the polarity field. - The accessor functions were returning the wrong variables and have been fixed in the CigiTrajectoryDefV3 class for GetAccelY() and GetAccelZ(). - Fixed an error in the Unpack() method of the CigiViewCtrlV3 class where the entity ID was not being swapped. v3 Beta 1.3 ------------ [06.01.2004] Bug Fixes: ------------------ - Added code to the CigiMessage class destructor to delete memory that has been allocated by the class for buffers, counters, and data. v3 Beta 1.2 ------------ [05.10.2004] Bug Fixes: ------------------ - Fixed a bug where the frame counter was not being updated for CIGI 1 and 2 messages on little endian machines. v3 Beta 1.1 ------------ [03.30.2004] Changes/Additions: ------------------ - Added project configurations to the Cigi.dsp project: Win32 DebugMT, Win32 ReleaseMT, Win32 Debug MT DLL, and Win32 Release MT DLL. - Added/updated LIB files for each of the configurations in Cigi.dsp (Win32). - Updated the doxygen HTML class library documentation files. - Updated the changelog in the users' manual. Bug Fixes: ------------------ - Added explicit type-casting and explicit type-indicators to variable assignment values as needed in the CIGI class library source and header files. v3 Beta 1 ------------ [03.15.2004] Initial Release. cigi-ccl-3.3.3a+svn818/Doxyfile000066400000000000000000000221131210750432300161000ustar00rootroot00000000000000# Doxyfile 1.3.9.1 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = CCL PROJECT_NUMBER = 3.3.2 OUTPUT_DIRECTORY = C:/ccl/docs/ccl CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = YES BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES STRIP_FROM_PATH = "C:/" STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO DETAILS_AT_TOP = NO INHERIT_DOCS = YES DISTRIBUTE_GROUP_DOC = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = YES EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = YES HIDE_UNDOC_MEMBERS = YES HIDE_UNDOC_CLASSES = YES HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_DIRECTORIES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = C:/ccl FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = YES INLINE_SOURCES = YES STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES HIDE_UNDOC_RELATIONS = NO HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = YES GRAPHICAL_HIERARCHY = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 1000 GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO cigi-ccl-3.3.3a+svn818/INSTALL000066400000000000000000000220301210750432300154210ustar00rootroot00000000000000Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. cigi-ccl-3.3.3a+svn818/Makefile.am000066400000000000000000000002721210750432300164300ustar00rootroot00000000000000SUBDIRS = include source # installation info for the pkg-config files pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ cigicl.pc $(pkgconfig_DATA): $(top_builddir)/config.status cigi-ccl-3.3.3a+svn818/NEWS000066400000000000000000000000001210750432300150600ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/README000066400000000000000000000031241210750432300152530ustar00rootroot00000000000000This is the source distribution of the CIGI Class Library (CCL). This library makes integration of CIGI into an application much easier. More information about CIGI and the CCL can be found on the CIGI web site: http://cigi.sourceforge.net INSTALLATION ============ Windows systems --------------- The CCL can be compiled as a DLL or as a static LIB. The project files for compiling as a DLL can be found in the ccl_dll directory, and project files for compiling as a LIB can be found in the ccl_lib directory. UNIX systems ------------ UNIX installation instructions can be found in the INSTALL file. Briefly, the process goes like this: ./configure make And run the following as 'root': make install USAGE ===== API Documentation ----------------- Documentation for the CCL API is available from the CIGI web site, and in the form of Doxygen-generated help files. pkg-config ---------- If you are building a program that uses the CIGI Class Library, and you are using a modern UNIX-like system, you may be able to take advantage of the 'pkg-config' utility. The CCL includes a configuration file for pkg-config, and this file is installed by default when you run 'make install'. If your system has pkg-config installed, you can build CCL programs using a series of commands similar to the following: cc `pkg-config --cflags cigicl` ...etc... cc `pkg-config --libs cigicl` *.o ...etc... This makes your Makefiles much more readable, and saves you time spent tracking down the location of header and library files. You can get more info on pkg-config by running 'man pkg-config'. cigi-ccl-3.3.3a+svn818/ReleaseNotes.txt000066400000000000000000000346001210750432300175300ustar00rootroot00000000000000 Release Notes: ------------------------------------------------------------------------------- Release: CCL Version 3.3.3 Date: February 02, 2012 ------------------------------------------------------------------------------- Corrected a bug in CigiOutgoingMsg that was corrupting the send buffer pointer. Used a temporary buffer to point to the outgoing buffer. Then conducts a validity check on the buffer. If it passes, then the outgoing buffer pointer is updated. Corrected a bug in CigiIncomingMsg that was not incrementing through each of the Event, Signal, and Callback lists. Added the const modifier to the GetCompState member function in each of the CigiCompCtrlV3.h, the CigiCompCtrlV3_3.h, the CigiShortCompCtrlV3.h, and the CigiShortCompCtrlV3_3.h files. ------------------------------------------------------------------------------- Release: CCL Version 3.3.2 Date: December 09, 2010 ------------------------------------------------------------------------------- Updated CMakeLists.txt, configure.ac, and Doxyfile to reference the correct version number. Changed CigiException and CigiExceptions so that the error message is based on the basic_string standard container instead of a pointer to a buffer containing a C type string. Corrected a bug in CigiMessageBuffer calculating the needed size of the message buffers. Changed CigiOutgoingMsg::ChangeBufferCigiVersion so that it nolonged needs the CIGI version number as a parameter. Removed the inline modifier from CigiCopy8. Changed all instances of #include to #include . Corrected a bug in CigiIO::Recv. Removed the second MsgIn.AdvanceCrntBuffer call This should not have been called. It should only be called once at the beginning of the method. This was causing one buffer to be filled by the incoming and an empty buffer being read. Changed CigiOutgoingMsg so that the Database version is not zeroed automatically. Also Corrected a few Outgoing version problems. Corrected CigiSymbolLineDefV3_3. CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3 was being used where CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3 should have been used. It now uses the correct macros. ------------------------------------------------------------------------------- Release: CCL Version 3.3.1 Date: April 27, 2009 ------------------------------------------------------------------------------- Corrected a bug in CigiIncomingMsg::AdvanceCrntBuffer discovered by and a patch submitted by Christopher Buell. This bug would not advance the buffer if the current buffer pointer was null. Corrected a problem with component state. In CIGI V1 and V2 the component state is Cigi_uint16. In Cigi V3.0 and above the component state is Cigi_uint8. Converting between these can and probably will cause problems. In addition, the accessors should reflect the correct size of the value per the ICD. With few files in the examples and Testing, the compilers had problems resolving types and overloaded functions. The types were made more explicit to resolve this problem. ------------------------------------------------------------------------------- Release: CCL Version 3.3.0 Date: December 16, 2008 ------------------------------------------------------------------------------- Changed the version numbering system for the CCL to Applicable CIGI major version, Applicable CIGI minor version, Bug fix version. Corrected several bugs. Changed CigiTypes header and added a types header for Windows Visual studio and a header for Linux. The types header for Linux takes advantage of stdint.h. Added the Entity Control and IG Control for CIGI 3.3 which adds smoothing flags. ------------------------------------------------------------------------------- Release: CCL Version 2.1.0 Date: March 11, 2008 ------------------------------------------------------------------------------- Added the Symbol Clone packet and changed the Packet ID numbers for the Symbol Control and Short Symbol Control packets. ------------------------------------------------------------------------------- Release: CCL Version 2.0.0 Date: March 11, 2008 ------------------------------------------------------------------------------- Changed the method of conversion. Removed the Version Jump Table. Added the symbology packets. Changed the examples. Added Testing programs. ------------------------------------------------------------------------------- Release: CCL Version 1.7.5 Date: April 24, 2007 ------------------------------------------------------------------------------- Corrected a problem with Database request number adjustment. Changed V1 & V2 LOS requests to request extended responses if they are converted to V3. Changed the CigiHotReqV2 constructor to correctly set the request type to HOT instead of HAT. Corrected V3 & V3.2 SOF to correctly unpack the timestamp value. Removed the SetReqTyp member function from CigiHatHotXRespV3 & V3_2, because V3 and V3.2 does not have that parameter in the packet. ------------------------------------------------------------------------------- Release: CCL Version 1.7.4 Date: December 6, 2006 ------------------------------------------------------------------------------- Corrects a bug with the Version Jump Table that was causing a memory leak. Corrected the way V3 Celestial Control and Atmosphere Control flags were being set by the V1 and V2 Environmental Control classes. Corrected a bug in CigiOutgoingMsg that now correctly zeros out the Host database id request under specific conditions. ------------------------------------------------------------------------------- Release: CCL Version 1.7.3 Date: August 11, 2006 ------------------------------------------------------------------------------- Corrects a bug with IG Control and SOF that may have put the wrong Minor Version number in the CIGI messages. Corrected the CigiIGCtrlV3_2 and the CigiSOFV3_2 packing routines so that the Minor Version number is is packed from the packing object (a CigiIGCtrlV3_2 or CigiSOFV3_2 object when the current outgoing Cigi Version is 3.2) not the object with the user filled data. This will put the correct Minor Version number in the Cigi message. ------------------------------------------------------------------------------- Release: CCL Version 1.7.2 Date: July 18, 2006 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.7.2 Corrects several problems with the way the CCL has been recently released for Unix/Linux. The CCL will now be released in the .zip format for windows and the .tar.gz format for Unix/Linux. Several problems in CigiIncomingMsg involving setting the current CIGI version were corrected. The problem with the way the IterationVersion is initialized and used in the iteration method of incoming message processing was corrected. In the examples, several errors in the networking code involving a stray pointer due to a #define were corrected. Also in the examples, a few errors involving the STL differences between MS6 and MS7 and detecting the compiler version were corrected. ------------------------------------------------------------------------------- Release: CCL Version 1.7.1 Date: June 23, 2006 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.7.1 replaces use of native char and unsigned char types with new CIGI types Cigi_int8 and Cigi_uint8. ------------------------------------------------------------------------------- Release: CCL Version 1.7.0 Date: April 14, 2006 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.7.0 adds support for CIGI version 3.2. ------------------------------------------------------------------------------- Release: CCL Version 1.6.0 Date: March 02, 2006 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.6.0 adds improved support for autoamtic frame counter synchronization. ------------------------------------------------------------------------------- Release: CCL Version 1.5.7 Date: November 08, 2005 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.5.7 introduces two new I/O examples, and adds delayed processing capability when receiving incoming messages using the CigiIO class. ------------------------------------------------------------------------------- Release: CCL Version 1.5.6 Date: October 06, 2005 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.5.6 introduces two new examples, and fixes problems with frame counter synchronization. ------------------------------------------------------------------------------- Release: CCL Version 1.5.5 Date: August 12, 2005 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.5.5 fixes bugs associated with iterating through the incoming CIGI message buffer. ------------------------------------------------------------------------------- Release: CCL Version 1.5.4 Date: July 05, 2005 ------------------------------------------------------------------------------- The CCL is a C++ language library for implementing CIGI in both host and IG applications. Version 1.5.4 modified to detect a buffer overrun when processing incoming CIGI messages. ------------------------------------------------------------------------------- Release: CCL Version 1.5.3 Date: April 26, 2005 ------------------------------------------------------------------------------- Version 1.5.3 split the download files up into binaries, source, and documentation. It also added license information to each of these downloads. ------------------------------------------------------------------------------- Release: CCL Version 1.5.2 Date: April 06, 2005 ------------------------------------------------------------------------------- Version 1.5.2 includes various bug fixes detailed in the changelog. ------------------------------------------------------------------------------- Release: CCL Version 1.5.1 Date: February 09, 2005 ------------------------------------------------------------------------------- Version 1.5.1 fixes an error with the Windows DLL and LIB files and the corresponding Visual Studio project files. ------------------------------------------------------------------------------- Release: CCL Version 1.5 Date: January 25, 2005 ------------------------------------------------------------------------------- The first significant release since removing the beta status for the CCL. The final directory structure is used, as will be reflectd in the CVS repository. This version is more platform-capable, including Linux and 64-bit platforms. Please refer to the changelog for a full list of updates. ------------------------------------------------------------------------------- Release: CCL Version 1.4a Date: November 15, 2004 ------------------------------------------------------------------------------- Changed the versioning scheme for the CCL, the file structure of the package, and made other small changes; refer to the changelog for more details. ------------------------------------------------------------------------------- Release: CCL Version 3 Beta 1.4 Date: July 16, 2004 ------------------------------------------------------------------------------- Added examples of separate CIGI Host and IG applications using the CCL. Made bug fixes to the CCL; refer to the changelog for specific changes. ------------------------------------------------------------------------------- Release: CCL Version 3 Beta 1.3 Date: June 01, 2004 ------------------------------------------------------------------------------- Added code to the CigiMessage class destructor to delete memory that has been allocated by the class for buffers, counters, and data. ------------------------------------------------------------------------------- Release: CCL Version 3 Beta 1.2 Date: May 10, 2004 ------------------------------------------------------------------------------- Fixed a bug in the CigiOutgoingMessage class where the frame counter was not being updated for CIGI 1 and 2 messages on little endian machines. ------------------------------------------------------------------------------- Release: CCL Version 3 Beta 1.1 Date: March 30, 2004 ------------------------------------------------------------------------------- Made bug fixes to the CCL involving explicit type-casting and explicit type indicators to variable assignment values. Added multithreaded and multithreaded DLL configurations to the Cigi.dsp library project for both debug and release builds (Win32). ------------------------------------------------------------------------------- Release: CCL Version 3 Beta 1 Date: March 14, 2004 ------------------------------------------------------------------------------- 1)======================== Directories: /cigi/version3/source/ccl - The Cigi Class Library (CCL) /cigi/version3/examples/ccl - Example project using the Cigi Class Library. ( This is Visual C++ specific ) ( We have (with a little work) been able to get this to work on Linux.) /cigi/version3/docs/ccl - the class information document created using Doxygen. /cigi/version3/docs/userman - The user's manual. 2)======================== Visual C++ specific files: -Cigi.dsp -Cigi.dsw 3)======================== Unix/Linux specific files: -aclocal.m4 -AUTHORS -autoeverything.sh -Changelog -cigicl.pc.in -config.guess -config.sub -configure -configure.ac -depcomp -install -install-sh -ltmain.sh -Makefile.am -Makefile.in -missing -mkinstalldirs -NEWS -README Note: These files are case sensitive. However, due to the packaging method, the case may have been inadvertantly changed. 4)======================== dox_cigi_cfg is a doxygen configuration file. cigi-ccl-3.3.3a+svn818/Testing/000077500000000000000000000000001210750432300160105ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/000077500000000000000000000000001210750432300200225ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/DefaultProc.cpp000066400000000000000000000023341210750432300227400ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "DefaultProc.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::DefaultProc() { } // ================================================ // ~DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::~DefaultProc() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void DefaultProc::OnPacketReceived(CigiBasePacket *Packet) { } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/DefaultProc.h000066400000000000000000000027011210750432300224030ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) #define _DEFAULT_PACKET_PROCESSING_INCLUDED_ #include using namespace std; //========================================================= //! The base class for the SOF Event Packet Processing //! class DefaultProc : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! DefaultProc(); //========================================================= //! General Destructor //! virtual ~DefaultProc(); //==> Incoming Packet Processing //========================================================= //! The callback handler for the CIGI SOF packet //! \param Packet - The pointer to the SOF packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/HostRcvCcl.cpp000066400000000000000000000375531210750432300225550ustar00rootroot00000000000000/**
 *  The CIGI IG tester
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   HostRcvCcl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This contains the code needed to run the Host Receive side
 *   CIGI communications tester.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  12/21/2007 Greg Basler                       MPV_CR_DR_1
 *  Initial Release.
 * 
* The Boeing Company * 1.0 */ #include "Network.h" // network includes winsock2.h which must be included before windows.h // Tiny XML includes #define TINYXML_USE_STL #define TIXML_USE_STL #include #include // CIGI related includes // From CCL #include #include #include #include #include #include // Handling routines #include "DefaultProc.h" #include "XSOF.h" #include "XSOFV1.h" #include "XHatRespV1.h" #include "XLosRespV1.h" #include "XCollDetSegRespV1.h" #include "XSensorRespV1.h" #include "XSOFV2.h" #include "XHatRespV2.h" #include "XLosRespV2.h" #include "XCollDetSegRespV2.h" #include "XSensorRespV2.h" #include "XHotRespV2.h" #include "XCollDetVolRespV2.h" #include "XIGMsgV2.h" #include "XSOFV3.h" #include "XHatHotRespV3.h" #include "XHatHotXRespV3.h" #include "XLosRespV3.h" #include "XLosXRespV3.h" #include "XSensorRespV3.h" #include "XSensorXRespV3.h" #include "XPositionRespV3.h" #include "XWeatherCondRespV3.h" #include "XAerosolRespV3.h" #include "XMaritimeSurfaceRespV3.h" #include "XTerrestrialSurfaceRespV3.h" #include "XCollDetSegRespV3.h" #include "XCollDetVolRespV3.h" #include "XAnimationStopV3.h" #include "XEventNotificationV3.h" #include "XIGMsgV3.h" #include "XSOFV3_2.h" #include "XHatHotRespV3_2.h" #include "XHatHotXRespV3_2.h" #include "XLosRespV3_2.h" #include "XLosXRespV3_2.h" // System includes #include #include #include #ifdef WIN32 #include #include #endif #include using namespace std; // ================================================ // Global variables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Networking class/object Network network; // CIGI specific static CigiHostSession *HostSn; static CigiOutgoingMsg *OmsgPtr; static CigiIncomingMsg *ImsgPtr; static DefaultProc DefaultPckt; static CigiIGCtrlV3_2 CIGC3_2; static CigiIGCtrlV3 CIGC3; static CigiIGCtrlV2 CIGC2; static CigiIGCtrlV1 CIGC1; static CigiBaseIGCtrl *pCIGC; static XSOF Pr_SOF; static XSOFV1 Pr_SOFV1; static XHatRespV1 Pr_HatRespV1; static XLosRespV1 Pr_LosRespV1; static XCollDetSegRespV1 Pr_CollDetSegRespV1; static XSensorRespV1 Pr_SensorRespV1; static XSOFV2 Pr_SOFV2; static XHatRespV2 Pr_HatRespV2; static XLosRespV2 Pr_LosRespV2; static XCollDetSegRespV2 Pr_CollDetSegRespV2; static XSensorRespV2 Pr_SensorRespV2; static XHotRespV2 Pr_HotRespV2; static XCollDetVolRespV2 Pr_CollDetVolRespV2; static XIGMsgV2 Pr_IGMsgV2; static XSOFV3 Pr_SOFV3; static XHatHotRespV3 Pr_HatHotRespV3; static XHatHotXRespV3 Pr_HatHotXRespV3; static XLosRespV3 Pr_LosRespV3; static XLosXRespV3 Pr_LosXRespV3; static XSensorRespV3 Pr_SensorRespV3; static XSensorXRespV3 Pr_SensorXRespV3; static XPositionRespV3 Pr_PositionRespV3; static XWeatherCondRespV3 Pr_WeatherCondRespV3; static XAerosolRespV3 Pr_AerosolRespV3; static XMaritimeSurfaceRespV3 Pr_MaritimeSurfaceRespV3; static XTerrestrialSurfaceRespV3 Pr_TerrestrialSurfaceRespV3; static XCollDetSegRespV3 Pr_CollDetSegRespV3; static XCollDetVolRespV3 Pr_CollDetVolRespV3; static XAnimationStopV3 Pr_AnimationStopV3; static XEventNotificationV3 Pr_EventNotificationV3; static XIGMsgV3 Pr_IGMsgV3; static XSOFV3_2 Pr_SOFV3_2; static XHatHotRespV3_2 Pr_HatHotRespV3_2; static XHatHotXRespV3_2 Pr_HatHotXRespV3_2; static XLosRespV3_2 Pr_LosRespV3_2; static XLosXRespV3_2 Pr_LosXRespV3_2; // CIGI network message buffers and information int recvLen; static unsigned char *pCigiOutBuf; #define RECV_BUFFER_SIZE 32768 static unsigned char CInBuf[RECV_BUFFER_SIZE]; static int CigiInSz; static int CigiOutSz; static int Port_H2IG; static int Port_IG2H; static string IGAddr; static int MajorVer; static int MinorVer; static bool PrtSOF; static float timeDelayLimit; // ================================================ // Pre-declaration of Local routines // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void); int init_cigi_if(void); // ================================================ // Main // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int main(int argc, char* argv[]) { CigiInSz = 0; ReadConfig(); init_cigi_if(); /* CIGI messaging */ CigiOutgoingMsg &Omsg = *OmsgPtr; Omsg.BeginMsg(); while(1) { cout << "================================\n"; cout << "Frame: " << Omsg.GetFrameCnt() << endl; cout << "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n"; // load the IG Control Omsg << *pCIGC; // Do packaging here to // Package msg try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // wait for Start Of Frame long HoldTime; bool RcvrProc = false; long CheckTime = (long)time(&HoldTime); while(!RcvrProc) { if((CigiInSz = network.recv( CInBuf, RECV_BUFFER_SIZE )) > 0) RcvrProc = true; else { long TstTime = (long)time(&HoldTime); if((TstTime - CheckTime) > 1) { cout << "Did not receive SOF\n"; RcvrProc = true; CigiInSz = 0; } } } if(pCigiOutBuf != NULL) { if(CigiInSz > 0) Omsg.UpdateIGCtrl(pCigiOutBuf,CInBuf); else Omsg.UpdateIGCtrl(pCigiOutBuf,NULL); // send CIGI message int sentBytes = network.send(pCigiOutBuf,CigiOutSz); } Omsg.FreeMsg(); // Frees the buffer containing the message that was just sent /* process incoming CIGI message - this could be long */ if( CigiInSz > 0 ) { try { ImsgPtr->ProcessIncomingMsg((unsigned char *)CInBuf,CigiInSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } } cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n"; } // shut down the network network.closeSocket(); delete HostSn; return 0; } // ================================================ // Read Configuration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void) { TiXmlNode *bnode = NULL; // base node TiXmlText *CfgDta = NULL; TiXmlHandle *hConfig = NULL; // pointer to a Config handle TiXmlElement *Config = NULL; TiXmlText *DbDta = NULL; TiXmlDocument doc("HostRcvCcl.def"); bool stat = doc.LoadFile(); //set default values Port_H2IG = 8000; Port_IG2H = 8001; IGAddr = "127.0.0.1"; MajorVer = 3; MinorVer = 3; PrtSOF = false; if(stat) { bnode = doc.FirstChild("HostCclReceiverInitialization"); if(bnode == NULL) stat = false; // The file is not a Mission Function Initialization file } if(stat) { // get base configuration Config = bnode->FirstChildElement("Config"); if(Config != NULL) { hConfig = new TiXmlHandle(Config); CfgDta = hConfig->FirstChildElement("IG_Addr").Child(0).Text(); if(CfgDta) IGAddr = CfgDta->Value(); CfgDta = hConfig->FirstChildElement("Port_To_IG").Child(0).Text(); Port_H2IG = (CfgDta) ? atoi(CfgDta->Value()) : 8000; CfgDta = hConfig->FirstChildElement("Port_To_Host").Child(0).Text(); Port_IG2H = (CfgDta) ? atoi(CfgDta->Value()) : 8001; CfgDta = hConfig->FirstChildElement("Major_Version_Cigi").Child(0).Text(); MajorVer = (CfgDta) ? atoi(CfgDta->Value()) : 0; if((MajorVer == 1) || (MajorVer == 2)) MinorVer = 0; else if(MajorVer == 3) { CfgDta = hConfig->FirstChildElement("Minor_Version_Cigi").Child(0).Text(); MinorVer = (CfgDta) ? atoi(CfgDta->Value()) : 3; if(MinorVer < 2) MinorVer = 0; else if(MinorVer > 3) MinorVer = 3; } else { MajorVer = 3; MinorVer = 3; } CfgDta = hConfig->FirstChildElement("Print_SOF").Child(0).Text(); PrtSOF = (memcmp((void *)CfgDta->Value(),"true",4) == 0) ? true : false; delete hConfig; } } } // ================================================ // Initialize interface to CIGI // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int init_cigi_if(void){ int err_status = 0; /* open sockets to CIGI */ // hostemu-ip-addr, hostemu-socket, local-socket printf("init_cigi_if: initializing ports to CIGI\n"); bool netstatus = network.openSocket( IGAddr.c_str(), Port_H2IG, Port_IG2H ); if( !netstatus ) { printf( "could not connect to CIGI IG server\n" ); exit( 1 ); } else { printf( "successfully connected to CIGI IG server\n" ); } HostSn = new CigiHostSession(1,32768,2,32768); CigiOutgoingMsg &Omsg = HostSn->GetOutgoingMsgMgr(); CigiIncomingMsg &Imsg = HostSn->GetIncomingMsgMgr(); OmsgPtr = &Omsg; ImsgPtr = &Imsg; HostSn->SetCigiVersion(MajorVer,MinorVer); HostSn->SetSynchronous(true); Imsg.SetReaderCigiVersion(MajorVer,MinorVer); Imsg.UsingIteration(false); // Version specific items pCIGC = &CIGC3_2; if(MajorVer == 3) { if(MinorVer < 2) pCIGC = &CIGC3; else pCIGC = &CIGC3_2; } else if(MajorVer == 2) pCIGC = &CIGC2; else if(MajorVer == 1) pCIGC = &CIGC1; // set up a default handler for unhandled packets Imsg.RegisterEventProcessor(0, (CigiBaseEventProcessor *) &DefaultPckt); // Register all the Event processors if(MajorVer == 1) { if(PrtSOF) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_SOFV1); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_SOF); Imsg.RegisterEventProcessor(CIGI_HAT_RESP_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_HatRespV1); Imsg.RegisterEventProcessor(CIGI_LOS_RESP_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_LosRespV1); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_CollDetSegRespV1); Imsg.RegisterEventProcessor(CIGI_SENSOR_RESP_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_SensorRespV1); } else if(MajorVer == 2) { if(PrtSOF) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_SOFV2); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_SOF); Imsg.RegisterEventProcessor(CIGI_HAT_RESP_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_HatRespV2); Imsg.RegisterEventProcessor(CIGI_LOS_RESP_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_LosRespV2); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_CollDetSegRespV2); Imsg.RegisterEventProcessor(CIGI_SENSOR_RESP_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_SensorRespV2); Imsg.RegisterEventProcessor(CIGI_HOT_RESP_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_HotRespV2); Imsg.RegisterEventProcessor(CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_CollDetVolRespV2); Imsg.RegisterEventProcessor(CIGI_IG_MSG_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_IGMsgV2); } else { if(MajorVer != 3) { MajorVer = 3; MinorVer = 3; } else { if(MinorVer < 2) MinorVer = 0; else if(MinorVer > 3) MinorVer = 3; } if(MinorVer < 2) { if(PrtSOF) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_SOFV3); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_SOF); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_HatHotRespV3); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_XRESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_HatHotXRespV3); Imsg.RegisterEventProcessor(CIGI_LOS_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_LosRespV3); Imsg.RegisterEventProcessor(CIGI_LOS_XRESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_LosXRespV3); } else { if(PrtSOF) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_SOFV3_2); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_SOF); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_RESP_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_HatHotRespV3_2); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_XRESP_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_HatHotXRespV3_2); Imsg.RegisterEventProcessor(CIGI_LOS_RESP_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_LosRespV3_2); Imsg.RegisterEventProcessor(CIGI_LOS_XRESP_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_LosXRespV3_2); } Imsg.RegisterEventProcessor(CIGI_SENSOR_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_SensorRespV3); Imsg.RegisterEventProcessor(CIGI_SENSOR_XRESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_SensorXRespV3); Imsg.RegisterEventProcessor(CIGI_POSITION_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_PositionRespV3); Imsg.RegisterEventProcessor(CIGI_WEATHER_COND_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_WeatherCondRespV3); Imsg.RegisterEventProcessor(CIGI_AEROSOL_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_AerosolRespV3); Imsg.RegisterEventProcessor(CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_MaritimeSurfaceRespV3); Imsg.RegisterEventProcessor(CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_TerrestrialSurfaceRespV3); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CollDetSegRespV3); Imsg.RegisterEventProcessor(CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CollDetVolRespV3); Imsg.RegisterEventProcessor(CIGI_ANIMATION_STOP_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_AnimationStopV3); Imsg.RegisterEventProcessor(CIGI_EVENT_NOTIFICATION_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_EventNotificationV3); Imsg.RegisterEventProcessor(CIGI_IG_MSG_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_IGMsgV3); } // initialize the IG Control pCIGC->SetDatabaseID(0,false); pCIGC->SetIGMode(CigiBaseIGCtrl::Operate); CIGC3.SetTimeStampValid(false); CIGC3_2.SetTimeStampValid(false); return err_status; } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/HostRcvCcl.sln000066400000000000000000000016751210750432300225630ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HostRcvCcl", "HostRcvCcl.vcproj", "{D6E9260C-5BD5-4CA3-B7F5-0556D01BC164}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {D6E9260C-5BD5-4CA3-B7F5-0556D01BC164}.Debug.ActiveCfg = Debug|Win32 {D6E9260C-5BD5-4CA3-B7F5-0556D01BC164}.Debug.Build.0 = Debug|Win32 {D6E9260C-5BD5-4CA3-B7F5-0556D01BC164}.Release.ActiveCfg = Release|Win32 {D6E9260C-5BD5-4CA3-B7F5-0556D01BC164}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/HostRcvCcl.vcproj000066400000000000000000000206321210750432300232640ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/ReadMe.txt000066400000000000000000000024121210750432300217170ustar00rootroot00000000000000======================================================================== CONSOLE APPLICATION : HostRcvCcl Project Overview ======================================================================== AppWizard has created this HostRcvCcl application for you. This file contains a summary of what you will find in each of the files that make up your HostRcvCcl application. HostRcvCcl.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. HostRcvCcl.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named HostRcvCcl.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" comments to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XAerosolRespV3.cpp000066400000000000000000000014641210750432300233320ustar00rootroot00000000000000// XAerosolRespV3.cpp: Body of the XAerosolRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XAerosolRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XAerosolRespV3::XAerosolRespV3() { } XAerosolRespV3::~XAerosolRespV3() { } void XAerosolRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiAerosolRespV3 *InPckt = (CigiAerosolRespV3 *)Packet; printf("Aerosol Response V3:\n"); printf("\tRequest ID = %u\n",InPckt->GetRequestID()); printf("\tLayer ID = %u\n",InPckt->GetLayerID()); printf("\tAerosol Concentration = %f\n",InPckt->GetAerosolConcentration()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XAerosolRespV3.h000066400000000000000000000011601210750432300227700ustar00rootroot00000000000000// XAerosolRespV3.h: Interface for the XAerosolRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XAEROSOLRESPV3_INCLUDED_) #define _PROC_XAEROSOLRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiAerosolRespV3.h" class XAerosolRespV3 : public CigiBaseEventProcessor { public: XAerosolRespV3(); virtual ~XAerosolRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiAerosolRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiAerosolRespV3 *TPckt; }; #endif // _PROC_XAEROSOLRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XAnimationStopV3.cpp000066400000000000000000000013021210750432300236500ustar00rootroot00000000000000// XAnimationStopV3.cpp: Body of the XAnimationStopV3 class. // ////////////////////////////////////////////////////////////////////// #include "XAnimationStopV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XAnimationStopV3::XAnimationStopV3() { } XAnimationStopV3::~XAnimationStopV3() { } void XAnimationStopV3::OnPacketReceived(CigiBasePacket *Packet) { CigiAnimationStopV3 *InPckt = (CigiAnimationStopV3 *)Packet; printf("Animation Stop V3:\n"); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XAnimationStopV3.h000066400000000000000000000012061210750432300233200ustar00rootroot00000000000000// XAnimationStopV3.h: Interface for the XAnimationStopV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XANIMATIONSTOPV3_INCLUDED_) #define _PROC_XANIMATIONSTOPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiAnimationStopV3.h" class XAnimationStopV3 : public CigiBaseEventProcessor { public: XAnimationStopV3(); virtual ~XAnimationStopV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiAnimationStopV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiAnimationStopV3 *TPckt; }; #endif // _PROC_XANIMATIONSTOPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetSegRespV1.cpp000066400000000000000000000017061210750432300237100ustar00rootroot00000000000000// XCollDetSegRespV1.cpp: Body of the XCollDetSegRespV1 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegRespV1.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegRespV1::XCollDetSegRespV1() { } XCollDetSegRespV1::~XCollDetSegRespV1() { } void XCollDetSegRespV1::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegRespV1 *InPckt = (CigiCollDetSegRespV1 *)Packet; printf("Collision Detection Segment Response V1:\n"); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tSegment ID = %u\n",InPckt->GetSegID()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tX = %f\n",InPckt->GetX()); printf("\tY = %f\n",InPckt->GetY()); printf("\tZ = %f\n",InPckt->GetZ()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetSegRespV1.h000066400000000000000000000012211210750432300233450ustar00rootroot00000000000000// XCollDetSegRespV1.h: Interface for the XCollDetSegRespV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCOLLDETSEGRESPV1_INCLUDED_) #define _PROC_XCOLLDETSEGRESPV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegRespV1.h" class XCollDetSegRespV1 : public CigiBaseEventProcessor { public: XCollDetSegRespV1(); virtual ~XCollDetSegRespV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegRespV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegRespV1 *TPckt; }; #endif // _PROC_XCOLLDETSEGRESPV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetSegRespV2.cpp000066400000000000000000000024111210750432300237030ustar00rootroot00000000000000// XCollDetSegRespV2.cpp: Body of the XCollDetSegRespV2 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegRespV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegRespV2::XCollDetSegRespV2() { } XCollDetSegRespV2::~XCollDetSegRespV2() { } void XCollDetSegRespV2::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegRespV2 *InPckt = (CigiCollDetSegRespV2 *)Packet; printf("Collision Detection Segment Response V2:\n"); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tSegment ID = %u\n",InPckt->GetSegID()); printf("\tCollision Type = %d : ",InPckt->GetCollType()); switch(InPckt->GetCollType()) { case 0: printf("NonEntity\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tCollision Entity ID = %u\n",InPckt->GetCollEntityID()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tX = %f\n",InPckt->GetX()); printf("\tY = %f\n",InPckt->GetY()); printf("\tZ = %f\n",InPckt->GetZ()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetSegRespV2.h000066400000000000000000000012211210750432300233460ustar00rootroot00000000000000// XCollDetSegRespV2.h: Interface for the XCollDetSegRespV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCOLLDETSEGRESPV2_INCLUDED_) #define _PROC_XCOLLDETSEGRESPV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegRespV2.h" class XCollDetSegRespV2 : public CigiBaseEventProcessor { public: XCollDetSegRespV2(); virtual ~XCollDetSegRespV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegRespV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegRespV2 *TPckt; }; #endif // _PROC_XCOLLDETSEGRESPV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetSegRespV3.cpp000066400000000000000000000023311210750432300237050ustar00rootroot00000000000000// XCollDetSegRespV3.cpp: Body of the XCollDetSegRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegRespV3::XCollDetSegRespV3() { } XCollDetSegRespV3::~XCollDetSegRespV3() { } void XCollDetSegRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegRespV3 *InPckt = (CigiCollDetSegRespV3 *)Packet; printf("Collision Detection Segment Response V3:\n"); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tSegment ID = %u\n",InPckt->GetSegID()); printf("\tCollision Type = %d : ",InPckt->GetCollType()); switch(InPckt->GetCollType()) { case 0: printf("NonEntity\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tCollision Entity ID = %u\n",InPckt->GetCollEntityID()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tIntersection Distance = %f\n",InPckt->GetIntersectDist()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetSegRespV3.h000066400000000000000000000012211210750432300233470ustar00rootroot00000000000000// XCollDetSegRespV3.h: Interface for the XCollDetSegRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCOLLDETSEGRESPV3_INCLUDED_) #define _PROC_XCOLLDETSEGRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegRespV3.h" class XCollDetSegRespV3 : public CigiBaseEventProcessor { public: XCollDetSegRespV3(); virtual ~XCollDetSegRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegRespV3 *TPckt; }; #endif // _PROC_XCOLLDETSEGRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetVolRespV2.cpp000066400000000000000000000021311210750432300237240ustar00rootroot00000000000000// XCollDetVolRespV2.cpp: Body of the XCollDetVolRespV2 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetVolRespV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetVolRespV2::XCollDetVolRespV2() { } XCollDetVolRespV2::~XCollDetVolRespV2() { } void XCollDetVolRespV2::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetVolRespV2 *InPckt = (CigiCollDetVolRespV2 *)Packet; printf("Collision Detection Volume Response V2:\n"); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tVolume ID = %u\n",InPckt->GetVolID()); printf("\tCollision Type = %d : ",InPckt->GetCollType()); switch(InPckt->GetCollType()) { case 0: printf("NonEntity\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tCollision Entity ID = %u\n",InPckt->GetCollEntityID()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetVolRespV2.h000066400000000000000000000012211210750432300233700ustar00rootroot00000000000000// XCollDetVolRespV2.h: Interface for the XCollDetVolRespV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCOLLDETVOLRESPV2_INCLUDED_) #define _PROC_XCOLLDETVOLRESPV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetVolRespV2.h" class XCollDetVolRespV2 : public CigiBaseEventProcessor { public: XCollDetVolRespV2(); virtual ~XCollDetVolRespV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetVolRespV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetVolRespV2 *TPckt; }; #endif // _PROC_XCOLLDETVOLRESPV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetVolRespV3.cpp000066400000000000000000000022331210750432300237300ustar00rootroot00000000000000// XCollDetVolRespV3.cpp: Body of the XCollDetVolRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetVolRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetVolRespV3::XCollDetVolRespV3() { } XCollDetVolRespV3::~XCollDetVolRespV3() { } void XCollDetVolRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetVolRespV3 *InPckt = (CigiCollDetVolRespV3 *)Packet; printf("Collision Detection Volume Response V3:\n"); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tVolume ID = %u\n",InPckt->GetVolID()); printf("\tCollision Type = %d : ",InPckt->GetCollType()); switch(InPckt->GetCollType()) { case 0: printf("NonEntity\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tCollision Entity ID = %u\n",InPckt->GetCollEntityID()); printf("\tCollision Volume ID = %u\n",InPckt->GetCollVolID()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XCollDetVolRespV3.h000066400000000000000000000012211210750432300233710ustar00rootroot00000000000000// XCollDetVolRespV3.h: Interface for the XCollDetVolRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCOLLDETVOLRESPV3_INCLUDED_) #define _PROC_XCOLLDETVOLRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetVolRespV3.h" class XCollDetVolRespV3 : public CigiBaseEventProcessor { public: XCollDetVolRespV3(); virtual ~XCollDetVolRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetVolRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetVolRespV3 *TPckt; }; #endif // _PROC_XCOLLDETVOLRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XEventNotificationV3.cpp000066400000000000000000000016461210750432300245260ustar00rootroot00000000000000// XEventNotificationV3.cpp: Body of the XEventNotificationV3 class. // ////////////////////////////////////////////////////////////////////// #include "XEventNotificationV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEventNotificationV3::XEventNotificationV3() { } XEventNotificationV3::~XEventNotificationV3() { } void XEventNotificationV3::OnPacketReceived(CigiBasePacket *Packet) { CigiEventNotificationV3 *InPckt = (CigiEventNotificationV3 *)Packet; printf("Event Notification V3:\n"); printf("\tEventID = %u\n",InPckt->GetEventID()); printf("\tEventData 1 = %u\n",InPckt->GetULEventData(0)); printf("\tEventData 2 = %u\n",InPckt->GetULEventData(1)); printf("\tEventData 3 = %u\n",InPckt->GetULEventData(2)); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XEventNotificationV3.h000066400000000000000000000012621210750432300241650ustar00rootroot00000000000000// XEventNotificationV3.h: Interface for the XEventNotificationV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEVENTNOTIFICATIONV3_INCLUDED_) #define _PROC_XEVENTNOTIFICATIONV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEventNotificationV3.h" class XEventNotificationV3 : public CigiBaseEventProcessor { public: XEventNotificationV3(); virtual ~XEventNotificationV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEventNotificationV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEventNotificationV3 *TPckt; }; #endif // _PROC_XEVENTNOTIFICATIONV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotRespV3.cpp000066400000000000000000000021301210750432300231040ustar00rootroot00000000000000// XHatHotRespV3.cpp: Body of the XHatHotRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotRespV3::XHatHotRespV3() { } XHatHotRespV3::~XHatHotRespV3() { } void XHatHotRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotRespV3 *InPckt = (CigiHatHotRespV3 *)Packet; printf("HAT HOT Response V3:\n"); printf("\tHat Hot ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); int tType = (int)InPckt->GetReqType(); printf("\tRequest Type = %d : ",tType); switch(tType) { case 0: printf("HAT\n"); break; case 1: printf("HOT\n"); break; default: printf("\n"); break; } if(tType == 0) printf("\tHat = %f\n",InPckt->GetHat()); else if(tType == 1) printf("\tHot = %f\n",InPckt->GetHot()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotRespV3.h000066400000000000000000000011451210750432300225560ustar00rootroot00000000000000// XHatHotRespV3.h: Interface for the XHatHotRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHATHOTRESPV3_INCLUDED_) #define _PROC_XHATHOTRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotRespV3.h" class XHatHotRespV3 : public CigiBaseEventProcessor { public: XHatHotRespV3(); virtual ~XHatHotRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotRespV3 *TPckt; }; #endif // _PROC_XHATHOTRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotRespV3_2.cpp000066400000000000000000000022551210750432300233350ustar00rootroot00000000000000// XHatHotRespV3_2.cpp: Body of the XHatHotRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotRespV3_2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotRespV3_2::XHatHotRespV3_2() { } XHatHotRespV3_2::~XHatHotRespV3_2() { } void XHatHotRespV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotRespV3_2 *InPckt = (CigiHatHotRespV3_2 *)Packet; printf("HAT HOT Response V3_2:\n"); printf("\tHat Hot ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); int tType = (int)InPckt->GetReqType(); printf("\tRequest Type = %d : ",tType); switch(tType) { case 0: printf("HAT\n"); break; case 1: printf("HOT\n"); break; default: printf("\n"); break; } printf("\tHost Frame ID = %d\n",InPckt->GetHostFrame()); if(tType == 0) printf("\tHat = %f\n",InPckt->GetHat()); else if(tType == 1) printf("\tHot = %f\n",InPckt->GetHot()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotRespV3_2.h000066400000000000000000000011731210750432300230000ustar00rootroot00000000000000// XHatHotRespV3_2.h: Interface for the XHatHotRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHATHOTRESPV3_2_INCLUDED_) #define _PROC_XHATHOTRESPV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotRespV3_2.h" class XHatHotRespV3_2 : public CigiBaseEventProcessor { public: XHatHotRespV3_2(); virtual ~XHatHotRespV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotRespV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotRespV3_2 *TPckt; }; #endif // _PROC_XHATHOTRESPV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotXRespV3.cpp000066400000000000000000000017541210750432300232470ustar00rootroot00000000000000// XHatHotXRespV3.cpp: Body of the XHatHotXRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotXRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotXRespV3::XHatHotXRespV3() { } XHatHotXRespV3::~XHatHotXRespV3() { } void XHatHotXRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotXRespV3 *InPckt = (CigiHatHotXRespV3 *)Packet; printf("HAT HOT Extended Response V3:\n"); printf("\tHat Hot ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tHat = %f\n",InPckt->GetHat()); printf("\tHot = %f\n",InPckt->GetHot()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tNormal Azimuth = %f\n",InPckt->GetNormAz()); printf("\tNormal Elevation = %f\n",InPckt->GetNormEl()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotXRespV3.h000066400000000000000000000011601210750432300227030ustar00rootroot00000000000000// XHatHotXRespV3.h: Interface for the XHatHotXRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHATHOTXRESPV3_INCLUDED_) #define _PROC_XHATHOTXRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotXRespV3.h" class XHatHotXRespV3 : public CigiBaseEventProcessor { public: XHatHotXRespV3(); virtual ~XHatHotXRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotXRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotXRespV3 *TPckt; }; #endif // _PROC_XHATHOTXRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotXRespV3_2.cpp000066400000000000000000000021001210750432300234520ustar00rootroot00000000000000// XHatHotXRespV3_2.cpp: Body of the XHatHotXRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotXRespV3_2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotXRespV3_2::XHatHotXRespV3_2() { } XHatHotXRespV3_2::~XHatHotXRespV3_2() { } void XHatHotXRespV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotXRespV3_2 *InPckt = (CigiHatHotXRespV3_2 *)Packet; printf("HAT HOT Extended Response V3_2:\n"); printf("\tHat Hot ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tHost Frame ID = %u\n",InPckt->GetHostFrame()); printf("\tHat = %f\n",InPckt->GetHat()); printf("\tHot = %f\n",InPckt->GetHot()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tNormal Azimuth = %f\n",InPckt->GetNormAz()); printf("\tNormal Elevation = %f\n",InPckt->GetNormEl()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatHotXRespV3_2.h000066400000000000000000000012061210750432300231250ustar00rootroot00000000000000// XHatHotXRespV3_2.h: Interface for the XHatHotXRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHATHOTXRESPV3_2_INCLUDED_) #define _PROC_XHATHOTXRESPV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotXRespV3_2.h" class XHatHotXRespV3_2 : public CigiBaseEventProcessor { public: XHatHotXRespV3_2(); virtual ~XHatHotXRespV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotXRespV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotXRespV3_2 *TPckt; }; #endif // _PROC_XHATHOTXRESPV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatRespV1.cpp000066400000000000000000000014151210750432300224340ustar00rootroot00000000000000// XHatRespV1.cpp: Body of the XHatRespV1 class. // ////////////////////////////////////////////////////////////////////// #include "XHatRespV1.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatRespV1::XHatRespV1() { } XHatRespV1::~XHatRespV1() { } void XHatRespV1::OnPacketReceived(CigiBasePacket *Packet) { CigiHatRespV1 *InPckt = (CigiHatRespV1 *)Packet; printf("HAT Response V1:\n"); printf("\tHat ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tHat = %f\n",InPckt->GetHat()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatRespV1.h000066400000000000000000000011041210750432300220740ustar00rootroot00000000000000// XHatRespV1.h: Interface for the XHatRespV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHATRESPV1_INCLUDED_) #define _PROC_XHATRESPV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatRespV1.h" class XHatRespV1 : public CigiBaseEventProcessor { public: XHatRespV1(); virtual ~XHatRespV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatRespV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatRespV1 *TPckt; }; #endif // _PROC_XHATRESPV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatRespV2.cpp000066400000000000000000000014151210750432300224350ustar00rootroot00000000000000// XHatRespV2.cpp: Body of the XHatRespV2 class. // ////////////////////////////////////////////////////////////////////// #include "XHatRespV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatRespV2::XHatRespV2() { } XHatRespV2::~XHatRespV2() { } void XHatRespV2::OnPacketReceived(CigiBasePacket *Packet) { CigiHatRespV2 *InPckt = (CigiHatRespV2 *)Packet; printf("HAT Response V2:\n"); printf("\tHat ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tHat = %f\n",InPckt->GetHat()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHatRespV2.h000066400000000000000000000011041210750432300220750ustar00rootroot00000000000000// XHatRespV2.h: Interface for the XHatRespV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHATRESPV2_INCLUDED_) #define _PROC_XHATRESPV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatRespV2.h" class XHatRespV2 : public CigiBaseEventProcessor { public: XHatRespV2(); virtual ~XHatRespV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatRespV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatRespV2 *TPckt; }; #endif // _PROC_XHATRESPV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHotRespV2.cpp000066400000000000000000000014151210750432300224530ustar00rootroot00000000000000// XHotRespV2.cpp: Body of the XHotRespV2 class. // ////////////////////////////////////////////////////////////////////// #include "XHotRespV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHotRespV2::XHotRespV2() { } XHotRespV2::~XHotRespV2() { } void XHotRespV2::OnPacketReceived(CigiBasePacket *Packet) { CigiHotRespV2 *InPckt = (CigiHotRespV2 *)Packet; printf("HOT Response V2:\n"); printf("\tHot ID = %u\n",InPckt->GetHatHotID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tHot = %f\n",InPckt->GetHot()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XHotRespV2.h000066400000000000000000000011041210750432300221130ustar00rootroot00000000000000// XHotRespV2.h: Interface for the XHotRespV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHOTRESPV2_INCLUDED_) #define _PROC_XHOTRESPV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHotRespV2.h" class XHotRespV2 : public CigiBaseEventProcessor { public: XHotRespV2(); virtual ~XHotRespV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHotRespV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHotRespV2 *TPckt; }; #endif // _PROC_XHOTRESPV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XIGMsgV2.cpp000066400000000000000000000012241210750432300220330ustar00rootroot00000000000000// XIGMsgV2.cpp: Body of the XIGMsgV2 class. // ////////////////////////////////////////////////////////////////////// #include "XIGMsgV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGMsgV2::XIGMsgV2() { } XIGMsgV2::~XIGMsgV2() { } void XIGMsgV2::OnPacketReceived(CigiBasePacket *Packet) { CigiIGMsgV2 *InPckt = (CigiIGMsgV2 *)Packet; printf("IG Message V2:\n"); printf("\tMessage ID = %u\n",InPckt->GetMsgID()); printf("\tMessage = %s\n",InPckt->GetMsg()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XIGMsgV2.h000066400000000000000000000010561210750432300215030ustar00rootroot00000000000000// XIGMsgV2.h: Interface for the XIGMsgV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGMSGV2_INCLUDED_) #define _PROC_XIGMSGV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGMsgV2.h" class XIGMsgV2 : public CigiBaseEventProcessor { public: XIGMsgV2(); virtual ~XIGMsgV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGMsgV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGMsgV2 *TPckt; }; #endif // _PROC_XIGMSGV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XIGMsgV3.cpp000066400000000000000000000012241210750432300220340ustar00rootroot00000000000000// XIGMsgV3.cpp: Body of the XIGMsgV3 class. // ////////////////////////////////////////////////////////////////////// #include "XIGMsgV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGMsgV3::XIGMsgV3() { } XIGMsgV3::~XIGMsgV3() { } void XIGMsgV3::OnPacketReceived(CigiBasePacket *Packet) { CigiIGMsgV3 *InPckt = (CigiIGMsgV3 *)Packet; printf("IG Message V3:\n"); printf("\tMessage ID = %u\n",InPckt->GetMsgID()); printf("\tMessage = %s\n",InPckt->GetMsg()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XIGMsgV3.h000066400000000000000000000010561210750432300215040ustar00rootroot00000000000000// XIGMsgV3.h: Interface for the XIGMsgV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGMSGV3_INCLUDED_) #define _PROC_XIGMSGV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGMsgV3.h" class XIGMsgV3 : public CigiBaseEventProcessor { public: XIGMsgV3(); virtual ~XIGMsgV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGMsgV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGMsgV3 *TPckt; }; #endif // _PROC_XIGMSGV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV1.cpp000066400000000000000000000017721210750432300224630ustar00rootroot00000000000000// XLosRespV1.cpp: Body of the XLosRespV1 class. // ////////////////////////////////////////////////////////////////////// #include "XLosRespV1.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosRespV1::XLosRespV1() { } XLosRespV1::~XLosRespV1() { } void XLosRespV1::OnPacketReceived(CigiBasePacket *Packet) { CigiLosRespV1 *InPckt = (CigiLosRespV1 *)Packet; printf("Line Of Sight Response V1:\n"); printf("\tLine Of Sight ID = %u\n",InPckt->GetLosID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tVisible = %d\n",InPckt->GetVisible()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tRange = %f\n",InPckt->GetRange()); printf("\tLatitude = %f\n",InPckt->GetLatitude()); printf("\tLongitude = %f\n",InPckt->GetLongitude()); printf("\tAltitude = %f\n",InPckt->GetAltitude()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV1.h000066400000000000000000000011041210750432300221150ustar00rootroot00000000000000// XLosRespV1.h: Interface for the XLosRespV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLOSRESPV1_INCLUDED_) #define _PROC_XLOSRESPV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosRespV1.h" class XLosRespV1 : public CigiBaseEventProcessor { public: XLosRespV1(); virtual ~XLosRespV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosRespV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosRespV1 *TPckt; }; #endif // _PROC_XLOSRESPV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV2.cpp000066400000000000000000000017721210750432300224640ustar00rootroot00000000000000// XLosRespV2.cpp: Body of the XLosRespV2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosRespV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosRespV2::XLosRespV2() { } XLosRespV2::~XLosRespV2() { } void XLosRespV2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosRespV2 *InPckt = (CigiLosRespV2 *)Packet; printf("Line Of Sight Response V2:\n"); printf("\tLine Of Sight ID = %u\n",InPckt->GetLosID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tVisible = %d\n",InPckt->GetVisible()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tRange = %f\n",InPckt->GetRange()); printf("\tLatitude = %f\n",InPckt->GetLatitude()); printf("\tLongitude = %f\n",InPckt->GetLongitude()); printf("\tAltitude = %f\n",InPckt->GetAltitude()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV2.h000066400000000000000000000011041210750432300221160ustar00rootroot00000000000000// XLosRespV2.h: Interface for the XLosRespV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLOSRESPV2_INCLUDED_) #define _PROC_XLOSRESPV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosRespV2.h" class XLosRespV2 : public CigiBaseEventProcessor { public: XLosRespV2(); virtual ~XLosRespV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosRespV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosRespV2 *TPckt; }; #endif // _PROC_XLOSRESPV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV3.cpp000066400000000000000000000017261210750432300224640ustar00rootroot00000000000000// XLosRespV3.cpp: Body of the XLosRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XLosRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosRespV3::XLosRespV3() { } XLosRespV3::~XLosRespV3() { } void XLosRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiLosRespV3 *InPckt = (CigiLosRespV3 *)Packet; printf("Line Of Sight Response V3:\n"); printf("\tLine Of Sight ID = %u\n",InPckt->GetLosID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tEntity ID Valid = %d\n",InPckt->GetEntityIDValid()); printf("\tVisible = %d\n",InPckt->GetVisible()); printf("\tResponse Count = %u\n",InPckt->GetRespCount()); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tRange = %f\n",InPckt->GetRange()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV3.h000066400000000000000000000011041210750432300221170ustar00rootroot00000000000000// XLosRespV3.h: Interface for the XLosRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLOSRESPV3_INCLUDED_) #define _PROC_XLOSRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosRespV3.h" class XLosRespV3 : public CigiBaseEventProcessor { public: XLosRespV3(); virtual ~XLosRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosRespV3 *TPckt; }; #endif // _PROC_XLOSRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV3_2.cpp000066400000000000000000000020471210750432300227020ustar00rootroot00000000000000// XLosRespV3_2.cpp: Body of the XLosRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosRespV3_2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosRespV3_2::XLosRespV3_2() { } XLosRespV3_2::~XLosRespV3_2() { } void XLosRespV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosRespV3_2 *InPckt = (CigiLosRespV3_2 *)Packet; printf("Line Of Sight Response V3_2:\n"); printf("\tLine Of Sight ID = %u\n",InPckt->GetLosID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tEntity ID Valid = %d\n",InPckt->GetEntityIDValid()); printf("\tVisible = %d\n",InPckt->GetVisible()); printf("\tHost Frame = %u\n",InPckt->GetHostFrame()); printf("\tResponse Count = %u\n",InPckt->GetRespCount()); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tRange = %f\n",InPckt->GetRange()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosRespV3_2.h000066400000000000000000000011321210750432300223410ustar00rootroot00000000000000// XLosRespV3_2.h: Interface for the XLosRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLOSRESPV3_2_INCLUDED_) #define _PROC_XLOSRESPV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosRespV3_2.h" class XLosRespV3_2 : public CigiBaseEventProcessor { public: XLosRespV3_2(); virtual ~XLosRespV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosRespV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosRespV3_2 *TPckt; }; #endif // _PROC_XLOSRESPV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosXRespV3.cpp000066400000000000000000000035001210750432300226040ustar00rootroot00000000000000// XLosXRespV3.cpp: Body of the XLosXRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XLosXRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosXRespV3::XLosXRespV3() { } XLosXRespV3::~XLosXRespV3() { } void XLosXRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiLosXRespV3 *InPckt = (CigiLosXRespV3 *)Packet; printf("Line Of Sight Extended Response V3:\n"); printf("\tLine Of Sight ID = %u\n",InPckt->GetLosID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tEntity ID Valid = %d\n",InPckt->GetEntityIDValid()); printf("\tRange Valid = %d\n",InPckt->GetRangeValid()); printf("\tVisible = %d\n",InPckt->GetVisible()); printf("\tIntersectionCoordSys = %d : ",InPckt->GetIntersectionCoordSys()); switch(InPckt->GetIntersectionCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tResponse Count = %u\n",InPckt->GetRespCount()); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tRange = %f\n",InPckt->GetRange()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); printf("\tRed = %u\n",InPckt->GetRed()); printf("\tGreen = %u\n",InPckt->GetGreen()); printf("\tBlue = %u\n",InPckt->GetBlue()); printf("\tAlpha = %u\n",InPckt->GetAlpha()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tNormal Azimuth = %f\n",InPckt->GetNormalAz()); printf("\tNormal Elevation = %f\n",InPckt->GetNormalEl()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosXRespV3.h000066400000000000000000000011171210750432300222530ustar00rootroot00000000000000// XLosXRespV3.h: Interface for the XLosXRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLOSXRESPV3_INCLUDED_) #define _PROC_XLOSXRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosXRespV3.h" class XLosXRespV3 : public CigiBaseEventProcessor { public: XLosXRespV3(); virtual ~XLosXRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosXRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosXRespV3 *TPckt; }; #endif // _PROC_XLOSXRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosXRespV3_2.cpp000066400000000000000000000031661210750432300230350ustar00rootroot00000000000000// XLosXRespV3_2.cpp: Body of the XLosXRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosXRespV3_2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosXRespV3_2::XLosXRespV3_2() { } XLosXRespV3_2::~XLosXRespV3_2() { } void XLosXRespV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosXRespV3_2 *InPckt = (CigiLosXRespV3_2 *)Packet; printf("Line Of Sight Extended Response V3_2:\n"); printf("\tLine Of Sight ID = %u\n",InPckt->GetLosID()); printf("\tValid = %d\n",InPckt->GetValid()); printf("\tEntity ID Valid = %d\n",InPckt->GetEntityIDValid()); printf("\tRange Valid = %d\n",InPckt->GetRangeValid()); printf("\tVisible = %d\n",InPckt->GetVisible()); printf("\tHost Frame = %u\n",InPckt->GetHostFrame()); printf("\tResponse Count = %u\n",InPckt->GetRespCount()); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tRange = %f\n",InPckt->GetRange()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); printf("\tRed = %u\n",InPckt->GetRed()); printf("\tGreen = %u\n",InPckt->GetGreen()); printf("\tBlue = %u\n",InPckt->GetBlue()); printf("\tAlpha = %u\n",InPckt->GetAlpha()); printf("\tMaterial = %u\n",InPckt->GetMaterial()); printf("\tNormal Azimuth = %f\n",InPckt->GetNormalAz()); printf("\tNormal Elevation = %f\n",InPckt->GetNormalEl()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XLosXRespV3_2.h000066400000000000000000000011451210750432300224750ustar00rootroot00000000000000// XLosXRespV3_2.h: Interface for the XLosXRespV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLOSXRESPV3_2_INCLUDED_) #define _PROC_XLOSXRESPV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosXRespV3_2.h" class XLosXRespV3_2 : public CigiBaseEventProcessor { public: XLosXRespV3_2(); virtual ~XLosXRespV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosXRespV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosXRespV3_2 *TPckt; }; #endif // _PROC_XLOSXRESPV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XMaritimeSurfaceRespV3.cpp000066400000000000000000000016221210750432300250020ustar00rootroot00000000000000// XMaritimeSurfaceRespV3.cpp: Body of the XMaritimeSurfaceRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XMaritimeSurfaceRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XMaritimeSurfaceRespV3::XMaritimeSurfaceRespV3() { } XMaritimeSurfaceRespV3::~XMaritimeSurfaceRespV3() { } void XMaritimeSurfaceRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiMaritimeSurfaceRespV3 *InPckt = (CigiMaritimeSurfaceRespV3 *)Packet; printf("Maritime Surface Response V3:\n"); printf("\tRequest ID = %u\n",InPckt->GetRequestID()); printf("\tSurface Height = %f\n",InPckt->GetSurfaceHeight()); printf("\tWater Temperature = %f\n",InPckt->GetWaterTemp()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XMaritimeSurfaceRespV3.h000066400000000000000000000013101210750432300244410ustar00rootroot00000000000000// XMaritimeSurfaceRespV3.h: Interface for the XMaritimeSurfaceRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XMARITIMESURFACERESPV3_INCLUDED_) #define _PROC_XMARITIMESURFACERESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiMaritimeSurfaceRespV3.h" class XMaritimeSurfaceRespV3 : public CigiBaseEventProcessor { public: XMaritimeSurfaceRespV3(); virtual ~XMaritimeSurfaceRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiMaritimeSurfaceRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiMaritimeSurfaceRespV3 *TPckt; }; #endif // _PROC_XMARITIMESURFACERESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XPositionRespV3.cpp000066400000000000000000000034261210750432300235320ustar00rootroot00000000000000// XPositionRespV3.cpp: Body of the XPositionRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XPositionRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XPositionRespV3::XPositionRespV3() { } XPositionRespV3::~XPositionRespV3() { } void XPositionRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiPositionRespV3 *InPckt = (CigiPositionRespV3 *)Packet; printf("Position Response V3:\n"); printf("\tObject ID = %u\n",InPckt->GetObjectID()); printf("\tArticulated Part ID = %u\n",InPckt->GetArtPartID()); printf("\tObject Class = %d : ",InPckt->GetObjectClass()); switch(InPckt->GetObjectClass()) { case 0: printf("Entity\n"); break; case 1: printf("ArtPart\n"); break; case 2: printf("View\n"); break; case 3: printf("ViewGrp\n"); break; case 4: printf("MotionTracker\n"); break; default: printf("\n"); break; } printf("\tCoordinate System = %d : ",InPckt->GetCoordSys()); switch(InPckt->GetCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("ParentEntity\n"); break; case 2: printf("Submodel\n"); break; default: printf("\n"); break; } printf("\tLat or X offset = %f\n",InPckt->GetLatOrXoff()); printf("\tLon or Y offset = %f\n",InPckt->GetLonOrYoff()); printf("\tAlt or Z offset = %f\n",InPckt->GetAltOrZoff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XPositionRespV3.h000066400000000000000000000011731210750432300231740ustar00rootroot00000000000000// XPositionRespV3.h: Interface for the XPositionRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XPOSITIONRESPV3_INCLUDED_) #define _PROC_XPOSITIONRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiPositionRespV3.h" class XPositionRespV3 : public CigiBaseEventProcessor { public: XPositionRespV3(); virtual ~XPositionRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiPositionRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiPositionRespV3 *TPckt; }; #endif // _PROC_XPOSITIONRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOF.cpp000066400000000000000000000007221210750432300213060ustar00rootroot00000000000000// XSOF.cpp: Body of the XSOF class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "XSOF.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSOF::XSOF() { } XSOF::~XSOF() { } void XSOF::OnPacketReceived(CigiBasePacket *Packet) { CigiSOFV3_2 *InPckt = (CigiSOFV3_2 *)Packet; } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOF.h000066400000000000000000000010111210750432300207430ustar00rootroot00000000000000// XSOF.h: interface for the XSOF class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSOF_INCLUDED_) #define _PROC_XSOF_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiBaseSOF.h" class XSOF : public CigiBaseEventProcessor { public: XSOF(); virtual ~XSOF(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiBaseSOF *TPcktIn) { TPckt = TPcktIn; } protected: CigiBaseSOF *TPckt; }; #endif // _PROC_XSOF_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV1.cpp000066400000000000000000000020441210750432300215140ustar00rootroot00000000000000// XSOFV1.cpp: Body of the XSOFV1 class. // ////////////////////////////////////////////////////////////////////// #include "XSOFV1.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSOFV1::XSOFV1() { } XSOFV1::~XSOFV1() { } void XSOFV1::OnPacketReceived(CigiBasePacket *Packet) { CigiSOFV1 *InPckt = (CigiSOFV1 *)Packet; printf("Start Of Frame V1:\n"); printf("\tDatabase ID = %d\n",InPckt->GetDatabaseID()); printf("\tIG Status = %u\n",InPckt->GetIGStatus()); printf("\tIG Mode = %d : ",InPckt->GetIGMode()); switch(InPckt->GetIGMode()) { case 0: printf("Reset\n"); break; case 1: printf("Operate\n"); break; case 2: printf("debug\n"); break; case 3: printf("OfflineMaint\n"); break; default: printf("\n"); break; } printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV1.h000066400000000000000000000010301210750432300211530ustar00rootroot00000000000000// XSOFV1.h: Interface for the XSOFV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSOFV1_INCLUDED_) #define _PROC_XSOFV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSOFV1.h" class XSOFV1 : public CigiBaseEventProcessor { public: XSOFV1(); virtual ~XSOFV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSOFV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSOFV1 *TPckt; }; #endif // _PROC_XSOFV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV2.cpp000066400000000000000000000021351210750432300215160ustar00rootroot00000000000000// XSOFV2.cpp: Body of the XSOFV2 class. // ////////////////////////////////////////////////////////////////////// #include "XSOFV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSOFV2::XSOFV2() { } XSOFV2::~XSOFV2() { } void XSOFV2::OnPacketReceived(CigiBasePacket *Packet) { CigiSOFV2 *InPckt = (CigiSOFV2 *)Packet; printf("Start Of Frame V2:\n"); printf("\tDatabase ID = %d\n",InPckt->GetDatabaseID()); printf("\tIG Status = %u\n",InPckt->GetIGStatus()); printf("\tIG Mode = %d : ",InPckt->GetIGMode()); switch(InPckt->GetIGMode()) { case 0: printf("Reset\n"); break; case 1: printf("Operate\n"); break; case 2: printf("debug\n"); break; case 3: printf("OfflineMaint\n"); break; default: printf("\n"); break; } printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr()); printf("\tTime Stamp = %f\n",InPckt->GetTimeStamp()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV2.h000066400000000000000000000010301210750432300211540ustar00rootroot00000000000000// XSOFV2.h: Interface for the XSOFV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSOFV2_INCLUDED_) #define _PROC_XSOFV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSOFV2.h" class XSOFV2 : public CigiBaseEventProcessor { public: XSOFV2(); virtual ~XSOFV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSOFV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSOFV2 *TPckt; }; #endif // _PROC_XSOFV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV3.cpp000066400000000000000000000026611210750432300215230ustar00rootroot00000000000000// XSOFV3.cpp: Body of the XSOFV3 class. // ////////////////////////////////////////////////////////////////////// #include "XSOFV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSOFV3::XSOFV3() { } XSOFV3::~XSOFV3() { } void XSOFV3::OnPacketReceived(CigiBasePacket *Packet) { CigiSOFV3 *InPckt = (CigiSOFV3 *)Packet; printf("Start Of Frame V3:\n"); printf("\tDatabase ID = %d\n",InPckt->GetDatabaseID()); printf("\tIG Status = %u\n",InPckt->GetIGStatus()); printf("\tIG Mode = %d : ",InPckt->GetIGMode()); switch(InPckt->GetIGMode()) { case 0: printf("Reset\n"); break; case 1: printf("Operate\n"); break; case 2: printf("debug\n"); break; case 3: printf("OfflineMaint\n"); break; default: printf("\n"); break; } printf("\tTime Stamp Valid = %d\n",InPckt->GetTimeStampValid()); printf("\tEarth Reference Model = %d : ",InPckt->GetEarthRefModel()); switch(InPckt->GetEarthRefModel()) { case 0: printf("WGS84\n"); break; case 1: printf("HostDefined\n"); break; default: printf("\n"); break; } printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr()); printf("\tTime Stamp = %u\n",InPckt->GetTimeStamp()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV3.h000066400000000000000000000010301210750432300211550ustar00rootroot00000000000000// XSOFV3.h: Interface for the XSOFV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSOFV3_INCLUDED_) #define _PROC_XSOFV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSOFV3.h" class XSOFV3 : public CigiBaseEventProcessor { public: XSOFV3(); virtual ~XSOFV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSOFV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSOFV3 *TPckt; }; #endif // _PROC_XSOFV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV3_2.cpp000066400000000000000000000031131210750432300217350ustar00rootroot00000000000000// XSOFV3_2.cpp: Body of the XSOFV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XSOFV3_2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSOFV3_2::XSOFV3_2() { } XSOFV3_2::~XSOFV3_2() { } void XSOFV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiSOFV3_2 *InPckt = (CigiSOFV3_2 *)Packet; printf("Start Of Frame V3_2:\n"); printf("\tDatabase ID = %u\n",InPckt->GetDatabaseID()); printf("\tIG Status = %u\n",InPckt->GetIGStatus()); printf("\tIG Mode = %d : ",InPckt->GetIGMode()); switch(InPckt->GetIGMode()) { case 0: printf("Reset\n"); break; case 1: printf("Standby\n"); break; case 2: printf("Operate\n"); break; case 3: printf("debug\n"); break; case 4: printf("OfflineMaint\n"); break; default: printf("\n"); break; } printf("\tTime Stamp Valid = %d\n",InPckt->GetTimeStampValid()); printf("\tEarth Reference Model = %d : ",InPckt->GetEarthRefModel()); switch(InPckt->GetEarthRefModel()) { case 0: printf("WGS84\n"); break; case 1: printf("HostDefined\n"); break; default: printf("\n"); break; } printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr()); printf("\tTime Stamp = %u\n",InPckt->GetTimeStamp()); printf("\tLast Received Host Frame = %u\n",InPckt->GetLastRcvdHostFrame()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSOFV3_2.h000066400000000000000000000010561210750432300214060ustar00rootroot00000000000000// XSOFV3_2.h: Interface for the XSOFV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSOFV3_2_INCLUDED_) #define _PROC_XSOFV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSOFV3_2.h" class XSOFV3_2 : public CigiBaseEventProcessor { public: XSOFV3_2(); virtual ~XSOFV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSOFV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSOFV3_2 *TPckt; }; #endif // _PROC_XSOFV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorRespV1.cpp000066400000000000000000000024541210750432300231750ustar00rootroot00000000000000// XSensorRespV1.cpp: Body of the XSensorRespV1 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorRespV1.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorRespV1::XSensorRespV1() { } XSensorRespV1::~XSensorRespV1() { } void XSensorRespV1::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorRespV1 *InPckt = (CigiSensorRespV1 *)Packet; printf("Sensor Response V1:\n"); printf("\tView ID = %u\n",InPckt->GetViewID()); printf("\tSensor ID = %u\n",InPckt->GetSensorID()); printf("\tSensor Status = %d : ",InPckt->GetSensorStat()); switch(InPckt->GetSensorStat()) { case 0: printf("Searching\n"); break; case 1: printf("Tracking\n"); break; case 2: printf("NearBrakeLock\n"); break; case 3: printf("BrakeLock\n"); break; default: printf("\n"); break; } printf("\tGate Size X = %u\n",InPckt->GetGateSzX()); printf("\tGate Size Y = %u\n",InPckt->GetGateSzY()); printf("\tGate X offset = %f\n",InPckt->GetGateXoff()); printf("\tGate Y offset = %f\n",InPckt->GetGateYoff()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorRespV1.h000066400000000000000000000011451210750432300226360ustar00rootroot00000000000000// XSensorRespV1.h: Interface for the XSensorRespV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSENSORRESPV1_INCLUDED_) #define _PROC_XSENSORRESPV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorRespV1.h" class XSensorRespV1 : public CigiBaseEventProcessor { public: XSensorRespV1(); virtual ~XSensorRespV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorRespV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorRespV1 *TPckt; }; #endif // _PROC_XSENSORRESPV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorRespV2.cpp000066400000000000000000000024541210750432300231760ustar00rootroot00000000000000// XSensorRespV2.cpp: Body of the XSensorRespV2 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorRespV2.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorRespV2::XSensorRespV2() { } XSensorRespV2::~XSensorRespV2() { } void XSensorRespV2::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorRespV2 *InPckt = (CigiSensorRespV2 *)Packet; printf("Sensor Response V2:\n"); printf("\tView ID = %u\n",InPckt->GetViewID()); printf("\tSensor ID = %u\n",InPckt->GetSensorID()); printf("\tSensor Status = %d : ",InPckt->GetSensorStat()); switch(InPckt->GetSensorStat()) { case 0: printf("Searching\n"); break; case 1: printf("Tracking\n"); break; case 2: printf("NearBrakeLock\n"); break; case 3: printf("BrakeLock\n"); break; default: printf("\n"); break; } printf("\tGate Size X = %u\n",InPckt->GetGateSzX()); printf("\tGate Size Y = %u\n",InPckt->GetGateSzY()); printf("\tGate X offset = %f\n",InPckt->GetGateXoff()); printf("\tGate Y offset = %f\n",InPckt->GetGateYoff()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorRespV2.h000066400000000000000000000011451210750432300226370ustar00rootroot00000000000000// XSensorRespV2.h: Interface for the XSensorRespV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSENSORRESPV2_INCLUDED_) #define _PROC_XSENSORRESPV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorRespV2.h" class XSensorRespV2 : public CigiBaseEventProcessor { public: XSensorRespV2(); virtual ~XSensorRespV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorRespV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorRespV2 *TPckt; }; #endif // _PROC_XSENSORRESPV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorRespV3.cpp000066400000000000000000000025501210750432300231740ustar00rootroot00000000000000// XSensorRespV3.cpp: Body of the XSensorRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorRespV3::XSensorRespV3() { } XSensorRespV3::~XSensorRespV3() { } void XSensorRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorRespV3 *InPckt = (CigiSensorRespV3 *)Packet; printf("Sensor Response V3:\n"); printf("\tView ID = %u\n",InPckt->GetViewID()); printf("\tSensor ID = %u\n",InPckt->GetSensorID()); printf("\tSensor Status = %d : ",InPckt->GetSensorStat()); switch(InPckt->GetSensorStat()) { case 0: printf("Searching\n"); break; case 1: printf("Tracking\n"); break; case 2: printf("NearBrakeLock\n"); break; case 3: printf("BrakeLock\n"); break; default: printf("\n"); break; } printf("\tGate Size X = %u\n",InPckt->GetGateSzX()); printf("\tGate Size Y = %u\n",InPckt->GetGateSzY()); printf("\tGate X offset = %f\n",InPckt->GetGateXoff()); printf("\tGate Y offset = %f\n",InPckt->GetGateYoff()); printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorRespV3.h000066400000000000000000000011451210750432300226400ustar00rootroot00000000000000// XSensorRespV3.h: Interface for the XSensorRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSENSORRESPV3_INCLUDED_) #define _PROC_XSENSORRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorRespV3.h" class XSensorRespV3 : public CigiBaseEventProcessor { public: XSensorRespV3(); virtual ~XSensorRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorRespV3 *TPckt; }; #endif // _PROC_XSENSORRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorXRespV3.cpp000066400000000000000000000032771210750432300233330ustar00rootroot00000000000000// XSensorXRespV3.cpp: Body of the XSensorXRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorXRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorXRespV3::XSensorXRespV3() { } XSensorXRespV3::~XSensorXRespV3() { } void XSensorXRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorXRespV3 *InPckt = (CigiSensorXRespV3 *)Packet; printf("Sensor Extended Response V3:\n"); printf("\tView ID = %u\n",InPckt->GetViewID()); printf("\tSensor ID = %u\n",InPckt->GetSensorID()); printf("\tSensor Status = %d : ",InPckt->GetSensorStat()); switch(InPckt->GetSensorStat()) { case 0: printf("Searching\n"); break; case 1: printf("Tracking\n"); break; case 2: printf("NearBrakeLock\n"); break; case 3: printf("BrakeLock\n"); break; default: printf("\n"); break; } printf("\tEntity Target = %d\n",InPckt->GetEntityTgt()); printf("\tEntity ID = %u\n",InPckt->GetEntityID()); printf("\tGate Size X = %u\n",InPckt->GetGateSzX()); printf("\tGate Size Y = %u\n",InPckt->GetGateSzY()); printf("\tGate X offset = %f\n",InPckt->GetGateXoff()); printf("\tGate Y offset = %f\n",InPckt->GetGateYoff()); printf("\tFrame Counter = %u\n",InPckt->GetFrameCntr()); printf("\tTrack Point Latitude = %f\n",InPckt->GetTrackPntLat()); printf("\tTrack Point Longitude = %f\n",InPckt->GetTrackPntLon()); printf("\tTrack Point Altitude = %f\n",InPckt->GetTrackPntAlt()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XSensorXRespV3.h000066400000000000000000000011601210750432300227650ustar00rootroot00000000000000// XSensorXRespV3.h: Interface for the XSensorXRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSENSORXRESPV3_INCLUDED_) #define _PROC_XSENSORXRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorXRespV3.h" class XSensorXRespV3 : public CigiBaseEventProcessor { public: XSensorXRespV3(); virtual ~XSensorXRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorXRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorXRespV3 *TPckt; }; #endif // _PROC_XSENSORXRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XTerrestrialSurfaceRespV3.cpp000066400000000000000000000016011210750432300255300ustar00rootroot00000000000000// XTerrestrialSurfaceRespV3.cpp: Body of the XTerrestrialSurfaceRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XTerrestrialSurfaceRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTerrestrialSurfaceRespV3::XTerrestrialSurfaceRespV3() { } XTerrestrialSurfaceRespV3::~XTerrestrialSurfaceRespV3() { } void XTerrestrialSurfaceRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiTerrestrialSurfaceRespV3 *InPckt = (CigiTerrestrialSurfaceRespV3 *)Packet; printf("Terrestrial Surface Response V3:\n"); printf("\tRequest ID = %u\n",InPckt->GetRequestID()); printf("\tSurface Condition ID = %u\n",InPckt->GetSurfaceConditionID()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XTerrestrialSurfaceRespV3.h000066400000000000000000000013511210750432300251770ustar00rootroot00000000000000// XTerrestrialSurfaceRespV3.h: Interface for the XTerrestrialSurfaceRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTERRESTRIALSURFACERESPV3_INCLUDED_) #define _PROC_XTERRESTRIALSURFACERESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTerrestrialSurfaceRespV3.h" class XTerrestrialSurfaceRespV3 : public CigiBaseEventProcessor { public: XTerrestrialSurfaceRespV3(); virtual ~XTerrestrialSurfaceRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTerrestrialSurfaceRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTerrestrialSurfaceRespV3 *TPckt; }; #endif // _PROC_XTERRESTRIALSURFACERESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XWeatherCondRespV3.cpp000066400000000000000000000022301210750432300241210ustar00rootroot00000000000000// XWeatherCondRespV3.cpp: Body of the XWeatherCondRespV3 class. // ////////////////////////////////////////////////////////////////////// #include "XWeatherCondRespV3.h" #include #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWeatherCondRespV3::XWeatherCondRespV3() { } XWeatherCondRespV3::~XWeatherCondRespV3() { } void XWeatherCondRespV3::OnPacketReceived(CigiBasePacket *Packet) { CigiWeatherCondRespV3 *InPckt = (CigiWeatherCondRespV3 *)Packet; printf("Weather Condition Response V3:\n"); printf("\tRequest ID = %u\n",InPckt->GetRequestID()); printf("\tHumidity = %u\n",InPckt->GetHumidity()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tVisibility = %f\n",InPckt->GetVisibility()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tVertical Wind Speed = %f\n",InPckt->GetVertWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); printf("\tBarometric Pressure = %f\n",InPckt->GetBaroPress()); } cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/XWeatherCondRespV3.h000066400000000000000000000012341210750432300235710ustar00rootroot00000000000000// XWeatherCondRespV3.h: Interface for the XWeatherCondRespV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWEATHERCONDRESPV3_INCLUDED_) #define _PROC_XWEATHERCONDRESPV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWeatherCondRespV3.h" class XWeatherCondRespV3 : public CigiBaseEventProcessor { public: XWeatherCondRespV3(); virtual ~XWeatherCondRespV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWeatherCondRespV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWeatherCondRespV3 *TPckt; }; #endif // _PROC_XWEATHERCONDRESPV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/stdafx.cpp000066400000000000000000000004411210750432300220160ustar00rootroot00000000000000// stdafx.cpp : source file that includes just the standard includes // HostRcvCcl.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/stdafx.h000066400000000000000000000004311210750432300214620ustar00rootroot00000000000000// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include #include // TODO: reference additional headers your program requires here cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/000077500000000000000000000000001210750432300225105ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v1/000077500000000000000000000000001210750432300230365ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v1/HostRcvCcl.def000066400000000000000000000005111210750432300255250ustar00rootroot00000000000000 127.0.0.1 8000 8001 1 0 false cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v2/000077500000000000000000000000001210750432300230375ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v2/HostRcvCcl.def000066400000000000000000000005111210750432300255260ustar00rootroot00000000000000 127.0.0.1 8000 8001 2 0 false cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v3/000077500000000000000000000000001210750432300230405ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v3/HostRcvCcl.def000066400000000000000000000005111210750432300255270ustar00rootroot00000000000000 127.0.0.1 8000 8001 3 0 false cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v3_2/000077500000000000000000000000001210750432300232615ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostRcvCcl/testingRepos/v3_2/HostRcvCcl.def000066400000000000000000000005111210750432300257500ustar00rootroot00000000000000 127.0.0.1 8000 8001 3 2 false cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/000077500000000000000000000000001210750432300201615ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/AllCigi.h000066400000000000000000000004231210750432300216350ustar00rootroot00000000000000#include "CigiAllPackets.h" #include "CigiErrorCodes.h" #include "CigiException.h" #include "CigiExceptions.h" #include "CigiOutgoingMsg.h" #include "CigiHostSession.h" #include "CigiIGSession.h" #include "CigiIncomingMsg.h" #include "CigiSwapping.h" #include "CigiIO.h" cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/DefaultProc.cpp000066400000000000000000000023341210750432300230770ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "DefaultProc.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::DefaultProc() { } // ================================================ // ~DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::~DefaultProc() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void DefaultProc::OnPacketReceived(CigiBasePacket *Packet) { } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/DefaultProc.h000066400000000000000000000027011210750432300225420ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) #define _DEFAULT_PACKET_PROCESSING_INCLUDED_ #include using namespace std; //========================================================= //! The base class for the SOF Event Packet Processing //! class DefaultProc : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! DefaultProc(); //========================================================= //! General Destructor //! virtual ~DefaultProc(); //==> Incoming Packet Processing //========================================================= //! The callback handler for the CIGI SOF packet //! \param Packet - The pointer to the SOF packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/HostSendCcl.cpp000066400000000000000000000247621210750432300230510ustar00rootroot00000000000000// HostSendCcl.cpp : Defines the entry point for the console application. // /**
 *  The CIGI MiniHost
 *  Copyright (c) 2004 The Boeing Company
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 *  FILENAME:   HostSendCcl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *
 *  PROGRAM DESCRIPTION:
 *  This class contains the data and methods necessary to
 *   test certain portions of CIGI.
 *
 *
 * 
* The Boeing Company * 1.0 */ #include "Network.h" // network includes winsock2.h which must be included before windows.h #include "StdAfx.h" // Tiny XML includes #define TINYXML_USE_STL #define TIXML_USE_STL #include #include // CIGI related includes // From CCL #include #include #include #include #include #include #include // System includes #include #include #include #ifdef WIN32 #include #include #endif #include // Test Includes #include "XSOF.h" #include "DefaultProc.h" #include "OutputProc3.h" #include "OutputProc2.h" #include "OutputProc1.h" // Special database information structure typedef struct Database_info { int id; double lat; double lon; double alt; } DbInfo; //using namespace std; // ================================================ // Global variables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Networking class/object Network network; // CIGI specific static CigiHostSession *HostSn; static CigiOutgoingMsg *OmsgPtr; static CigiIncomingMsg *ImsgPtr; OutputProcessor *OutProc; XSOF *Pr_SOF = NULL; DefaultProc *Pr_Default = NULL; static CigiIGCtrlV3_3 CIGC3_3; static CigiIGCtrlV3_2 CIGC3_2; static CigiIGCtrlV3 CIGC3; static CigiIGCtrlV2 CIGC2; static CigiIGCtrlV1 CIGC1; static CigiBaseIGCtrl *pCIGC; // CIGI network message buffers and information int recvLen; static unsigned char *pCigiOutBuf; #define RECV_BUFFER_SIZE 32768 static unsigned char CInBuf[RECV_BUFFER_SIZE]; static int CigiInSz; static int CigiOutSz; static string IGAddr; static int Port_H2IG; static int Port_IG2H; static int MajorVer; static int MinorVer; static string CsvFile; // The database information int CurrentDB; std::list dblist; std::list::iterator idbl; // ================================================ // Pre-declaration of Local routines // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void); int init_cigi_if(void); // ================================================ // Main // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int _tmain(int argc, _TCHAR* argv[]) { CigiInSz = 0; ReadConfig(); if(dblist.empty()) { cout << "\n\nNo Database Information!\n\n"; return(0); } init_cigi_if(); /* CIGI messaging */ CigiOutgoingMsg &Omsg = *OmsgPtr; Omsg.BeginMsg(); while(1) { /* process incoming CIGI message - this should be short */ if( CigiInSz > 0 ) { try { ImsgPtr->ProcessIncomingMsg((unsigned char *)CInBuf,CigiInSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } } // load the IG Control Omsg << *pCIGC; OutProc->Out(); // Do packaging here to // Package msg try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // wait for Start Of Frame long HoldTime; bool RcvrProc = false; long CheckTime = time(&HoldTime); while(!RcvrProc) { if((CigiInSz = network.recv( CInBuf, RECV_BUFFER_SIZE )) > 0) RcvrProc = true; else { long TstTime = time(&HoldTime); if((TstTime - CheckTime) > 1) { cout << "Did not receive SOF\n"; RcvrProc = true; CigiInSz = 0; } } } if(pCigiOutBuf != NULL) { if(CigiInSz > 0) Omsg.UpdateIGCtrl(pCigiOutBuf,CInBuf); else Omsg.UpdateIGCtrl(pCigiOutBuf,NULL); // send CIGI message int sentBytes = network.send(pCigiOutBuf,CigiOutSz); } Omsg.FreeMsg(); // Frees the buffer containing the message that was just sent } // shut down the network network.closeSocket(); delete HostSn; delete Pr_SOF; delete Pr_Default; delete OutProc; return 0; } // ================================================ // Read Configuration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void) { TiXmlNode *bnode = NULL; // base node TiXmlText *ParseTxt = NULL; TiXmlHandle *hConfig = NULL; // pointer to a Config handle TiXmlElement *Config = NULL; TiXmlText *DbDta = NULL; TiXmlDocument doc("MiniHost.def"); bool stat = doc.LoadFile(); //set default values Port_H2IG = 8000; Port_IG2H = 8001; IGAddr = "127.0.0.1"; MajorVer = 3; MinorVer = 2; if(stat) { bnode = doc.FirstChild("MiniHostInitialization"); if(bnode == NULL) stat = false; // The file is not a Mission Function Initialization file } if(stat) { // get base configuration Config = bnode->FirstChildElement("Config"); if(Config != NULL) { hConfig = new TiXmlHandle(Config); ParseTxt = hConfig->FirstChildElement("IG_Addr").Child(0).Text(); if(ParseTxt) IGAddr = ParseTxt->Value(); ParseTxt = hConfig->FirstChildElement("Port_To_IG").Child(0).Text(); Port_H2IG = (ParseTxt) ? atoi(ParseTxt->Value()) : 8000; ParseTxt = hConfig->FirstChildElement("Port_From_IG").Child(0).Text(); Port_IG2H = (ParseTxt) ? atoi(ParseTxt->Value()) : 8001; ParseTxt = hConfig->FirstChildElement("Major_Version_Cigi").Child(0).Text(); MajorVer = (ParseTxt) ? atoi(ParseTxt->Value()) : 0; if((MajorVer == 1) || (MajorVer == 2)) MinorVer = 0; else if(MajorVer == 3) { ParseTxt = hConfig->FirstChildElement("Minor_Version_Cigi").Child(0).Text(); MinorVer = (ParseTxt) ? atoi(ParseTxt->Value()) : 0; if(MinorVer < 2) MinorVer = 0; else if(MinorVer > 3) MinorVer = 3; } ParseTxt = hConfig->FirstChildElement("Csv_File_Name").Child(0).Text(); if(ParseTxt) CsvFile = ParseTxt->Value(); else CsvFile.clear(); delete hConfig; } // get Database configuration Config = bnode->FirstChildElement("DBase"); while(Config != NULL) { hConfig = new TiXmlHandle(Config); DbInfo *pDbInfo = new DbInfo; DbDta = hConfig->FirstChildElement("ID").Child(0).Text(); pDbInfo->id = (DbDta) ? atoi(DbDta->Value()) : 5; DbDta = hConfig->FirstChildElement("Lat").Child(0).Text(); pDbInfo->lat = (DbDta) ? atof(DbDta->Value()) : 0.0; DbDta = hConfig->FirstChildElement("Lon").Child(0).Text(); pDbInfo->lon = (DbDta) ? atof(DbDta->Value()) : 0.0; DbDta = hConfig->FirstChildElement("Alt").Child(0).Text(); pDbInfo->alt = (DbDta) ? atof(DbDta->Value()) : 0.0; dblist.push_back(pDbInfo); Config = Config->NextSiblingElement("DBase"); } } } // ================================================ // Initialize interface to CIGI // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int init_cigi_if(void) { int err_status = 0; /* open sockets to CIGI */ // hostemu-ip-addr, hostemu-socket, local-socket printf("init_cigi_if: initializing ports to CIGI\n"); bool netstatus = network.openSocket( IGAddr.c_str(), Port_H2IG, Port_IG2H ); if( !netstatus ) { printf( "could not connect to CIGI IG server\n" ); exit( 1 ); } else { printf( "successfully connected to CIGI IG server\n" ); } HostSn = new CigiHostSession(1,32768,2,32768); CigiOutgoingMsg &Omsg = HostSn->GetOutgoingMsgMgr(); CigiIncomingMsg &Imsg = HostSn->GetIncomingMsgMgr(); OmsgPtr = &Omsg; ImsgPtr = &Imsg; HostSn->SetCigiVersion(MajorVer,MinorVer); HostSn->SetSynchronous(true); Imsg.SetReaderCigiVersion(MajorVer,MinorVer); Imsg.UsingIteration(false); // Version specific items pCIGC = &CIGC3_3; int tSOF_ID = CIGI_SOF_PACKET_ID_V3_2; OutProc = NULL; if(MajorVer == 3) { if(MinorVer < 2) { tSOF_ID = CIGI_SOF_PACKET_ID_V3; pCIGC = &CIGC3; } else { tSOF_ID = CIGI_SOF_PACKET_ID_V3_2; if(MinorVer < 3) pCIGC = &CIGC3_2; else pCIGC = &CIGC3_3; } OutProc = new OutputProcessor3; } else if(MajorVer == 2) { tSOF_ID = CIGI_SOF_PACKET_ID_V2; pCIGC = &CIGC2; OutProc = new OutputProcessor2; } else if(MajorVer == 1) { tSOF_ID = CIGI_SOF_PACKET_ID_V1; pCIGC = &CIGC1; OutProc = new OutputProcessor1; } if(OutProc == NULL) { MajorVer = 3; MinorVer = 3; OutProc = new OutputProcessor3; } // SOF Pr_SOF = new XSOF; Imsg.RegisterEventProcessor(tSOF_ID, (CigiBaseEventProcessor *) Pr_SOF); // Default Packet Processor Pr_Default = new DefaultProc; Imsg.RegisterEventProcessor(0, (CigiBaseEventProcessor *) Pr_Default); // Initialize the outgoing message processor OutProc->Init(HostSn,CsvFile,MajorVer,MinorVer); // initialize the IG Control pCIGC->SetDatabaseID(0,false); pCIGC->SetIGMode(CigiBaseIGCtrl::Operate); CIGC3.SetTimeStampValid(false); CIGC3_2.SetTimeStampValid(false); return err_status; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/HostSendCcl.sln000066400000000000000000000016771210750432300230630ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HostSendCcl", "HostSendCcl.vcproj", "{1CED9940-4F43-4301-BAC0-6C54A1F05A87}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {1CED9940-4F43-4301-BAC0-6C54A1F05A87}.Debug.ActiveCfg = Debug|Win32 {1CED9940-4F43-4301-BAC0-6C54A1F05A87}.Debug.Build.0 = Debug|Win32 {1CED9940-4F43-4301-BAC0-6C54A1F05A87}.Release.ActiveCfg = Release|Win32 {1CED9940-4F43-4301-BAC0-6C54A1F05A87}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/HostSendCcl.vcproj000066400000000000000000000344061210750432300235660ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc.cpp000066400000000000000000000050561210750432300230170ustar00rootroot00000000000000// OutputProcessor.cpp: implementation of the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor::OutputProcessor() { HostSn = NULL; OmsgPtr = NULL; HPrsLn = NULL; CsvFile = "HostData.csv"; TstID = 0; } OutputProcessor::~OutputProcessor() { if(HPrsLn != NULL) delete HPrsLn; list::iterator iPrs; for(iPrs=Parsers.begin();iPrs!=Parsers.end();iPrs++) { if(*iPrs != NULL) delete *iPrs; } Parsers.clear(); } void OutputProcessor::Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer) { HostSn = HostSnIn; CigiOutgoingMsg &Omsg = HostSn->GetOutgoingMsgMgr(); OmsgPtr = &Omsg; list::iterator iPrs; for(iPrs=Parsers.begin();iPrs!=Parsers.end();iPrs++) { (*iPrs)->Init(OmsgPtr); } HPrsLn = new ParseLine; TstID = 0; if(!CsvFileNm.empty()) CsvFile = CsvFileNm; } bool OutputProcessor::Out() { static ifstream Hinfl(CsvFile.c_str(),ios::in); bool Valid = true; if(Hinfl.is_open() != 0) { if(!Hinfl.eof()) { Hinfl.getline(line,511); if(line[0] != 0) { HPrsLn->ParseBuf(line); ProcLine(*HPrsLn); } } else { Hinfl.close(); Valid = false; } } else Valid = false; return(Valid); } void OutputProcessor::ProcLine(ParseLine &PrsLn) { if(OmsgPtr == NULL) return; TstID++; printf("\n\n================================\nHOST Output Test No. %d\nvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n",TstID); ParseValue *pPV = PrsLn.Get1stVal(); string CmpStr = pPV->GetStr(); list::iterator iPrs; for(iPrs=Parsers.begin();iPrs!=Parsers.end();iPrs++) { if(*((*iPrs)->GetPcktID()) == (char *)pPV->GetStr()) { (*iPrs)->ProcPckt(pPV); break; } } printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",TstID); } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc.h000066400000000000000000000015771210750432300224700ustar00rootroot00000000000000// OutputProcessor.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_INCLUDED_) #define _OUTPUT_PROCESSOR_INCLUDED_ #include "AllCigi.h" #include #include class PcktParsingProcessor; class ParseLine; class ParseValue; class OutputProcessor { public: OutputProcessor(); virtual ~OutputProcessor(); virtual void Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer); bool Out(void); void ProcLine(ParseLine &PrsLn); protected: CigiHostSession *HostSn; CigiOutgoingMsg *OmsgPtr; std::string CsvFile; std::list Parsers; ParseLine *HPrsLn; char line[512]; int TstID; }; #endif // !defined(_OUTPUT_PROCESSOR_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc1.cpp000066400000000000000000000046441210750432300231020ustar00rootroot00000000000000// OutputProcessor1.cpp: implementation of the OutputProcessor1 class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc1.h" #include "Proc_ArtPartCtrlV1.h" #include "Proc_CollDetSegDefV1.h" #include "Proc_CompCtrlV1.h" #include "Proc_EntityCtrlV1.h" #include "Proc_SensorCtrlV1.h" #include "Proc_TrajectoryV1.h" #include "Proc_ViewCtrlV1.h" #include "Proc_ViewDefV1.h" #include "Proc_WeatherCtrlV1.h" #include "Proc_RateCtrlV1.h" #include "Proc_LosSegReqV1.h" #include "Proc_LosVectReqV1.h" #include "Proc_EnvCtrlV1.h" #include "Proc_SpecialEffectV1.h" #include "Proc_HatReqV1.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor1::OutputProcessor1() { } OutputProcessor1::~OutputProcessor1() { } void OutputProcessor1::Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer) { Parsers.push_back((PcktParsingProcessor *)(new Proc_ArtPartCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetSegDefV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CompCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EntityCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_TrajectoryV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ViewCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ViewDefV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_WeatherCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_RateCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosSegReqV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosVectReqV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EnvCtrlV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SpecialEffectV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HatReqV1)); OutputProcessor::Init(HostSnIn, CsvFileNm, MajorVer, MinorVer); } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc1.h000066400000000000000000000010761210750432300225430ustar00rootroot00000000000000// OutputProcessor1.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_1_INCLUDED_) #define _OUTPUT_PROCESSOR_1_INCLUDED_ #include "OutputProc.h" class OutputProcessor1 : public OutputProcessor { public: OutputProcessor1(); virtual ~OutputProcessor1(); virtual void Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer); }; #endif // !defined(_OUTPUT_PROCESSOR_1_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc2.cpp000066400000000000000000000051561210750432300231020ustar00rootroot00000000000000// OutputProcessor2.cpp: implementation of the OutputProcessor2 class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc2.h" #include "Proc_ArtPartCtrlV2.h" #include "Proc_CollDetSegDefV2.h" #include "Proc_CollDetVolDefV2.h" #include "Proc_CompCtrlV2.h" #include "Proc_EntityCtrlV2.h" #include "Proc_SensorCtrlV2.h" #include "Proc_TrajectoryV2.h" #include "Proc_ViewCtrlV2.h" #include "Proc_ViewDefV2.h" #include "Proc_WeatherCtrlV2.h" #include "Proc_RateCtrlV2.h" #include "Proc_LosSegReqV2.h" #include "Proc_LosVectReqV2.h" #include "Proc_EnvCtrlV2.h" #include "Proc_SpecialEffectV2.h" #include "Proc_HatReqV2.h" #include "Proc_HotReqV2.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor2::OutputProcessor2() { } OutputProcessor2::~OutputProcessor2() { } void OutputProcessor2::Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer) { Parsers.push_back((PcktParsingProcessor *)(new Proc_ArtPartCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetSegDefV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetVolDefV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CompCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EntityCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_TrajectoryV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ViewCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ViewDefV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_WeatherCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_RateCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosSegReqV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosVectReqV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EnvCtrlV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SpecialEffectV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HatReqV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HotReqV2)); OutputProcessor::Init(HostSnIn, CsvFileNm, MajorVer, MinorVer); } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc2.h000066400000000000000000000010761210750432300225440ustar00rootroot00000000000000// OutputProcessor2.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_2_INCLUDED_) #define _OUTPUT_PROCESSOR_2_INCLUDED_ #include "OutputProc.h" class OutputProcessor2 : public OutputProcessor { public: OutputProcessor2(); virtual ~OutputProcessor2(); virtual void Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer); }; #endif // !defined(_OUTPUT_PROCESSOR_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc3.cpp000066400000000000000000000135141210750432300231000ustar00rootroot00000000000000// OutputProcessor3.cpp: implementation of the OutputProcessor3 class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc3.h" #include "Proc_ArtPartCtrlV3.h" #include "Proc_AtmosCtrlV3.h" #include "Proc_CelestialCtrlV3.h" #include "Proc_CollDetSegDefV3.h" #include "Proc_CollDetVolDefV3.h" #include "Proc_CompCtrlV3.h" #include "Proc_ConfClampEntityCtrlV3.h" #include "Proc_EarthModelDefV3.h" #include "Proc_EntityCtrlV3.h" #include "Proc_EntityCtrlV3_3.h" #include "Proc_EnvCondReqV3.h" #include "Proc_EnvRgnCtrlV3.h" #include "Proc_MaritimeSurfaceCtrlV3.h" #include "Proc_MotionTrackCtrlV3.h" #include "Proc_PositionReqV3.h" #include "Proc_SensorCtrlV3.h" #include "Proc_ShortArtPartCtrlV3.h" #include "Proc_ShortCompCtrlV3.h" #include "Proc_TerrestrialSurfaceCtrlV3.h" #include "Proc_TrajectoryV3.h" #include "Proc_ViewCtrlV3.h" #include "Proc_ViewDefV3.h" #include "Proc_WaveCtrlV3.h" #include "Proc_WeatherCtrlV3.h" #include "Proc_RateCtrlV3.h" #include "Proc_HatHotReqV3.h" #include "Proc_LosSegReqV3.h" #include "Proc_LosVectReqV3.h" #include "Proc_RateCtrlV3_2.h" #include "Proc_HatHotReqV3_2.h" #include "Proc_LosSegReqV3_2.h" #include "Proc_LosVectReqV3_2.h" #include "Proc_CompCtrlV3_3.h" #include "Proc_ShortCompCtrlV3_3.h" #include "Proc_SymbolSurfaceDefV3_3.h" #include "Proc_SymbolCtrlV3_3.h" #include "Proc_ShortSymbolCtrlV3_3.h" #include "Proc_SymbolTextDefV3_3.h" #include "Proc_SymbolCircleDefV3_3.h" #include "Proc_SymbolLineDefV3_3.h" #include "Proc_SymbolCloneV3_3.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor3::OutputProcessor3() { } OutputProcessor3::~OutputProcessor3() { } void OutputProcessor3::Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer) { if(MajorVer == 3) { Parsers.push_back((PcktParsingProcessor *)(new Proc_ArtPartCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_AtmosCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CelestialCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetSegDefV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetVolDefV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ConfClampEntityCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EarthModelDefV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EnvCondReqV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EnvRgnCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_MaritimeSurfaceCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_MotionTrackCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_PositionReqV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ShortArtPartCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_TerrestrialSurfaceCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_TrajectoryV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ViewCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ViewDefV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_WaveCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_WeatherCtrlV3)); if(MinorVer < 2) { Parsers.push_back((PcktParsingProcessor *)(new Proc_EntityCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_RateCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HatHotReqV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosSegReqV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosVectReqV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CompCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ShortCompCtrlV3)); } else { Parsers.push_back((PcktParsingProcessor *)(new Proc_HatHotReqV3_2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosSegReqV3_2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosVectReqV3_2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_RateCtrlV3_2)); if(MinorVer < 3) { Parsers.push_back((PcktParsingProcessor *)(new Proc_EntityCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CompCtrlV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ShortCompCtrlV3)); } else { Parsers.push_back((PcktParsingProcessor *)(new Proc_EntityCtrlV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CompCtrlV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ShortCompCtrlV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SymbolSurfaceDefV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SymbolCtrlV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_ShortSymbolCtrlV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SymbolTextDefV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SymbolCircleDefV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SymbolLineDefV3_3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SymbolCloneV3_3)); } } } OutputProcessor::Init(HostSnIn, CsvFileNm, MajorVer, MinorVer); } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/OutputProc3.h000066400000000000000000000010761210750432300225450ustar00rootroot00000000000000// OutputProcessor3.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_3_INCLUDED_) #define _OUTPUT_PROCESSOR_3_INCLUDED_ #include "OutputProc.h" class OutputProcessor3 : public OutputProcessor { public: OutputProcessor3(); virtual ~OutputProcessor3(); virtual void Init(CigiHostSession *HostSnIn, string &CsvFileNm, int MajorVer, int MinorVer); }; #endif // !defined(_OUTPUT_PROCESSOR_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/ParseLine.cpp000066400000000000000000000025571210750432300225600ustar00rootroot00000000000000// ParseLine.cpp: implementation of the ParseLine class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "ParseLine.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// ParseLine::ParseLine() { Val1 = NULL; ValCnt = 0; } ParseLine::ParseLine(char *Buff) { Val1 = NULL; ValCnt = 0; ParseBuf(Buff); } ParseLine::~ParseLine() { Clear(); } void ParseLine::Clear() { ParseValue *Crnt; ParseValue *Nxt; Crnt = Val1; while(Crnt != NULL) { Nxt = Crnt->nxt(); delete Crnt; Crnt = Nxt; } Val1 = NULL; } void ParseLine::ParseBuf(char *Buff) { char tbuf[255]; char *p = Buff; char *b = tbuf; bool go = true; ParseValue *cVal = new ParseValue; Val1 = cVal; ValCnt = 1; while(go) { switch(*p) { case ',': *b = 0; cVal->SetDta(tbuf); cVal->Next = new ParseValue; cVal = cVal->Next; b = tbuf; ValCnt++; break; case 0x0a: case 0x0d: case 0: go = false; *b = 0; cVal->SetDta(tbuf); cVal->Next = NULL; break; default: *b++ = *p; break; } p++; } } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/ParseLine.h000066400000000000000000000013471210750432300222210ustar00rootroot00000000000000// ParseLine.h: interface for the ParseLine class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_PARSELINE_H__A40EAAC5_829E_43DF_A3FD_03C9D565A6EB__INCLUDED_) #define AFX_PARSELINE_H__A40EAAC5_829E_43DF_A3FD_03C9D565A6EB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class ParseValue; #include "ParseValue.h" class ParseLine { public: ParseLine(); ParseLine(char *Buff); virtual ~ParseLine(); void ParseBuf(char *Buff); ParseValue * Get1stVal() { return(Val1); } void Clear(); int GetValCnt() { return(ValCnt); } protected: int ValCnt; ParseValue * Val1; }; #endif // !defined(AFX_PARSELINE_H__A40EAAC5_829E_43DF_A3FD_03C9D565A6EB__INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/ParseValue.cpp000066400000000000000000000027121210750432300227360ustar00rootroot00000000000000// ParseValue.cpp: implementation of the ParseValue class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "ParseValue.h" #include "stdlib.h" #include "string.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// ParseValue::ParseValue() { memset(dta,0,255); Next = NULL; } ParseValue::~ParseValue() { } unsigned char ParseValue::GetUChar() { int t = atoi(dta); unsigned char tuc = (unsigned char)t; return(tuc); } char ParseValue::GetChar() { int t = atoi(dta); char tc = (char)t; return(tc); } unsigned short ParseValue::GetUShort() { int t = atoi(dta); unsigned short tus = (unsigned short)t; return(tus); } short ParseValue::GetShort() { int t = atoi(dta); short ts = (short)t; return(ts); } unsigned long ParseValue::GetULong() { union cnvt { long l; unsigned long ul; } td; td.l = atol(dta); return(td.ul); } long ParseValue::GetLong() { return(atol(dta)); } float ParseValue::Getfloat() { double td = atof(dta); float tf = (float)td; return(tf); } double ParseValue::Getdouble() { return(atof(dta)); } bool ParseValue::GetBool() { bool rslt = false; if((dta[0] == 'T')||(dta[0] == 't')) rslt = true; return(rslt); } void ParseValue::SetDta(char *buf) { strcpy(dta,buf); } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/ParseValue.h000066400000000000000000000016271210750432300224070ustar00rootroot00000000000000// ParseValue.h: interface for the ParseValue class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_PARSEVALUE_H__57CC0107_2674_49FA_A326_8E383F2E1735__INCLUDED_) #define AFX_PARSEVALUE_H__57CC0107_2674_49FA_A326_8E383F2E1735__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class ParseLine; #include "ParseLine.h" class ParseValue { friend class ParseLine; public: void SetDta(char *buf); ParseValue(); virtual ~ParseValue(); char *GetStr() { return(dta); } unsigned char GetUChar(); char GetChar(); unsigned short GetUShort(); short GetShort(); unsigned long GetULong(); long GetLong(); float Getfloat(); double Getdouble(); bool GetBool(); ParseValue * nxt() { return(Next); } protected: char dta[255]; ParseValue * Next; }; #endif // !defined(AFX_PARSEVALUE_H__57CC0107_2674_49FA_A326_8E383F2E1735__INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/PcktParsingProcessor.h000066400000000000000000000014161210750432300244610ustar00rootroot00000000000000// PcktParsingProcessor.h: interface for the Packet Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PACKET_PARSING_PROCESSOR_INCLUDED_) #define _PACKET_PARSING_PROCESSOR_INCLUDED_ #include "AllCigi.h" #include class ParseValue; class PcktParsingProcessor { public: PcktParsingProcessor(void) { Omsg = NULL; } virtual ~PcktParsingProcessor(void) { } std::string * GetPcktID(void) { return(&PcktID); } void Init(CigiOutgoingMsg *OmsgIn) { Omsg = OmsgIn; } virtual void ProcPckt(ParseValue *pPV) = 0; protected: std::string PcktID; CigiOutgoingMsg *Omsg; char *DefHex; }; #endif // _PACKET_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ArtPartCtrlV1.cpp000066400000000000000000000166151210750432300242720ustar00rootroot00000000000000// Proc_ArtPartCtrlV1.cpp: implementation of the Proc_ArtPartCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ArtPartCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ArtPartCtrlV1::Proc_ArtPartCtrlV1() { PcktID = "ArtPartCtrl"; } Proc_ArtPartCtrlV1::~Proc_ArtPartCtrlV1() { } void Proc_ArtPartCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Articulated Part Control:\n"); if(pPV != NULL) { try { Om_ArtPartCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetArtPartID(pPV->GetUChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetArtPartEn(pPV->GetBool(),true); printf("\tArticulated Part Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetXOffEn(pPV->GetBool(),true); printf("\tX Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYOffEn(pPV->GetBool(),true); printf("\tY Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetZOffEn(pPV->GetBool(),true); printf("\tZ Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetRollEn(pPV->GetBool(),true); printf("\tRoll Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetPitchEn(pPV->GetBool(),true); printf("\tPitch Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYawEn(pPV->GetBool(),true); printf("\tYaw Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because X Offset gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_ArtPartCtrl.SetXOff(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tX Offset = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Y Offset gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_ArtPartCtrl.SetYOff(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tY Offset = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Z Offset gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_ArtPartCtrl.SetZOff(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tZ Offset = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Roll gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_ArtPartCtrl.SetRoll(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.0054931654f); float df = ((float)ti) * 0.0054931654f; printf("\tRoll = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Pitch gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_ArtPartCtrl.SetPitch(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.0054931654f); float df = ((float)ti) * 0.0054931654f; printf("\tPitch = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Yaw gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_ArtPartCtrl.SetYaw(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.0054931654f); float df = ((float)ti) * 0.0054931654f; printf("\tYaw = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ArtPartCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ArtPartCtrlV1.h000066400000000000000000000012131210750432300237230ustar00rootroot00000000000000// Proc_ArtPartCtrlV1.h: interface for the Proc_ArtPartCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ArtPartCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ArtPartCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ArtPartCtrlV1 : public PcktParsingProcessor { public: Proc_ArtPartCtrlV1(void); virtual ~Proc_ArtPartCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiArtPartCtrlV1 Om_ArtPartCtrl; }; #endif // _Proc_ArtPartCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ArtPartCtrlV2.cpp000066400000000000000000000132771210750432300242740ustar00rootroot00000000000000// Proc_ArtPartCtrlV2.cpp: implementation of the Proc_ArtPartCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ArtPartCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ArtPartCtrlV2::Proc_ArtPartCtrlV2() { PcktID = "ArtPartCtrl"; } Proc_ArtPartCtrlV2::~Proc_ArtPartCtrlV2() { } void Proc_ArtPartCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Articulated Part Control:\n"); if(pPV != NULL) { try { Om_ArtPartCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetArtPartID(pPV->GetChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetArtPartEn(pPV->GetBool(),true); printf("\tArticulated Part Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetXOffEn(pPV->GetBool(),true); printf("\tX Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYOffEn(pPV->GetBool(),true); printf("\tY Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetZOffEn(pPV->GetBool(),true); printf("\tZ Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetRollEn(pPV->GetBool(),true); printf("\tRoll Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetPitchEn(pPV->GetBool(),true); printf("\tPitch Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYawEn(pPV->GetBool(),true); printf("\tYaw Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetXOff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYOff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetZOff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ArtPartCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ArtPartCtrlV2.h000066400000000000000000000012131210750432300237240ustar00rootroot00000000000000// Proc_ArtPartCtrlV2.h: interface for the Proc_ArtPartCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ArtPartCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ArtPartCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ArtPartCtrlV2 : public PcktParsingProcessor { public: Proc_ArtPartCtrlV2(void); virtual ~Proc_ArtPartCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiArtPartCtrlV2 Om_ArtPartCtrl; }; #endif // _Proc_ArtPartCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ArtPartCtrlV3.cpp000066400000000000000000000133001210750432300242600ustar00rootroot00000000000000// Proc_ArtPartCtrlV3.cpp: implementation of the Proc_ArtPartCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ArtPartCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ArtPartCtrlV3::Proc_ArtPartCtrlV3() { PcktID = "ArtPartCtrl"; } Proc_ArtPartCtrlV3::~Proc_ArtPartCtrlV3() { } void Proc_ArtPartCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Articulated Part Control:\n"); if(pPV != NULL) { try { Om_ArtPartCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetArtPartID(pPV->GetUChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetArtPartEn(pPV->GetBool(),true); printf("\tArticulated Part Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetXOffEn(pPV->GetBool(),true); printf("\tX Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYOffEn(pPV->GetBool(),true); printf("\tY Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetZOffEn(pPV->GetBool(),true); printf("\tZ Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetRollEn(pPV->GetBool(),true); printf("\tRoll Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetPitchEn(pPV->GetBool(),true); printf("\tPitch Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYawEn(pPV->GetBool(),true); printf("\tYaw Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetXOff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYOff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetZOff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ArtPartCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ArtPartCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ArtPartCtrlV3.h000066400000000000000000000012131210750432300237250ustar00rootroot00000000000000// Proc_ArtPartCtrlV3.h: interface for the Proc_ArtPartCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ArtPartCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ArtPartCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ArtPartCtrlV3 : public PcktParsingProcessor { public: Proc_ArtPartCtrlV3(void); virtual ~Proc_ArtPartCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiArtPartCtrlV3 Om_ArtPartCtrl; }; #endif // _Proc_ArtPartCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_AtmosCtrlV3.cpp000066400000000000000000000067631210750432300240050ustar00rootroot00000000000000// Proc_AtmosCtrlV3.cpp: implementation of the Proc_AtmosCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_AtmosCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_AtmosCtrlV3::Proc_AtmosCtrlV3() { PcktID = "AtmosCtrl"; } Proc_AtmosCtrlV3::~Proc_AtmosCtrlV3() { } void Proc_AtmosCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Atmosphere Control:\n"); if(pPV != NULL) { try { Om_AtmosCtrl.SetAtmosEn(pPV->GetBool(),true); printf("\tAtmosphere Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetHumidity(pPV->GetUChar(),true); printf("\tHumidity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetVisibility(pPV->Getfloat(),true); printf("\tVisibility = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetVertWindSp(pPV->Getfloat(),true); printf("\tVertical Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AtmosCtrl.SetBaroPress(pPV->Getfloat(),true); printf("\tBarometric Pressure = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_AtmosCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_AtmosCtrlV3.h000066400000000000000000000011631210750432300234370ustar00rootroot00000000000000// Proc_AtmosCtrlV3.h: interface for the Proc_AtmosCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_AtmosCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_AtmosCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_AtmosCtrlV3 : public PcktParsingProcessor { public: Proc_AtmosCtrlV3(void); virtual ~Proc_AtmosCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiAtmosCtrlV3 Om_AtmosCtrl; }; #endif // _Proc_AtmosCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CelestialCtrlV3.cpp000066400000000000000000000106671210750432300246250ustar00rootroot00000000000000// Proc_CelestialCtrlV3.cpp: implementation of the Proc_CelestialCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CelestialCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CelestialCtrlV3::Proc_CelestialCtrlV3() { PcktID = "CelestialCtrl"; } Proc_CelestialCtrlV3::~Proc_CelestialCtrlV3() { } void Proc_CelestialCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Celestial Control:\n"); if(pPV != NULL) { try { Om_CelestialCtrl.SetHour(pPV->GetUChar(),true); printf("\tHour = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetMinute(pPV->GetUChar(),true); printf("\tMinute = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetEphemerisEn(pPV->GetBool(),true); printf("\tEphemeris Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetSunEn(pPV->GetBool(),true); printf("\tSun Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetMoonEn(pPV->GetBool(),true); printf("\tMoon Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetStarEn(pPV->GetBool(),true); printf("\tStar Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetDateVld(pPV->GetBool(),true); printf("\tDate Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetMonth(pPV->GetUChar(),true); printf("\tMonth = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetDay(pPV->GetUChar(),true); printf("\tDay = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetYear(pPV->GetUShort(),true); printf("\tYear = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CelestialCtrl.SetStarInt(pPV->Getfloat(),true); printf("\tStar Intensity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CelestialCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CelestialCtrlV3.h000066400000000000000000000012371210750432300242630ustar00rootroot00000000000000// Proc_CelestialCtrlV3.h: interface for the Proc_CelestialCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CelestialCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CelestialCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CelestialCtrlV3 : public PcktParsingProcessor { public: Proc_CelestialCtrlV3(void); virtual ~Proc_CelestialCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCelestialCtrlV3 Om_CelestialCtrl; }; #endif // _Proc_CelestialCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetSegDefV1.cpp000066400000000000000000000134571210750432300244750ustar00rootroot00000000000000// Proc_CollDetSegDefV1.cpp: implementation of the Proc_CollDetSegDefV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetSegDefV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetSegDefV1::Proc_CollDetSegDefV1() { PcktID = "CollDetSegDef"; } Proc_CollDetSegDefV1::~Proc_CollDetSegDefV1() { } void Proc_CollDetSegDefV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Collision Detection Segment Definition:\n"); if(pPV != NULL) { try { Om_CollDetSegDef.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetSegmentID(pPV->GetUChar(),true); printf("\tSegment ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetSegmentEn(pPV->GetBool(),true); printf("\tSegment Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Start X gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetX1(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tStart X = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Start Y gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetY1(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tStart Y = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Start Z gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetZ1(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tStart Z = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because End X gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetX2(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tEnding X = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because End Y gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetY2(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tEnding Y = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because End Z gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetZ2(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tEnding Z = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CollDetSegDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetSegDefV1.h000066400000000000000000000012411210750432300241260ustar00rootroot00000000000000// Proc_CollDetSegDefV1.h: interface for the Proc_CollDetSegDefV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CollDetSegDefV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CollDetSegDefV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CollDetSegDefV1 : public PcktParsingProcessor { public: Proc_CollDetSegDefV1(void); virtual ~Proc_CollDetSegDefV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetSegDefV1 Om_CollDetSegDef; }; #endif // _Proc_CollDetSegDefV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetSegDefV2.cpp000066400000000000000000000134571210750432300244760ustar00rootroot00000000000000// Proc_CollDetSegDefV2.cpp: implementation of the Proc_CollDetSegDefV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetSegDefV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetSegDefV2::Proc_CollDetSegDefV2() { PcktID = "CollDetSegDef"; } Proc_CollDetSegDefV2::~Proc_CollDetSegDefV2() { } void Proc_CollDetSegDefV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Collision Detection Segment Definition:\n"); if(pPV != NULL) { try { Om_CollDetSegDef.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetSegmentID(pPV->GetUChar(),true); printf("\tSegment ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetSegmentEn(pPV->GetBool(),true); printf("\tSegment Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Start X gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetX1(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tStart X = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Start Y gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetY1(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tStart Y = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Start Z gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetZ1(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tStart Z = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because End X gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetX2(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tEnding X = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because End Y gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetY2(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tEnding Y = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because End Z gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetSegDef.SetZ2(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tEnding Z = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CollDetSegDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetSegDefV2.h000066400000000000000000000012411210750432300241270ustar00rootroot00000000000000// Proc_CollDetSegDefV2.h: interface for the Proc_CollDetSegDefV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CollDetSegDefV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CollDetSegDefV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CollDetSegDefV2 : public PcktParsingProcessor { public: Proc_CollDetSegDefV2(void); virtual ~Proc_CollDetSegDefV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetSegDefV2 Om_CollDetSegDef; }; #endif // _Proc_CollDetSegDefV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetSegDefV3.cpp000066400000000000000000000101731210750432300244670ustar00rootroot00000000000000// Proc_CollDetSegDefV3.cpp: implementation of the Proc_CollDetSegDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetSegDefV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetSegDefV3::Proc_CollDetSegDefV3() { PcktID = "CollDetSegDef"; } Proc_CollDetSegDefV3::~Proc_CollDetSegDefV3() { } void Proc_CollDetSegDefV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Collision Detection Segment Definition:\n"); if(pPV != NULL) { try { Om_CollDetSegDef.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetSegmentID(pPV->GetUChar(),true); printf("\tSegment ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetSegmentEn(pPV->GetBool(),true); printf("\tSegment Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetX1(pPV->Getfloat(),true); printf("\tStart X = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetY1(pPV->Getfloat(),true); printf("\tStart Y = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetZ1(pPV->Getfloat(),true); printf("\tStart Z = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetX2(pPV->Getfloat(),true); printf("\tEnding X = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetY2(pPV->Getfloat(),true); printf("\tEnding Y = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetZ2(pPV->Getfloat(),true); printf("\tEnding Z = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegDef.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CollDetSegDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetSegDefV3.h000066400000000000000000000012411210750432300241300ustar00rootroot00000000000000// Proc_CollDetSegDefV3.h: interface for the Proc_CollDetSegDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CollDetSegDefV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CollDetSegDefV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CollDetSegDefV3 : public PcktParsingProcessor { public: Proc_CollDetSegDefV3(void); virtual ~Proc_CollDetSegDefV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetSegDefV3 Om_CollDetSegDef; }; #endif // _Proc_CollDetSegDefV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetVolDefV2.cpp000066400000000000000000000130201210750432300245020ustar00rootroot00000000000000// Proc_CollDetVolDefV2.cpp: implementation of the Proc_CollDetVolDefV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetVolDefV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetVolDefV2::Proc_CollDetVolDefV2() { PcktID = "CollDetVolDef"; } Proc_CollDetVolDefV2::~Proc_CollDetVolDefV2() { } void Proc_CollDetVolDefV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Collision Detection Volume Definition:\n"); if(pPV != NULL) { try { Om_CollDetVolDef.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetVolID(pPV->GetUChar(),true); printf("\tVolume ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetVolEn(pPV->GetBool(),true); printf("\tVolume Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because X Offset gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetVolDef.SetXoff(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tX Offset = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Y Offset gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetVolDef.SetYoff(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tY Offset = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Z Offset gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetVolDef.SetZoff(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tZ Offset = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Height Or Radius gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetVolDef.SetHeightOrRadius(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tHeight or Radius = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Width gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetVolDef.SetWidth(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tWidth = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Depth gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_CollDetVolDef.SetDepth(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tDepth = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CollDetVolDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetVolDefV2.h000066400000000000000000000012411210750432300241510ustar00rootroot00000000000000// Proc_CollDetVolDefV2.h: interface for the Proc_CollDetVolDefV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CollDetVolDefV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CollDetVolDefV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CollDetVolDefV2 : public PcktParsingProcessor { public: Proc_CollDetVolDefV2(void); virtual ~Proc_CollDetVolDefV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetVolDefV2 Om_CollDetVolDef; }; #endif // _Proc_CollDetVolDefV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetVolDefV3.cpp000066400000000000000000000125511210750432300245130ustar00rootroot00000000000000// Proc_CollDetVolDefV3.cpp: implementation of the Proc_CollDetVolDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetVolDefV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetVolDefV3::Proc_CollDetVolDefV3() { PcktID = "CollDetVolDef"; } Proc_CollDetVolDefV3::~Proc_CollDetVolDefV3() { } void Proc_CollDetVolDefV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Collision Detection Volume Definition:\n"); if(pPV != NULL) { try { Om_CollDetVolDef.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetVolID(pPV->GetUChar(),true); printf("\tVolume ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetVolEn(pPV->GetBool(),true); printf("\tVolume Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Sphere",pPV->GetStr()) == 0) { Om_CollDetVolDef.SetVolType(CigiBaseCollDetVolDef::Sphere,true); printf("\tVolume Type = 0 : Sphere\n"); } else if(strcmp("Cuboid",pPV->GetStr()) == 0) { Om_CollDetVolDef.SetVolType(CigiBaseCollDetVolDef::Cuboid,true); printf("\tVolume Type = 1 : Cuboid\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetXoff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetYoff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetZoff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetHeightOrRadius(pPV->Getfloat(),true); printf("\tHeight or Radius = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetWidth(pPV->Getfloat(),true); printf("\tWidth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetDepth(pPV->Getfloat(),true); printf("\tDepth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolDef.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CollDetVolDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CollDetVolDefV3.h000066400000000000000000000012411210750432300241520ustar00rootroot00000000000000// Proc_CollDetVolDefV3.h: interface for the Proc_CollDetVolDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CollDetVolDefV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CollDetVolDefV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CollDetVolDefV3 : public PcktParsingProcessor { public: Proc_CollDetVolDefV3(void); virtual ~Proc_CollDetVolDefV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetVolDefV3 Om_CollDetVolDef; }; #endif // _Proc_CollDetVolDefV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV1.cpp000066400000000000000000000071731210750432300236120ustar00rootroot00000000000000// Proc_CompCtrlV1.cpp: implementation of the Proc_CompCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CompCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CompCtrlV1::Proc_CompCtrlV1() { PcktID = "CompCtrl"; } Proc_CompCtrlV1::~Proc_CompCtrlV1() { } void Proc_CompCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Component Control:\n"); if(pPV != NULL) { try { Om_CompCtrl.SetCompID(pPV->GetUShort(),true); printf("\tComp ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetViewID(pPV->GetUChar(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Entity",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompAssoc(CigiBaseCompCtrl::Entity,true); printf("\tComp Class = 0 : Entity\n"); } else if(strcmp("Environment",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompAssoc(CigiBaseCompCtrl::Environment,true); printf("\tComp Class = 1 : Environment\n"); } else if(strcmp("View",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompAssoc(CigiBaseCompCtrl::View,true); printf("\tComp Class = 2 : View\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompState(pPV->GetUShort(),true); printf("\tComponent State = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tComponent Data 0 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tComponent Data 1 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CompCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV1.h000066400000000000000000000011521210750432300232460ustar00rootroot00000000000000// Proc_CompCtrlV1.h: interface for the Proc_CompCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CompCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CompCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CompCtrlV1 : public PcktParsingProcessor { public: Proc_CompCtrlV1(void); virtual ~Proc_CompCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCompCtrlV1 Om_CompCtrl; }; #endif // _Proc_CompCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV2.cpp000066400000000000000000000076761210750432300236230ustar00rootroot00000000000000// Proc_CompCtrlV2.cpp: implementation of the Proc_CompCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CompCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CompCtrlV2::Proc_CompCtrlV2() { PcktID = "CompCtrl"; } Proc_CompCtrlV2::~Proc_CompCtrlV2() { } void Proc_CompCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Component Control:\n"); if(pPV != NULL) { try { Om_CompCtrl.SetCompID(pPV->GetUShort(),true); printf("\tComp ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetInstanceID(pPV->GetUShort(),true); printf("\tInstance ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("EntityV2",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV2(CigiBaseCompCtrl::EntityV2,true); printf("\tComp Class = 0 : EntityV2\n"); } else if(strcmp("EnvironmentV2",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV2(CigiBaseCompCtrl::EnvironmentV2,true); printf("\tComp Class = 1 : EnvironmentV2\n"); } else if(strcmp("ViewV2",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV2(CigiBaseCompCtrl::ViewV2,true); printf("\tComp Class = 2 : ViewV2\n"); } else if(strcmp("ViewGrpV2",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV2(CigiBaseCompCtrl::ViewGrpV2,true); printf("\tComp Class = 3 : ViewGrpV2\n"); } else if(strcmp("SensorV2",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV2(CigiBaseCompCtrl::SensorV2,true); printf("\tComp Class = 4 : SensorV2\n"); } else if(strcmp("SystemV2",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV2(CigiBaseCompCtrl::SystemV2,true); printf("\tComp Class = 5 : SystemV2\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompState(pPV->GetUShort(),true); printf("\tComponent State = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tComponent Data 0 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tComponent Data 1 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CompCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV2.h000066400000000000000000000011521210750432300232470ustar00rootroot00000000000000// Proc_CompCtrlV2.h: interface for the Proc_CompCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CompCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CompCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CompCtrlV2 : public PcktParsingProcessor { public: Proc_CompCtrlV2(void); virtual ~Proc_CompCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCompCtrlV2 Om_CompCtrl; }; #endif // _Proc_CompCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV3.cpp000066400000000000000000000162161210750432300236120ustar00rootroot00000000000000// Proc_CompCtrlV3.cpp: implementation of the Proc_CompCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CompCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CompCtrlV3::Proc_CompCtrlV3() { PcktID = "CompCtrl"; } Proc_CompCtrlV3::~Proc_CompCtrlV3() { } void Proc_CompCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Component Control:\n"); if(pPV != NULL) { try { Om_CompCtrl.SetCompID(pPV->GetUShort(),true); printf("\tComp ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetInstanceID(pPV->GetUShort(),true); printf("\tInstance ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("EntityV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::EntityV3,true); printf("\tComp Class = 0 : EntityV3\n"); } else if(strcmp("ViewV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewV3,true); printf("\tComp Class = 1 : ViewV3\n"); } else if(strcmp("ViewGrpV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewGrpV3,true); printf("\tComp Class = 2 : ViewGrpV3\n"); } else if(strcmp("SensorV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::SensorV3,true); printf("\tComp Class = 3 : SensorV3\n"); } else if(strcmp("RegionalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalSeaSurfaceV3,true); printf("\tComp Class = 4 : RegionalSeaSurfaceV3\n"); } else if(strcmp("RegionalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalTerrainSurfaceV3,true); printf("\tComp Class = 5 : RegionalTerrainSurfaceV3\n"); } else if(strcmp("RegionalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalLayeredWeatherV3,true); printf("\tComp Class = 6 : RegionalLayeredWeatherV3\n"); } else if(strcmp("GlobalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalSeaSurfaceV3,true); printf("\tComp Class = 7 : GlobalSeaSurfaceV3\n"); } else if(strcmp("GlobalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalTerrainSurfaceV3,true); printf("\tComp Class = 8 : GlobalTerrainSurfaceV3\n"); } else if(strcmp("GlobalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalLayeredWeatherV3,true); printf("\tComp Class = 9 : GlobalLayeredWeatherV3\n"); } else if(strcmp("AtmosphereV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::AtmosphereV3,true); printf("\tComp Class = 10 : AtmosphereV3\n"); } else if(strcmp("CelestialSphereV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::CelestialSphereV3,true); printf("\tComp Class = 11 : CelestialSphereV3\n"); } else if(strcmp("EventV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::EventV3,true); printf("\tComp Class = 12 : EventV3\n"); } else if(strcmp("SystemV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::SystemV3,true); printf("\tComp Class = 13 : SystemV3\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompState(pPV->GetUChar(),true); printf("\tComponent State = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tComponent Data 0 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tComponent Data 1 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),2,true); printf("\tComponent Data 2 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),3,true); printf("\tComponent Data 3 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),4,true); printf("\tComponent Data 4 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),5,true); printf("\tComponent Data 5 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CompCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV3.h000066400000000000000000000011521210750432300232500ustar00rootroot00000000000000// Proc_CompCtrlV3.h: interface for the Proc_CompCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CompCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CompCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CompCtrlV3 : public PcktParsingProcessor { public: Proc_CompCtrlV3(void); virtual ~Proc_CompCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCompCtrlV3 Om_CompCtrl; }; #endif // _Proc_CompCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV3_3.cpp000066400000000000000000000171311210750432300240310ustar00rootroot00000000000000// Proc_CompCtrlV3_3.cpp: implementation of the Proc_CompCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CompCtrlV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CompCtrlV3_3::Proc_CompCtrlV3_3() { PcktID = "CompCtrl"; } Proc_CompCtrlV3_3::~Proc_CompCtrlV3_3() { } void Proc_CompCtrlV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Component Control:\n"); if(pPV != NULL) { try { Om_CompCtrl.SetCompID(pPV->GetUShort(),true); printf("\tComp ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetInstanceID(pPV->GetUShort(),true); printf("\tInstance ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("EntityV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::EntityV3,true); printf("\tComp Class = 0 : EntityV3\n"); } else if(strcmp("ViewV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewV3,true); printf("\tComp Class = 1 : ViewV3\n"); } else if(strcmp("ViewGrpV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewGrpV3,true); printf("\tComp Class = 2 : ViewGrpV3\n"); } else if(strcmp("SensorV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::SensorV3,true); printf("\tComp Class = 3 : SensorV3\n"); } else if(strcmp("RegionalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalSeaSurfaceV3,true); printf("\tComp Class = 4 : RegionalSeaSurfaceV3\n"); } else if(strcmp("RegionalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalTerrainSurfaceV3,true); printf("\tComp Class = 5 : RegionalTerrainSurfaceV3\n"); } else if(strcmp("RegionalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalLayeredWeatherV3,true); printf("\tComp Class = 6 : RegionalLayeredWeatherV3\n"); } else if(strcmp("GlobalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalSeaSurfaceV3,true); printf("\tComp Class = 7 : GlobalSeaSurfaceV3\n"); } else if(strcmp("GlobalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalTerrainSurfaceV3,true); printf("\tComp Class = 8 : GlobalTerrainSurfaceV3\n"); } else if(strcmp("GlobalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalLayeredWeatherV3,true); printf("\tComp Class = 9 : GlobalLayeredWeatherV3\n"); } else if(strcmp("AtmosphereV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::AtmosphereV3,true); printf("\tComp Class = 10 : AtmosphereV3\n"); } else if(strcmp("CelestialSphereV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::CelestialSphereV3,true); printf("\tComp Class = 11 : CelestialSphereV3\n"); } else if(strcmp("EventV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::EventV3,true); printf("\tComp Class = 12 : EventV3\n"); } else if(strcmp("SystemV3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::SystemV3,true); printf("\tComp Class = 13 : SystemV3\n"); } else if(strcmp("SymbolSurfaceV3_3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::SymbolSurfaceV3_3,true); printf("\tComp Class = 14 : SymbolSurfaceV3_3\n"); } else if(strcmp("SymbolV3_3",pPV->GetStr()) == 0) { Om_CompCtrl.SetCompClassV3(CigiBaseCompCtrl::SymbolV3_3,true); printf("\tComp Class = 15 : SymbolV3_3\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompState(pPV->GetUChar(),true); printf("\tComponent State = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tComponent Data 0 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tComponent Data 1 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),2,true); printf("\tComponent Data 2 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),3,true); printf("\tComponent Data 3 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),4,true); printf("\tComponent Data 4 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),5,true); printf("\tComponent Data 5 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_CompCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_CompCtrlV3_3.h000066400000000000000000000011761210750432300235000ustar00rootroot00000000000000// Proc_CompCtrlV3_3.h: interface for the Proc_CompCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_CompCtrlV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_CompCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_CompCtrlV3_3 : public PcktParsingProcessor { public: Proc_CompCtrlV3_3(void); virtual ~Proc_CompCtrlV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiCompCtrlV3_3 Om_CompCtrl; }; #endif // _Proc_CompCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ConfClampEntityCtrlV3.cpp000066400000000000000000000044541210750432300257540ustar00rootroot00000000000000// Proc_ConfClampEntityCtrlV3.cpp: implementation of the Proc_ConfClampEntityCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ConfClampEntityCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ConfClampEntityCtrlV3::Proc_ConfClampEntityCtrlV3() { PcktID = "ConfClampEntityCtrl"; } Proc_ConfClampEntityCtrlV3::~Proc_ConfClampEntityCtrlV3() { } void Proc_ConfClampEntityCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Conformal Clamped Entity Control:\n"); if(pPV != NULL) { try { Om_ConfClampEntityCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ConfClampEntityCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ConfClampEntityCtrl.SetLat(pPV->Getdouble(),true); printf("\tLat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ConfClampEntityCtrl.SetLon(pPV->Getdouble(),true); printf("\tLon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ConfClampEntityCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ConfClampEntityCtrlV3.h000066400000000000000000000013431210750432300254130ustar00rootroot00000000000000// Proc_ConfClampEntityCtrlV3.h: interface for the Proc_ConfClampEntityCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ConfClampEntityCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ConfClampEntityCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ConfClampEntityCtrlV3 : public PcktParsingProcessor { public: Proc_ConfClampEntityCtrlV3(void); virtual ~Proc_ConfClampEntityCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiConfClampEntityCtrlV3 Om_ConfClampEntityCtrl; }; #endif // _Proc_ConfClampEntityCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EarthModelDefV3.cpp000066400000000000000000000037351210750432300245340ustar00rootroot00000000000000// Proc_EarthModelDefV3.cpp: implementation of the Proc_EarthModelDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EarthModelDefV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EarthModelDefV3::Proc_EarthModelDefV3() { PcktID = "EarthModelDef"; } Proc_EarthModelDefV3::~Proc_EarthModelDefV3() { } void Proc_EarthModelDefV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Earth Reference Model Definition:\n"); if(pPV != NULL) { try { Om_EarthModelDef.SetCustomERMEn(pPV->GetBool(),true); printf("\tCustom Earth Reference Model Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EarthModelDef.SetEquatorialRadius(pPV->Getdouble(),true); printf("\tEquatorial Radius = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EarthModelDef.SetFlattening(pPV->Getdouble(),true); printf("\tFlattening = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EarthModelDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EarthModelDefV3.h000066400000000000000000000012411210750432300241670ustar00rootroot00000000000000// Proc_EarthModelDefV3.h: interface for the Proc_EarthModelDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EarthModelDefV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EarthModelDefV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EarthModelDefV3 : public PcktParsingProcessor { public: Proc_EarthModelDefV3(void); virtual ~Proc_EarthModelDefV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEarthModelDefV3 Om_EarthModelDef; }; #endif // _Proc_EarthModelDefV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV1.cpp000066400000000000000000000166501210750432300241700ustar00rootroot00000000000000// Proc_EntityCtrlV1.cpp: implementation of the Proc_EntityCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EntityCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EntityCtrlV1::Proc_EntityCtrlV1() { PcktID = "EntityCtrl"; } Proc_EntityCtrlV1::~Proc_EntityCtrlV1() { } void Proc_EntityCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Entity Control\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_EntityCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Destruct",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiEntityCtrlV1::DestructV1,true); printf("\tEntity State = 0 : DestructV1\n"); } else if(strcmp("Construct",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiEntityCtrlV1::ConstructV1,true); printf("\tEntity State = 1 : ConstructV1\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Detach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Detach,true); printf("\tAttach State = 0 : Detach\n"); } else if(strcmp("Attach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Attach,true); printf("\tAttach State = 1 : Attach\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Disable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Disable,true); printf("\tCollision Detection Enable = 0 : Disable\n"); } else if(strcmp("Enable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Enable,true); printf("\tCollision Detection Enable = 1 : Enable\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NoAction",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV1::NoActionV1,true); printf("\tAnimation State = 0 : NoActionV1\n"); } else if(strcmp("Load",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV1::LoadV1,true); printf("\tAnimation State = 1 : LoadV1\n"); } else if(strcmp("LoadActivate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV1::LoadActivateV1,true); printf("\tAnimation State = 2 : LoadActivateV1\n"); } else if(strcmp("Activate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV1::ActivateV1,true); printf("\tAnimation State = 3 : ActivateV1\n"); } else if(strcmp("Deactivate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV1::DeactivateV1,true); printf("\tAnimation State = 4 : DeactivateV1\n"); } else if(strcmp("DeactivateUnload",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV1::DeactivateUnloadV1,true); printf("\tAnimation State = 5 : DeactivateUnloadV1\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetEntityType(pPV->GetUShort(),true); printf("\tEntity Type = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetParentID(pPV->GetUShort(),true); printf("\tParent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetTemp(pPV->Getfloat(),true); printf("\tTemperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetHeading(pPV->Getfloat(),true); printf("\tHeading = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetZoff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EntityCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV1.h000066400000000000000000000012001210750432300236160ustar00rootroot00000000000000// Proc_EntityCtrlV1.h: interface for the Proc_EntityCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EntityCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EntityCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EntityCtrlV1 : public PcktParsingProcessor { public: Proc_EntityCtrlV1(void); virtual ~Proc_EntityCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEntityCtrlV1 Om_EntityCtrl; }; #endif // _Proc_EntityCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV2.cpp000066400000000000000000000163661210750432300241750ustar00rootroot00000000000000// Proc_EntityCtrlV2.cpp: implementation of the Proc_EntityCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EntityCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EntityCtrlV2::Proc_EntityCtrlV2() { PcktID = "EntityCtrl"; } Proc_EntityCtrlV2::~Proc_EntityCtrlV2() { } void Proc_EntityCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Entity Control\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_EntityCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Standby",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiEntityCtrlV2::LoadHideV2,true); printf("\tEntity State = 0 : LoadHideV2\n"); } else if(strcmp("Active",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiEntityCtrlV2::LoadShowV2,true); printf("\tEntity State = 1 : LoadShowV2\n"); } else if(strcmp("Remove",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiEntityCtrlV2::UnloadV2,true); printf("\tEntity State = 2 : UnloadV2\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Detach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Detach,true); printf("\tAttach State = 0 : Detach\n"); } else if(strcmp("Attach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Attach,true); printf("\tAttach State = 1 : Attach\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Disable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Disable,true); printf("\tCollision Detection Enable = 0 : Disable\n"); } else if(strcmp("Enable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Enable,true); printf("\tCollision Detection Enable = 1 : Enable\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Stop",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV2::StopV2,true); printf("\tAnimation State = 0 : StopV2\n"); } else if(strcmp("Play",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV2::PlayV2,true); printf("\tAnimation State = 1 : PlayV2\n"); } else if(strcmp("Restart",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEffectState(CigiEntityCtrlV2::RestartV2,true); printf("\tAnimation State = 2 : RestartV2\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetEntityType(pPV->GetUShort(),true); printf("\tEntity Type = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetParentID(pPV->GetUShort(),true); printf("\tParent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetOpacity(pPV->Getfloat(),true); printf("\tOpacity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetTemp(pPV->Getfloat(),true); printf("\tTemperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetHeading(pPV->Getfloat(),true); printf("\tHeading = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EntityCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV2.h000066400000000000000000000012001210750432300236170ustar00rootroot00000000000000// Proc_EntityCtrlV2.h: interface for the Proc_EntityCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EntityCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EntityCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EntityCtrlV2 : public PcktParsingProcessor { public: Proc_EntityCtrlV2(void); virtual ~Proc_EntityCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEntityCtrlV2 Om_EntityCtrl; }; #endif // _Proc_EntityCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV3.cpp000066400000000000000000000261341210750432300241700ustar00rootroot00000000000000// Proc_EntityCtrlV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EntityCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EntityCtrlV3::Proc_EntityCtrlV3() { PcktID = "EntityCtrl"; } Proc_EntityCtrlV3::~Proc_EntityCtrlV3() { } void Proc_EntityCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Entity Control\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_EntityCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Standby",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiBaseEntityCtrl::Standby,true); printf("\tEntity State = 0 : Standby\n"); } else if(strcmp("Active",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiBaseEntityCtrl::Active,true); printf("\tEntity State = 1 : Active\n"); } else if(strcmp("Remove",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiBaseEntityCtrl::Remove,true); printf("\tEntity State = 2 : Remove\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Detach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Detach,true); printf("\tAttach State = 0 : Detach\n"); } else if(strcmp("Attach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Attach,true); printf("\tAttach State = 1 : Attach\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Disable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Disable,true); printf("\tCollision Detection Enable = 0 : Disable\n"); } else if(strcmp("Enable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Enable,true); printf("\tCollision Detection Enable = 1 : Enable\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NoInherit",pPV->GetStr()) == 0) { Om_EntityCtrl.SetInheritAlpha(CigiBaseEntityCtrl::NoInherit,true); printf("\tInherit Alpha = 0 : NoInherit\n"); } else if(strcmp("Inherit",pPV->GetStr()) == 0) { Om_EntityCtrl.SetInheritAlpha(CigiBaseEntityCtrl::Inherit,true); printf("\tInherit Alpha = 1 : Inherit\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NoClamp",pPV->GetStr()) == 0) { Om_EntityCtrl.SetGrndClamp(CigiBaseEntityCtrl::NoClamp,true); printf("\tGround Clamp = 0 : NoClamp\n"); } else if(strcmp("AltClamp",pPV->GetStr()) == 0) { Om_EntityCtrl.SetGrndClamp(CigiBaseEntityCtrl::AltClamp,true); printf("\tGround Clamp = 1 : Altitude Clamp\n"); } else if(strcmp("AltAttClamp",pPV->GetStr()) == 0) { Om_EntityCtrl.SetGrndClamp(CigiBaseEntityCtrl::AltAttClamp,true); printf("\tGround Clamp = 2 : Conformal Clamp\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Forward",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationDir(CigiBaseEntityCtrl::Forward,true); printf("\tAnimation Direction = 0 : Forward\n"); } else if(strcmp("Backward",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationDir(CigiBaseEntityCtrl::Backward,true); printf("\tAnimation Direction = 1 : Backward\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("OneShot",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationLoopMode(CigiBaseEntityCtrl::OneShot,true); printf("\tAnimation Loop Mode = 0 : OneShot\n"); } else if(strcmp("Continuous",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationLoopMode(CigiBaseEntityCtrl::Continuous,true); printf("\tAnimation Loop Mode = 1 : Continuous\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Stop",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Stop,true); printf("\tAnimation State = 0 : Stop\n"); } else if(strcmp("Pause",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Pause,true); printf("\tAnimation State = 1 : Pause\n"); } else if(strcmp("Play",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Play,true); printf("\tAnimation State = 2 : Play\n"); } else if(strcmp("Continue",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Continue,true); printf("\tAnimation State = 3 : Continue\n"); } else if(strcmp("NoAction",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::NoAction,true); printf("\tAnimation State = NoAction\n"); } else if(strcmp("Load",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Load,true); printf("\tAnimation State = Load\n"); } else if(strcmp("LoadActivate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::LoadActivate,true); printf("\tAnimation State = LoadActivate\n"); } else if(strcmp("Activate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Activate,true); printf("\tAnimation State = Activate\n"); } else if(strcmp("Deactivate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Deactivate,true); printf("\tAnimation State = Deactivate\n"); } else if(strcmp("DeactivateUnload",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::DeactivateUnload,true); printf("\tAnimation State = DeactivateUnload\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetAlpha(pPV->GetUChar(),true); printf("\tAlpha = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetEntityType(pPV->GetUShort(),true); printf("\tEntity Type = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetParentID(pPV->GetUShort(),true); printf("\tParent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EntityCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV3.h000066400000000000000000000012001210750432300236200ustar00rootroot00000000000000// Proc_EntityCtrlV3.h: interface for the Proc_EntityCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EntityCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EntityCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EntityCtrlV3 : public PcktParsingProcessor { public: Proc_EntityCtrlV3(void); virtual ~Proc_EntityCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEntityCtrlV3 Om_EntityCtrl; }; #endif // _Proc_EntityCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV3_3.cpp000066400000000000000000000270011210750432300244040ustar00rootroot00000000000000// Proc_EntityCtrlV3_3.cpp: implementation of the Proc_EntityCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EntityCtrlV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EntityCtrlV3_3::Proc_EntityCtrlV3_3() { PcktID = "EntityCtrl"; } Proc_EntityCtrlV3_3::~Proc_EntityCtrlV3_3() { } void Proc_EntityCtrlV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Entity Control\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_EntityCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Standby",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiBaseEntityCtrl::Standby,true); printf("\tEntity State = 0 : Standby\n"); } else if(strcmp("Active",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiBaseEntityCtrl::Active,true); printf("\tEntity State = 1 : Active\n"); } else if(strcmp("Remove",pPV->GetStr()) == 0) { Om_EntityCtrl.SetEntityState(CigiBaseEntityCtrl::Remove,true); printf("\tEntity State = 2 : Remove\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Detach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Detach,true); printf("\tAttach State = 0 : Detach\n"); } else if(strcmp("Attach",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAttachState(CigiBaseEntityCtrl::Attach,true); printf("\tAttach State = 1 : Attach\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Disable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Disable,true); printf("\tCollision Detection Enable = 0 : Disable\n"); } else if(strcmp("Enable",pPV->GetStr()) == 0) { Om_EntityCtrl.SetCollisionDetectEn(CigiBaseEntityCtrl::Enable,true); printf("\tCollision Detection Enable = 1 : Enable\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NoInherit",pPV->GetStr()) == 0) { Om_EntityCtrl.SetInheritAlpha(CigiBaseEntityCtrl::NoInherit,true); printf("\tInherit Alpha = 0 : NoInherit\n"); } else if(strcmp("Inherit",pPV->GetStr()) == 0) { Om_EntityCtrl.SetInheritAlpha(CigiBaseEntityCtrl::Inherit,true); printf("\tInherit Alpha = 1 : Inherit\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NoClamp",pPV->GetStr()) == 0) { Om_EntityCtrl.SetGrndClamp(CigiBaseEntityCtrl::NoClamp,true); printf("\tGround Clamp = 0 : NoClamp\n"); } else if(strcmp("AltClamp",pPV->GetStr()) == 0) { Om_EntityCtrl.SetGrndClamp(CigiBaseEntityCtrl::AltClamp,true); printf("\tGround Clamp = 1 : Altitude Clamp\n"); } else if(strcmp("AltAttClamp",pPV->GetStr()) == 0) { Om_EntityCtrl.SetGrndClamp(CigiBaseEntityCtrl::AltAttClamp,true); printf("\tGround Clamp = 2 : Conformal Clamp\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Forward",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationDir(CigiBaseEntityCtrl::Forward,true); printf("\tAnimation Direction = 0 : Forward\n"); } else if(strcmp("Backward",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationDir(CigiBaseEntityCtrl::Backward,true); printf("\tAnimation Direction = 1 : Backward\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("OneShot",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationLoopMode(CigiBaseEntityCtrl::OneShot,true); printf("\tAnimation Loop Mode = 0 : OneShot\n"); } else if(strcmp("Continuous",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationLoopMode(CigiBaseEntityCtrl::Continuous,true); printf("\tAnimation Loop Mode = 1 : Continuous\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Stop",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Stop,true); printf("\tAnimation State = 0 : Stop\n"); } else if(strcmp("Pause",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Pause,true); printf("\tAnimation State = 1 : Pause\n"); } else if(strcmp("Play",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Play,true); printf("\tAnimation State = 2 : Play\n"); } else if(strcmp("Continue",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Continue,true); printf("\tAnimation State = 3 : Continue\n"); } else if(strcmp("NoAction",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::NoAction,true); printf("\tAnimation State = NoAction\n"); } else if(strcmp("Load",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Load,true); printf("\tAnimation State = Load\n"); } else if(strcmp("LoadActivate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::LoadActivate,true); printf("\tAnimation State = LoadActivate\n"); } else if(strcmp("Activate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Activate,true); printf("\tAnimation State = Activate\n"); } else if(strcmp("Deactivate",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::Deactivate,true); printf("\tAnimation State = Deactivate\n"); } else if(strcmp("DeactivateUnload",pPV->GetStr()) == 0) { Om_EntityCtrl.SetAnimationState(CigiBaseEntityCtrl::DeactivateUnload,true); printf("\tAnimation State = DeactivateUnload\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetSmoothingEn(pPV->GetBool(),true); if(pPV->GetBool()) printf("\tSmoothing Enabled\n"); else printf("\tSmoothing Disabled\n"); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetAlpha(pPV->GetUChar(),true); printf("\tAlpha = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetEntityType(pPV->GetUShort(),true); printf("\tEntity Type = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetParentID(pPV->GetUShort(),true); printf("\tParent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EntityCtrl.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EntityCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EntityCtrlV3_3.h000066400000000000000000000012241210750432300240500ustar00rootroot00000000000000// Proc_EntityCtrlV3_3.h: interface for the Proc_EntityCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EntityCtrlV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EntityCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EntityCtrlV3_3 : public PcktParsingProcessor { public: Proc_EntityCtrlV3_3(void); virtual ~Proc_EntityCtrlV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEntityCtrlV3_3 Om_EntityCtrl; }; #endif // _Proc_EntityCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvCondReqV3.cpp000066400000000000000000000065101210750432300240670ustar00rootroot00000000000000// Proc_EnvCondReqV3.cpp: implementation of the Proc_EnvCondReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EnvCondReqV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EnvCondReqV3::Proc_EnvCondReqV3() { PcktID = "EnvCondReq"; } Proc_EnvCondReqV3::~Proc_EnvCondReqV3() { } void Proc_EnvCondReqV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Environmental Condition Request:\n"); unsigned char tReqType = 0; if(pPV != NULL) { if(strcmp("Maritime",pPV->GetStr()) == 0) { tReqType = (unsigned char)CigiBaseEnvCondReq::Maritime; printf("\tRequest Type = 1 : Maritime\n"); } pPV = pPV->nxt(); } if(pPV != NULL) { if(strcmp("Terrestrial",pPV->GetStr()) == 0) { tReqType |= (unsigned char)CigiBaseEnvCondReq::Terrestrial; printf("\tRequest Type = 2 : Terrestrial\n"); } pPV = pPV->nxt(); } if(pPV != NULL) { if(strcmp("Weather",pPV->GetStr()) == 0) { tReqType |= (unsigned char)CigiBaseEnvCondReq::Weather; printf("\tRequest Type = 4 : Weather\n"); } pPV = pPV->nxt(); } if(pPV != NULL) { if(strcmp("Aerosol",pPV->GetStr()) == 0) { tReqType |= (unsigned char)CigiBaseEnvCondReq::Aerosol; printf("\tRequest Type = 8 : Aerosol\n"); } pPV = pPV->nxt(); } try { Om_EnvCondReq.SetReqType(tReqType,true); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } if(pPV != NULL) { try { Om_EnvCondReq.SetReqID(pPV->GetUChar(),true); printf("\tRequest ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCondReq.SetLat(pPV->Getdouble(),true); printf("\tLatitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCondReq.SetLon(pPV->Getdouble(),true); printf("\tLongitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCondReq.SetAlt(pPV->Getdouble(),true); printf("\tAltitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EnvCondReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvCondReqV3.h000066400000000000000000000012001210750432300235230ustar00rootroot00000000000000// Proc_EnvCondReqV3.h: interface for the Proc_EnvCondReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EnvCondReqV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EnvCondReqV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EnvCondReqV3 : public PcktParsingProcessor { public: Proc_EnvCondReqV3(void); virtual ~Proc_EnvCondReqV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEnvCondReqV3 Om_EnvCondReq; }; #endif // _Proc_EnvCondReqV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvCtrlV1.cpp000066400000000000000000000105361210750432300234410ustar00rootroot00000000000000// Proc_EnvCtrlV1.cpp: implementation of the Proc_EnvCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EnvCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EnvCtrlV1::Proc_EnvCtrlV1() { PcktID = "EnvCtrl"; } Proc_EnvCtrlV1::~Proc_EnvCtrlV1() { } void Proc_EnvCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Environmental Control:\n"); if(pPV != NULL) { try { Om_EnvCtrl.SetHour(pPV->GetUChar(),true); printf("\tHour = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetMinute(pPV->GetUChar(),true); printf("\tMinute = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetEphemerisEn(pPV->GetBool(),true); printf("\tEphemeris Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetHumidity(pPV->GetUChar(),true); printf("\tHumidity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetMonth(pPV->GetUChar(),true); printf("\tMonth = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetDay(pPV->GetUChar(),true); printf("\tDay = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetYear(pPV->GetUShort(),true); printf("\tYear = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetVisibility(pPV->Getfloat(),true); printf("\tVisibility = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EnvCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvCtrlV1.h000066400000000000000000000011371210750432300231030ustar00rootroot00000000000000// Proc_EnvCtrlV1.h: interface for the Proc_EnvCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EnvCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EnvCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EnvCtrlV1 : public PcktParsingProcessor { public: Proc_EnvCtrlV1(void); virtual ~Proc_EnvCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEnvCtrlV1 Om_EnvCtrl; }; #endif // _Proc_EnvCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvCtrlV2.cpp000066400000000000000000000124301210750432300234350ustar00rootroot00000000000000// Proc_EnvCtrlV2.cpp: implementation of the Proc_EnvCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EnvCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EnvCtrlV2::Proc_EnvCtrlV2() { PcktID = "EnvCtrl"; } Proc_EnvCtrlV2::~Proc_EnvCtrlV2() { } void Proc_EnvCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Environmental Control:\n"); if(pPV != NULL) { try { Om_EnvCtrl.SetHour(pPV->GetUChar(),true); printf("\tHour = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetMinute(pPV->GetUChar(),true); printf("\tMinute = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetEphemerisEn(pPV->GetBool(),true); printf("\tEphemeris Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetAtmosEn(pPV->GetBool(),true); printf("\tAtmosphere Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetHumidity(pPV->GetUChar(),true); printf("\tHumidity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetMonth(pPV->GetUChar(),true); printf("\tMonth = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetDay(pPV->GetUChar(),true); printf("\tDay = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetYear(pPV->GetUShort(),true); printf("\tYear = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetVisibility(pPV->Getfloat(),true); printf("\tVisibility = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetBaroPress(pPV->Getfloat(),true); printf("\tBarometric Pressure = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvCtrl.SetAerosol(pPV->Getfloat(),true); printf("\tAerosol = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EnvCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvCtrlV2.h000066400000000000000000000011371210750432300231040ustar00rootroot00000000000000// Proc_EnvCtrlV2.h: interface for the Proc_EnvCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EnvCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EnvCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EnvCtrlV2 : public PcktParsingProcessor { public: Proc_EnvCtrlV2(void); virtual ~Proc_EnvCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEnvCtrlV2 Om_EnvCtrl; }; #endif // _Proc_EnvCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvRgnCtrlV3.cpp000066400000000000000000000152751210750432300241170ustar00rootroot00000000000000// Proc_EnvRgnCtrlV3.cpp: implementation of the Proc_EnvRgnCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EnvRgnCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EnvRgnCtrlV3::Proc_EnvRgnCtrlV3() { PcktID = "EnvRgnCtrl"; } Proc_EnvRgnCtrlV3::~Proc_EnvRgnCtrlV3() { } void Proc_EnvRgnCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Environmental Region Control\n"); if(pPV != NULL) { try { Om_EnvRgnCtrl.SetRegionID(pPV->GetUShort(),true); printf("\tRegion ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Inactive",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetRgnState(CigiBaseEnvRgnCtrl::Inactive,true); printf("\tRegion State = 0 : Inactive\n"); } else if(strcmp("Active",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetRgnState(CigiBaseEnvRgnCtrl::Active,true); printf("\tRegion State = 1 : Active\n"); } else if(strcmp("Destroyed",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetRgnState(CigiBaseEnvRgnCtrl::Destroyed,true); printf("\tRegion State = 2 : Destroyed\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("UseLast",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetWeatherProp(CigiBaseEnvRgnCtrl::UseLast,true); printf("\tWeather Property = 0 : UseLast\n"); } else if(strcmp("Merge",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetWeatherProp(CigiBaseEnvRgnCtrl::Merge,true); printf("\tWeather Property = 1 : Merge\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("UseLast",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetAerosol(CigiBaseEnvRgnCtrl::UseLast,true); printf("\tAerosol = 0 : UseLast\n"); } else if(strcmp("Merge",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetAerosol(CigiBaseEnvRgnCtrl::Merge,true); printf("\tAerosol = 1 : Merge\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("UseLast",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetMaritimeSurface(CigiBaseEnvRgnCtrl::UseLast,true); printf("\tMaritime Surface = 0 : UseLast\n"); } else if(strcmp("Merge",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetMaritimeSurface(CigiBaseEnvRgnCtrl::Merge,true); printf("\tMaritime Surface = 1 : Merge\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("UseLast",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetTerrestrialSurface(CigiBaseEnvRgnCtrl::UseLast,true); printf("\tTerrestrial Surface = 0 : UseLast\n"); } else if(strcmp("Merge",pPV->GetStr()) == 0) { Om_EnvRgnCtrl.SetTerrestrialSurface(CigiBaseEnvRgnCtrl::Merge,true); printf("\tTerrestrial Surface = 1 : Merge\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetLat(pPV->Getdouble(),true); printf("\tLat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetLon(pPV->Getdouble(),true); printf("\tLon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetXSize(pPV->Getfloat(),true); printf("\tX Size = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetYSize(pPV->Getfloat(),true); printf("\tY Size = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetCornerRadius(pPV->Getfloat(),true); printf("\tCorner Radius = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetRotation(pPV->Getfloat(),true); printf("\tRotation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EnvRgnCtrl.SetTransition(pPV->Getfloat(),true); printf("\tTransition = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_EnvRgnCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_EnvRgnCtrlV3.h000066400000000000000000000012001210750432300235430ustar00rootroot00000000000000// Proc_EnvRgnCtrlV3.h: interface for the Proc_EnvRgnCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_EnvRgnCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_EnvRgnCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_EnvRgnCtrlV3 : public PcktParsingProcessor { public: Proc_EnvRgnCtrlV3(void); virtual ~Proc_EnvRgnCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiEnvRgnCtrlV3 Om_EnvRgnCtrl; }; #endif // _Proc_EnvRgnCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatHotReqV3.cpp000066400000000000000000000076001210750432300237230ustar00rootroot00000000000000// Proc_HatHotReqV3.cpp: implementation of the Proc_HatHotReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatHotReqV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatHotReqV3::Proc_HatHotReqV3() { PcktID = "HatHotReq"; } Proc_HatHotReqV3::~Proc_HatHotReqV3() { } void Proc_HatHotReqV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Hot/Hat Request:\n"); if(pPV != NULL) { try { Om_HatHotReq.SetHatHotID(pPV->GetUShort(),true); printf("\tHat-Hot ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("HAT",pPV->GetStr()) == 0) { Om_HatHotReq.SetReqType(CigiBaseHatHotReq::HAT,true); printf("\tRequest Type = 0 : HAT\n"); } else if(strcmp("HOT",pPV->GetStr()) == 0) { Om_HatHotReq.SetReqType(CigiBaseHatHotReq::HOT,true); printf("\tRequest Type = 1 : HOT\n"); } else if(strcmp("Extended",pPV->GetStr()) == 0) { Om_HatHotReq.SetReqType(CigiBaseHatHotReq::Extended,true); printf("\tRequest Type = 2 : Extended\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_HatHotReq.SetSrcCoordSys(CigiBaseHatHotReq::Geodetic,true); printf("\tSource Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_HatHotReq.SetSrcCoordSys(CigiBaseHatHotReq::Entity,true); printf("\tSource Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_HatHotReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatHotReqV3.h000066400000000000000000000011651210750432300233700ustar00rootroot00000000000000// Proc_HatHotReqV3.h: interface for the Proc_HatHotReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_HatHotReqV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_HatHotReqV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_HatHotReqV3 : public PcktParsingProcessor { public: Proc_HatHotReqV3(void); virtual ~Proc_HatHotReqV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatHotReqV3 Om_HatHotReq; }; #endif // _Proc_HatHotReqV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatHotReqV3_2.cpp000066400000000000000000000103341210750432300241420ustar00rootroot00000000000000// Proc_HatHotReqV3_2.cpp: implementation of the Proc_HatHotReqV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatHotReqV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatHotReqV3_2::Proc_HatHotReqV3_2() { PcktID = "HatHotReq"; } Proc_HatHotReqV3_2::~Proc_HatHotReqV3_2() { } void Proc_HatHotReqV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Hot/Hat Request:\n"); if(pPV != NULL) { try { Om_HatHotReq.SetHatHotID(pPV->GetUShort(),true); printf("\tHat-Hot ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("HAT",pPV->GetStr()) == 0) { Om_HatHotReq.SetReqType(CigiBaseHatHotReq::HAT,true); printf("\tRequest Type = 0 : HAT\n"); } else if(strcmp("HOT",pPV->GetStr()) == 0) { Om_HatHotReq.SetReqType(CigiBaseHatHotReq::HOT,true); printf("\tRequest Type = 1 : HOT\n"); } else if(strcmp("Extended",pPV->GetStr()) == 0) { Om_HatHotReq.SetReqType(CigiBaseHatHotReq::Extended,true); printf("\tRequest Type = 2 : Extended\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_HatHotReq.SetSrcCoordSys(CigiBaseHatHotReq::Geodetic,true); printf("\tSource Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_HatHotReq.SetSrcCoordSys(CigiBaseHatHotReq::Entity,true); printf("\tSource Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetUpdatePeriod(pPV->GetUChar(),true); printf("\tUpdate Period = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotReq.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_HatHotReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatHotReqV3_2.h000066400000000000000000000012111210750432300236010ustar00rootroot00000000000000// Proc_HatHotReqV3_2.h: interface for the Proc_HatHotReqV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_HatHotReqV3_2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_HatHotReqV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_HatHotReqV3_2 : public PcktParsingProcessor { public: Proc_HatHotReqV3_2(void); virtual ~Proc_HatHotReqV3_2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatHotReqV3_2 Om_HatHotReq; }; #endif // _Proc_HatHotReqV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatReqV1.cpp000066400000000000000000000041551210750432300232500ustar00rootroot00000000000000// Proc_HatReqV1.cpp: implementation of the Proc_HatReqV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatReqV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatReqV1::Proc_HatReqV1() { PcktID = "HatReq"; } Proc_HatReqV1::~Proc_HatReqV1() { } void Proc_HatReqV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Hat Request:\n"); if(pPV != NULL) { try { Om_HatReq.SetHatHotID(pPV->GetUShort(),true); printf("\tHat ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatReq.SetLat(pPV->Getdouble(),true); printf("\tLatitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatReq.SetLon(pPV->Getdouble(),true); printf("\tLongitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatReq.SetAlt(pPV->Getfloat(),true); printf("\tAltitude = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_HatReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatReqV1.h000066400000000000000000000011241210750432300227060ustar00rootroot00000000000000// Proc_HatReqV1.h: interface for the Proc_HatReqV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_HatReqV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_HatReqV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_HatReqV1 : public PcktParsingProcessor { public: Proc_HatReqV1(void); virtual ~Proc_HatReqV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatReqV1 Om_HatReq; }; #endif // _Proc_HatReqV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatReqV2.cpp000066400000000000000000000041601210750432300232450ustar00rootroot00000000000000// Proc_HatReqV2.cpp: implementation of the Proc_HatReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatReqV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatReqV2::Proc_HatReqV2() { PcktID = "HatReq"; } Proc_HatReqV2::~Proc_HatReqV2() { } void Proc_HatReqV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Hat Request:\n"); if(pPV != NULL) { try { Om_HatReq.SetHatHotID(pPV->GetUShort(),true); printf("\tHat ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatReq.SetLat(pPV->Getdouble(),true); printf("\tLatitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatReq.SetLon(pPV->Getdouble(),true); printf("\tLongitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatReq.SetAlt(pPV->Getdouble(),true); printf("\tAltitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_HatReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HatReqV2.h000066400000000000000000000011241210750432300227070ustar00rootroot00000000000000// Proc_HatReqV2.h: interface for the Proc_HatReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_HatReqV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_HatReqV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_HatReqV2 : public PcktParsingProcessor { public: Proc_HatReqV2(void); virtual ~Proc_HatReqV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatReqV2 Om_HatReq; }; #endif // _Proc_HatReqV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HotReqV2.cpp000066400000000000000000000034631210750432300232700ustar00rootroot00000000000000// Proc_HotReqV2.cpp: implementation of the Proc_HotReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HotReqV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HotReqV2::Proc_HotReqV2() { PcktID = "HotReq"; } Proc_HotReqV2::~Proc_HotReqV2() { } void Proc_HotReqV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Hot Request:\n"); if(pPV != NULL) { try { Om_HotReq.SetHatHotID(pPV->GetUShort(),true); printf("\tHot ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HotReq.SetLat(pPV->Getdouble(),true); printf("\tLatitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HotReq.SetLon(pPV->Getdouble(),true); printf("\tLongitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_HotReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_HotReqV2.h000066400000000000000000000011241210750432300227250ustar00rootroot00000000000000// Proc_HotReqV2.h: interface for the Proc_HotReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_HotReqV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_HotReqV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_HotReqV2 : public PcktParsingProcessor { public: Proc_HotReqV2(void); virtual ~Proc_HotReqV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiHotReqV2 Om_HotReq; }; #endif // _Proc_HotReqV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV1.cpp000066400000000000000000000062321210750432300237260ustar00rootroot00000000000000// Proc_LosSegReqV1.cpp: implementation of the Proc_LosSegReqV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosSegReqV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosSegReqV1::Proc_LosSegReqV1() { PcktID = "LosSegReq"; } Proc_LosSegReqV1::~Proc_LosSegReqV1() { } void Proc_LosSegReqV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Sight Segment Request\n"); if(pPV != NULL) { try { Om_LosSegReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Sight ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcLat(pPV->Getdouble(),true); printf("\tSource Lat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcLon(pPV->Getdouble(),true); printf("\tSource Lon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcAlt(pPV->Getfloat(),true); printf("\tSource Alt = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstLat(pPV->Getdouble(),true); printf("\tDestination Lat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstLon(pPV->Getdouble(),true); printf("\tDestination Lon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstAlt(pPV->Getfloat(),true); printf("\tDestination Alt = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosSegReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV1.h000066400000000000000000000011651210750432300233730ustar00rootroot00000000000000// Proc_LosSegReqV1.h: interface for the Proc_LosSegReqV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosSegReqV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosSegReqV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosSegReqV1 : public PcktParsingProcessor { public: Proc_LosSegReqV1(void); virtual ~Proc_LosSegReqV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosSegReqV1 Om_LosSegReq; }; #endif // _Proc_LosSegReqV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV2.cpp000066400000000000000000000062361210750432300237330ustar00rootroot00000000000000// Proc_LosSegReqV2.cpp: implementation of the Proc_LosSegReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosSegReqV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosSegReqV2::Proc_LosSegReqV2() { PcktID = "LosSegReq"; } Proc_LosSegReqV2::~Proc_LosSegReqV2() { } void Proc_LosSegReqV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Sight Segment Request\n"); if(pPV != NULL) { try { Om_LosSegReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Sight ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcLat(pPV->Getdouble(),true); printf("\tSource Lat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcLon(pPV->Getdouble(),true); printf("\tSource Lon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcAlt(pPV->Getdouble(),true); printf("\tSource Alt = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstLat(pPV->Getdouble(),true); printf("\tDestination Lat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstLon(pPV->Getdouble(),true); printf("\tDestination Lon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstAlt(pPV->Getdouble(),true); printf("\tDestination Alt = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosSegReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV2.h000066400000000000000000000011651210750432300233740ustar00rootroot00000000000000// Proc_LosSegReqV2.h: interface for the Proc_LosSegReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosSegReqV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosSegReqV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosSegReqV2 : public PcktParsingProcessor { public: Proc_LosSegReqV2(void); virtual ~Proc_LosSegReqV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosSegReqV2 Om_LosSegReq; }; #endif // _Proc_LosSegReqV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV3.cpp000066400000000000000000000152111210750432300237250ustar00rootroot00000000000000// Proc_LosSegReqV3.cpp: implementation of the Proc_LosSegReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosSegReqV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosSegReqV3::Proc_LosSegReqV3() { PcktID = "LosSegReq"; } Proc_LosSegReqV3::~Proc_LosSegReqV3() { } void Proc_LosSegReqV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Sight Segment Request\n"); if(pPV != NULL) { try { Om_LosSegReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Sight ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Basic",pPV->GetStr()) == 0) { Om_LosSegReq.SetReqType(CigiBaseLosSegReq::Basic,true); printf("\tRequest Type = 0 : Basic\n"); } else if(strcmp("Extended",pPV->GetStr()) == 0) { Om_LosSegReq.SetReqType(CigiBaseLosSegReq::Extended,true); printf("\tRequest Type = 1 : Extended\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosSegReq.SetSrcCoordSys(CigiBaseLosSegReq::Geodetic,true); printf("\tSource Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosSegReq.SetSrcCoordSys(CigiBaseLosSegReq::Entity,true); printf("\tSource Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosSegReq.SetDstCoordSys(CigiBaseLosSegReq::Geodetic,true); printf("\tDestination Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosSegReq.SetDstCoordSys(CigiBaseLosSegReq::Entity,true); printf("\tDestination Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosSegReq.SetResponseCoordSys(CigiBaseLosSegReq::Geodetic,true); printf("\tResponse Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosSegReq.SetResponseCoordSys(CigiBaseLosSegReq::Entity,true); printf("\tResponse Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetAlphaThresh(pPV->GetUChar(),true); printf("\tAlpha Threshold = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcXoff(pPV->Getdouble(),true); printf("\tSource X Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcYoff(pPV->Getdouble(),true); printf("\tSource Y Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcZoff(pPV->Getdouble(),true); printf("\tSource Z Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstXoff(pPV->Getdouble(),true); printf("\tDestination X Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstYoff(pPV->Getdouble(),true); printf("\tDestination Y Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstZoff(pPV->Getdouble(),true); printf("\tDestination Z Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosSegReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV3.h000066400000000000000000000011651210750432300233750ustar00rootroot00000000000000// Proc_LosSegReqV3.h: interface for the Proc_LosSegReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosSegReqV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosSegReqV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosSegReqV3 : public PcktParsingProcessor { public: Proc_LosSegReqV3(void); virtual ~Proc_LosSegReqV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosSegReqV3 Om_LosSegReq; }; #endif // _Proc_LosSegReqV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV3_2.cpp000066400000000000000000000172301210750432300241510ustar00rootroot00000000000000// Proc_LosSegReqV3_2.cpp: implementation of the Proc_LosSegReqV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosSegReqV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosSegReqV3_2::Proc_LosSegReqV3_2() { PcktID = "LosSegReq"; } Proc_LosSegReqV3_2::~Proc_LosSegReqV3_2() { } void Proc_LosSegReqV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Sight Segment Request\n"); if(pPV != NULL) { try { Om_LosSegReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Sight ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Basic",pPV->GetStr()) == 0) { Om_LosSegReq.SetReqType(CigiBaseLosSegReq::Basic,true); printf("\tRequest Type = 0 : Basic\n"); } else if(strcmp("Extended",pPV->GetStr()) == 0) { Om_LosSegReq.SetReqType(CigiBaseLosSegReq::Extended,true); printf("\tRequest Type = 1 : Extended\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosSegReq.SetSrcCoordSys(CigiBaseLosSegReq::Geodetic,true); printf("\tSource Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosSegReq.SetSrcCoordSys(CigiBaseLosSegReq::Entity,true); printf("\tSource Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosSegReq.SetDstCoordSys(CigiBaseLosSegReq::Geodetic,true); printf("\tDestination Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosSegReq.SetDstCoordSys(CigiBaseLosSegReq::Entity,true); printf("\tDestination Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosSegReq.SetResponseCoordSys(CigiBaseLosSegReq::Geodetic,true); printf("\tResponse Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosSegReq.SetResponseCoordSys(CigiBaseLosSegReq::Entity,true); printf("\tResponse Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDestEntityIDValid(pPV->GetBool(),true); printf("\tDestination Entity ID Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetAlphaThresh(pPV->GetUChar(),true); printf("\tAlpha Threshold = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcXoff(pPV->Getdouble(),true); printf("\tSource X Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcYoff(pPV->Getdouble(),true); printf("\tSource Y Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetSrcZoff(pPV->Getdouble(),true); printf("\tSource Z Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstXoff(pPV->Getdouble(),true); printf("\tDestination X Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstYoff(pPV->Getdouble(),true); printf("\tDestination Y Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDstZoff(pPV->Getdouble(),true); printf("\tDestination Z Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetUpdatePeriod(pPV->GetUChar(),true); printf("\tUpdate Period = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosSegReq.SetDestEntityID(pPV->GetUShort(),true); printf("\tDestination Entity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosSegReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosSegReqV3_2.h000066400000000000000000000012111210750432300236060ustar00rootroot00000000000000// Proc_LosSegReqV3_2.h: interface for the Proc_LosSegReqV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosSegReqV3_2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosSegReqV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosSegReqV3_2 : public PcktParsingProcessor { public: Proc_LosSegReqV3_2(void); virtual ~Proc_LosSegReqV3_2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosSegReqV3_2 Om_LosSegReq; }; #endif // _Proc_LosSegReqV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV1.cpp000066400000000000000000000062421210750432300241120ustar00rootroot00000000000000// Proc_LosVectReqV1.cpp: implementation of the Proc_LosVectReqV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosVectReqV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosVectReqV1::Proc_LosVectReqV1() { PcktID = "LosVectReq"; } Proc_LosVectReqV1::~Proc_LosVectReqV1() { } void Proc_LosVectReqV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Site Vector Request:\n"); if(pPV != NULL) { try { Om_LosVectReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Site ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectAz(pPV->Getfloat(),true); printf("\tVector Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectEl(pPV->Getfloat(),true); printf("\tVector Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMaxRange(pPV->Getfloat(),true); printf("\tMax Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcLat(pPV->Getdouble(),true); printf("\tSource Lat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcLon(pPV->Getdouble(),true); printf("\tSource Lon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcAlt(pPV->Getfloat(),true); printf("\tSource Alt = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosVectReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV1.h000066400000000000000000000012001210750432300235440ustar00rootroot00000000000000// Proc_LosVectReqV1.h: interface for the Proc_LosVectReqV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosVectReqV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosVectReqV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosVectReqV1 : public PcktParsingProcessor { public: Proc_LosVectReqV1(void); virtual ~Proc_LosVectReqV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosVectReqV1 Om_LosVectReq; }; #endif // _Proc_LosVectReqV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV2.cpp000066400000000000000000000067551210750432300241240ustar00rootroot00000000000000// Proc_LosVectReqV2.cpp: implementation of the Proc_LosVectReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosVectReqV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosVectReqV2::Proc_LosVectReqV2() { PcktID = "LosVectReq"; } Proc_LosVectReqV2::~Proc_LosVectReqV2() { } void Proc_LosVectReqV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Site Vector Request:\n"); if(pPV != NULL) { try { Om_LosVectReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Site ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectAz(pPV->Getfloat(),true); printf("\tVector Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectEl(pPV->Getfloat(),true); printf("\tVector Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMinRange(pPV->Getfloat(),true); printf("\tMinimum Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMaxRange(pPV->Getfloat(),true); printf("\tMax Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcLat(pPV->Getdouble(),true); printf("\tSource Lat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcLon(pPV->Getdouble(),true); printf("\tSource Lon = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcAlt(pPV->Getdouble(),true); printf("\tSource Alt = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosVectReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV2.h000066400000000000000000000012001210750432300235450ustar00rootroot00000000000000// Proc_LosVectReqV2.h: interface for the Proc_LosVectReqV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosVectReqV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosVectReqV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosVectReqV2 : public PcktParsingProcessor { public: Proc_LosVectReqV2(void); virtual ~Proc_LosVectReqV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosVectReqV2 Om_LosVectReq; }; #endif // _Proc_LosVectReqV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV3.cpp000066400000000000000000000145111210750432300241120ustar00rootroot00000000000000// Proc_LosVectReqV3.cpp: implementation of the Proc_LosVectReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosVectReqV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosVectReqV3::Proc_LosVectReqV3() { PcktID = "LosVectReq"; } Proc_LosVectReqV3::~Proc_LosVectReqV3() { } void Proc_LosVectReqV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Site Vector Request:\n"); if(pPV != NULL) { try { Om_LosVectReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Site ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Basic",pPV->GetStr()) == 0) { Om_LosVectReq.SetReqType(CigiBaseLosVectReq::Basic,true); printf("\tRequest Type = 0 : Basic\n"); } else if(strcmp("Extended",pPV->GetStr()) == 0) { Om_LosVectReq.SetReqType(CigiBaseLosVectReq::Extended,true); printf("\tRequest Type = 1 : Extended\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosVectReq.SetSrcCoordSys(CigiBaseLosVectReq::Geodetic,true); printf("\tSource Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosVectReq.SetSrcCoordSys(CigiBaseLosVectReq::Entity,true); printf("\tSource Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosVectReq.SetResponseCoordSys(CigiBaseLosVectReq::Geodetic,true); printf("\tResponse Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosVectReq.SetResponseCoordSys(CigiBaseLosVectReq::Entity,true); printf("\tResponse Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetAlphaThresh(pPV->GetUChar(),true); printf("\tAlpha Threshold = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectAz(pPV->Getfloat(),true); printf("\tVector Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectEl(pPV->Getfloat(),true); printf("\tVector Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMinRange(pPV->Getfloat(),true); printf("\tMinimum Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMaxRange(pPV->Getfloat(),true); printf("\tMax Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcXoff(pPV->Getdouble(),true); printf("\tSource X Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcYoff(pPV->Getdouble(),true); printf("\tSource Y Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcZoff(pPV->Getdouble(),true); printf("\tSource Z Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosVectReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV3.h000066400000000000000000000012001210750432300235460ustar00rootroot00000000000000// Proc_LosVectReqV3.h: interface for the Proc_LosVectReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosVectReqV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosVectReqV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosVectReqV3 : public PcktParsingProcessor { public: Proc_LosVectReqV3(void); virtual ~Proc_LosVectReqV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosVectReqV3 Om_LosVectReq; }; #endif // _Proc_LosVectReqV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV3_2.cpp000066400000000000000000000152461210750432300243410ustar00rootroot00000000000000// Proc_LosVectReqV3_2.cpp: implementation of the Proc_LosVectReqV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosVectReqV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosVectReqV3_2::Proc_LosVectReqV3_2() { PcktID = "LosVectReq"; } Proc_LosVectReqV3_2::~Proc_LosVectReqV3_2() { } void Proc_LosVectReqV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Line of Site Vector Request:\n"); if(pPV != NULL) { try { Om_LosVectReq.SetLosID(pPV->GetUShort(),true); printf("\tLine of Site ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Basic",pPV->GetStr()) == 0) { Om_LosVectReq.SetReqType(CigiBaseLosVectReq::Basic,true); printf("\tRequest Type = 0 : Basic\n"); } else if(strcmp("Extended",pPV->GetStr()) == 0) { Om_LosVectReq.SetReqType(CigiBaseLosVectReq::Extended,true); printf("\tRequest Type = 1 : Extended\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosVectReq.SetSrcCoordSys(CigiBaseLosVectReq::Geodetic,true); printf("\tSource Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosVectReq.SetSrcCoordSys(CigiBaseLosVectReq::Entity,true); printf("\tSource Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosVectReq.SetResponseCoordSys(CigiBaseLosVectReq::Geodetic,true); printf("\tResponse Coordinate System = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosVectReq.SetResponseCoordSys(CigiBaseLosVectReq::Entity,true); printf("\tResponse Coordinate System = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetAlphaThresh(pPV->GetUChar(),true); printf("\tAlpha Threshold = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectAz(pPV->Getfloat(),true); printf("\tVector Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetVectEl(pPV->Getfloat(),true); printf("\tVector Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMinRange(pPV->Getfloat(),true); printf("\tMinimum Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMaxRange(pPV->Getfloat(),true); printf("\tMax Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcXoff(pPV->Getdouble(),true); printf("\tSource X Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcYoff(pPV->Getdouble(),true); printf("\tSource Y Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetSrcZoff(pPV->Getdouble(),true); printf("\tSource Z Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetMask(pPV->GetULong(),true); printf("\tMask = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosVectReq.SetUpdatePeriod(pPV->GetUChar(),true); printf("\tUpdate Period = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_LosVectReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_LosVectReqV3_2.h000066400000000000000000000012241210750432300237750ustar00rootroot00000000000000// Proc_LosVectReqV3_2.h: interface for the Proc_LosVectReqV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_LosVectReqV3_2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_LosVectReqV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_LosVectReqV3_2 : public PcktParsingProcessor { public: Proc_LosVectReqV3_2(void); virtual ~Proc_LosVectReqV3_2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosVectReqV3_2 Om_LosVectReq; }; #endif // _Proc_LosVectReqV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_MaritimeSurfaceCtrlV3.cpp000066400000000000000000000075311210750432300257740ustar00rootroot00000000000000// Proc_MaritimeSurfaceCtrlV3.cpp: implementation of the Proc_MaritimeSurfaceCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_MaritimeSurfaceCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_MaritimeSurfaceCtrlV3::Proc_MaritimeSurfaceCtrlV3() { PcktID = "MaritimeSurfaceCtrl"; } Proc_MaritimeSurfaceCtrlV3::~Proc_MaritimeSurfaceCtrlV3() { } void Proc_MaritimeSurfaceCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Maritime Surface Control:\n"); if(pPV != NULL) { try { Om_MaritimeSurfaceCtrl.SetEntityRgnID(pPV->GetUShort(),true); printf("\tEntity Region ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceCtrl.SetSurfaceCondEn(pPV->GetBool(),true); printf("\tSurface Conditions Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceCtrl.SetWhitecapEn(pPV->GetBool(),true); printf("\tWhite Cap Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Global",pPV->GetStr()) == 0) { Om_MaritimeSurfaceCtrl.SetScope(CigiBaseMaritimeSurfaceCtrl::Global,true); printf("\tScope = 0 : Global\n"); } else if(strcmp("Regional",pPV->GetStr()) == 0) { Om_MaritimeSurfaceCtrl.SetScope(CigiBaseMaritimeSurfaceCtrl::Regional,true); printf("\tScope = 1 : Regional\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_MaritimeSurfaceCtrl.SetScope(CigiBaseMaritimeSurfaceCtrl::Entity,true); printf("\tScope = 2 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceCtrl.SetSurfaceHeight(pPV->Getfloat(),true); printf("\tSurface Height = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceCtrl.SetWaterTemp(pPV->Getfloat(),true); printf("\tWater Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceCtrl.SetClarity(pPV->Getfloat(),true); printf("\tClarity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_MaritimeSurfaceCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_MaritimeSurfaceCtrlV3.h000066400000000000000000000013431210750432300254340ustar00rootroot00000000000000// Proc_MaritimeSurfaceCtrlV3.h: interface for the Proc_MaritimeSurfaceCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_MaritimeSurfaceCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_MaritimeSurfaceCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_MaritimeSurfaceCtrlV3 : public PcktParsingProcessor { public: Proc_MaritimeSurfaceCtrlV3(void); virtual ~Proc_MaritimeSurfaceCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiMaritimeSurfaceCtrlV3 Om_MaritimeSurfaceCtrl; }; #endif // _Proc_MaritimeSurfaceCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_MotionTrackCtrlV3.cpp000066400000000000000000000114151210750432300251420ustar00rootroot00000000000000// Proc_MotionTrackCtrlV3.cpp: implementation of the Proc_MotionTrackCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_MotionTrackCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_MotionTrackCtrlV3::Proc_MotionTrackCtrlV3() { PcktID = "MotionTrackCtrl"; } Proc_MotionTrackCtrlV3::~Proc_MotionTrackCtrlV3() { } void Proc_MotionTrackCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Motion Tracker Control:\n"); if(pPV != NULL) { try { Om_MotionTrackCtrl.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetTrackerID(pPV->GetUChar(),true); printf("\tTracker ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetTrackerEn(pPV->GetBool(),true); printf("\tTracker Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetBoresightEn(pPV->GetBool(),true); printf("\tBoresight Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetXEn(pPV->GetBool(),true); printf("\tX Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetYEn(pPV->GetBool(),true); printf("\tY Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetZEn(pPV->GetBool(),true); printf("\tZ Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetRollEn(pPV->GetBool(),true); printf("\tRoll Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetPitchEn(pPV->GetBool(),true); printf("\tPitch Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MotionTrackCtrl.SetYawEn(pPV->GetBool(),true); printf("\tYaw Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("View",pPV->GetStr()) == 0) { Om_MotionTrackCtrl.SetScope(CigiBaseMotionTrackCtrl::View,true); printf("\tScope = 0 : View\n"); } else if(strcmp("ViewGrp",pPV->GetStr()) == 0) { Om_MotionTrackCtrl.SetScope(CigiBaseMotionTrackCtrl::ViewGrp,true); printf("\tScope = 1 : ViewGrp\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_MotionTrackCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_MotionTrackCtrlV3.h000066400000000000000000000012671210750432300246130ustar00rootroot00000000000000// Proc_MotionTrackCtrlV3.h: interface for the Proc_MotionTrackCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_MotionTrackCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_MotionTrackCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_MotionTrackCtrlV3 : public PcktParsingProcessor { public: Proc_MotionTrackCtrlV3(void); virtual ~Proc_MotionTrackCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiMotionTrackCtrlV3 Om_MotionTrackCtrl; }; #endif // _Proc_MotionTrackCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_PositionReqV3.cpp000066400000000000000000000104041210750432300243340ustar00rootroot00000000000000// Proc_PositionReqV3.cpp: implementation of the Proc_PositionReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_PositionReqV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_PositionReqV3::Proc_PositionReqV3() { PcktID = "PositionReq"; } Proc_PositionReqV3::~Proc_PositionReqV3() { } void Proc_PositionReqV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Position Request\n"); if(pPV != NULL) { try { Om_PositionReq.SetObjectID(pPV->GetUShort(),true); printf("\tObject ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionReq.SetArtPartID(pPV->GetUChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("OneShot",pPV->GetStr()) == 0) { Om_PositionReq.SetUpdateMode(CigiBasePositionReq::OneShot,true); printf("\tUpdate Mode = 0 : OneShot\n"); } else if(strcmp("Continuous",pPV->GetStr()) == 0) { Om_PositionReq.SetUpdateMode(CigiBasePositionReq::Continuous,true); printf("\tUpdate Mode = 1 : Continuous\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Entity",pPV->GetStr()) == 0) { Om_PositionReq.SetObjectClass(CigiBasePositionReq::Entity,true); printf("\tObject Class = 0 : Entity\n"); } else if(strcmp("ArtPart",pPV->GetStr()) == 0) { Om_PositionReq.SetObjectClass(CigiBasePositionReq::ArtPart,true); printf("\tObject Class = 1 : ArtPart\n"); } else if(strcmp("View",pPV->GetStr()) == 0) { Om_PositionReq.SetObjectClass(CigiBasePositionReq::View,true); printf("\tObject Class = 2 : View\n"); } else if(strcmp("ViewGrp",pPV->GetStr()) == 0) { Om_PositionReq.SetObjectClass(CigiBasePositionReq::ViewGrp,true); printf("\tObject Class = 3 : ViewGrp\n"); } else if(strcmp("MotionTracker",pPV->GetStr()) == 0) { Om_PositionReq.SetObjectClass(CigiBasePositionReq::MotionTracker,true); printf("\tObject Class = 4 : MotionTracker\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_PositionReq.SetCoordSys(CigiBasePositionReq::Geodetic,true); printf("\tCoordinate System = 0 : Geodetic\n"); } else if(strcmp("ParentEntity",pPV->GetStr()) == 0) { Om_PositionReq.SetCoordSys(CigiBasePositionReq::ParentEntity,true); printf("\tCoordinate System = 1 : ParentEntity\n"); } else if(strcmp("Submodel",pPV->GetStr()) == 0) { Om_PositionReq.SetCoordSys(CigiBasePositionReq::Submodel,true); printf("\tCoordinate System = 2 : Submodel\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_PositionReq; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_PositionReqV3.h000066400000000000000000000012131210750432300237770ustar00rootroot00000000000000// Proc_PositionReqV3.h: interface for the Proc_PositionReqV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_PositionReqV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_PositionReqV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_PositionReqV3 : public PcktParsingProcessor { public: Proc_PositionReqV3(void); virtual ~Proc_PositionReqV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiPositionReqV3 Om_PositionReq; }; #endif // _Proc_PositionReqV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV1.cpp000066400000000000000000000066351210750432300236110ustar00rootroot00000000000000// Proc_RateCtrlV1.cpp: implementation of the Proc_RateCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_RateCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_RateCtrlV1::Proc_RateCtrlV1() { PcktID = "RateCtrl"; } Proc_RateCtrlV1::~Proc_RateCtrlV1() { } void Proc_RateCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Rate Control\n"); if(pPV != NULL) { try { Om_RateCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetArtPartID(pPV->GetChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetXRate(pPV->Getfloat(),true); printf("\tX Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYRate(pPV->Getfloat(),true); printf("\tY Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetZRate(pPV->Getfloat(),true); printf("\tZ Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetRollRate(pPV->Getfloat(),true); printf("\tRoll Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetPitchRate(pPV->Getfloat(),true); printf("\tPitch Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYawRate(pPV->Getfloat(),true); printf("\tYaw Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_RateCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV1.h000066400000000000000000000011521210750432300232430ustar00rootroot00000000000000// Proc_RateCtrlV1.h: interface for the Proc_RateCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_RateCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_RateCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_RateCtrlV1 : public PcktParsingProcessor { public: Proc_RateCtrlV1(void); virtual ~Proc_RateCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiRateCtrlV1 Om_RateCtrl; }; #endif // _Proc_RateCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV2.cpp000066400000000000000000000066351210750432300236120ustar00rootroot00000000000000// Proc_RateCtrlV2.cpp: implementation of the Proc_RateCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_RateCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_RateCtrlV2::Proc_RateCtrlV2() { PcktID = "RateCtrl"; } Proc_RateCtrlV2::~Proc_RateCtrlV2() { } void Proc_RateCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Rate Control\n"); if(pPV != NULL) { try { Om_RateCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetArtPartID(pPV->GetChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetXRate(pPV->Getfloat(),true); printf("\tX Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYRate(pPV->Getfloat(),true); printf("\tY Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetZRate(pPV->Getfloat(),true); printf("\tZ Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetRollRate(pPV->Getfloat(),true); printf("\tRoll Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetPitchRate(pPV->Getfloat(),true); printf("\tPitch Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYawRate(pPV->Getfloat(),true); printf("\tYaw Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_RateCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV2.h000066400000000000000000000011521210750432300232440ustar00rootroot00000000000000// Proc_RateCtrlV2.h: interface for the Proc_RateCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_RateCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_RateCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_RateCtrlV2 : public PcktParsingProcessor { public: Proc_RateCtrlV2(void); virtual ~Proc_RateCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiRateCtrlV2 Om_RateCtrl; }; #endif // _Proc_RateCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV3.cpp000066400000000000000000000073661210750432300236150ustar00rootroot00000000000000// Proc_RateCtrlV3.cpp: implementation of the Proc_RateCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_RateCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_RateCtrlV3::Proc_RateCtrlV3() { PcktID = "RateCtrl"; } Proc_RateCtrlV3::~Proc_RateCtrlV3() { } void Proc_RateCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Rate Control\n"); if(pPV != NULL) { try { Om_RateCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetArtPartID(pPV->GetUChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetApplyToArtPart(pPV->GetBool(),true); printf("\tApply to Articulated Part = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetXRate(pPV->Getfloat(),true); printf("\tX Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYRate(pPV->Getfloat(),true); printf("\tY Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetZRate(pPV->Getfloat(),true); printf("\tZ Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetRollRate(pPV->Getfloat(),true); printf("\tRoll Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetPitchRate(pPV->Getfloat(),true); printf("\tPitch Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYawRate(pPV->Getfloat(),true); printf("\tYaw Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_RateCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV3.h000066400000000000000000000011521210750432300232450ustar00rootroot00000000000000// Proc_RateCtrlV3.h: interface for the Proc_RateCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_RateCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_RateCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_RateCtrlV3 : public PcktParsingProcessor { public: Proc_RateCtrlV3(void); virtual ~Proc_RateCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiRateCtrlV3 Om_RateCtrl; }; #endif // _Proc_RateCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV3_2.cpp000066400000000000000000000110541210750432300240230ustar00rootroot00000000000000// Proc_RateCtrlV3_2.cpp: implementation of the Proc_RateCtrlV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_RateCtrlV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_RateCtrlV3_2::Proc_RateCtrlV3_2() { PcktID = "RateCtrl"; } Proc_RateCtrlV3_2::~Proc_RateCtrlV3_2() { } void Proc_RateCtrlV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Rate Control\n"); if(pPV != NULL) { try { Om_RateCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetArtPartID(pPV->GetUChar(),true); printf("\tArticulated Part ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetApplyToArtPart(pPV->GetBool(),true); printf("\tApply to Articulated Part = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("World",pPV->GetStr()) == 0) { Om_RateCtrl.SetCoordSys(CigiBaseRateCtrl::World,true); printf("\tCoordinate System = 0 : World\n"); } else if(strcmp("Parent",pPV->GetStr()) == 0) { Om_RateCtrl.SetCoordSys(CigiBaseRateCtrl::Parent,true); printf("\tCoordinate System = 0 : World\n"); } else if(strcmp("Local",pPV->GetStr()) == 0) { Om_RateCtrl.SetCoordSys(CigiBaseRateCtrl::Local,true); printf("\tCoordinate System = 1 : Local\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetXRate(pPV->Getfloat(),true); printf("\tX Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYRate(pPV->Getfloat(),true); printf("\tY Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetZRate(pPV->Getfloat(),true); printf("\tZ Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetRollRate(pPV->Getfloat(),true); printf("\tRoll Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetPitchRate(pPV->Getfloat(),true); printf("\tPitch Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_RateCtrl.SetYawRate(pPV->Getfloat(),true); printf("\tYaw Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_RateCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_RateCtrlV3_2.h000066400000000000000000000011761210750432300234740ustar00rootroot00000000000000// Proc_RateCtrlV3_2.h: interface for the Proc_RateCtrlV3_2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_RateCtrlV3_2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_RateCtrlV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_RateCtrlV3_2 : public PcktParsingProcessor { public: Proc_RateCtrlV3_2(void); virtual ~Proc_RateCtrlV3_2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiRateCtrlV3_2 Om_RateCtrl; }; #endif // _Proc_RateCtrlV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SensorCtrlV1.cpp000066400000000000000000000154271210750432300241660ustar00rootroot00000000000000// Proc_SensorCtrlV1.cpp: implementation of the Proc_SensorCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorCtrlV1::Proc_SensorCtrlV1() { PcktID = "SensorCtrl"; } Proc_SensorCtrlV1::~Proc_SensorCtrlV1() { } void Proc_SensorCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Sensor Control:\n"); if(pPV != NULL) { try { Om_SensorCtrl.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetSensorOn(pPV->GetBool(),true); printf("\tSensor On = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("WhiteHot",pPV->GetStr()) == 0) { Om_SensorCtrl.SetPolarity(CigiBaseSensorCtrl::WhiteHot,true); printf("\tPolarity = 0 : WhiteHot\n"); } else if(strcmp("BlackHot",pPV->GetStr()) == 0) { Om_SensorCtrl.SetPolarity(CigiBaseSensorCtrl::BlackHot,true); printf("\tPolarity = 1 : BlackHot\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetLineDropEn(pPV->GetBool(),true); printf("\tLine Drop Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TrackOff",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TrackOff,true); printf("\tTrack Mode = 0 : TrackOff\n"); } else if(strcmp("ForceCorrelate",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::ForceCorrelate,true); printf("\tTrack Mode = 1 : ForceCorrelate\n"); } else if(strcmp("Scene",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Scene,true); printf("\tTrack Mode = 2 : Scene\n"); } else if(strcmp("Target",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Target,true); printf("\tTrack Mode = 3 : Target\n"); } else if(strcmp("Ship",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Ship,true); printf("\tTrack Mode = 4 : Ship\n"); } else if(strcmp("TMDefA",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefA,true); printf("\tTrack Mode = 5 : TMDefA\n"); } else if(strcmp("TMDefB",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefB,true); printf("\tTrack Mode = 6 : TMDefB\n"); } else if(strcmp("TMDefC",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefC,true); printf("\tTrack Mode = 7 : TMDefC\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetAutoGainEn(pPV->GetBool(),true); printf("\tAuto Gain Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TrackWhite",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackPolarity(CigiBaseSensorCtrl::TrackWhite,true); printf("\tTrack Polarity = 0 : TrackWhite\n"); } else if(strcmp("TrackBlack",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackPolarity(CigiBaseSensorCtrl::TrackBlack,true); printf("\tTrack Polarity = 1 : TrackBlack\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetGain(pPV->Getfloat(),true); printf("\tGain = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetLevel(pPV->Getfloat(),true); printf("\tLevel = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetACCoupling(pPV->Getfloat(),true); printf("\tAC Coupling = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetNoise(pPV->Getfloat(),true); printf("\tNoise = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SensorCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SensorCtrlV1.h000066400000000000000000000012001210750432300236130ustar00rootroot00000000000000// Proc_SensorCtrlV1.h: interface for the Proc_SensorCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SensorCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SensorCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SensorCtrlV1 : public PcktParsingProcessor { public: Proc_SensorCtrlV1(void); virtual ~Proc_SensorCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorCtrlV1 Om_SensorCtrl; }; #endif // _Proc_SensorCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SensorCtrlV2.cpp000066400000000000000000000154271210750432300241670ustar00rootroot00000000000000// Proc_SensorCtrlV2.cpp: implementation of the Proc_SensorCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorCtrlV2::Proc_SensorCtrlV2() { PcktID = "SensorCtrl"; } Proc_SensorCtrlV2::~Proc_SensorCtrlV2() { } void Proc_SensorCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Sensor Control:\n"); if(pPV != NULL) { try { Om_SensorCtrl.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetSensorOn(pPV->GetBool(),true); printf("\tSensor On = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("WhiteHot",pPV->GetStr()) == 0) { Om_SensorCtrl.SetPolarity(CigiBaseSensorCtrl::WhiteHot,true); printf("\tPolarity = 0 : WhiteHot\n"); } else if(strcmp("BlackHot",pPV->GetStr()) == 0) { Om_SensorCtrl.SetPolarity(CigiBaseSensorCtrl::BlackHot,true); printf("\tPolarity = 1 : BlackHot\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetLineDropEn(pPV->GetBool(),true); printf("\tLine Drop Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TrackOff",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TrackOff,true); printf("\tTrack Mode = 0 : TrackOff\n"); } else if(strcmp("ForceCorrelate",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::ForceCorrelate,true); printf("\tTrack Mode = 1 : ForceCorrelate\n"); } else if(strcmp("Scene",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Scene,true); printf("\tTrack Mode = 2 : Scene\n"); } else if(strcmp("Target",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Target,true); printf("\tTrack Mode = 3 : Target\n"); } else if(strcmp("Ship",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Ship,true); printf("\tTrack Mode = 4 : Ship\n"); } else if(strcmp("TMDefA",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefA,true); printf("\tTrack Mode = 5 : TMDefA\n"); } else if(strcmp("TMDefB",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefB,true); printf("\tTrack Mode = 6 : TMDefB\n"); } else if(strcmp("TMDefC",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefC,true); printf("\tTrack Mode = 7 : TMDefC\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetAutoGainEn(pPV->GetBool(),true); printf("\tAuto Gain Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TrackWhite",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackPolarity(CigiBaseSensorCtrl::TrackWhite,true); printf("\tTrack Polarity = 0 : TrackWhite\n"); } else if(strcmp("TrackBlack",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackPolarity(CigiBaseSensorCtrl::TrackBlack,true); printf("\tTrack Polarity = 1 : TrackBlack\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetGain(pPV->Getfloat(),true); printf("\tGain = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetLevel(pPV->Getfloat(),true); printf("\tLevel = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetACCoupling(pPV->Getfloat(),true); printf("\tAC Coupling = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetNoise(pPV->Getfloat(),true); printf("\tNoise = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SensorCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SensorCtrlV2.h000066400000000000000000000012001210750432300236140ustar00rootroot00000000000000// Proc_SensorCtrlV2.h: interface for the Proc_SensorCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SensorCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SensorCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SensorCtrlV2 : public PcktParsingProcessor { public: Proc_SensorCtrlV2(void); virtual ~Proc_SensorCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorCtrlV2 Om_SensorCtrl; }; #endif // _Proc_SensorCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SensorCtrlV3.cpp000066400000000000000000000166431210750432300241710ustar00rootroot00000000000000// Proc_SensorCtrlV3.cpp: implementation of the Proc_SensorCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorCtrlV3::Proc_SensorCtrlV3() { PcktID = "SensorCtrl"; } Proc_SensorCtrlV3::~Proc_SensorCtrlV3() { } void Proc_SensorCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Sensor Control:\n"); if(pPV != NULL) { try { Om_SensorCtrl.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetSensorOn(pPV->GetBool(),true); printf("\tSensor On = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("WhiteHot",pPV->GetStr()) == 0) { Om_SensorCtrl.SetPolarity(CigiBaseSensorCtrl::WhiteHot,true); printf("\tPolarity = 0 : WhiteHot\n"); } else if(strcmp("BlackHot",pPV->GetStr()) == 0) { Om_SensorCtrl.SetPolarity(CigiBaseSensorCtrl::BlackHot,true); printf("\tPolarity = 1 : BlackHot\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetLineDropEn(pPV->GetBool(),true); printf("\tLine Drop Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetAutoGainEn(pPV->GetBool(),true); printf("\tAuto Gain Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TrackWhite",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackPolarity(CigiBaseSensorCtrl::TrackWhite,true); printf("\tTrack Polarity = 0 : TrackWhite\n"); } else if(strcmp("TrackBlack",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackPolarity(CigiBaseSensorCtrl::TrackBlack,true); printf("\tTrack Polarity = 1 : TrackBlack\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("GatePos",pPV->GetStr()) == 0) { Om_SensorCtrl.SetResponseType(CigiBaseSensorCtrl::GatePos,true); printf("\tResponse Type = 0 : GatePos\n"); } else if(strcmp("GateAndTargetPos",pPV->GetStr()) == 0) { Om_SensorCtrl.SetResponseType(CigiBaseSensorCtrl::GateAndTargetPos,true); printf("\tResponse Type = 1 : GateAndTargetPos\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TrackOff",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TrackOff,true); printf("\tTrack Mode = 0 : TrackOff\n"); } else if(strcmp("ForceCorrelate",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::ForceCorrelate,true); printf("\tTrack Mode = 1 : ForceCorrelate\n"); } else if(strcmp("Scene",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Scene,true); printf("\tTrack Mode = 2 : Scene\n"); } else if(strcmp("Target",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Target,true); printf("\tTrack Mode = 3 : Target\n"); } else if(strcmp("Ship",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::Ship,true); printf("\tTrack Mode = 4 : Ship\n"); } else if(strcmp("TMDefA",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefA,true); printf("\tTrack Mode = 5 : TMDefA\n"); } else if(strcmp("TMDefB",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefB,true); printf("\tTrack Mode = 6 : TMDefB\n"); } else if(strcmp("TMDefC",pPV->GetStr()) == 0) { Om_SensorCtrl.SetTrackMode(CigiBaseSensorCtrl::TMDefC,true); printf("\tTrack Mode = 7 : TMDefC\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetGain(pPV->Getfloat(),true); printf("\tGain = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetLevel(pPV->Getfloat(),true); printf("\tLevel = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetACCoupling(pPV->Getfloat(),true); printf("\tAC Coupling = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorCtrl.SetNoise(pPV->Getfloat(),true); printf("\tNoise = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SensorCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SensorCtrlV3.h000066400000000000000000000012001210750432300236150ustar00rootroot00000000000000// Proc_SensorCtrlV3.h: interface for the Proc_SensorCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SensorCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SensorCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SensorCtrlV3 : public PcktParsingProcessor { public: Proc_SensorCtrlV3(void); virtual ~Proc_SensorCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorCtrlV3 Om_SensorCtrl; }; #endif // _Proc_SensorCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortArtPartCtrlV3.cpp000066400000000000000000000154711210750432300253130ustar00rootroot00000000000000// Proc_ShortArtPartCtrlV3.cpp: implementation of the Proc_ShortArtPartCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ShortArtPartCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ShortArtPartCtrlV3::Proc_ShortArtPartCtrlV3() { PcktID = "ShortArtPartCtrl"; } Proc_ShortArtPartCtrlV3::~Proc_ShortArtPartCtrlV3() { } void Proc_ShortArtPartCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Short Articulated Control:\n"); if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetArtPart1(pPV->GetUChar(),true); printf("\tArticulated Part ID 1 = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetArtPart2(pPV->GetUChar(),true); printf("\tArticulated Part ID 2 = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NotUsed",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::NotUsed,true); printf("\tDegree of Freedom Select 1 = 0 : Not Used\n"); } else if(strcmp("Xoff",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::Xoff,true); printf("\tDegree of Freedom Select 1 = 1 : X Offset\n"); } else if(strcmp("Yoff",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::Yoff,true); printf("\tDegree of Freedom Select 1 = 2 : Y Offset\n"); } else if(strcmp("Zoff",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::Zoff,true); printf("\tDegree of Freedom Select 1 = 3 : Z Offset\n"); } else if(strcmp("Yaw",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::Yaw,true); printf("\tDegree of Freedom Select 1 = 4 : Yaw\n"); } else if(strcmp("Pitch",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::Pitch,true); printf("\tDegree of Freedom Select 1 = 5 : Pitch\n"); } else if(strcmp("Roll",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect1(CigiBaseShortArtPartCtrl::Roll,true); printf("\tDegree of Freedom Select 1 = 6 : Roll\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NotUsed",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::NotUsed,true); printf("\tDegree of Freedom Select 2 = 0 : Not Used\n"); } else if(strcmp("Xoff",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::Xoff,true); printf("\tDegree of Freedom Select 2 = 1 : X Offset\n"); } else if(strcmp("Yoff",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::Yoff,true); printf("\tDegree of Freedom Select 2 = 2 : Y Offset\n"); } else if(strcmp("Zoff",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::Zoff,true); printf("\tDegree of Freedom Select 2 = 3 : Z Offset\n"); } else if(strcmp("Yaw",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::Yaw,true); printf("\tDegree of Freedom Select 2 = 4 : Yaw\n"); } else if(strcmp("Pitch",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::Pitch,true); printf("\tDegree of Freedom Select 2 = 5 : Pitch\n"); } else if(strcmp("Roll",pPV->GetStr()) == 0) { Om_ShortArtPartCtrl.SetDofSelect2(CigiBaseShortArtPartCtrl::Roll,true); printf("\tDegree of Freedom Select 2 = 6 : Roll\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetArtPart1En(pPV->GetBool(),true); printf("\tArticulated Part 1 Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetArtPart2En(pPV->GetBool(),true); printf("\tArticulated Part 2 Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetDof1(pPV->Getfloat(),true); printf("\tDegree of Freedom 1 = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortArtPartCtrl.SetDof2(pPV->Getfloat(),true); printf("\tDegree of Freedom 2 = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ShortArtPartCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortArtPartCtrlV3.h000066400000000000000000000013021210750432300247440ustar00rootroot00000000000000// Proc_ShortArtPartCtrlV3.h: interface for the Proc_ShortArtPartCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ShortArtPartCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ShortArtPartCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ShortArtPartCtrlV3 : public PcktParsingProcessor { public: Proc_ShortArtPartCtrlV3(void); virtual ~Proc_ShortArtPartCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiShortArtPartCtrlV3 Om_ShortArtPartCtrl; }; #endif // _Proc_ShortArtPartCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortCompCtrlV3.cpp000066400000000000000000000140151210750432300246250ustar00rootroot00000000000000// Proc_ShortCompCtrlV3.cpp: implementation of the Proc_ShortCompCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ShortCompCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ShortCompCtrlV3::Proc_ShortCompCtrlV3() { PcktID = "ShortCompCtrl"; } Proc_ShortCompCtrlV3::~Proc_ShortCompCtrlV3() { } void Proc_ShortCompCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Short Component Control:\n"); if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompID(pPV->GetUShort(),true); printf("\tComponent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetInstanceID(pPV->GetUShort(),true); printf("\tInstance ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("EntityV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::EntityV3,true); printf("\tComponent Class = 0 : EntityV3\n"); } else if(strcmp("ViewV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewV3,true); printf("\tComponent Class = 1 : ViewV3\n"); } else if(strcmp("ViewGrpV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewGrpV3,true); printf("\tComponent Class = 2 : ViewGrpV3\n"); } else if(strcmp("SensorV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::SensorV3,true); printf("\tComponent Class = 3 : SensorV3\n"); } else if(strcmp("RegionalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalSeaSurfaceV3,true); printf("\tComponent Class = 4 : RegionalSeaSurfaceV3\n"); } else if(strcmp("RegionalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalTerrainSurfaceV3,true); printf("\tComponent Class = 5 : RegionalTerrainSurfaceV3\n"); } else if(strcmp("RegionalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalLayeredWeatherV3,true); printf("\tComponent Class = 6 : RegionalLayeredWeatherV3\n"); } else if(strcmp("GlobalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalSeaSurfaceV3,true); printf("\tComponent Class = 7 : GlobalSeaSurfaceV3\n"); } else if(strcmp("GlobalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalTerrainSurfaceV3,true); printf("\tComponent Class = 8 : GlobalTerrainSurfaceV3\n"); } else if(strcmp("GlobalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalLayeredWeatherV3,true); printf("\tComponent Class = 9 : GlobalLayeredWeatherV3\n"); } else if(strcmp("AtmosphereV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::AtmosphereV3,true); printf("\tComponent Class = 10 : AtmosphereV3\n"); } else if(strcmp("CelestialSphereV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::CelestialSphereV3,true); printf("\tComponent Class = 11 : CelestialSphereV3\n"); } else if(strcmp("EventV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::EventV3,true); printf("\tComponent Class = 12 : EventV3\n"); } else if(strcmp("SystemV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::SystemV3,true); printf("\tComponent Class = 13 : SystemV3\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompState(pPV->GetUChar(),true); printf("\tComponent State = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tComponent Data 0 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tComponent Data 1 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ShortCompCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortCompCtrlV3.h000066400000000000000000000012411210750432300242670ustar00rootroot00000000000000// Proc_ShortCompCtrlV3.h: interface for the Proc_ShortCompCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ShortCompCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ShortCompCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ShortCompCtrlV3 : public PcktParsingProcessor { public: Proc_ShortCompCtrlV3(void); virtual ~Proc_ShortCompCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiShortCompCtrlV3 Om_ShortCompCtrl; }; #endif // _Proc_ShortCompCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortCompCtrlV3_3.cpp000066400000000000000000000147541210750432300250610ustar00rootroot00000000000000// Proc_ShortCompCtrlV3_3.cpp: implementation of the Proc_ShortCompCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ShortCompCtrlV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ShortCompCtrlV3_3::Proc_ShortCompCtrlV3_3() { PcktID = "ShortCompCtrl"; } Proc_ShortCompCtrlV3_3::~Proc_ShortCompCtrlV3_3() { } void Proc_ShortCompCtrlV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Short Component Control:\n"); if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompID(pPV->GetUShort(),true); printf("\tComponent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetInstanceID(pPV->GetUShort(),true); printf("\tInstance ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("EntityV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::EntityV3,true); printf("\tComponent Class = 0 : EntityV3\n"); } else if(strcmp("ViewV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewV3,true); printf("\tComponent Class = 1 : ViewV3\n"); } else if(strcmp("ViewGrpV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::ViewGrpV3,true); printf("\tComponent Class = 2 : ViewGrpV3\n"); } else if(strcmp("SensorV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::SensorV3,true); printf("\tComponent Class = 3 : SensorV3\n"); } else if(strcmp("RegionalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalSeaSurfaceV3,true); printf("\tComponent Class = 4 : RegionalSeaSurfaceV3\n"); } else if(strcmp("RegionalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalTerrainSurfaceV3,true); printf("\tComponent Class = 5 : RegionalTerrainSurfaceV3\n"); } else if(strcmp("RegionalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::RegionalLayeredWeatherV3,true); printf("\tComponent Class = 6 : RegionalLayeredWeatherV3\n"); } else if(strcmp("GlobalSeaSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalSeaSurfaceV3,true); printf("\tComponent Class = 7 : GlobalSeaSurfaceV3\n"); } else if(strcmp("GlobalTerrainSurfaceV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalTerrainSurfaceV3,true); printf("\tComponent Class = 8 : GlobalTerrainSurfaceV3\n"); } else if(strcmp("GlobalLayeredWeatherV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::GlobalLayeredWeatherV3,true); printf("\tComponent Class = 9 : GlobalLayeredWeatherV3\n"); } else if(strcmp("AtmosphereV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::AtmosphereV3,true); printf("\tComponent Class = 10 : AtmosphereV3\n"); } else if(strcmp("CelestialSphereV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::CelestialSphereV3,true); printf("\tComponent Class = 11 : CelestialSphereV3\n"); } else if(strcmp("EventV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::EventV3,true); printf("\tComponent Class = 12 : EventV3\n"); } else if(strcmp("SystemV3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::SystemV3,true); printf("\tComponent Class = 13 : SystemV3\n"); } else if(strcmp("SymbolSurfaceV3_3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::SymbolSurfaceV3_3,true); printf("\tComponent Class = 14 : SymbolSurfaceV3_3\n"); } else if(strcmp("SymbolV3_3",pPV->GetStr()) == 0) { Om_ShortCompCtrl.SetCompClassV3(CigiBaseCompCtrl::SymbolV3_3,true); printf("\tComponent Class = 15 : SymbolV3_3\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompState(pPV->GetUChar(),true); printf("\tComponent State = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tComponent Data 0 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ShortCompCtrl.SetCompData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tComponent Data 1 = %d\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ShortCompCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortCompCtrlV3_3.h000066400000000000000000000012651210750432300245170ustar00rootroot00000000000000// Proc_ShortCompCtrlV3_3.h: interface for the Proc_ShortCompCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ShortCompCtrlV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ShortCompCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ShortCompCtrlV3_3 : public PcktParsingProcessor { public: Proc_ShortCompCtrlV3_3(void); virtual ~Proc_ShortCompCtrlV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiShortCompCtrlV3_3 Om_ShortCompCtrl; }; #endif // _Proc_ShortCompCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortSymbolCtrlV3_3.cpp000066400000000000000000000224231210750432300254200ustar00rootroot00000000000000// Proc_ShortSymbolCtrlV3_3.cpp: implementation of the Proc_ShortSymbolCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ShortSymbolCtrlV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ShortSymbolCtrlV3_3::Proc_ShortSymbolCtrlV3_3() { PcktID = "ShortSymbolCtrl"; } Proc_ShortSymbolCtrlV3_3::~Proc_ShortSymbolCtrlV3_3() { } void Proc_ShortSymbolCtrlV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Short Symbol Control:\n"); if(pPV != NULL) { try { Om_ShortSymbolCtrl.SetSymbolID(pPV->GetUShort(),true); printf("\tSymbol ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Hidden",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetSymbolState(CigiBaseSymbolCtrl::Hidden,true); printf("\tSymbol State = 0 : Hidden\n"); } else if(strcmp("Visible",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetSymbolState(CigiBaseSymbolCtrl::Visible,true); printf("\tSymbol State = 1 : Visible\n"); } else if(strcmp("Destroyed",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetSymbolState(CigiBaseSymbolCtrl::Destroyed,true); printf("\tSymbol State = 1 : Destroyed\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Detach",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetAttachState(CigiBaseSymbolCtrl::Detach,true); printf("\tAttach State = 0 : Detach\n"); } else if(strcmp("Attach",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetAttachState(CigiBaseSymbolCtrl::Attach,true); printf("\tAttach State = 1 : Attach\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Continue",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetFlashCtrl(CigiBaseSymbolCtrl::Continue,true); printf("\tFlash Control = 0 : Continue\n"); } else if(strcmp("Reset",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetFlashCtrl(CigiBaseSymbolCtrl::Reset,true); printf("\tFlash Control = 1 : Reset\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NotInherit",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetInheritColor(CigiBaseSymbolCtrl::NotInherit,true); printf("\tInherit Color = 0 : NotInherit\n"); } else if(strcmp("Inherit",pPV->GetStr()) == 0) { Om_ShortSymbolCtrl.SetInheritColor(CigiBaseSymbolCtrl::Inherit,true); printf("\tInherit Color = 1 : Inherit\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } int tDatumId = 0; for(tDatumId=0;tDatumId<2;tDatumId++) { if(pPV != NULL) { try { if(strcmp("None",pPV->GetStr()) == 0) { printf("\tDatum %d type = 0 : None\n",tDatumId); Om_ShortSymbolCtrl.SetDatumNone(tDatumId); if((pPV = pPV->nxt()) == NULL) break; } else if(strcmp("SurfaceIdDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 1 : SurfaceIdDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetSurfaceID(tDatumId,pPV->GetUShort()); printf("\tDatum %d: Surface ID = %d\n",tDatumId,pPV->GetUShort()); } else if(strcmp("ParentIdDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 2 : ParentIdDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetParentSymbolID(tDatumId,pPV->GetUShort()); printf("\tDatum %d: Parent ID = %d\n",tDatumId,pPV->GetUShort()); } else if(strcmp("LayerDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 3 : LayerDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetLayer(tDatumId,pPV->GetUChar()); printf("\tDatum %d: Layer = %d\n",tDatumId,pPV->GetUChar()); } else if(strcmp("FlashDutyCycleDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 4 : FlashDutyCycleDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetFlashDutyCycle(tDatumId,pPV->GetUChar()); printf("\tDatum %d: Flash Duty Cycle = %d\n",tDatumId,pPV->GetUChar()); } else if(strcmp("FlashPeriodDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 5 : FlashPeriodDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetFlashPeriod(tDatumId,pPV->Getfloat()); printf("\tDatum %d: Flash Period = %f\n",tDatumId,pPV->Getfloat()); } else if(strcmp("UPositionDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 6 : UPositionDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetUPosition(tDatumId,pPV->Getfloat()); printf("\tDatum %d: U Position = %f\n",tDatumId,pPV->Getfloat()); } else if(strcmp("VPositionDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 7 : VPositionDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetVPosition(tDatumId,pPV->Getfloat()); printf("\tDatum %d: V Position = %f\n",tDatumId,pPV->Getfloat()); } else if(strcmp("RotationDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 8 : RotationDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetRotation(tDatumId,pPV->Getfloat()); printf("\tDatum %d: Rotation = %f\n",tDatumId,pPV->Getfloat()); } else if(strcmp("ColorDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 9 : ColorDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Cigi_uint8 tRed,tGreen,tBlue,tAlpha; tRed = tGreen = tBlue = tAlpha = 0; tRed = pPV->GetUChar(); if((pPV = pPV->nxt()) == NULL) break; tGreen = pPV->GetUChar(); if((pPV = pPV->nxt()) == NULL) break; tBlue = pPV->GetUChar(); if((pPV = pPV->nxt()) == NULL) break; tAlpha = pPV->GetUChar(); Om_ShortSymbolCtrl.SetColor(tDatumId, tRed,tGreen,tBlue,tAlpha); printf("\tDatum %d: Color:\n\t\t=> Red = %d\n\t\t=> Green = %d\n\t\t=> Blue = %d\n\t\t=> Alpha = %d\n", tDatumId,tRed,tGreen,tBlue,tAlpha); } else if(strcmp("ScaleUDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 10 : ScaleUDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetScaleU(tDatumId,pPV->Getfloat()); printf("\tDatum %d: U Scale = %f\n",tDatumId,pPV->Getfloat()); } else if(strcmp("ScaleVDatumType",pPV->GetStr()) == 0) { printf("\tDatum %d type = 11 : ScaleVDatumType\n",tDatumId); if((pPV = pPV->nxt()) == NULL) break; Om_ShortSymbolCtrl.SetScaleV(tDatumId,pPV->Getfloat()); printf("\tDatum %d: V Scale = %f\n",tDatumId,pPV->Getfloat()); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ShortSymbolCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ShortSymbolCtrlV3_3.h000066400000000000000000000013131210750432300250600ustar00rootroot00000000000000// Proc_ShortSymbolCtrlV3_3.h: interface for the Proc_ShortSymbolCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ShortSymbolCtrlV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ShortSymbolCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ShortSymbolCtrlV3_3 : public PcktParsingProcessor { public: Proc_ShortSymbolCtrlV3_3(void); virtual ~Proc_ShortSymbolCtrlV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiShortSymbolCtrlV3_3 Om_ShortSymbolCtrl; }; #endif // _Proc_ShortSymbolCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SpecialEffectV1.cpp000066400000000000000000000154611210750432300245630ustar00rootroot00000000000000// Proc_SpecialEffectV1.cpp: implementation of the Proc_SpecialEffectV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SpecialEffectV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SpecialEffectV1::Proc_SpecialEffectV1() { PcktID = "SpecialEffect"; } Proc_SpecialEffectV1::~Proc_SpecialEffectV1() { } void Proc_SpecialEffectV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Special Effect\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SpecialEffect.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Forward",pPV->GetStr()) == 0) { Om_SpecialEffect.SetSeqDir(CigiBaseSpecEffDef::Forward,true); printf("\tSequence Direction = 0 : Forward\n"); } else if(strcmp("Backward",pPV->GetStr()) == 0) { Om_SpecialEffect.SetSeqDir(CigiBaseSpecEffDef::Backward,true); printf("\tSequence Direction = 1 : Backward\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetColorEn(pPV->GetBool(),true); printf("\tColor Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetRed(pPV->GetUChar(),true); printf("\tRed Component = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetGreen(pPV->GetUChar(),true); printf("\tGreen Component = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetBlue(pPV->GetUChar(),true); printf("\tBlue Component = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because X Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetXScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tX Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Y Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetYScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tY Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Z Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetZScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tZ Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Time Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetTimeScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tTime Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetEffectCnt(pPV->GetUShort(),true); printf("\tEffect Count = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetSeparation(pPV->Getfloat(),true); printf("\tSeperation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetBurstRate(pPV->Getfloat(),true); printf("\tBurst Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetDuration(pPV->Getfloat(),true); printf("\tDuration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SpecialEffect; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SpecialEffectV1.h000066400000000000000000000012331210750432300242200ustar00rootroot00000000000000// Proc_SpecialEffectV1.h: interface for the Proc_SpecialEffectV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SpecialEffectV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SpecialEffectV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SpecialEffectV1 : public PcktParsingProcessor { public: Proc_SpecialEffectV1(void); virtual ~Proc_SpecialEffectV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSpecEffDefV1 Om_SpecialEffect; }; #endif // _Proc_SpecialEffectV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SpecialEffectV2.cpp000066400000000000000000000154611210750432300245640ustar00rootroot00000000000000// Proc_SpecialEffectV2.cpp: implementation of the Proc_SpecialEffectV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SpecialEffectV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SpecialEffectV2::Proc_SpecialEffectV2() { PcktID = "SpecialEffect"; } Proc_SpecialEffectV2::~Proc_SpecialEffectV2() { } void Proc_SpecialEffectV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Special Effect\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SpecialEffect.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Forward",pPV->GetStr()) == 0) { Om_SpecialEffect.SetSeqDir(CigiBaseSpecEffDef::Forward,true); printf("\tSequence Direction = 0 : Forward\n"); } else if(strcmp("Backward",pPV->GetStr()) == 0) { Om_SpecialEffect.SetSeqDir(CigiBaseSpecEffDef::Backward,true); printf("\tSequence Direction = 1 : Backward\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetColorEn(pPV->GetBool(),true); printf("\tColor Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetRed(pPV->GetUChar(),true); printf("\tRed Component = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetGreen(pPV->GetUChar(),true); printf("\tGreen Component = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetBlue(pPV->GetUChar(),true); printf("\tBlue Component = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because X Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetXScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tX Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Y Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetYScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tY Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Z Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetZScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tZ Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { // Because Time Scale gets converted to a fixed point number // the output print needs to be adjusted to give the actual // value put into the packet float tf = pPV->Getfloat(); Om_SpecialEffect.SetTimeScale(tf,true); Cigi_int16 ti = (Cigi_int16)(tf / 0.015625f); float df = ((float)ti) * 0.015625f; printf("\tTime Scale = %f\n",df); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetEffectCnt(pPV->GetUShort(),true); printf("\tEffect Count = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetSeparation(pPV->Getfloat(),true); printf("\tSeperation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetBurstRate(pPV->Getfloat(),true); printf("\tBurst Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SpecialEffect.SetDuration(pPV->Getfloat(),true); printf("\tDuration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SpecialEffect; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SpecialEffectV2.h000066400000000000000000000012331210750432300242210ustar00rootroot00000000000000// Proc_SpecialEffectV2.h: interface for the Proc_SpecialEffectV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SpecialEffectV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SpecialEffectV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SpecialEffectV2 : public PcktParsingProcessor { public: Proc_SpecialEffectV2(void); virtual ~Proc_SpecialEffectV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSpecEffDefV2 Om_SpecialEffect; }; #endif // _Proc_SpecialEffectV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolCircleDefV3_3.cpp000066400000000000000000000125651210750432300253220ustar00rootroot00000000000000// Proc_SymbolCircleDefV3_3.cpp: implementation of the Proc_SymbolCircleDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SymbolCircleDefV3_3.h" #include "CigiCircleSymbolDataV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SymbolCircleDefV3_3::Proc_SymbolCircleDefV3_3() { PcktID = "SymbolCircleDef"; } Proc_SymbolCircleDefV3_3::~Proc_SymbolCircleDefV3_3() { } void Proc_SymbolCircleDefV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Symbol Circle Definition:\n"); Om_SymbolCircleDef.ClearCircles(); if(pPV != NULL) { try { Om_SymbolCircleDef.SetSymbolID(pPV->GetUShort(),true); printf("\tSymbol ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Line",pPV->GetStr()) == 0) { Om_SymbolCircleDef.SetDrawingStyle(CigiBaseSymbolCircleDef::Line,true); printf("\tDrawing Style = 0 : Line\n"); } else if(strcmp("Fill",pPV->GetStr()) == 0) { Om_SymbolCircleDef.SetDrawingStyle(CigiBaseSymbolCircleDef::Fill,true); printf("\tDrawing Style = 1 : Fill\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCircleDef.SetStipplePattern(pPV->GetUShort(),true); printf("\tStipple Pattern = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCircleDef.SetLineWidth(pPV->Getfloat(),true); printf("\tLine Width = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCircleDef.SetStipplePatternLen(pPV->Getfloat(),true); printf("\tStipple Pattern Length = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } CigiCircleSymbolDataV3_3 *CircleDta; while((pPV != NULL)&&(*(pPV->GetStr()) != 0)) { CircleDta = (CigiCircleSymbolDataV3_3 *)Om_SymbolCircleDef.AddCircle(); if(pPV != NULL) { try { CircleDta->SetCenterUPosition(pPV->Getfloat(),true); printf("\tCenter U Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { CircleDta->SetCenterVPosition(pPV->Getfloat(),true); printf("\tCenter V Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { CircleDta->SetRadius(pPV->Getfloat(),true); printf("\tRadius = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { CircleDta->SetInnerRadius(pPV->Getfloat(),true); printf("\tInner Radius = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { CircleDta->SetStartAngle(pPV->Getfloat(),true); printf("\tStart Angle = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { CircleDta->SetEndAngle(pPV->Getfloat(),true); printf("\tEnd Angle = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SymbolCircleDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolCircleDefV3_3.h000066400000000000000000000013131210750432300247540ustar00rootroot00000000000000// Proc_SymbolCircleDefV3_3.h: interface for the Proc_SymbolCircleDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SymbolCircleDefV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SymbolCircleDefV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SymbolCircleDefV3_3 : public PcktParsingProcessor { public: Proc_SymbolCircleDefV3_3(void); virtual ~Proc_SymbolCircleDefV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSymbolCircleDefV3_3 Om_SymbolCircleDef; }; #endif // _Proc_SymbolCircleDefV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolCloneV3_3.cpp000066400000000000000000000042341210750432300245340ustar00rootroot00000000000000// Proc_SymbolCloneV3_3.cpp: implementation of the Proc_SymbolCloneV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SymbolCloneV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SymbolCloneV3_3::Proc_SymbolCloneV3_3() { PcktID = "SymbolClone"; } Proc_SymbolCloneV3_3::~Proc_SymbolCloneV3_3() { } void Proc_SymbolCloneV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Symbol Clone:\n"); if(pPV != NULL) { try { Om_SymbolClone.SetSymbolID(pPV->GetUShort(),true); printf("\tSymbol ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Symbol",pPV->GetStr()) == 0) { Om_SymbolClone.SetSourceType(CigiBaseSymbolClone::SymbolSrc,true); printf("\tSource Type = 0 : Symbol\n"); } else if(strcmp("SymbolTemplate",pPV->GetStr()) == 0) { Om_SymbolClone.SetSourceType(CigiBaseSymbolClone::SymbolTemplateSrc,true); printf("\tSource Type = 1 : Symbol Template\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolClone.SetSourceID(pPV->GetUShort(),true); printf("\tSource ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } } *Omsg << Om_SymbolClone; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolCloneV3_3.h000066400000000000000000000012371210750432300242010ustar00rootroot00000000000000// Proc_SymbolCloneV3_3.h: interface for the Proc_SymbolCloneV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SymbolCloneV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SymbolCloneV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SymbolCloneV3_3 : public PcktParsingProcessor { public: Proc_SymbolCloneV3_3(void); virtual ~Proc_SymbolCloneV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSymbolCloneV3_3 Om_SymbolClone; }; #endif // _Proc_SymbolCloneV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolCtrlV3_3.cpp000066400000000000000000000206571210750432300244070ustar00rootroot00000000000000// Proc_SymbolCtrlV3_3.cpp: implementation of the Proc_SymbolCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SymbolCtrlV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SymbolCtrlV3_3::Proc_SymbolCtrlV3_3() { PcktID = "SymbolCtrl"; } Proc_SymbolCtrlV3_3::~Proc_SymbolCtrlV3_3() { } void Proc_SymbolCtrlV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Symbol Control:\n"); if(pPV != NULL) { try { Om_SymbolCtrl.SetSymbolID(pPV->GetUShort(),true); printf("\tSymbol ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Hidden",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetSymbolState(CigiBaseSymbolCtrl::Hidden,true); printf("\tSymbol State = 0 : Hidden\n"); } else if(strcmp("Visible",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetSymbolState(CigiBaseSymbolCtrl::Visible,true); printf("\tSymbol State = 1 : Visible\n"); } else if(strcmp("Destroyed",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetSymbolState(CigiBaseSymbolCtrl::Destroyed,true); printf("\tSymbol State = 2 : Destroyed\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Detach",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetAttachState(CigiBaseSymbolCtrl::Detach,true); printf("\tAttach State = 0 : Detach\n"); } else if(strcmp("Attach",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetAttachState(CigiBaseSymbolCtrl::Attach,true); printf("\tAttach State = 1 : Attach\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Continue",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetFlashCtrl(CigiBaseSymbolCtrl::Continue,true); printf("\tFlash Control = 0 : Continue\n"); } else if(strcmp("Reset",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetFlashCtrl(CigiBaseSymbolCtrl::Reset,true); printf("\tFlash Control = 1 : Reset\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NotInherit",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetInheritColor(CigiBaseSymbolCtrl::NotInherit,true); printf("\tInherit Color = 0 : NotInherit\n"); } else if(strcmp("Inherit",pPV->GetStr()) == 0) { Om_SymbolCtrl.SetInheritColor(CigiBaseSymbolCtrl::Inherit,true); printf("\tInherit Color = 1 : Inherit\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetParentSymbolID(pPV->GetUShort(),true); printf("\tParent ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetSurfaceID(pPV->GetUShort(),true); printf("\tSurface ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetLayer(pPV->GetUChar(),true); printf("\tLayer ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetFlashDutyCycle(pPV->GetUChar(),true); printf("\tFlash Duty Cycle percentage = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetFlashPeriod(pPV->Getfloat(),true); printf("\tFlash Period = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetUPosition(pPV->Getfloat(),true); printf("\tU Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetVPosition(pPV->Getfloat(),true); printf("\tV Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetRotation(pPV->Getfloat(),true); printf("\tRotation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetRed(pPV->GetUChar(),true); printf("\tRed = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetGreen(pPV->GetUChar(),true); printf("\tGreen = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetBlue(pPV->GetUChar(),true); printf("\tBlue = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetAlpha(pPV->GetUChar(),true); printf("\tAlpha = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetScaleU(pPV->Getfloat(),true); printf("\tU Scale = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolCtrl.SetScaleV(pPV->Getfloat(),true); printf("\tV Scale = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SymbolCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolCtrlV3_3.h000066400000000000000000000012241210750432300240410ustar00rootroot00000000000000// Proc_SymbolCtrlV3_3.h: interface for the Proc_SymbolCtrlV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SymbolCtrlV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SymbolCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SymbolCtrlV3_3 : public PcktParsingProcessor { public: Proc_SymbolCtrlV3_3(void); virtual ~Proc_SymbolCtrlV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSymbolCtrlV3_3 Om_SymbolCtrl; }; #endif // _Proc_SymbolCtrlV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolLineDefV3_3.cpp000066400000000000000000000117671210750432300250130ustar00rootroot00000000000000// Proc_SymbolLineDefV3_3.cpp: implementation of the Proc_SymbolLineDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SymbolLineDefV3_3.h" #include "CigiVertexSymbolDataV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SymbolLineDefV3_3::Proc_SymbolLineDefV3_3() { PcktID = "SymbolLineDef"; } Proc_SymbolLineDefV3_3::~Proc_SymbolLineDefV3_3() { } void Proc_SymbolLineDefV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Symbol Line Definition:\n"); Om_SymbolLineDef.ClearVertices(); if(pPV != NULL) { try { Om_SymbolLineDef.SetSymbolID(pPV->GetUShort(),true); printf("\tSymbol ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Points",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::Points,true); printf("\tDrawing Primitive = 0 : Points\n"); } else if(strcmp("Lines",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::Lines,true); printf("\tDrawing Primitive = 1 : Lines\n"); } else if(strcmp("LineStrip",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::LineStrip,true); printf("\tDrawing Primitive = 2 : LineStrip\n"); } else if(strcmp("LineLoop",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::LineLoop,true); printf("\tDrawing Primitive = 3 : LineLoop\n"); } else if(strcmp("Triangles",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::Triangles,true); printf("\tDrawing Primitive = 4 : Triangles\n"); } else if(strcmp("TriangleStrip",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::TriangleStrip,true); printf("\tDrawing Primitive = 5 : TriangleStrip\n"); } else if(strcmp("TriangleFan",pPV->GetStr()) == 0) { Om_SymbolLineDef.SetPrimitive(CigiBaseSymbolLineDef::TriangleFan,true); printf("\tDrawing Primitive = 6 : TriangleFan\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolLineDef.SetStipplePattern(pPV->GetUShort(),true); printf("\tStipple Pattern = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolLineDef.SetLineWidth(pPV->Getfloat(),true); printf("\tLine Width = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolLineDef.SetStipplePatternLen(pPV->Getfloat(),true); printf("\tStipple Pattern Length = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } CigiVertexSymbolDataV3_3 *VertexDta; while((pPV != NULL)&&(*(pPV->GetStr()) != 0)) { VertexDta = (CigiVertexSymbolDataV3_3 *)Om_SymbolLineDef.AddVertex(); if(pPV != NULL) { try { VertexDta->SetVertexU(pPV->Getfloat(),true); printf("\tVertex U Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { VertexDta->SetVertexV(pPV->Getfloat(),true); printf("\tVertex V Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SymbolLineDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolLineDefV3_3.h000066400000000000000000000012651210750432300244500ustar00rootroot00000000000000// Proc_SymbolLineDefV3_3.h: interface for the Proc_SymbolLineDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SymbolLineDefV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SymbolLineDefV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SymbolLineDefV3_3 : public PcktParsingProcessor { public: Proc_SymbolLineDefV3_3(void); virtual ~Proc_SymbolLineDefV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSymbolLineDefV3_3 Om_SymbolLineDef; }; #endif // _Proc_SymbolLineDefV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolSurfaceDefV3_3.cpp000066400000000000000000000252361210750432300255100ustar00rootroot00000000000000// Proc_SymbolSurfaceDefV3_3.cpp: implementation of the Proc_SymbolSurfaceDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SymbolSurfaceDefV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SymbolSurfaceDefV3_3::Proc_SymbolSurfaceDefV3_3() { PcktID = "SymbolSurfaceDef"; } Proc_SymbolSurfaceDefV3_3::~Proc_SymbolSurfaceDefV3_3() { } void Proc_SymbolSurfaceDefV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Symbol Surface Definition:\n"); if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetSurfaceID(pPV->GetUShort(),true); printf("\tSurface ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Active",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetSurfaceState(CigiBaseSymbolSurfaceDef::Active,true); printf("\tSurface State = 0 : Active\n"); } else if(strcmp("Destroyed",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetSurfaceState(CigiBaseSymbolSurfaceDef::Destroyed,true); printf("\tSurface State = 1 : Destroyed\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("EntityAttached",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetAttached(CigiBaseSymbolSurfaceDef::EntityAttached,true); printf("\tAttach State = 0 : EntityAttached\n"); } else if(strcmp("ViewAttached",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetAttached(CigiBaseSymbolSurfaceDef::ViewAttached,true); printf("\tAttach State = 1 : ViewAttached\n"); EntAt = false; } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NotBillboard",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetBillboardState(CigiBaseSymbolSurfaceDef::NotBillboard,true); printf("\tBillBoard State = 0 : NotBillboard\n"); } else if(strcmp("Billboard",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetBillboardState(CigiBaseSymbolSurfaceDef::Billboard,true); printf("\tBillBoard State = 1 : Billboard\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Disable",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetPerspectiveGrowth(CigiBaseSymbolSurfaceDef::Disable,true); printf("\tPerspective Growth = 0 : Disable\n"); } else if(strcmp("Enable",pPV->GetStr()) == 0) { Om_SymbolSurfaceDef.SetPerspectiveGrowth(CigiBaseSymbolSurfaceDef::Enable,true); printf("\tPerspective Growth = 1 : Enable\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(EntAt) { if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetXOffset(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetYOffset(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetZOffset(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetWidth(pPV->Getfloat(),true); printf("\tWidth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetHeight(pPV->Getfloat(),true); printf("\tHeight = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } } else { if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetLeftEdgePosition(pPV->Getfloat(),true); printf("\tLeft Edge Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetRightEdgePosition(pPV->Getfloat(),true); printf("\tRight Edge Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetTopEdgePosition(pPV->Getfloat(),true); printf("\tTop Edge Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetBottomEdgePosition(pPV->Getfloat(),true); printf("\tBottom Edge Position = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } Om_SymbolSurfaceDef.SetPitch(0.0f,true); Om_SymbolSurfaceDef.SetRoll(0.0f,true); Om_SymbolSurfaceDef.SetWidth(0.0f,true); Om_SymbolSurfaceDef.SetHeight(0.0f,true); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetMinU(pPV->Getfloat(),true); printf("\tMinimum U Coordinate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetMaxU(pPV->Getfloat(),true); printf("\tMaximum U Coordinate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetMinV(pPV->Getfloat(),true); printf("\tMinimum V Coordinate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolSurfaceDef.SetMaxV(pPV->Getfloat(),true); printf("\tMaximum V Coordinate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SymbolSurfaceDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolSurfaceDefV3_3.h000066400000000000000000000013261210750432300251470ustar00rootroot00000000000000// Proc_SymbolSurfaceDefV3_3.h: interface for the Proc_SymbolSurfaceDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SymbolSurfaceDefV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SymbolSurfaceDefV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SymbolSurfaceDefV3_3 : public PcktParsingProcessor { public: Proc_SymbolSurfaceDefV3_3(void); virtual ~Proc_SymbolSurfaceDefV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSymbolSurfaceDefV3_3 Om_SymbolSurfaceDef; }; #endif // _Proc_SymbolSurfaceDefV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolTextDefV3_3.cpp000066400000000000000000000130331210750432300250340ustar00rootroot00000000000000// Proc_SymbolTextDefV3_3.cpp: implementation of the Proc_SymbolTextDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SymbolTextDefV3_3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SymbolTextDefV3_3::Proc_SymbolTextDefV3_3() { PcktID = "SymbolTextDef"; } Proc_SymbolTextDefV3_3::~Proc_SymbolTextDefV3_3() { } void Proc_SymbolTextDefV3_3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; bool EntAt = true; pPV = pPV->nxt(); // skip the cmd name printf("Symbol Text Definition:\n"); if(pPV != NULL) { try { Om_SymbolTextDef.SetSymbolID(pPV->GetUShort(),true); printf("\tSymbol ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("TopLeft",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::TopLeft,true); printf("\tAlignment State = 0 : TopLeft\n"); } else if(strcmp("TopCenter",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::TopCenter,true); printf("\tAlignment State = 1 : TopCenter\n"); } else if(strcmp("TopRight",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::TopRight,true); printf("\tAlignment State = 2 : TopRight\n"); } else if(strcmp("CenterLeft",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::CenterLeft,true); printf("\tAlignment State = 3 : CenterLeft\n"); } else if(strcmp("Center",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::Center,true); printf("\tAlignment State = 4 : Center\n"); } else if(strcmp("CenterRight",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::CenterRight,true); printf("\tAlignment State = 5 : CenterRight\n"); } else if(strcmp("BottomLeft",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::BottomLeft,true); printf("\tAlignment State = 6 : BottomLeft\n"); } else if(strcmp("BottomCenter",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::BottomCenter,true); printf("\tAlignment State = 7 : BottomCenter\n"); } else if(strcmp("BottomRight",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetAlignment(CigiBaseSymbolTextDef::BottomRight,true); printf("\tAlignment State = 8 : BottomRight\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("LeftToRight",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetOrientation(CigiBaseSymbolTextDef::LeftToRight,true); printf("\tOrientation State = 0 : LeftToRight\n"); } else if(strcmp("TopToBottom",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetOrientation(CigiBaseSymbolTextDef::TopToBottom,true); printf("\tOrientation State = 1 : TopToBottom\n"); } else if(strcmp("RightToLeft",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetOrientation(CigiBaseSymbolTextDef::RightToLeft,true); printf("\tOrientation State = 2 : RightToLeft\n"); } else if(strcmp("BottomToTop",pPV->GetStr()) == 0) { Om_SymbolTextDef.SetOrientation(CigiBaseSymbolTextDef::BottomToTop,true); printf("\tOrientation State = 3 : BottomToTop\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolTextDef.SetFontID(pPV->GetUChar(),true); printf("\tFont ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SymbolTextDef.SetFontSize(pPV->Getfloat(),true); printf("\tFont Size = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { std::string txt(pPV->GetStr()); Om_SymbolTextDef.SetText(txt,true); printf("\tText = %s\n",txt.c_str()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_SymbolTextDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_SymbolTextDefV3_3.h000066400000000000000000000012651210750432300245050ustar00rootroot00000000000000// Proc_SymbolTextDefV3_3.h: interface for the Proc_SymbolTextDefV3_3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_SymbolTextDefV3_3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_SymbolTextDefV3_3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_SymbolTextDefV3_3 : public PcktParsingProcessor { public: Proc_SymbolTextDefV3_3(void); virtual ~Proc_SymbolTextDefV3_3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiSymbolTextDefV3_3 Om_SymbolTextDef; }; #endif // _Proc_SymbolTextDefV3_3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TerrestrialSurfaceCtrlV3.cpp000066400000000000000000000071051210750432300265220ustar00rootroot00000000000000// Proc_TerrestrialSurfaceCtrlV3.cpp: implementation of the Proc_TerrestrialSurfaceCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_TerrestrialSurfaceCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_TerrestrialSurfaceCtrlV3::Proc_TerrestrialSurfaceCtrlV3() { PcktID = "TerrestrialSurfaceCtrl"; } Proc_TerrestrialSurfaceCtrlV3::~Proc_TerrestrialSurfaceCtrlV3() { } void Proc_TerrestrialSurfaceCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Terrestrial Surface Control:\n"); if(pPV != NULL) { try { Om_TerrestrialSurfaceCtrl.SetEntityRgnID(pPV->GetUShort(),true); printf("\tEntity Region ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_TerrestrialSurfaceCtrl.SetSurfaceCondID(pPV->GetUShort(),true); printf("\tSurface Condition ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_TerrestrialSurfaceCtrl.SetSurfaceCondEn(pPV->GetBool(),true); printf("\tSurface Condition Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Global",pPV->GetStr()) == 0) { Om_TerrestrialSurfaceCtrl.SetScope(CigiBaseTerrestrialSurfaceCtrl::Global,true); printf("\tScope = 0 : Global\n"); } else if(strcmp("Regional",pPV->GetStr()) == 0) { Om_TerrestrialSurfaceCtrl.SetScope(CigiBaseTerrestrialSurfaceCtrl::Regional,true); printf("\tScope = 1 : Regional\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_TerrestrialSurfaceCtrl.SetScope(CigiBaseTerrestrialSurfaceCtrl::Entity,true); printf("\tScope = 2 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_TerrestrialSurfaceCtrl.SetSeverity(pPV->GetUChar(),true); printf("\tSeverity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_TerrestrialSurfaceCtrl.SetCoverage(pPV->GetUChar(),true); printf("\tCoverage = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_TerrestrialSurfaceCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TerrestrialSurfaceCtrlV3.h000066400000000000000000000014041210750432300261630ustar00rootroot00000000000000// Proc_TerrestrialSurfaceCtrlV3.h: interface for the Proc_TerrestrialSurfaceCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_TerrestrialSurfaceCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_TerrestrialSurfaceCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_TerrestrialSurfaceCtrlV3 : public PcktParsingProcessor { public: Proc_TerrestrialSurfaceCtrlV3(void); virtual ~Proc_TerrestrialSurfaceCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiTerrestrialSurfaceCtrlV3 Om_TerrestrialSurfaceCtrl; }; #endif // _Proc_TerrestrialSurfaceCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TrajectoryV1.cpp000066400000000000000000000062121210750432300242060ustar00rootroot00000000000000// Proc_TrajectoryV1.cpp: implementation of the Proc_TrajectoryV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_TrajectoryV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_TrajectoryV1::Proc_TrajectoryV1() { PcktID = "Trajectory"; } Proc_TrajectoryV1::~Proc_TrajectoryV1() { } void Proc_TrajectoryV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Trajectory:\n"); if(pPV != NULL) { try { Om_Trajectory.SetEntityID(pPV->GetUShort(),true); printf("\tEntityID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetAccel(pPV->Getfloat(),true); printf("\tAcceleration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetRetardationRate(pPV->Getfloat(),true); printf("\tRetardation Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetTermVel(pPV->Getfloat(),true); printf("\tTerminal Velocity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetXoff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetYoff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetZoff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_Trajectory; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TrajectoryV1.h000066400000000000000000000012061210750432300236510ustar00rootroot00000000000000// Proc_TrajectoryV1.h: interface for the Proc_TrajectoryV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_TrajectoryV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_TrajectoryV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_TrajectoryV1 : public PcktParsingProcessor { public: Proc_TrajectoryV1(void); virtual ~Proc_TrajectoryV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiTrajectoryDefV1 Om_Trajectory; }; #endif // _Proc_TrajectoryV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TrajectoryV2.cpp000066400000000000000000000043111210750432300242050ustar00rootroot00000000000000// Proc_TrajectoryV2.cpp: implementation of the Proc_TrajectoryV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_TrajectoryV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_TrajectoryV2::Proc_TrajectoryV2() { PcktID = "Trajectory"; } Proc_TrajectoryV2::~Proc_TrajectoryV2() { } void Proc_TrajectoryV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Trajectory:\n"); if(pPV != NULL) { try { Om_Trajectory.SetEntityID(pPV->GetUShort(),true); printf("\tEntityID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetAccel(pPV->Getfloat(),true); printf("\tAcceleration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetRetardationRate(pPV->Getfloat(),true); printf("\tRetardation Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetTermVel(pPV->Getfloat(),true); printf("\tTerminal Velocity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_Trajectory; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TrajectoryV2.h000066400000000000000000000012061210750432300236520ustar00rootroot00000000000000// Proc_TrajectoryV2.h: interface for the Proc_TrajectoryV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_TrajectoryV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_TrajectoryV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_TrajectoryV2 : public PcktParsingProcessor { public: Proc_TrajectoryV2(void); virtual ~Proc_TrajectoryV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiTrajectoryDefV2 Om_Trajectory; }; #endif // _Proc_TrajectoryV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TrajectoryV3.cpp000066400000000000000000000055341210750432300242160ustar00rootroot00000000000000// Proc_TrajectoryV3.cpp: implementation of the Proc_TrajectoryV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_TrajectoryV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_TrajectoryV3::Proc_TrajectoryV3() { PcktID = "Trajectory"; } Proc_TrajectoryV3::~Proc_TrajectoryV3() { } void Proc_TrajectoryV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Trajectory:\n"); if(pPV != NULL) { try { Om_Trajectory.SetEntityID(pPV->GetUShort(),true); printf("\tEntityID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetAccelX(pPV->Getfloat(),true); printf("\tX Acceleration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetAccelY(pPV->Getfloat(),true); printf("\tY Acceleration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetAccelZ(pPV->Getfloat(),true); printf("\tZ Acceleration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetRetardationRate(pPV->Getfloat(),true); printf("\tRetardation Rate = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_Trajectory.SetTermVel(pPV->Getfloat(),true); printf("\tTerminal Velocity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_Trajectory; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_TrajectoryV3.h000066400000000000000000000012061210750432300236530ustar00rootroot00000000000000// Proc_TrajectoryV3.h: interface for the Proc_TrajectoryV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_TrajectoryV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_TrajectoryV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_TrajectoryV3 : public PcktParsingProcessor { public: Proc_TrajectoryV3(void); virtual ~Proc_TrajectoryV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiTrajectoryDefV3 Om_Trajectory; }; #endif // _Proc_TrajectoryV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewCtrlV1.cpp000066400000000000000000000072731210750432300236270ustar00rootroot00000000000000// Proc_ViewCtrlV1.cpp: implementation of the Proc_ViewCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ViewCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ViewCtrlV1::Proc_ViewCtrlV1() { PcktID = "ViewCtrl"; } Proc_ViewCtrlV1::~Proc_ViewCtrlV1() { } void Proc_ViewCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("View Control:\n"); if(pPV != NULL) { try { Om_ViewCtrl.SetViewID(pPV->GetUChar(),true); printf("\tView ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetGroupID(pPV->GetUChar(),true); printf("\tGroup ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetXOff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYOff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetZOff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ViewCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewCtrlV1.h000066400000000000000000000011521210750432300232620ustar00rootroot00000000000000// Proc_ViewCtrlV1.h: interface for the Proc_ViewCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ViewCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ViewCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ViewCtrlV1 : public PcktParsingProcessor { public: Proc_ViewCtrlV1(void); virtual ~Proc_ViewCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiViewCtrlV1 Om_ViewCtrl; }; #endif // _Proc_ViewCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewCtrlV2.cpp000066400000000000000000000131151210750432300236200ustar00rootroot00000000000000// Proc_ViewCtrlV2.cpp: implementation of the Proc_ViewCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ViewCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ViewCtrlV2::Proc_ViewCtrlV2() { PcktID = "ViewCtrl"; } Proc_ViewCtrlV2::~Proc_ViewCtrlV2() { } void Proc_ViewCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("View Control:\n"); if(pPV != NULL) { try { Om_ViewCtrl.SetViewID(pPV->GetUChar(),true); printf("\tView ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetGroupID(pPV->GetUChar(),true); printf("\tGroup ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetXOffEn(pPV->GetBool(),true); printf("\tX Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYOffEn(pPV->GetBool(),true); printf("\tY Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetZOffEn(pPV->GetBool(),true); printf("\tZ Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetRollEn(pPV->GetBool(),true); printf("\tRoll Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetPitchEn(pPV->GetBool(),true); printf("\tPitch Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYawEn(pPV->GetBool(),true); printf("\tYaw Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetXOff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYOff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetZOff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ViewCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewCtrlV2.h000066400000000000000000000011521210750432300232630ustar00rootroot00000000000000// Proc_ViewCtrlV2.h: interface for the Proc_ViewCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ViewCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ViewCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ViewCtrlV2 : public PcktParsingProcessor { public: Proc_ViewCtrlV2(void); virtual ~Proc_ViewCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiViewCtrlV2 Om_ViewCtrl; }; #endif // _Proc_ViewCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewCtrlV3.cpp000066400000000000000000000131021210750432300236150ustar00rootroot00000000000000// Proc_ViewCtrlV3.cpp: implementation of the Proc_ViewCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ViewCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ViewCtrlV3::Proc_ViewCtrlV3() { PcktID = "ViewCtrl"; } Proc_ViewCtrlV3::~Proc_ViewCtrlV3() { } void Proc_ViewCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("View Control:\n"); if(pPV != NULL) { try { Om_ViewCtrl.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetGroupID(pPV->GetUChar(),true); printf("\tGroup ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetXOffEn(pPV->GetBool(),true); printf("\tX Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYOffEn(pPV->GetBool(),true); printf("\tY Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetZOffEn(pPV->GetBool(),true); printf("\tZ Offset Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetRollEn(pPV->GetBool(),true); printf("\tRoll Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetPitchEn(pPV->GetBool(),true); printf("\tPitch Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYawEn(pPV->GetBool(),true); printf("\tYaw Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetXOff(pPV->Getfloat(),true); printf("\tX Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYOff(pPV->Getfloat(),true); printf("\tY Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetZOff(pPV->Getfloat(),true); printf("\tZ Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewCtrl.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ViewCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewCtrlV3.h000066400000000000000000000011521210750432300232640ustar00rootroot00000000000000// Proc_ViewCtrlV3.h: interface for the Proc_ViewCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ViewCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ViewCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ViewCtrlV3 : public PcktParsingProcessor { public: Proc_ViewCtrlV3(void); virtual ~Proc_ViewCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiViewCtrlV3 Om_ViewCtrl; }; #endif // _Proc_ViewCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewDefV1.cpp000066400000000000000000000161371210750432300234200ustar00rootroot00000000000000// Proc_ViewDefV1.cpp: implementation of the Proc_ViewDefV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ViewDefV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ViewDefV1::Proc_ViewDefV1() { PcktID = "ViewDef"; } Proc_ViewDefV1::~Proc_ViewDefV1() { } void Proc_ViewDefV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("View Definition:\n"); if(pPV != NULL) { try { Om_ViewDef.SetViewID(pPV->GetUChar(),true); printf("\tView ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetGroupID(pPV->GetUChar(),true); printf("\tGroup ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetViewType(pPV->GetUChar(),true); printf("\tView Type = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("ReplicateNone",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateNone,true); printf("\tReplicate Mode = 0 : ReplicateNone\n"); } else if(strcmp("Replicate1x2",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate1x2,true); printf("\tReplicate Mode = 1 : Replicate1x2\n"); } else if(strcmp("Replicate2x1",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate2x1,true); printf("\tReplicate Mode = 2 : Replicate2x1\n"); } else if(strcmp("Replicate2x2",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate2x2,true); printf("\tReplicate Mode = 3 : Replicate2x2\n"); } else if(strcmp("ReplicateDefA",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefA,true); printf("\tReplicate Mode = 4 : ReplicateDefA\n"); } else if(strcmp("ReplicateDefB",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefB,true); printf("\tReplicate Mode = 5 : ReplicateDefB\n"); } else if(strcmp("ReplicateDefC",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefC,true); printf("\tReplicate Mode = 6 : ReplicateDefC\n"); } else if(strcmp("ReplicateDefD",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefD,true); printf("\tReplicate Mode = 7 : ReplicateDefD\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("MirrorNone",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::MirrorNone,true); printf("\tMirror Mode = 0 : MirrorNone\n"); } else if(strcmp("Horizontal",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Horizontal,true); printf("\tMirror Mode = 1 : Horizontal\n"); } else if(strcmp("Vertical",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Vertical,true); printf("\tMirror Mode = 2 : Vertical\n"); } else if(strcmp("Horiz_Vert",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Horiz_Vert,true); printf("\tMirror Mode = 3 : Horiz_Vert\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetTrackerAssigned(pPV->GetBool(),true); printf("\tTracker Assigned = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVNear(pPV->Getfloat(),true); printf("\tNear FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVFar(pPV->Getfloat(),true); printf("\tFar FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVLeft(pPV->Getfloat(),true); printf("\tLeft FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVRight(pPV->Getfloat(),true); printf("\tRight FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVTop(pPV->Getfloat(),true); printf("\tTop FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVBottom(pPV->Getfloat(),true); printf("\tBottom FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ViewDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewDefV1.h000066400000000000000000000011371210750432300230570ustar00rootroot00000000000000// Proc_ViewDefV1.h: interface for the Proc_ViewDefV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ViewDefV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ViewDefV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ViewDefV1 : public PcktParsingProcessor { public: Proc_ViewDefV1(void); virtual ~Proc_ViewDefV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiViewDefV1 Om_ViewDef; }; #endif // _Proc_ViewDefV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewDefV2.cpp000066400000000000000000000221451210750432300234150ustar00rootroot00000000000000// Proc_ViewDefV2.cpp: implementation of the Proc_ViewDefV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ViewDefV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ViewDefV2::Proc_ViewDefV2() { PcktID = "ViewDef"; } Proc_ViewDefV2::~Proc_ViewDefV2() { } void Proc_ViewDefV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("View Definition:\n"); if(pPV != NULL) { try { Om_ViewDef.SetViewID(pPV->GetUChar(),true); printf("\tView ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetGroupID(pPV->GetUChar(),true); printf("\tGroup ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetViewType(pPV->GetUChar(),true); printf("\tView Type = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("ReplicateNone",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateNone,true); printf("\tReplicate Mode = 0 : ReplicateNone\n"); } else if(strcmp("Replicate1x2",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate1x2,true); printf("\tReplicate Mode = 1 : Replicate1x2\n"); } else if(strcmp("Replicate2x1",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate2x1,true); printf("\tReplicate Mode = 2 : Replicate2x1\n"); } else if(strcmp("Replicate2x2",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate2x2,true); printf("\tReplicate Mode = 3 : Replicate2x2\n"); } else if(strcmp("ReplicateDefA",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefA,true); printf("\tReplicate Mode = 4 : ReplicateDefA\n"); } else if(strcmp("ReplicateDefB",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefB,true); printf("\tReplicate Mode = 5 : ReplicateDefB\n"); } else if(strcmp("ReplicateDefC",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefC,true); printf("\tReplicate Mode = 6 : ReplicateDefC\n"); } else if(strcmp("ReplicateDefD",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefD,true); printf("\tReplicate Mode = 7 : ReplicateDefD\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("MirrorNone",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::MirrorNone,true); printf("\tMirror Mode = 0 : MirrorNone\n"); } else if(strcmp("Horizontal",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Horizontal,true); printf("\tMirror Mode = 1 : Horizontal\n"); } else if(strcmp("Vertical",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Vertical,true); printf("\tMirror Mode = 2 : Vertical\n"); } else if(strcmp("Horiz_Vert",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Horiz_Vert,true); printf("\tMirror Mode = 3 : Horiz_Vert\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetTrackerAssigned(pPV->GetBool(),true); printf("\tTracker Assigned = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVNearEn(pPV->GetBool(),true); printf("\tNear FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVFarEn(pPV->GetBool(),true); printf("\tFar FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVLeftEn(pPV->GetBool(),true); printf("\tLeft FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVRightEn(pPV->GetBool(),true); printf("\tRight FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVTopEn(pPV->GetBool(),true); printf("\tTop FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVBottomEn(pPV->GetBool(),true); printf("\tBottom FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVNear(pPV->Getfloat(),true); printf("\tNear FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVFar(pPV->Getfloat(),true); printf("\tFar FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVLeft(pPV->Getfloat(),true); printf("\tLeft FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVRight(pPV->Getfloat(),true); printf("\tRight FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVTop(pPV->Getfloat(),true); printf("\tTop FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVBottom(pPV->Getfloat(),true); printf("\tBottom FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ViewDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewDefV2.h000066400000000000000000000011371210750432300230600ustar00rootroot00000000000000// Proc_ViewDefV2.h: interface for the Proc_ViewDefV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ViewDefV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ViewDefV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ViewDefV2 : public PcktParsingProcessor { public: Proc_ViewDefV2(void); virtual ~Proc_ViewDefV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiViewDefV2 Om_ViewDef; }; #endif // _Proc_ViewDefV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewDefV3.cpp000066400000000000000000000233361210750432300234210ustar00rootroot00000000000000// Proc_ViewDefV3.cpp: implementation of the Proc_ViewDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_ViewDefV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_ViewDefV3::Proc_ViewDefV3() { PcktID = "ViewDef"; } Proc_ViewDefV3::~Proc_ViewDefV3() { } void Proc_ViewDefV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("View Definition:\n"); if(pPV != NULL) { try { Om_ViewDef.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetGroupID(pPV->GetUChar(),true); printf("\tGroup ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVNearEn(pPV->GetBool(),true); printf("\tNear FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVFarEn(pPV->GetBool(),true); printf("\tFar FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVLeftEn(pPV->GetBool(),true); printf("\tLeft FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVRightEn(pPV->GetBool(),true); printf("\tRight FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVTopEn(pPV->GetBool(),true); printf("\tTop FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVBottomEn(pPV->GetBool(),true); printf("\tBottom FOV Clipping Plane Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("MirrorNone",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::MirrorNone,true); printf("\tMirror Mode = 0 : MirrorNone\n"); } else if(strcmp("Horizontal",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Horizontal,true); printf("\tMirror Mode = 1 : Horizontal\n"); } else if(strcmp("Vertical",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Vertical,true); printf("\tMirror Mode = 2 : Vertical\n"); } else if(strcmp("Horiz_Vert",pPV->GetStr()) == 0) { Om_ViewDef.SetMirrorMode(CigiBaseViewDef::Horiz_Vert,true); printf("\tMirror Mode = 3 : Horiz_Vert\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("ReplicateNone",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateNone,true); printf("\tReplicate Mode = 0 : ReplicateNone\n"); } else if(strcmp("Replicate1x2",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate1x2,true); printf("\tReplicate Mode = 1 : Replicate1x2\n"); } else if(strcmp("Replicate2x1",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate2x1,true); printf("\tReplicate Mode = 2 : Replicate2x1\n"); } else if(strcmp("Replicate2x2",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::Replicate2x2,true); printf("\tReplicate Mode = 3 : Replicate2x2\n"); } else if(strcmp("ReplicateDefA",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefA,true); printf("\tReplicate Mode = 4 : ReplicateDefA\n"); } else if(strcmp("ReplicateDefB",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefB,true); printf("\tReplicate Mode = 5 : ReplicateDefB\n"); } else if(strcmp("ReplicateDefC",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefC,true); printf("\tReplicate Mode = 6 : ReplicateDefC\n"); } else if(strcmp("ReplicateDefD",pPV->GetStr()) == 0) { Om_ViewDef.SetPixelReplicateMode(CigiBaseViewDef::ReplicateDefD,true); printf("\tReplicate Mode = 7 : ReplicateDefD\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Perspective",pPV->GetStr()) == 0) { Om_ViewDef.SetProjectionType(CigiBaseViewDef::Perspective,true); printf("\tProjection Type = 0 : Perspective\n"); } else if(strcmp("Orthographic",pPV->GetStr()) == 0) { Om_ViewDef.SetProjectionType(CigiBaseViewDef::Orthographic,true); printf("\tProjection Type = 1 : Orthographic\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetReorder(pPV->GetBool(),true); printf("\tReorder = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetViewType(pPV->GetUChar(),true); printf("\tView Type = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVNear(pPV->Getfloat(),true); printf("\tNear FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVFar(pPV->Getfloat(),true); printf("\tFar FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVLeft(pPV->Getfloat(),true); printf("\tLeft FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVRight(pPV->Getfloat(),true); printf("\tRight FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVTop(pPV->Getfloat(),true); printf("\tTop FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_ViewDef.SetFOVBottom(pPV->Getfloat(),true); printf("\tBottom FOV Clipping Plane = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_ViewDef; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_ViewDefV3.h000066400000000000000000000011371210750432300230610ustar00rootroot00000000000000// Proc_ViewDefV3.h: interface for the Proc_ViewDefV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_ViewDefV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_ViewDefV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_ViewDefV3 : public PcktParsingProcessor { public: Proc_ViewDefV3(void); virtual ~Proc_ViewDefV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiViewDefV3 Om_ViewDef; }; #endif // _Proc_ViewDefV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WaveCtrlV3.cpp000066400000000000000000000124131210750432300236110ustar00rootroot00000000000000// Proc_WaveCtrlV3.cpp: implementation of the Proc_WaveCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_WaveCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_WaveCtrlV3::Proc_WaveCtrlV3() { PcktID = "WaveCtrl"; } Proc_WaveCtrlV3::~Proc_WaveCtrlV3() { } void Proc_WaveCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Wave Control:\n"); if(pPV != NULL) { try { Om_WaveCtrl.SetEntityRgnID(pPV->GetUShort(),true); printf("\tEntity Region ID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetWaveID(pPV->GetUChar(),true); printf("\tWave ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetWaveEn(pPV->GetBool(),true); printf("\tWave Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Global",pPV->GetStr()) == 0) { Om_WaveCtrl.SetScope(CigiBaseWaveCtrl::Global,true); printf("\tScope = 0 : Global\n"); } else if(strcmp("Regional",pPV->GetStr()) == 0) { Om_WaveCtrl.SetScope(CigiBaseWaveCtrl::Regional,true); printf("\tScope = 1 : Regional\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_WaveCtrl.SetScope(CigiBaseWaveCtrl::Entity,true); printf("\tScope = 2 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Plunging",pPV->GetStr()) == 0) { Om_WaveCtrl.SetBreaker(CigiBaseWaveCtrl::Plunging,true); printf("\tBreaker = 0 : Plunging\n"); } else if(strcmp("Spilling",pPV->GetStr()) == 0) { Om_WaveCtrl.SetBreaker(CigiBaseWaveCtrl::Spilling,true); printf("\tBreaker = 1 : Spilling\n"); } else if(strcmp("Surging",pPV->GetStr()) == 0) { Om_WaveCtrl.SetBreaker(CigiBaseWaveCtrl::Surging,true); printf("\tBreaker = 2 : Surging\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetWaveHt(pPV->Getfloat(),true); printf("\tWave Height = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetWaveLen(pPV->Getfloat(),true); printf("\tWavelength = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetPeriod(pPV->Getfloat(),true); printf("\tPeriod = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetDirection(pPV->Getfloat(),true); printf("\tDirection = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetPhaseOff(pPV->Getfloat(),true); printf("\tPhase Offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WaveCtrl.SetLeading(pPV->Getfloat(),true); printf("\tLeading = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_WaveCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WaveCtrlV3.h000066400000000000000000000011521210750432300232540ustar00rootroot00000000000000// Proc_WaveCtrlV3.h: interface for the Proc_WaveCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_WaveCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_WaveCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_WaveCtrlV3 : public PcktParsingProcessor { public: Proc_WaveCtrlV3(void); virtual ~Proc_WaveCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiWaveCtrlV3 Om_WaveCtrl; }; #endif // _Proc_WaveCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WeatherCtrlV1.cpp000066400000000000000000000134431210750432300243100ustar00rootroot00000000000000// Proc_WeatherCtrlV1.cpp: implementation of the Proc_WeatherCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_WeatherCtrlV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_WeatherCtrlV1::Proc_WeatherCtrlV1() { PcktID = "WeatherCtrl"; } Proc_WeatherCtrlV1::~Proc_WeatherCtrlV1() { } void Proc_WeatherCtrlV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Weather Control:\n"); if(pPV != NULL) { try { unsigned short ts = pPV->GetUShort(); Om_WeatherCtrl.SetEntityID(ts,true); printf("\tID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetWeatherEn(pPV->GetBool(),true); printf("\tWeather Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetScudEn(pPV->GetBool(),true); printf("\tScud Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetRandomWindsEn(pPV->GetBool(),true); printf("\tRandom Winds Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetSeverity(pPV->GetUChar(),true); printf("\tSeverity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetPhenomenonType(pPV->GetUShort(),true); printf("\tPhenomenon Type = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetOpacity(pPV->Getfloat(),true); printf("\tOpacity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetScudFreq(pPV->Getfloat(),true); printf("\tScud Frequency = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetCoverage(pPV->Getfloat(),true); printf("\tCoverage = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetBaseElev(pPV->Getfloat(),true); printf("\tBase Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetThickness(pPV->Getfloat(),true); printf("\tThickness = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetTransition(pPV->Getfloat(),true); printf("\tTransition = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_WeatherCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WeatherCtrlV1.h000066400000000000000000000012131210750432300237450ustar00rootroot00000000000000// Proc_WeatherCtrlV1.h: interface for the Proc_WeatherCtrlV1 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_WeatherCtrlV1_PARSING_PROCESSOR_INCLUDED_) #define _Proc_WeatherCtrlV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_WeatherCtrlV1 : public PcktParsingProcessor { public: Proc_WeatherCtrlV1(void); virtual ~Proc_WeatherCtrlV1(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiWeatherCtrlV1 Om_WeatherCtrl; }; #endif // _Proc_WeatherCtrlV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WeatherCtrlV2.cpp000066400000000000000000000134431210750432300243110ustar00rootroot00000000000000// Proc_WeatherCtrlV2.cpp: implementation of the Proc_WeatherCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_WeatherCtrlV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_WeatherCtrlV2::Proc_WeatherCtrlV2() { PcktID = "WeatherCtrl"; } Proc_WeatherCtrlV2::~Proc_WeatherCtrlV2() { } void Proc_WeatherCtrlV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Weather Control:\n"); if(pPV != NULL) { try { unsigned short ts = pPV->GetUShort(); Om_WeatherCtrl.SetEntityID(ts,true); printf("\tID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetWeatherEn(pPV->GetBool(),true); printf("\tWeather Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetScudEn(pPV->GetBool(),true); printf("\tScud Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetRandomWindsEn(pPV->GetBool(),true); printf("\tRandom Winds Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetSeverity(pPV->GetUChar(),true); printf("\tSeverity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetPhenomenonType(pPV->GetUShort(),true); printf("\tPhenomenon Type = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetOpacity(pPV->Getfloat(),true); printf("\tOpacity = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetScudFreq(pPV->Getfloat(),true); printf("\tScud Frequency = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetCoverage(pPV->Getfloat(),true); printf("\tCoverage = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetBaseElev(pPV->Getfloat(),true); printf("\tBase Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetThickness(pPV->Getfloat(),true); printf("\tThickness = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetTransition(pPV->Getfloat(),true); printf("\tTransition = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_WeatherCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WeatherCtrlV2.h000066400000000000000000000012131210750432300237460ustar00rootroot00000000000000// Proc_WeatherCtrlV2.h: interface for the Proc_WeatherCtrlV2 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_WeatherCtrlV2_PARSING_PROCESSOR_INCLUDED_) #define _Proc_WeatherCtrlV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_WeatherCtrlV2 : public PcktParsingProcessor { public: Proc_WeatherCtrlV2(void); virtual ~Proc_WeatherCtrlV2(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiWeatherCtrlV2 Om_WeatherCtrl; }; #endif // _Proc_WeatherCtrlV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WeatherCtrlV3.cpp000066400000000000000000000272771210750432300243240ustar00rootroot00000000000000// Proc_WeatherCtrlV3.cpp: implementation of the Proc_WeatherCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_WeatherCtrlV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_WeatherCtrlV3::Proc_WeatherCtrlV3() { PcktID = "WeatherCtrl"; } Proc_WeatherCtrlV3::~Proc_WeatherCtrlV3() { } void Proc_WeatherCtrlV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; pPV = pPV->nxt(); // skip the cmd name printf("Weather Control:\n"); if(pPV != NULL) { try { unsigned short ts = pPV->GetUShort(); Om_WeatherCtrl.SetEntityID(ts,true); Om_WeatherCtrl.SetRegionID(ts,true); printf("\tID = %d\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetLayerID(pPV->GetUChar(),true); printf("\tLayer ID = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetHumidity(pPV->GetUChar(),true); printf("\tHumidity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetWeatherEn(pPV->GetBool(),true); printf("\tWeather Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetScudEn(pPV->GetBool(),true); printf("\tScud Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetRandomWindsEn(pPV->GetBool(),true); printf("\tRandom Winds Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetRandomLightningEn(pPV->GetBool(),true); printf("\tRandom Lightning Enable = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("None",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::None,true); printf("\tCloud Type = 0 : None\n"); } else if(strcmp("Altocumulus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Altocumulus,true); printf("\tCloud Type = 1 : Altocumulus\n"); } else if(strcmp("Altostratus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Altostratus,true); printf("\tCloud Type = 2 : Altostratus\n"); } else if(strcmp("Cirrocumulus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Cirrocumulus,true); printf("\tCloud Type = 3 : Cirrocumulus\n"); } else if(strcmp("Cirrostratus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Cirrostratus,true); printf("\tCloud Type = 4 : Cirrostratus\n"); } else if(strcmp("Cirrus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Cirrus,true); printf("\tCloud Type = 5 : Cirrus\n"); } else if(strcmp("Cumulonimbus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Cumulonimbus,true); printf("\tCloud Type = 6 : Cumulonimbus\n"); } else if(strcmp("Cumulus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Cumulus,true); printf("\tCloud Type = 7 : Cumulus\n"); } else if(strcmp("Nimbostratus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Nimbostratus,true); printf("\tCloud Type = 8 : Nimbostratus\n"); } else if(strcmp("Stratocumulus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Stratocumulus,true); printf("\tCloud Type = 9 : Stratocumulus\n"); } else if(strcmp("Stratus",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::Stratus,true); printf("\tCloud Type = 10 : Stratus\n"); } else if(strcmp("DefA",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::DefA,true); printf("\tCloud Type = 11 : DefA\n"); } else if(strcmp("DefB",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::DefB,true); printf("\tCloud Type = 12 : DefB\n"); } else if(strcmp("DefC",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::DefC,true); printf("\tCloud Type = 13 : DefC\n"); } else if(strcmp("DefD",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::DefD,true); printf("\tCloud Type = 14 : DefD\n"); } else if(strcmp("DefE",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetCloudType(CigiBaseWeatherCtrl::DefE,true); printf("\tCloud Type = 15 : DefE\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Global",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetScope(CigiBaseWeatherCtrl::Global,true); printf("\tScope = 0 : Global\n"); } else if(strcmp("Regional",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetScope(CigiBaseWeatherCtrl::Regional,true); printf("\tScope = 1 : Regional\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_WeatherCtrl.SetScope(CigiBaseWeatherCtrl::Entity,true); printf("\tScope = 2 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetSeverity(pPV->GetUChar(),true); printf("\tSeverity = %d\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetVisibilityRng(pPV->Getfloat(),true); printf("\tVisibility Range = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetScudFreq(pPV->Getfloat(),true); printf("\tScud Frequency = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetCoverage(pPV->Getfloat(),true); printf("\tCoverage = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetBaseElev(pPV->Getfloat(),true); printf("\tBase Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetThickness(pPV->Getfloat(),true); printf("\tThickness = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetTransition(pPV->Getfloat(),true); printf("\tTransition = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetVertWindSp(pPV->Getfloat(),true); printf("\tVertical Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetBaroPress(pPV->Getfloat(),true); printf("\tBarometric Pressure = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCtrl.SetAerosol(pPV->Getfloat(),true); printf("\tAerosol = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) DefHex = pPV->GetStr(); *Omsg << Om_WeatherCtrl; } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/Proc_WeatherCtrlV3.h000066400000000000000000000012131210750432300237470ustar00rootroot00000000000000// Proc_WeatherCtrlV3.h: interface for the Proc_WeatherCtrlV3 Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_Proc_WeatherCtrlV3_PARSING_PROCESSOR_INCLUDED_) #define _Proc_WeatherCtrlV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include class Proc_WeatherCtrlV3 : public PcktParsingProcessor { public: Proc_WeatherCtrlV3(void); virtual ~Proc_WeatherCtrlV3(void); virtual void ProcPckt(ParseValue *pPV); protected: CigiWeatherCtrlV3 Om_WeatherCtrl; }; #endif // _Proc_WeatherCtrlV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/ReadMe.txt000066400000000000000000000024201210750432300220550ustar00rootroot00000000000000======================================================================== CONSOLE APPLICATION : HostSendCcl Project Overview ======================================================================== AppWizard has created this HostSendCcl application for you. This file contains a summary of what you will find in each of the files that make up your HostSendCcl application. HostSendCcl.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. HostSendCcl.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named HostSendCcl.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" comments to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/000077500000000000000000000000001210750432300226075ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V1/000077500000000000000000000000001210750432300230755ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V1/HostData.csv000066400000000000000000000131601210750432300253220ustar00rootroot00000000000000EntityCtrl,2,Construct,Detach,Disable,NoAction,50,104,20.1,-110.1,22.1,10.2,5.5,3.9,1.3, EntityCtrl,2,Construct,Attach,Enable,Load,50,104,22.2,97.3,10.3,57.5,7.4,22.1,7.7, EntityCtrl,2,Destruct,Detach,Disable,LoadActivate,50,104,23.3,43.5,5.5,88.3,3.9,1.3,5.5, EntityCtrl,2,Destruct,Detach,Disable,Activate,50,104,24.1,-60.3,-82.3,175.3,22.1,7.7,7.4, EntityCtrl,8,Construct,Detach,Disable,Deactivate,50,104,22.3,-10.1,60.3,220.3,1.3,5.5,3.9, EntityCtrl,259,Construct,Detach,Disable,DeactivateUnload,36,12801,21.8,4.2,30.3,310.4,7.7,7.4,22.1, CompCtrl,1,1,1,Entity,1,1,15,,,,,,,, CompCtrl,15,61440,2,Environment,15,15,15,,,,,,,, CompCtrl,240,3840,3,View,240,16,15,,,,,,,, CompCtrl,3840,240,4,Entity,15,240,15,,,,,,,, CompCtrl,61440,15,5,Environment,15,61440,15,,,,,,,, CompCtrl,15,15,6,View,15,983040,15,,,,,,,, ArtPartCtrl,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,240,119,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,25.1,25.1,25.1,25.1,25.1 ArtPartCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,15,15,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,10.1,20.2,30.3,40.2,10.4,20.1 RateCtrl,15,-1,10.2,20.3,12.3,21.5,33.1,22.3,,,,,,, RateCtrl,240,119,25.1,20.3,25.1,21.5,25.1,22.3,,,,,,, RateCtrl,3840,15,10.2,25.1,12.3,25.1,33.1,25.1,,,,,,, EnvCtrl,1,1,FALSE,20,1,1,2004,19.3,14.2,14.2,42.3,,,, EnvCtrl,23,59,TRUE,45,2,28,2004,20.2,24.3,11.9,119.6,,,, EnvCtrl,1,15,TRUE,76,1,1,2003,21.1,41.1,9.4,209.7,,,, EnvCtrl,1,15,FALSE,94,1,1,2001,22.5,37.8,3.2,321.9,,,, WeatherCtrl,15,FALSE,TRUE,FALSE,1,1,11.2,25.1,14.4,25.1,321.3,25.1,17.7,25.1,11.6 WeatherCtrl,240,TRUE,FALSE,TRUE,3,2,25.1,11.1,25.1,15.9,485.3,13.8,25.1,19.9,25.1 WeatherCtrl,3840,TRUE,TRUE,TRUE,5,3,31.3,25.1,21.2,25.1,1212.3,25.1,18.2,25.1,13.1 WeatherCtrl,0,FALSE,FALSE,FALSE,1,4,11.2,25.1,14.4,25.1,1548.9,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,5,11.2,25.1,14.4,25.1,22123.7,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,6,11.2,25.1,14.4,25.1,754.2,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,7,11.2,25.1,14.4,25.1,365.8,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,22,11.2,25.1,14.4,25.1,1569.2,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,45,11.2,25.1,14.4,25.1,1379.05,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,22,11.2,25.1,14.4,25.1,6491.5,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,87,11.2,25.1,14.4,25.1,4589.3,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,33,11.2,25.1,14.4,25.1,3287.4,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,54,11.2,25.1,14.4,25.1,6517.8,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,21,11.2,25.1,14.4,25.1,6842.1,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,22,11.2,25.1,14.4,25.1,9317.6,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,2,11.2,25.1,14.4,25.1,5540.1,25.1,17.7,25.1,11.6 ViewCtrl,0,0,15,25.1,11.6,25.1,19.8,25.1,17.3,,,,,, ViewCtrl,13,3,240,1.1,25.1,14.6,25.1,33.2,25.1,,,,,, ViewCtrl,26,6,3840,25.1,11.6,25.1,19.8,25.1,17.3,,,,,, ViewCtrl,31,7,15,25.1,11.6,25.1,19.8,25.1,17.3,,,,,, SensorCtrl,0,240,TRUE,WhiteHot,TRUE,TrackOff,TRUE,TrackWhite,1.3,0.7,0.8,0.4,,, SensorCtrl,5,15,FALSE,BlackHot,FALSE,ForceCorrelate,FALSE,TrackBlack,1.3,0.7,0.8,0.4,,, SensorCtrl,9,15,TRUE,WhiteHot,FALSE,Scene,TRUE,TrackBlack,1.3,0.7,0.8,0.4,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,Target,FALSE,TrackBlack,1.3,0.7,0.8,0.4,,, SensorCtrl,18,15,TRUE,WhiteHot,TRUE,Ship,TRUE,TrackBlack,1.3,0.7,0.8,0.4,,, SensorCtrl,21,15,TRUE,WhiteHot,TRUE,TMDefA,TRUE,TrackBlack,1.3,0.7,0.8,0.4,, SensorCtrl,26,15,TRUE,WhiteHot,TRUE,TMDefB,TRUE,TrackBlack,1.3,0.7,0.8,0.4,, SensorCtrl,31,15,TRUE,WhiteHot,TRUE,TMDefC,TRUE,TrackBlack,1.3,0.7,0.8,0.4,, Trajectory,15,25.1,15.6,25.1,2.3,3.6,9.4,,,,,,, Trajectory,240,3.2,25.1,18.4,3.6,9.4,2.3,,,,,,, Trajectory,3840,25.1,23.3,25.1,9.4,2.3,3.6,,,,,,, SpecialEffect,2,Forward,TRUE,25,220,43,1.1,3.5,2.3,1.2,1,0,1.1,3.3 SpecialEffect,4,Forward,FALSE,56,112,79,1.2,1.2,3.5,1.1,2,1,1.3,3.5 SpecialEffect,8,Backward,FALSE,112,56,158,2.3,3.5,1.2,0.8,4,1.1,0.9,2.6 SpecialEffect,16,Backward,TRUE,220,25,213,3.5,2.3,1.1,1.3,3,4.1,0.7,4.4 ViewDef,0,0,7,ReplicateNone,MirrorNone,TRUE,25.1,1346.5,25.1,30.3,45.5,25.1,, ViewDef,5,1,6,Replicate1x2,Horizontal,FALSE,2.2,46258.2,-2.5,25.1,25.1,50.1,, ViewDef,9,2,5,Replicate2x1,Vertical,TRUE,25.1,9137.5,25.1,30.3,45.5,25.1,, ViewDef,15,3,4,Replicate2x2,Horiz_Vert,FALSE,25.1,16743.2,25.1,30.3,45.5,25.1,, ViewDef,18,4,3,ReplicateDefA,Vertical,TRUE,25.1,9754.1,25.1,30.3,45.5,25.1,, ViewDef,21,5,2,ReplicateDefB,Vertical,FALSE,25.1,64135.2,25.1,30.3,45.5,25.1,, ViewDef,26,6,1,ReplicateDefC,Vertical,FALSE,25.1,2145.6,25.1,30.3,45.5,25.1 ViewDef,31,7,0,ReplicateDefD,Vertical,FALSE,25.1,78965.4,25.1,30.3,45.5,25.1 CollDetSegDef,15,115,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,3840,, CollDetSegDef,240,15,FALSE,40.2,25.1,10.2,25.1,50.3,25.1,240,, CollDetSegDef,3840,15,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,15,, HatReq,3840,35.9,-91.3,15.3,,,,,,,, HatReq,15,-76.3,156.3,35.9,,,,,,,, HatReq,240,15.3,35.9,571.3,,,,,,,, LosSegReq,15,35.9,-91.3,11.3,-75.6,11.3,35.9,,,,, LosSegReq,240,11.3,35.9,585.2,35.9,-91.3,11.3,,,,, LosSegReq,3840,-75.6,11.3,35.9,35.9,156.2,11.3,,,,, LosSegReq,15,35.9,-91.3,11.3,35.9,-27.3,11.3,,,,, LosSegReq,15,35.9,156.2,11.3,35.9,-91.3,11.3,,,,, LosSegReq,15,35.9,-27.3,11.3,11.3,35.9,585.2,,,,, LosVectReq,15,294.3,35.9,1379.2,15.5,11.3,15.5,,,,, LosVectReq,240,15.5,-65.3,643.2,35.9,-91.3,35.9,,,,, LosVectReq,3840,35.9,15.5,9713.5,-78.5,156.2,548.3 LosVectReq,15,310.4,35.9,6842.1,35.9,-27.3,35.9 LosVectReq,15,112.8,35.9,3928.4,35.9,-91.3,35.9 LosVectReq,15,198.3,35.9,1729.4,35.9,35.9,35.9 LosVectReq,15,35.9,35.9,3467.8,35.9,156.2,35.9 LosVectReq,15,35.9,35.9,1634.8,35.9,-27.3,35.9 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V1/MiniHost.def000066400000000000000000000006301210750432300253060ustar00rootroot00000000000000 127.0.0.1 8000 8001 1 0 HostData.csv 1 38.0 -90.2 1000 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V2/000077500000000000000000000000001210750432300230765ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V2/HostData.csv000066400000000000000000000146161210750432300253320ustar00rootroot00000000000000EntityCtrl,2,Active,Detach,Disable,Play,50,104,0,20.1,-110.1,22.1,10.2,5.5,3.9,1.3 EntityCtrl,2,Standby,Attach,Enable,Restart,50,104,100,22.2,97.3,10.3,57.5,7.4,22.1,7.7 EntityCtrl,2,Remove,Detach,Disable,Restart,50,104,90.1,23.3,43.5,5.5,88.3,3.9,1.3,5.5 EntityCtrl,2,Active,Detach,Disable,Stop,50,104,80.5,24.1,-60.3,-82.3,175.3,22.1,7.7,7.4 EntityCtrl,8,Active,Detach,Disable,Play,50,104,50.1,22.3,-10.1,60.3,220.3,1.3,5.5,3.9 EntityCtrl,259,Active,Detach,Disable,Play,36,12801,90.5,21.8,4.2,30.3,310.4,7.7,7.4,22.1 CompCtrl,1,1,EntityV2,1,1,15,,,,,,,,, CompCtrl,15,61440,EnvironmentV2,15,15,15,,,,,,,,, CompCtrl,240,3840,ViewV2,240,16,15,,,,,,,,, CompCtrl,3840,240,ViewGrpV2,15,240,15,,,,,,,,, CompCtrl,61440,15,SensorV2,15,61440,15,,,,,,,,, CompCtrl,15,15,SystemV2,15,983040,15,,,,,,,,, ArtPartCtrl,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,240,119,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,25.1,25.1,25.1,25.1,25.1 ArtPartCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,15,15,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,10.1,20.2,30.3,40.2,10.4,20.1 RateCtrl,15,240,10.2,20.3,12.3,21.5,33.1,22.3,,,,,,, RateCtrl,240,15,25.1,20.3,25.1,21.5,25.1,22.3,,,,,,, RateCtrl,3840,15,10.2,25.1,12.3,25.1,33.1,25.1,,,,,,, EnvCtrl,1,1,FALSE,FALSE,20,1,1,2004,19.3,14.2,14.2,42.3,1109.2,24.3, EnvCtrl,23,59,TRUE,TRUE,45,2,28,2004,20.2,24.3,11.9,119.6,1032.6,11.3, EnvCtrl,1,15,TRUE,FALSE,76,1,1,2003,21.1,41.1,9.4,209.7,1084.6,21.1, EnvCtrl,1,15,FALSE,TRUE,94,1,1,2001,22.5,37.8,3.2,321.9,1112.3,17.8, WeatherCtrl,15,FALSE,TRUE,FALSE,1,1,11.2,25.1,14.4,25.1,321.3,25.1,17.7,25.1,11.6 WeatherCtrl,240,TRUE,FALSE,TRUE,3,2,25.1,11.1,25.1,15.9,485.3,13.8,25.1,19.9,25.1 WeatherCtrl,3840,TRUE,TRUE,TRUE,5,3,31.3,25.1,21.2,25.1,1212.3,25.1,18.2,25.1,13.1 WeatherCtrl,0,FALSE,FALSE,FALSE,1,4,11.2,25.1,14.4,25.1,1548.9,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,5,11.2,25.1,14.4,25.1,22123.7,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,6,11.2,25.1,14.4,25.1,754.2,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,7,11.2,25.1,14.4,25.1,365.8,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,22,11.2,25.1,14.4,25.1,1569.2,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,45,11.2,25.1,14.4,25.1,1379.05,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,22,11.2,25.1,14.4,25.1,6491.5,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,87,11.2,25.1,14.4,25.1,4589.3,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,33,11.2,25.1,14.4,25.1,3287.4,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,54,11.2,25.1,14.4,25.1,6517.8,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,21,11.2,25.1,14.4,25.1,6842.1,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,22,11.2,25.1,14.4,25.1,9317.6,25.1,17.7,25.1,11.6 WeatherCtrl,0,TRUE,FALSE,FALSE,1,2,11.2,25.1,14.4,25.1,5540.1,25.1,17.7,25.1,11.6 ViewCtrl,0,0,15,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,11.6,25.1,19.8,25.1,17.3 ViewCtrl,13,3,240,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,1.1,25.1,14.6,25.1,33.2,25.1 ViewCtrl,26,6,3840,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,25.1,11.6,25.1,19.8,25.1,17.3 ViewCtrl,31,7,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,25.1,11.6,25.1,19.8,25.1,17.3 SensorCtrl,0,240,TRUE,WhiteHot,TRUE,TrackOff,TRUE,TrackWhite,0.8,0.7,1.3,0.4,,, SensorCtrl,5,15,FALSE,BlackHot,FALSE,ForceCorrelate,FALSE,TrackBlack,0.8,0.7,1.3,0.4,,, SensorCtrl,9,15,TRUE,WhiteHot,FALSE,Scene,TRUE,TrackBlack,0.8,0.7,1.3,0.4,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,Target,FALSE,TrackBlack,0.8,0.7,1.3,0.4,,, SensorCtrl,18,15,TRUE,WhiteHot,TRUE,Ship,TRUE,TrackBlack,0.8,0.7,1.3,0.4,,, SensorCtrl,21,15,TRUE,WhiteHot,TRUE,TMDefA,TRUE,TrackBlack,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,26,15,TRUE,WhiteHot,TRUE,TMDefB,TRUE,TrackBlack,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,31,15,TRUE,WhiteHot,TRUE,TMDefC,TRUE,TrackBlack,0.8,0.7,1.3,0.4,,,,,, Trajectory,15,25.1,15.6,25.1,,,,,,,,,,,,,, Trajectory,240,3.2,25.1,18.4,,,,,,,,,,,,,, Trajectory,3840,25.1,23.3,25.1,,,,,,,,,,,,,, SpecialEffect,2,Forward,TRUE,25,220,43,1.1,3.5,2.3,1.2,1,0,1.1,3.3,,,, SpecialEffect,4,Forward,FALSE,56,112,79,1.2,1.2,3.5,1.1,2,1,1.3,3.5,,,, SpecialEffect,8,Backward,FALSE,112,56,158,2.3,3.5,1.2,0.8,4,1.1,0.9,2.6,,,, SpecialEffect,16,Backward,TRUE,220,25,213,3.5,2.3,1.1,1.3,3,4.1,0.7,4.4,,,, ViewDef,0,0,7,ReplicateNone,MirrorNone,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,1346.5,30.3,25.1,45.5,25.1 ViewDef,5,1,6,Replicate1x2,Horizontal,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,2.2,46258.2,25.1,-2.5,25.1,50.1 ViewDef,9,2,5,Replicate2x1,Vertical,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,25.1,9137.5,30.3,25.1,45.5,25.1 ViewDef,15,3,4,Replicate2x2,Horiz_Vert,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,25.1,16743.2,30.3,25.1,45.5,25.1 ViewDef,18,4,3,ReplicateDefA,Vertical,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,FALSE,25.1,9754.1,30.3,25.1,45.5,25.1 ViewDef,21,5,2,ReplicateDefB,Vertical,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,25.1,64135.2,30.3,25.1,45.5,25.1 ViewDef,26,6,1,ReplicateDefC,Vertical,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,25.1,2145.6,30.3,25.1,45.5,25.1 ViewDef,31,7,0,ReplicateDefD,Vertical,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,25.1,78965.4,30.3,25.1,45.5,25.1 CollDetSegDef,15,115,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,3840,,,,,,,, CollDetSegDef,240,15,FALSE,40.2,25.1,10.2,25.1,50.3,25.1,240,,,,,,,, CollDetSegDef,3840,15,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,15,,,,,,,, CollDetVolDef,15,121,TRUE,25.1,13.3,25.1,3000.3,25.1,2000.3,,,,,,,,, CollDetVolDef,240,15,FALSE,36.3,25.1,13.3,25.1,3000.3,25.1,,,,,,,,, CollDetVolDef,3840,15,TRUE,25.1,13.3,25.1,3000.3,25.1,2000.3,,,,,,,,, HatReq,3840,35.9,-91.3,15.3,,,,,,,,,,,,,, HatReq,15,-76.3,156.3,35.9,,,,,,,,,,,,,, HatReq,240,15.3,35.9,571.3,,,,,,,,,,,,,, LosSegReq,15,35.9,-91.3,11.3,-75.6,11.3,35.9,,,,,,,,,,, LosSegReq,240,11.3,35.9,585.2,35.9,-91.3,11.3,,,,,,,,,,, LosSegReq,3840,-75.6,11.3,35.9,35.9,156.2,11.3,,,,,,,,,,, LosSegReq,15,35.9,-91.3,11.3,35.9,-27.3,11.3,,,,,,,,,,, LosSegReq,15,35.9,156.2,11.3,35.9,-91.3,11.3,,,,,,,,,,, LosSegReq,15,35.9,-27.3,11.3,11.3,35.9,585.2, LosVectReq,15,294.3,35.9,25.1,1379.2,15.5,11.3,15.5 LosVectReq,240,15.5,-65.3,11.3,643.2,35.9,-91.3,35.9 LosVectReq,3840,35.9,15.5,25.1,9713.5,-78.5,156.2,548.3 LosVectReq,15,310.4,35.9,11.3,6842.1,35.9,-27.3,35.9 LosVectReq,15,112.8,35.9,25.1,3928.4,35.9,-91.3,35.9 LosVectReq,15,198.3,35.9,25.1,1729.4,35.9,35.9,35.9 LosVectReq,15,35.9,35.9,25.1,3467.8,35.9,156.2,35.9 LosVectReq,15,35.9,35.9,25.1,1634.8,35.9,-27.3,35.9 HotReq,3840,35.9,-91.3,,,,, HotReq,15,-76.3,156.3,,,,, HotReq,240,15.3,35.9,,,,, cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V2/MiniHost.def000066400000000000000000000006301210750432300253070ustar00rootroot00000000000000 127.0.0.1 8000 8001 2 0 HostData.csv 1 38.0 -90.2 1000 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3.2/000077500000000000000000000000001210750432300232375ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3.2/HostData.csv000066400000000000000000000303641210750432300254710ustar00rootroot00000000000000EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Standby,Attach,Enable,Inherit,AltClamp,Backward,OneShot,Pause,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Remove,Detach,Disable,NoInherit,AltAttClamp,Forward,Continuous,Continue,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Stop,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,8,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,259,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,36,12801,544,2.4,3.3,63.3,10,20,30 ConfClampEntityCtrl,259,25.1,35.9,-91.3,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,-91.3,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,370.1,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,-91.3,,,,,,,,,,,,,, CompCtrl,1,1,EntityV3,1,1,15,15,15,15,15,,,,,,,, CompCtrl,15,61440,ViewV3,15,15,15,15,15,15,15,,,,,,,, CompCtrl,240,3840,ViewGrpV3,240,16,15,15,15,15,15,,,,,,,, CompCtrl,3840,240,SensorV3,15,240,15,15,15,15,15,,,,,,,, CompCtrl,61440,15,RegionalSeaSurfaceV3,15,61440,15,15,15,15,15,,,,,,,, CompCtrl,15,15,RegionalTerrainSurfaceV3,15,983040,15,15,15,15,15,,,,,,,, CompCtrl,15,15,RegionalLayeredWeatherV3,15,15728640,15,15,15,15,15 CompCtrl,15,15,GlobalSeaSurfaceV3,15,251658240,15,15,15,15,15 CompCtrl,15,15,GlobalTerrainSurfaceV3,15,4026531840,15,15,15,15,15 CompCtrl,1,1,GlobalLayeredWeatherV3,1,15,15,15,15,15,15 CompCtrl,1,1,AtmosphereV3,1,15,15,15,15,15,15 CompCtrl,1,1,CelestialSphereV3,1,15,15,15,15,15,15 CompCtrl,1,1,EventV3,1,15,15,15,15,15,15 CompCtrl,1,1,SystemV3,1,15,15,15,15,15,15 ShortCompCtrl,1,1,EntityV3,1,1,15,,,, ShortCompCtrl,15,61440,ViewV3,15,15,15,,,, ShortCompCtrl,240,3840,ViewGrpV3,240,16,15,,,, ShortCompCtrl,3840,240,SensorV3,15,240,15,,,, ShortCompCtrl,61440,15,RegionalSeaSurfaceV3,15,61440,15,,,, ShortCompCtrl,15,15,RegionalTerrainSurfaceV3,15,983040,15,,,, ShortCompCtrl,15,15,RegionalLayeredWeatherV3,15,15728640,15,,,, ShortCompCtrl,15,15,GlobalSeaSurfaceV3,15,251658240,15,,,, ShortCompCtrl,15,15,GlobalTerrainSurfaceV3,15,4026531840,15,,,,,,,,, ShortCompCtrl,1,1,GlobalLayeredWeatherV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,AtmosphereV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,CelestialSphereV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,EventV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,SystemV3,1,15,15,,,,,,,,, ArtPartCtrl,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,240,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,25.1,25.1,25.1,25.1,25.1 ArtPartCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,15,15,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,10.1,20.2,30.3,40.2,10.4,20.1 ShortArtPartCtrl,15,15,240,NotUsed,Roll,TRUE,TRUE,10.2,10.3,,,,,, ShortArtPartCtrl,240,240,15,Xoff,Pitch,FALSE,TRUE,25.1,10.3,,,,,, ShortArtPartCtrl,3840,15,15,Yoff,Yaw,TRUE,FALSE,10.2,25.1,,,,,, ShortArtPartCtrl,15,15,15,Zoff,Zoff,TRUE,FALSE,10.2,10.3,,,,,, ShortArtPartCtrl,15,15,15,Yaw,Yoff,FALSE,FALSE,10.2,10.3,,,,,, ShortArtPartCtrl,15,15,15,Pitch,Xoff,TRUE,TRUE,10.2,10.3,,,,,, ShortArtPartCtrl,15,15,15,Roll,NotUsed,TRUE,TRUE,10.2,10.3,,,,,,,,,,,,, RateCtrl,15,240,TRUE,Local,10.2,20.3,12.3,21.5,33.1,22.3,,,,,,,,,,,, RateCtrl,240,15,TRUE,Local,25.1,20.3,25.1,21.5,25.1,22.3,,,,,,,,,,,, RateCtrl,3840,15,FALSE,World,10.2,25.1,12.3,25.1,33.1,25.1,,,,,,,,,,,, CelestialCtrl,1,1,FALSE,FALSE,FALSE,FALSE,FALSE,1,1,2004,1,,,,,,,,,,, CelestialCtrl,23,59,TRUE,TRUE,TRUE,TRUE,TRUE,2,28,2004,95,,,,,,,,,,, CelestialCtrl,1,15,TRUE,FALSE,TRUE,FALSE,TRUE,1,1,2003,25.1,,,,,,,,,,, CelestialCtrl,1,15,FALSE,TRUE,FALSE,TRUE,FALSE,1,1,2001,25.1,,,,,,,,,,, AtmosCtrl,TRUE,15,25.1,12.7,25.1,10.6,25.1,10.3,,,,,,,,,,,,,, AtmosCtrl,FALSE,95,21.1,25.1,11.3,25.1,17.7,25.1,,,,,,,,,,,,,, EnvRgnCtrl,15,Inactive,UseLast,UseLast,Merge,UseLast,35.9,-91.3,25.1,10.2,25.1,12.3,25.1,,,,,,,,, EnvRgnCtrl,240,Active,Merge,UseLast,Merge,Merge,13.3,35.9,12.1,25.1,33.3,25.1,14.4,,,,,,,,, EnvRgnCtrl,3840,Destroyed,Merge,Merge,UseLast,UseLast,35.9,-91.3,25.1,10.2,25.1,12.3,25.1,,,,,,,,, WeatherCtrl,15,240,15,FALSE,TRUE,FALSE,TRUE,None,Entity,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,240,15,95,TRUE,FALSE,TRUE,FALSE,Altocumulus,Regional,3,12.3,25.1,11.1,25.1,15.9,25.1,13.8,25.1,19.9,25.1,14.4,25.1 WeatherCtrl,3840,15,15,TRUE,TRUE,TRUE,TRUE,Altostratus,Entity,5,25.1,31.3,25.1,21.2,25.1,11.1,25.1,18.2,25.1,13.1,25.1,12.8 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrocumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrostratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cumulonimbus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Nimbostratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Stratocumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Stratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefA,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefB,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefC,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefD,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefE,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 MaritimeSurfaceCtrl,0,FALSE,FALSE,Global,25.1,31.2,25.1,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,15,TRUE,TRUE,Regional,15.5,25.1,17.7,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,240,TRUE,FALSE,Entity,25.1,31.2,25.1,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,3840,FALSE,TRUE,Entity,15.5,25.1,17.7,,,,,,,, WaveCtrl,0,0,FALSE,Global,Plunging,25.1,15.5,25.1,11.8,25.1,15.6,,,, WaveCtrl,15,240,TRUE,Regional,Spilling,11.2,25.1,19.9,25.1,18.3,25.1,,,, WaveCtrl,240,15,TRUE,Entity,Surging,25.1,15.5,25.1,11.8,25.1,15.6,,,, WaveCtrl,3840,15,TRUE,Entity,Surging,11.2,25.1,19.9,25.1,18.3,25.1,,,, TerrestrialSurfaceCtrl,0,15,FALSE,Global,15,15,,,,,,,,, TerrestrialSurfaceCtrl,15,3840,TRUE,Regional,15,95,,,,,,,,, TerrestrialSurfaceCtrl,240,0,TRUE,Entity,31,15,,,,,,,,, TerrestrialSurfaceCtrl,3840,240,TRUE,Entity,6,15,,,,,,,,, ViewCtrl,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,3840,25.1,11.6,25.1,19.8,25.1,17.3 ViewCtrl,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,240,1.1,25.1,14.6,25.1,33.2,25.1 ViewCtrl,3840,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,15,25.1,11.6,25.1,19.8,25.1,17.3 ViewCtrl,15,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,15,25.1,11.6,25.1,19.8,25.1,17.3 SensorCtrl,15,240,TRUE,WhiteHot,TRUE,TRUE,TrackWhite,GatePos,TrackOff,0.8,0.7,1.3,0.4,, SensorCtrl,240,15,FALSE,BlackHot,FALSE,FALSE,TrackBlack,GateAndTargetPos,ForceCorrelate,0.8,0.7,1.3,0.4,, SensorCtrl,3840,15,TRUE,WhiteHot,FALSE,TRUE,TrackBlack,GatePos,Scene,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,FALSE,TrackBlack,GatePos,Target,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,Ship,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefA,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefB,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefC,0.8,0.7,1.3,0.4,,,,,, MotionTrackCtrl,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,View,,,,,,,, MotionTrackCtrl,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,ViewGrp,,,,,,,, MotionTrackCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,View,,,,,,,, MotionTrackCtrl,15,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,View,,,,,,,, EarthModelDef,TRUE,35.9,1.2,,,,,,,,,,,,,,,, EarthModelDef,FALSE,126.5,35.9,,,,,,,,,,,,,,,, Trajectory,15,25.1,15.6,25.1,22.3,25.1,,,,,,,,,,,,, Trajectory,240,3.2,25.1,18.4,25.1,12.1,,,,,,,,,,,,, Trajectory,3840,25.1,23.3,25.1,14.4,25.1,,,,,,,,,,,,, ViewDef,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,MirrorNone,ReplicateNone,Perspective,TRUE,1,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Horizontal,Replicate1x2,Orthographic,FALSE,2,2.2,25.1,-2.5,25.1,50.1,25.1 ViewDef,3840,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,Vertical,Replicate2x1,Orthographic,TRUE,3,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,Horiz_Vert,Replicate2x2,Orthographic,FALSE,4,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,Vertical,ReplicateDefA,Orthographic,FALSE,5,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,Vertical,ReplicateDefB,Orthographic,TRUE,6,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Vertical,ReplicateDefC,Orthographic,FALSE,7,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Vertical,ReplicateDefD,Orthographic,FALSE,7,25.1,30.3,25.1,45.5,25.1,10.2 CollDetSegDef,15,240,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,3840,,,,,,,,, CollDetSegDef,240,15,FALSE,40.2,25.1,10.2,25.1,50.3,25.1,240,,,,,,,,, CollDetSegDef,3840,15,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,15,,,,,,,,, CollDetVolDef,15,240,TRUE,Sphere,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,25.1,,,,,, CollDetVolDef,240,15,FALSE,Cuboid,36.3,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,,,,,, CollDetVolDef,3840,15,TRUE,Cuboid,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,25.1,,,,,, HatHotReq,3840,HAT,Geodetic,0,15,35.9,-91.3,15.3,,,,,,,,,,, HatHotReq,15,HOT,Entity,1,240,-91.3,15.3,35.9,,,,,,,,,,, HatHotReq,240,Extended,Entity,2,3840,15.3,35.9,-91.3,,,,,,,,,,, LosSegReq,15,Basic,Geodetic,Geodetic,Geodetic,FALSE,15,240,35.9,-91.3,11.3,35.9,-91.3,11.3,3840,0,240,, LosSegReq,240,Extended,Entity,Entity,Entity,TRUE,240,3840,11.3,35.9,-91.3,11.3,35.9,-91.3,240,1,15 LosSegReq,3840,Basic,Entity,Geodetic,Entity,FALSE,15,15,-91.3,11.3,35.9,-91.3,11.3,35.9,15,2,3840 LosSegReq,15,Extended,Geodetic,Entity,Geodetic,FALSE,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15,3,15 LosSegReq,15,Basic,Geodetic,Entity,Entity,TRUE,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15,4,15 LosSegReq,15,Extended,Entity,Geodetic,Geodetic,FALSE,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15,5,15 LosVectReq,15,Basic,Geodetic,Geodetic,240,3840,25.1,11.3,25.1,11.3,35.9,-91.3,15.5,240,0,, LosVectReq,240,Extended,Entity,Entity,15,240,11.3,25.1,11.3,25.1,-91.3,15.5,35.9,3840,1,, LosVectReq,3840,Extended,Geodetic,Geodetic,15,15,25.1,25.1,11.3,11.3,15.5,35.9,-91.3,15,2,, LosVectReq,15,Basic,Entity,Geodetic,15,15,11.3,11.3,25.1,25.1,35.9,35.9,35.9,15,3,, LosVectReq,15,Extended,Entity,Geodetic,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,4,, LosVectReq,15,Basic,Geodetic,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,5,, LosVectReq,15,Extended,Geodetic,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,6,, LosVectReq,15,Basic,Entity,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,7,, PositionReq,15,240,OneShot,Entity,Geodetic,,,,,,,,,,,, PositionReq,240,15,Continuous,ArtPart,ParentEntity,,,,,,,,,,,, PositionReq,3840,15,Continuous,View,Submodel,,,,,,,,,,,, PositionReq,15,15,Continuous,ViewGrp,Submodel,,, PositionReq,15,15,Continuous,MotionTracker,Submodel,,, EnvCondReq,Maritime,Terrestrial,Weather,Aerosol,1,35.9,-91.3,11.5 EnvCondReq,x,Terrestrial,Weather,Aerosol,2,21.1,-91.3,35.9 EnvCondReq,Maritime,x,Weather,Aerosol,4,35.9,-91.3,35.9 EnvCondReq,x,x,Weather,Aerosol,8,35.9,-91.3,35.9 EnvCondReq,Maritime,Terrestrial,x,Aerosol,16,35.9,-91.3,35.9 EnvCondReq,x,Terrestrial,x,Aerosol,32,35.9,-91.3,35.9 EnvCondReq,Maritime,x,x,Aerosol,64,35.9,-91.3,35.9 EnvCondReq,x,x,x,Aerosol,128,35.9,-91.3,35.9 EnvCondReq,Maritime,Terrestrial,Weather,x,255,35.9,-91.3,35.9 EnvCondReq,x,Terrestrial,Weather,x,3,35.9,-91.3,35.9 EnvCondReq,Maritime,x,Weather,x,56,35.9,-91.3,35.9 EnvCondReq,x,x,Weather,x,224,35.9,-91.3,35.9 EnvCondReq,Maritime,Terrestrial,x,x,129,35.9,-91.3,35.9 EnvCondReq,x,Terrestrial,x,x,153,35.9,-91.3,35.9 EnvCondReq,Maritime,x,x,x,170,35.9,-91.3,35.9 EnvCondReq,x,x,x,x,85,35.9,-91.3,35.9 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3.2/MiniHost.def000066400000000000000000000006301210750432300254500ustar00rootroot00000000000000 127.0.0.1 8000 8001 3 2 HostData.csv 1 38.0 -90.2 1000 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3/000077500000000000000000000000001210750432300230775ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3/HostData.csv000066400000000000000000000301711210750432300253250ustar00rootroot00000000000000EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Standby,Attach,Enable,Inherit,AltClamp,Backward,OneShot,Pause,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Remove,Detach,Disable,NoInherit,AltAttClamp,Forward,Continuous,Continue,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Stop,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,8,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,259,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,36,12801,544,2.4,3.3,63.3,10,20,30 ConfClampEntityCtrl,259,25.1,35.9,-91.3,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,-91.3,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,370.1,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,-91.3,,,,,,,,,,,,,, CompCtrl,1,1,EntityV3,1,1,15,15,15,15,15,,,,,,,, CompCtrl,15,61440,ViewV3,15,15,15,15,15,15,15,,,,,,,, CompCtrl,240,3840,ViewGrpV3,240,16,15,15,15,15,15,,,,,,,, CompCtrl,3840,240,SensorV3,15,240,15,15,15,15,15,,,,,,,, CompCtrl,61440,15,RegionalSeaSurfaceV3,15,61440,15,15,15,15,15,,,,,,,, CompCtrl,15,15,RegionalTerrainSurfaceV3,15,983040,15,15,15,15,15,,,,,,,, CompCtrl,15,15,RegionalLayeredWeatherV3,15,15728640,15,15,15,15,15 CompCtrl,15,15,GlobalSeaSurfaceV3,15,251658240,15,15,15,15,15 CompCtrl,15,15,GlobalTerrainSurfaceV3,15,4026531840,15,15,15,15,15 CompCtrl,1,1,GlobalLayeredWeatherV3,1,15,15,15,15,15,15 CompCtrl,1,1,AtmosphereV3,1,15,15,15,15,15,15 CompCtrl,1,1,CelestialSphereV3,1,15,15,15,15,15,15 CompCtrl,1,1,EventV3,1,15,15,15,15,15,15 CompCtrl,1,1,SystemV3,1,15,15,15,15,15,15 ShortCompCtrl,1,1,EntityV3,1,1,15,,,, ShortCompCtrl,15,61440,ViewV3,15,15,15,,,, ShortCompCtrl,240,3840,ViewGrpV3,240,16,15,,,, ShortCompCtrl,3840,240,SensorV3,15,240,15,,,, ShortCompCtrl,61440,15,RegionalSeaSurfaceV3,15,61440,15,,,, ShortCompCtrl,15,15,RegionalTerrainSurfaceV3,15,983040,15,,,, ShortCompCtrl,15,15,RegionalLayeredWeatherV3,15,15728640,15,,,, ShortCompCtrl,15,15,GlobalSeaSurfaceV3,15,251658240,15,,,, ShortCompCtrl,15,15,GlobalTerrainSurfaceV3,15,4026531840,15,,,,,,,,, ShortCompCtrl,1,1,GlobalLayeredWeatherV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,AtmosphereV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,CelestialSphereV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,EventV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,SystemV3,1,15,15,,,,,,,,, ArtPartCtrl,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,240,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,25.1,25.1,25.1,25.1,25.1 ArtPartCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,15,15,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,10.1,20.2,30.3,40.2,10.4,20.1 ShortArtPartCtrl,15,15,240,NotUsed,Roll,TRUE,TRUE,10.2,10.3,,,,,, ShortArtPartCtrl,240,240,15,Xoff,Pitch,FALSE,TRUE,25.1,10.3,,,,,, ShortArtPartCtrl,3840,15,15,Yoff,Yaw,TRUE,FALSE,10.2,25.1,,,,,, ShortArtPartCtrl,15,15,15,Zoff,Zoff,TRUE,FALSE,10.2,10.3,,,,,, ShortArtPartCtrl,15,15,15,Yaw,Yoff,FALSE,FALSE,10.2,10.3,,,,,, ShortArtPartCtrl,15,15,15,Pitch,Xoff,TRUE,TRUE,10.2,10.3,,,,,, ShortArtPartCtrl,15,15,15,Roll,NotUsed,TRUE,TRUE,10.2,10.3,,,,,,,,,,,,, RateCtrl,15,240,TRUE,10.2,20.3,12.3,21.5,33.1,22.3,,,,,,,,,,,,, RateCtrl,240,15,TRUE,25.1,20.3,25.1,21.5,25.1,22.3,,,,,,,,,,,,, RateCtrl,3840,15,FALSE,10.2,25.1,12.3,25.1,33.1,25.1,,,,,,,,,,,,, CelestialCtrl,1,1,FALSE,FALSE,FALSE,FALSE,FALSE,1,1,2004,1,,,,,,,,,,, CelestialCtrl,23,59,TRUE,TRUE,TRUE,TRUE,TRUE,2,28,2004,95,,,,,,,,,,, CelestialCtrl,1,15,TRUE,FALSE,TRUE,FALSE,TRUE,1,1,2003,25.1,,,,,,,,,,, CelestialCtrl,1,15,FALSE,TRUE,FALSE,TRUE,FALSE,1,1,2001,25.1,,,,,,,,,,, AtmosCtrl,TRUE,15,25.1,12.7,25.1,10.6,25.1,10.3,,,,,,,,,,,,,, AtmosCtrl,FALSE,95,21.1,25.1,11.3,25.1,17.7,25.1,,,,,,,,,,,,,, EnvRgnCtrl,15,Inactive,UseLast,UseLast,Merge,UseLast,35.9,-91.3,25.1,10.2,25.1,12.3,25.1,,,,,,,,, EnvRgnCtrl,240,Active,Merge,UseLast,Merge,Merge,13.3,35.9,12.1,25.1,33.3,25.1,14.4,,,,,,,,, EnvRgnCtrl,3840,Destroyed,Merge,Merge,UseLast,UseLast,35.9,-91.3,25.1,10.2,25.1,12.3,25.1,,,,,,,,, WeatherCtrl,15,240,15,FALSE,TRUE,FALSE,TRUE,None,Entity,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,240,15,95,TRUE,FALSE,TRUE,FALSE,Altocumulus,Regional,3,12.3,25.1,11.1,25.1,15.9,25.1,13.8,25.1,19.9,25.1,14.4,25.1 WeatherCtrl,3840,15,15,TRUE,TRUE,TRUE,TRUE,Altostratus,Entity,5,25.1,31.3,25.1,21.2,25.1,11.1,25.1,18.2,25.1,13.1,25.1,12.8 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrocumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrostratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cumulonimbus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Nimbostratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Stratocumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Stratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefA,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefB,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefC,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefD,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefE,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 MaritimeSurfaceCtrl,0,FALSE,FALSE,Global,25.1,31.2,25.1,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,15,TRUE,TRUE,Regional,15.5,25.1,17.7,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,240,TRUE,FALSE,Entity,25.1,31.2,25.1,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,3840,FALSE,TRUE,Entity,15.5,25.1,17.7,,,,,,,, WaveCtrl,0,0,FALSE,Global,Plunging,25.1,15.5,25.1,11.8,25.1,15.6,,,, WaveCtrl,15,240,TRUE,Regional,Spilling,11.2,25.1,19.9,25.1,18.3,25.1,,,, WaveCtrl,240,15,TRUE,Entity,Surging,25.1,15.5,25.1,11.8,25.1,15.6,,,, WaveCtrl,3840,15,TRUE,Entity,Surging,11.2,25.1,19.9,25.1,18.3,25.1,,,, TerrestrialSurfaceCtrl,0,15,FALSE,Global,15,15,,,,,,,,, TerrestrialSurfaceCtrl,15,3840,TRUE,Regional,15,95,,,,,,,,, TerrestrialSurfaceCtrl,240,0,TRUE,Entity,31,15,,,,,,,,, TerrestrialSurfaceCtrl,3840,240,TRUE,Entity,6,15,,,,,,,,, ViewCtrl,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,3840,25.1,11.6,25.1,19.8,25.1,17.3 ViewCtrl,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,240,1.1,25.1,14.6,25.1,33.2,25.1 ViewCtrl,3840,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,15,25.1,11.6,25.1,19.8,25.1,17.3 ViewCtrl,15,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,15,25.1,11.6,25.1,19.8,25.1,17.3 SensorCtrl,15,240,TRUE,WhiteHot,TRUE,TRUE,TrackWhite,GatePos,TrackOff,0.8,0.7,1.3,0.4,, SensorCtrl,240,15,FALSE,BlackHot,FALSE,FALSE,TrackBlack,GateAndTargetPos,ForceCorrelate,0.8,0.7,1.3,0.4,, SensorCtrl,3840,15,TRUE,WhiteHot,FALSE,TRUE,TrackBlack,GatePos,Scene,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,FALSE,TrackBlack,GatePos,Target,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,Ship,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefA,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefB,0.8,0.7,1.3,0.4,,,,,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefC,0.8,0.7,1.3,0.4,,,,,, MotionTrackCtrl,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,View,,,,,,,, MotionTrackCtrl,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,ViewGrp,,,,,,,, MotionTrackCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,View,,,,,,,, MotionTrackCtrl,15,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,View,,,,,,,, EarthModelDef,TRUE,35.9,1.2,,,,,,,,,,,,,,,, EarthModelDef,FALSE,126.5,35.9,,,,,,,,,,,,,,,, Trajectory,15,25.1,15.6,25.1,22.3,25.1,,,,,,,,,,,,, Trajectory,240,3.2,25.1,18.4,25.1,12.1,,,,,,,,,,,,, Trajectory,3840,25.1,23.3,25.1,14.4,25.1,,,,,,,,,,,,, ViewDef,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,MirrorNone,ReplicateNone,Perspective,TRUE,1,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Horizontal,Replicate1x2,Orthographic,FALSE,2,2.2,25.1,-2.5,25.1,50.1,25.1 ViewDef,3840,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,Vertical,Replicate2x1,Orthographic,TRUE,3,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,Horiz_Vert,Replicate2x2,Orthographic,FALSE,4,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,Vertical,ReplicateDefA,Orthographic,FALSE,5,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,Vertical,ReplicateDefB,Orthographic,TRUE,6,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Vertical,ReplicateDefC,Orthographic,FALSE,7,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Vertical,ReplicateDefD,Orthographic,FALSE,7,25.1,30.3,25.1,45.5,25.1,10.2 CollDetSegDef,15,240,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,3840,,,,,,,,, CollDetSegDef,240,15,FALSE,40.2,25.1,10.2,25.1,50.3,25.1,240,,,,,,,,, CollDetSegDef,3840,15,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,15,,,,,,,,, CollDetVolDef,15,240,TRUE,Sphere,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,25.1,,,,,, CollDetVolDef,240,15,FALSE,Cuboid,36.3,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,,,,,, CollDetVolDef,3840,15,TRUE,Cuboid,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,25.1,,,,,, HatHotReq,3840,HAT,Geodetic,15,35.9,-91.3,15.3,,,,,,,,,,,, HatHotReq,15,HOT,Entity,240,-91.3,15.3,35.9,,,,,,,,,,,, HatHotReq,240,Extended,Entity,3840,15.3,35.9,-91.3,,,,,,,,,,,, LosSegReq,15,Basic,Geodetic,Geodetic,Geodetic,15,240,35.9,-91.3,11.3,35.9,-91.3,11.3,3840,,,,, LosSegReq,240,Extended,Entity,Entity,Entity,240,3840,11.3,35.9,-91.3,11.3,35.9,-91.3,240 LosSegReq,3840,Basic,Entity,Geodetic,Entity,15,15,-91.3,11.3,35.9,-91.3,11.3,35.9,15 LosSegReq,15,Extended,Geodetic,Entity,Geodetic,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15 LosSegReq,15,Basic,Geodetic,Entity,Entity,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15 LosSegReq,15,Extended,Entity,Geodetic,Geodetic,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15 LosVectReq,15,Basic,Geodetic,Geodetic,240,3840,25.1,11.3,25.1,11.3,35.9,-91.3,15.5,240 LosVectReq,240,Extended,Entity,Entity,15,240,11.3,25.1,11.3,25.1,-91.3,15.5,35.9,3840 LosVectReq,3840,Extended,Geodetic,Geodetic,15,15,25.1,25.1,11.3,11.3,15.5,35.9,-91.3,15 LosVectReq,15,Basic,Entity,Geodetic,15,15,11.3,11.3,25.1,25.1,35.9,35.9,35.9,15 LosVectReq,15,Extended,Entity,Geodetic,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15 LosVectReq,15,Basic,Geodetic,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15 LosVectReq,15,Extended,Geodetic,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15 LosVectReq,15,Basic,Entity,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15 PositionReq,15,240,OneShot,Entity,Geodetic,,,,,,,,, PositionReq,240,15,Continuous,ArtPart,ParentEntity,,,,,,,,, PositionReq,3840,15,Continuous,View,Submodel,,,,,,,,, PositionReq,15,15,Continuous,ViewGrp,Submodel,,, PositionReq,15,15,Continuous,MotionTracker,Submodel,,, EnvCondReq,Maritime,Terrestrial,Weather,Aerosol,1,35.9,-91.3,11.5 EnvCondReq,x,Terrestrial,Weather,Aerosol,2,21.1,-91.3,35.9 EnvCondReq,Maritime,x,Weather,Aerosol,4,35.9,-91.3,35.9 EnvCondReq,x,x,Weather,Aerosol,8,35.9,-91.3,35.9 EnvCondReq,Maritime,Terrestrial,x,Aerosol,16,35.9,-91.3,35.9 EnvCondReq,x,Terrestrial,x,Aerosol,32,35.9,-91.3,35.9 EnvCondReq,Maritime,x,x,Aerosol,64,35.9,-91.3,35.9 EnvCondReq,x,x,x,Aerosol,128,35.9,-91.3,35.9 EnvCondReq,Maritime,Terrestrial,Weather,x,255,35.9,-91.3,35.9 EnvCondReq,x,Terrestrial,Weather,x,3,35.9,-91.3,35.9 EnvCondReq,Maritime,x,Weather,x,56,35.9,-91.3,35.9 EnvCondReq,x,x,Weather,x,224,35.9,-91.3,35.9 EnvCondReq,Maritime,Terrestrial,x,x,129,35.9,-91.3,35.9 EnvCondReq,x,Terrestrial,x,x,153,35.9,-91.3,35.9 EnvCondReq,Maritime,x,x,x,170,35.9,-91.3,35.9 EnvCondReq,x,x,x,x,85,35.9,-91.3,35.9 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3/MiniHost.def000066400000000000000000000006301210750432300253100ustar00rootroot00000000000000 127.0.0.1 8000 8001 3 0 HostData.csv 1 38.0 -90.2 1000 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3_3/000077500000000000000000000000001210750432300233215ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3_3/3.3Spec_HostData.csv000066400000000000000000000074641210750432300267560ustar00rootroot00000000000000EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,TRUE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Standby,Attach,Enable,Inherit,AltClamp,Backward,OneShot,Pause,FALSE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Remove,Detach,Disable,NoInherit,AltAttClamp,Forward,Continuous,Continue,FALSE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Stop,TRUE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,8,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,TRUE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,259,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,FALSE,36,12801,544,2.4,3.3,63.3,10,20,30 CompCtrl,1,1,SymbolSurfaceV3_3,1,15,15,15,15,15,15,,,,,,,,, CompCtrl,1,1,SymbolV3_3,1,15,15,15,15,15,15,,,,,,,,, ShortCompCtrl,1,1,SymbolSurfaceV3_3,1,15,15,,,,,,,,,,,,, ShortCompCtrl,1,1,SymbolV3_3,1,15,15,,,,,,,,,,,,, SymbolSurfaceDef,1,Active,EntityAttached,Billboard,Disable,2,0,0,-33.1,0,0,0,1.1,0.9,-11.1,12.2,-7.2,14.4, SymbolSurfaceDef,2,Active,EntityAttached,Billboard,Enable,1,0,0,-12.3,0,0,0,5.5,3.2,-12.2,9.3,-14.4,11.3, SymbolSurfaceDef,4,Active,EntityAttached,NotBillboard,Disable,8,17.3,-15.4,-10.3,7.5,2.3,-1.3,10.2,6.3,-5.2,7.5,-3.7,4.4, SymbolSurfaceDef,8,Active,ViewAttached,NotBillboard,Disable,16,0.3,0.6,0.2,0.4,-5.2,7.5,-3.7,4.4,,,,, SymbolSurfaceDef,1,Destroyed,EntityAttached,Billboard,Disable,2,0,0,-33.1,0,0,0,1.1,0.9,-11.1,12.2,-7.2,14.4, SymbolSurfaceDef,8,Destroyed,ViewAttached,NotBillboard,Disable,16,0.2,0.8,0.4,0.6,-5.2,7.5,-3.7,4.4,,,,, SymbolCtrl,1,Hidden,Detach,Continue,NotInherit,0,2,16,90,0.9,-15.2,11.1,15.1,15,220,15,255,1,1 SymbolCtrl,2,Visible,Attach,Reset,Inherit,1,4,32,75,1.2,15.2,9.8,15.1,25,190,25,255,1,1 SymbolCtrl,4,Destroyed,Detach,Continue,NotInherit,0,8,64,100,1,1.2,-1.3,15.1,175,45,45,125,1,1 ShortSymbolCtrl,1,Visible,Detach,Continue,NotInherit,None,0,FlashPeriodDatumType,2.2,,,,,,,,,, ShortSymbolCtrl,2,Visible,Attach,Reset,NotInherit,SurfaceIdDatumType,4,UPositionDatumType,2.4,,,,,,,,,, ShortSymbolCtrl,4,Visible,Attach,Continue,Inherit,ParentIdDatumType,1,VPositionDatumType,-3.3,,,,,,,,,, ShortSymbolCtrl,8,Visible,Attach,Reset,Inherit,LayerDatumType,15,RotationDatumType,15.2,,,,,,,,,, ShortSymbolCtrl,16,Visible,Detach,Continue,NotInherit,FlashDutyCycleDatumType,65,ColorDatumType,21,210,18,80,,,,,,, ShortSymbolCtrl,32,Visible,Attach,Reset,NotInherit,ColorDatumType,175,40,36,100,SurfaceIdDatumType,2,,,,,,, SymbolTextDef,1,TopLeft,LeftToRight,1,1.2,Happy,,,,,,,,,,,,, SymbolTextDef,2,TopCenter,TopToBottom,2,1.3,Sad,,,,,,,,,,,,, SymbolTextDef,4,TopRight,RightToLeft,3,0.9,Grumpy,,,,,,,,,,,,, SymbolTextDef,8,CenterLeft,BottomToTop,4,1.4,Blue,,,,,,,,,,,,, SymbolTextDef,16,Center,LeftToRight,5,1.2,Green,,,,,,,,,,,,, SymbolTextDef,32,CenterRight,TopToBottom,6,2.2,This is a phrase,,,,,,,,,,,,, SymbolTextDef,64,BottomLeft,RightToLeft,7,0.8,Jumping Frogs,,,,,,,,,,,,, SymbolTextDef,128,BottomCenter,BottomToTop,8,1.9,Tree Frogs,,,,,,,,,,, SymbolTextDef,256,BottomRight,LeftToRight,9,5.5,Pale Blue Sky,,,,,,,,,,, SymbolCircleDef,1,Line,43605,0.3,2.1,2.3,1.2,5.3,0,45.1,134.9,,,,,, SymbolCircleDef,2,Fill,50115,0.2,1.3,3.3,-1.1,6.1,4.2,199.5,339.5,,,,,, SymbolCircleDef,4,Line,43605,0.3,2.1,2.3,1.2,5.3,0,45.1,134.9,3.3,-1.1,6.1,4.2,199.5,339.5 SymbolCircleDef,8,Fill,50115,0.2,1.3,3.3,-1.1,6.1,4.2,199.5,339.5,2.3,1.2,5.3,0,45.1,134.9 SymbolLineDef,1,Points,43605,0.3,2.1,2.3,1.2,,,,,,,,,, SymbolLineDef,2,Lines,50115,0.2,1.3,3.3,-1.1,2.1,2.2,,,,,,,, SymbolLineDef,4,LineStrip,43605,0.3,2.1,2.3,1.2,1.2,1.4,3.3,3.5,4.8,5.2,,,, SymbolLineDef,8,LineLoop,50115,0.2,1.3,3.3,-1.1,1.2,1.4,3.3,3.5,4.8,5.2,,,, SymbolLineDef,16,Triangles,43605,0.3,2.1,2.3,1.2,3.3,1.2,3.3,2.1,,,,,, SymbolLineDef,32,TriangleStrip,50115,0.2,1.3,2.3,1.2,3.3,1.2,3.3,2.1,4.8,1.2,,,, SymbolLineDef,64,TriangleFan,43605,0.3,2.1,2.3,1.2,3.3,1.2,3.3,2.1,2.8,2.6,,,, cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3_3/FormatData.csv000066400000000000000000000055471210750432300260730ustar00rootroot00000000000000SymbolSurfaceDef,1,Active,EntityAttached,Billboard,Disable,2,0,0,-33.1,0,0,0,1.1,0.9,-11.1,12.2,-7.2,14.4, ,SetSurfaceID,SetSurfaceState,SetAttached,SetBillboardState,SetPerspectiveGrowth,SetEntityID,SetXOffset,SetYOffset,SetZOffset,SetYaw,SetPitch,SetRoll,SetWidth,SetHeight,SetMinU,SetMaxU,SetMinV,SetMaxV, ,,Active,EntityAttached,NotBillboard,Disable,,,,,,,,,,,,,, ,,Destroyed,ViewAttached,Billboard,Enable,,,,,,,,,,,,,, May need to look,,,,,may need to,,,,,,,,,,,,,, at how xyz offsets,,,,,change this in,,,,,,,,,,,,,, "& Yaw,Pitch,Roll",,,,,CCL,,,,,,,,,,,,,, are filled with,,,,,,SetViewID,SetLeftHalfAngle,SetRightHalfAngle,SetTopHalfAngle,SetBottomHalfAngle,SetLeftEdge,SetRightEdge,SetTopEdge,SetBottomEdge,,,,, billboards,,,,,,,,,,,,,,,,,,, SymbolCtrl,2,Visible,Attach,Reset,Inherit,1,4,32,75,1.2,15.2,9.8,15.1,25,190,25,255,1,1 SymbolCtrl,SetSymbolID,SetSymbolState,SetAttachState,SetFlashCtrl,SetInheritColor,SetParentSymbolID,SetSurfaceID,SetLayer,SetFlashDutyCycle,SetFlashPeriod,SetUPosition,SetVPosition,SetRotation,SetRed,SetGreen,SetBlue,SetAlpha,SetScaleU,SetScaleV ,,Hidden,Detach,Continue,NotInherit,,,,,,, ,,Visible,Attach,Reset,Inherit,,,,,,, ,,Destroyed,,,,,,,,,, ShortSymbolCtrl,2,Visible,Attach,Reset,NotInherit,SurfaceIdDatumType,4,UPositionDatumType,2.4,,, ShortSymbolCtrl,32,Visible,Attach,Reset,NotInherit,ColorDatumType,175,40,36,100,SurfaceIdDatumType,2 ShortSymbolCtrl,SetSymbolID,SetSymbolState,SetAttachState,SetFlashCtrl,SetInheritColor,Datum Type,Datum,Datum Type,Datum,,, ,,Hidden,Detach,Continue,NotInherit,None,,,,,, ,,Visible,Attach,Reset,Inherit,SurfaceIdDatumType,,,,,, ,,Destroyed,,,,ParentIdDatumType,,,,,, ,,,,,,LayerDatumType,,,,,, ,,,,,,FlashDutyCycleDatumType,,,, ,,,,,,FlashPeriodDatumType,,,, ,,,,,,UPositionDatumType,,,, ,,,,,,VPositionDatumType,,,, ,,,,,,RotationDatumType,,,, ,,,,,,ColorDatumType,red,green,blue,alpha SymbolTextDef,256,BottomRight,LeftToRight,9,5.5,Pale Blue Sky,,,, SymbolTextDef,SetSymbolID,SetAlignment,SetOrientation,SetFontID,SetFontSize,SetText,,,, ,,TopLeft,LeftToRight,,,,,,, ,,TopCenter,TopToBottom,,,,,,,, ,,TopRight,RightToLeft,,,,,,,, ,,CenterLeft,BottomToTop,,,,,,,, ,,Center,,,,,,,,, ,,CenterRight,,,,,,,,, ,,BottomLeft,,,,,,,,, ,,BottomCenter,,,,,,,,, ,,BottomRight,,,,,,,,, SymbolCircleDef,1,Line,43605,0.3,2.1,2.3,1.2,5.3,0,45.1,134.9 SymbolCircleDef,SetSymbolID,SetDrawingStyle,SetStipplePattern,SetLineWidth,SetStipplePatternLen,SetCenterUPosition,SetCenterVPosition,SetRadius,SetInnerRadius,SetStartAngle,SetEndAngle ,,Line,,,,, ,,Fill,,,,, SymbolLineDef,64,TriangleFan,43605,0.3,2.1,2.3,1.2 SymbolLineDef,SetSymbolID,SetPrimitive,SetStipplePattern,SetLineWidth,SetStipplePatternLen,SetVertexU,SetVertexV ,,Points,,,,, ,,Lines,,,,, ,,LineStrip,,,,, ,,LineLoop,,,,, ,,Triangles,,,,, ,,TriangleStrip,,,,, ,,TriangleFan, SymbolClone,SetSymbolID,SetSourceType,SetSourceID ,,Symbol, ,,SymbolTemplate, cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3_3/HostData.csv000066400000000000000000000370251210750432300255540ustar00rootroot00000000000000EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,TRUE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Standby,Attach,Enable,Inherit,AltClamp,Backward,OneShot,Pause,FALSE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Remove,Detach,Disable,NoInherit,AltAttClamp,Forward,Continuous,Continue,FALSE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,2,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Stop,TRUE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,8,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,TRUE,50,104,0,2.4,3.3,63.3,10,20,30 EntityCtrl,259,Active,Detach,Disable,NoInherit,NoClamp,Forward,Continuous,Play,FALSE,36,12801,544,2.4,3.3,63.3,10,20,30 ConfClampEntityCtrl,259,25.1,35.9,-91.3,,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,-91.3,,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,370.1,,,,,,,,,,,,,,, ConfClampEntityCtrl,769,25.1,35.9,-91.3,,,,,,,,,,,,,,, CompCtrl,1,1,EntityV3,1,1,15,15,15,15,15,,,,,,,,, CompCtrl,15,61440,ViewV3,15,15,15,15,15,15,15,,,,,,,,, CompCtrl,240,3840,ViewGrpV3,240,16,15,15,15,15,15,,,,,,,,, CompCtrl,3840,240,SensorV3,15,240,15,15,15,15,15,,,,,,,,, CompCtrl,61440,15,RegionalSeaSurfaceV3,15,61440,15,15,15,15,15,,,,,,,,, CompCtrl,15,15,RegionalTerrainSurfaceV3,15,983040,15,15,15,15,15,,,,,,,,, CompCtrl,15,15,RegionalLayeredWeatherV3,15,15728640,15,15,15,15,15 CompCtrl,15,15,GlobalSeaSurfaceV3,15,251658240,15,15,15,15,15 CompCtrl,15,15,GlobalTerrainSurfaceV3,15,4026531840,15,15,15,15,15 CompCtrl,1,1,GlobalLayeredWeatherV3,1,15,15,15,15,15,15 CompCtrl,1,1,AtmosphereV3,1,15,15,15,15,15,15 CompCtrl,1,1,CelestialSphereV3,1,15,15,15,15,15,15 CompCtrl,1,1,EventV3,1,15,15,15,15,15,15 CompCtrl,1,1,SystemV3,1,15,15,15,15,15,15 CompCtrl,1,1,SymbolSurfaceV3_3,1,15,15,15,15,15,15 CompCtrl,1,1,SymbolV3_3,1,15,15,15,15,15,15 ShortCompCtrl,1,1,EntityV3,1,1,15,,,, ShortCompCtrl,15,61440,ViewV3,15,15,15,,,, ShortCompCtrl,240,3840,ViewGrpV3,240,16,15,,,, ShortCompCtrl,3840,240,SensorV3,15,240,15,,,, ShortCompCtrl,61440,15,RegionalSeaSurfaceV3,15,61440,15,,,, ShortCompCtrl,15,15,RegionalTerrainSurfaceV3,15,983040,15,,,, ShortCompCtrl,15,15,RegionalLayeredWeatherV3,15,15728640,15,,,,,,,,, ShortCompCtrl,15,15,GlobalSeaSurfaceV3,15,251658240,15,,,,,,,,, ShortCompCtrl,15,15,GlobalTerrainSurfaceV3,15,4026531840,15,,,,,,,,, ShortCompCtrl,1,1,GlobalLayeredWeatherV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,AtmosphereV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,CelestialSphereV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,EventV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,SystemV3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,SymbolSurfaceV3_3,1,15,15,,,,,,,,, ShortCompCtrl,1,1,SymbolV3_3,1,15,15,,,,,,,,, ArtPartCtrl,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,240,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,25.1,25.1,25.1,25.1,25.1,25.1 ArtPartCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,10.1,20.2,30.3,40.2,10.4,20.1 ArtPartCtrl,15,15,TRUE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,10.1,20.2,30.3,40.2,10.4,20.1 ShortArtPartCtrl,15,15,240,NotUsed,Roll,TRUE,TRUE,10.2,10.3,,,,,, ShortArtPartCtrl,240,240,15,Xoff,Pitch,FALSE,TRUE,25.1,10.3,,,,,, ShortArtPartCtrl,3840,15,15,Yoff,Yaw,TRUE,FALSE,10.2,25.1,,,, ShortArtPartCtrl,15,15,15,Zoff,Zoff,TRUE,FALSE,10.2,10.3,,,, ShortArtPartCtrl,15,15,15,Yaw,Yoff,FALSE,FALSE,10.2,10.3,,,, ShortArtPartCtrl,15,15,15,Pitch,Xoff,TRUE,TRUE,10.2,10.3,,,, ShortArtPartCtrl,15,15,15,Roll,NotUsed,TRUE,TRUE,10.2,10.3,,,, RateCtrl,15,240,TRUE,Local,10.2,20.3,12.3,21.5,33.1,22.3,,, RateCtrl,240,15,TRUE,Local,25.1,20.3,25.1,21.5,25.1,22.3,,, RateCtrl,3840,15,FALSE,World,10.2,25.1,12.3,25.1,33.1,25.1,,, CelestialCtrl,1,1,FALSE,FALSE,FALSE,FALSE,FALSE,1,1,2004,1,, CelestialCtrl,23,59,TRUE,TRUE,TRUE,TRUE,TRUE,2,28,2004,95,, CelestialCtrl,1,15,TRUE,FALSE,TRUE,FALSE,TRUE,1,1,2003,25.1,, CelestialCtrl,1,15,FALSE,TRUE,FALSE,TRUE,FALSE,1,1,2001,25.1,, AtmosCtrl,TRUE,15,25.1,12.7,25.1,10.6,25.1,10.3,,,,, AtmosCtrl,FALSE,95,21.1,25.1,11.3,25.1,17.7,25.1,,,,, EnvRgnCtrl,15,Inactive,UseLast,UseLast,Merge,UseLast,35.9,-91.3,25.1,10.2,25.1,12.3,25.1 EnvRgnCtrl,240,Active,Merge,UseLast,Merge,Merge,13.3,35.9,12.1,25.1,33.3,25.1,14.4 EnvRgnCtrl,3840,Destroyed,Merge,Merge,UseLast,UseLast,35.9,-91.3,25.1,10.2,25.1,12.3,25.1,,,,,,,,, WeatherCtrl,15,240,15,FALSE,TRUE,FALSE,TRUE,None,Entity,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,240,15,95,TRUE,FALSE,TRUE,FALSE,Altocumulus,Regional,3,12.3,25.1,11.1,25.1,15.9,25.1,13.8,25.1,19.9,25.1,14.4,25.1 WeatherCtrl,3840,15,15,TRUE,TRUE,TRUE,TRUE,Altostratus,Entity,5,25.1,31.3,25.1,21.2,25.1,11.1,25.1,18.2,25.1,13.1,25.1,12.8 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrocumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrostratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cirrus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cumulonimbus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Cumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Nimbostratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Stratocumulus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,Stratus,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefA,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefB,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefC,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefD,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 WeatherCtrl,0,15,15,FALSE,FALSE,FALSE,FALSE,DefE,Global,1,25.1,11.2,25.1,14.4,25.1,11.3,25.1,17.7,25.1,11.6,25.1,12.2 MaritimeSurfaceCtrl,0,FALSE,FALSE,Global,25.1,31.2,25.1,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,15,TRUE,TRUE,Regional,15.5,25.1,17.7,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,240,TRUE,FALSE,Entity,25.1,31.2,25.1,,,,,,,,,,,,,,, MaritimeSurfaceCtrl,3840,FALSE,TRUE,Entity,15.5,25.1,17.7,,,,,,,,,,,,,,, WaveCtrl,0,0,FALSE,Global,Plunging,25.1,15.5,25.1,11.8,25.1,15.6,,,,,,,,,,, WaveCtrl,15,240,TRUE,Regional,Spilling,11.2,25.1,19.9,25.1,18.3,25.1,,,,,,,,,,, WaveCtrl,240,15,TRUE,Entity,Surging,25.1,15.5,25.1,11.8,25.1,15.6,,,,,,,,,,, WaveCtrl,3840,15,TRUE,Entity,Surging,11.2,25.1,19.9,25.1,18.3,25.1,,,,,,,,,,, TerrestrialSurfaceCtrl,0,15,FALSE,Global,15,15,,,,,,,,,,,,,,,, TerrestrialSurfaceCtrl,15,3840,TRUE,Regional,15,95,,,,,,,,,,,,,,,, TerrestrialSurfaceCtrl,240,0,TRUE,Entity,31,15,,,,,,,,,,,,,,,, TerrestrialSurfaceCtrl,3840,240,TRUE,Entity,6,15,,,,,,,,,,,,,,,, ViewCtrl,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,3840,25.1,11.6,25.1,19.8,25.1,17.3,,,,,,, ViewCtrl,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,240,1.1,25.1,14.6,25.1,33.2,25.1,,,,,,, ViewCtrl,3840,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,15,25.1,11.6,25.1,19.8,25.1,17.3,,,,,,, ViewCtrl,15,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,15,25.1,11.6,25.1,19.8,25.1,17.3 SensorCtrl,15,240,TRUE,WhiteHot,TRUE,TRUE,TrackWhite,GatePos,TrackOff,0.8,0.7,1.3,0.4,, SensorCtrl,240,15,FALSE,BlackHot,FALSE,FALSE,TrackBlack,GateAndTargetPos,ForceCorrelate,0.8,0.7,1.3,0.4,, SensorCtrl,3840,15,TRUE,WhiteHot,FALSE,TRUE,TrackBlack,GatePos,Scene,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,FALSE,TrackBlack,GatePos,Target,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,Ship,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefA,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefB,0.8,0.7,1.3,0.4,, SensorCtrl,15,15,TRUE,WhiteHot,TRUE,TRUE,TrackBlack,GatePos,TMDefC,0.8,0.7,1.3,0.4,, MotionTrackCtrl,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,View,,,, MotionTrackCtrl,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,ViewGrp,,,, MotionTrackCtrl,3840,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,View,,,, MotionTrackCtrl,15,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,View,,,, EarthModelDef,TRUE,35.9,1.2,,,,,,,,,,,, EarthModelDef,FALSE,126.5,35.9,,,,,,,,,,,, Trajectory,15,25.1,15.6,25.1,22.3,25.1,,,,,,,,, Trajectory,240,3.2,25.1,18.4,25.1,12.1,,,,,,,,,,,,, Trajectory,3840,25.1,23.3,25.1,14.4,25.1,,,,,,,,,,,,, ViewDef,15,240,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,MirrorNone,ReplicateNone,Perspective,TRUE,1,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,240,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Horizontal,Replicate1x2,Orthographic,FALSE,2,2.2,25.1,-2.5,25.1,50.1,25.1 ViewDef,3840,15,TRUE,FALSE,TRUE,FALSE,TRUE,FALSE,Vertical,Replicate2x1,Orthographic,TRUE,3,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,TRUE,FALSE,TRUE,FALSE,TRUE,Horiz_Vert,Replicate2x2,Orthographic,FALSE,4,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,Vertical,ReplicateDefA,Orthographic,FALSE,5,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,Vertical,ReplicateDefB,Orthographic,TRUE,6,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Vertical,ReplicateDefC,Orthographic,FALSE,7,25.1,30.3,25.1,45.5,25.1,10.2 ViewDef,15,15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,Vertical,ReplicateDefD,Orthographic,FALSE,7,25.1,30.3,25.1,45.5,25.1,10.2 CollDetSegDef,15,240,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,3840,,,,,,,,, CollDetSegDef,240,15,FALSE,40.2,25.1,10.2,25.1,50.3,25.1,240,,,,,,,,, CollDetSegDef,3840,15,TRUE,25.1,10.2,25.1,50.3,25.1,40.2,15,,,,,,,,, CollDetVolDef,15,240,TRUE,Sphere,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,25.1,,,,,, CollDetVolDef,240,15,FALSE,Cuboid,36.3,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,,,,,, CollDetVolDef,3840,15,TRUE,Cuboid,25.1,13.3,25.1,3000.3,25.1,2000.3,25.1,36.3,25.1,,,,,, HatHotReq,3840,HAT,Geodetic,0,15,35.9,-91.3,15.3,,,,,,,,, HatHotReq,15,HOT,Entity,1,240,-91.3,15.3,35.9,,,,,,,,, HatHotReq,240,Extended,Entity,2,3840,15.3,35.9,-91.3,,,,,,,,, LosSegReq,15,Basic,Geodetic,Geodetic,Geodetic,FALSE,15,240,35.9,-91.3,11.3,35.9,-91.3,11.3,3840,0,240 LosSegReq,240,Extended,Entity,Entity,Entity,TRUE,240,3840,11.3,35.9,-91.3,11.3,35.9,-91.3,240,1,15 LosSegReq,3840,Basic,Entity,Geodetic,Entity,FALSE,15,15,-91.3,11.3,35.9,-91.3,11.3,35.9,15,2,3840 LosSegReq,15,Extended,Geodetic,Entity,Geodetic,FALSE,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15,3,15 LosSegReq,15,Basic,Geodetic,Entity,Entity,TRUE,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15,4,15 LosSegReq,15,Extended,Entity,Geodetic,Geodetic,FALSE,15,15,35.9,-91.3,11.3,35.9,-91.3,11.3,15,5,15 LosVectReq,15,Basic,Geodetic,Geodetic,240,3840,25.1,11.3,25.1,11.3,35.9,-91.3,15.5,240,0,, LosVectReq,240,Extended,Entity,Entity,15,240,11.3,25.1,11.3,25.1,-91.3,15.5,35.9,3840,1,, LosVectReq,3840,Extended,Geodetic,Geodetic,15,15,25.1,25.1,11.3,11.3,15.5,35.9,-91.3,15,2,, LosVectReq,15,Basic,Entity,Geodetic,15,15,11.3,11.3,25.1,25.1,35.9,35.9,35.9,15,3,, LosVectReq,15,Extended,Entity,Geodetic,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,4,, LosVectReq,15,Basic,Geodetic,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,5,, LosVectReq,15,Extended,Geodetic,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,6,, LosVectReq,15,Basic,Entity,Entity,15,15,25.1,25.1,25.1,25.1,35.9,35.9,35.9,15,7 PositionReq,15,240,OneShot,Entity,Geodetic,,,,,,,,,, PositionReq,240,15,Continuous,ArtPart,ParentEntity,,,,,,,,,, PositionReq,3840,15,Continuous,View,Submodel,,,,,,,,,, PositionReq,15,15,Continuous,ViewGrp,Submodel,,,,,,,,,, PositionReq,15,15,Continuous,MotionTracker,Submodel,,,,,,,,,, EnvCondReq,Maritime,Terrestrial,Weather,Aerosol,1,35.9,-91.3,11.5,,,,,,, EnvCondReq,x,Terrestrial,Weather,Aerosol,2,21.1,-91.3,35.9,,,,,,, EnvCondReq,Maritime,x,Weather,Aerosol,4,35.9,-91.3,35.9,,,,,,, EnvCondReq,x,x,Weather,Aerosol,8,35.9,-91.3,35.9,,,,,,, EnvCondReq,Maritime,Terrestrial,x,Aerosol,16,35.9,-91.3,35.9,,,,,,, EnvCondReq,x,Terrestrial,x,Aerosol,32,35.9,-91.3,35.9,,,,,,, EnvCondReq,Maritime,x,x,Aerosol,64,35.9,-91.3,35.9,,,,,,, EnvCondReq,x,x,x,Aerosol,128,35.9,-91.3,35.9,,,,,,, EnvCondReq,Maritime,Terrestrial,Weather,x,255,35.9,-91.3,35.9,,,,,,, EnvCondReq,x,Terrestrial,Weather,x,3,35.9,-91.3,35.9,,,,,,, EnvCondReq,Maritime,x,Weather,x,56,35.9,-91.3,35.9,,,,,,,,,,, EnvCondReq,x,x,Weather,x,224,35.9,-91.3,35.9,,,,,,,,,,, EnvCondReq,Maritime,Terrestrial,x,x,129,35.9,-91.3,35.9,,,,,,,,,,, EnvCondReq,x,Terrestrial,x,x,153,35.9,-91.3,35.9,,,,,,,,,,, EnvCondReq,Maritime,x,x,x,170,35.9,-91.3,35.9,,,,,,,,,,, EnvCondReq,x,x,x,x,85,35.9,-91.3,35.9,,,,,,,,,,, SymbolSurfaceDef,1,Active,EntityAttached,Billboard,Disable,2,0,0,-33.1,0,0,0,1.1,0.9,-11.1,12.2,-7.2,14.4, SymbolSurfaceDef,2,Active,EntityAttached,Billboard,Enable,1,0,0,-12.3,0,0,0,5.5,3.2,-12.2,9.3,-14.4,11.3, SymbolSurfaceDef,4,Active,EntityAttached,NotBillboard,Disable,8,17.3,-15.4,-10.3,7.5,2.3,-1.3,10.2,6.3,-5.2,7.5,-3.7,4.4, SymbolSurfaceDef,8,Active,ViewAttached,NotBillboard,Disable,16,0.3,0.6,0.2,0.4,-5.2,7.5,-3.7,4.4,,,,, SymbolSurfaceDef,1,Destroyed,EntityAttached,Billboard,Disable,2,0,0,-33.1,0,0,0,1.1,0.9,-11.1,12.2,-7.2,14.4, SymbolSurfaceDef,8,Destroyed,ViewAttached,NotBillboard,Disable,16,0.2,0.8,0.4,0.6,-5.2,7.5,-3.7,4.4,,,,, SymbolCtrl,1,Hidden,Detach,Continue,NotInherit,0,2,16,90,0.9,-15.2,11.1,15.1,15,220,15,255,1,1 SymbolCtrl,2,Visible,Attach,Reset,Inherit,1,4,32,75,1.2,15.2,9.8,15.1,25,190,25,255,1,1 SymbolCtrl,4,Destroyed,Detach,Continue,NotInherit,0,8,64,100,1,1.2,-1.3,15.1,175,45,45,125,1,1 ShortSymbolCtrl,1,Visible,Detach,Continue,NotInherit,None,0,FlashPeriodDatumType,2.2,,,,,,,,,, ShortSymbolCtrl,2,Visible,Attach,Reset,NotInherit,SurfaceIdDatumType,4,UPositionDatumType,2.4,,, ShortSymbolCtrl,4,Visible,Attach,Continue,Inherit,ParentIdDatumType,1,VPositionDatumType,-3.3,,, ShortSymbolCtrl,8,Visible,Attach,Reset,Inherit,LayerDatumType,15,RotationDatumType,15.2,,, ShortSymbolCtrl,16,Visible,Detach,Continue,NotInherit,FlashDutyCycleDatumType,65,ColorDatumType,21,210,18,80 ShortSymbolCtrl,32,Visible,Attach,Reset,NotInherit,ColorDatumType,175,40,36,100,SurfaceIdDatumType,2 SymbolTextDef,1,TopLeft,LeftToRight,1,1.2,Happy,,,,,, SymbolTextDef,2,TopCenter,TopToBottom,2,1.3,Sad,,,,,, SymbolTextDef,4,TopRight,RightToLeft,3,0.9,Grumpy,,,,,, SymbolTextDef,8,CenterLeft,BottomToTop,4,1.4,Blue,,,,,, SymbolTextDef,16,Center,LeftToRight,5,1.2,Green,,,,,, SymbolTextDef,32,CenterRight,TopToBottom,6,2.2,This is a phrase,,,,,, SymbolTextDef,64,BottomLeft,RightToLeft,7,0.8,Jumping Frogs,,,,,, SymbolTextDef,128,BottomCenter,BottomToTop,8,1.9,Tree Frogs,,,,,, SymbolTextDef,256,BottomRight,LeftToRight,9,5.5,Pale Blue Sky,,,,,, SymbolCircleDef,1,Line,43605,0.3,2.1,2.3,1.2,5.3,0,45.1,134.9, SymbolCircleDef,2,Fill,50115,0.2,1.3,3.3,-1.1,6.1,4.2,199.5,339.5, SymbolCircleDef,1,Line,43605,0.3,2.1,2.3,1.2,5.3,0,45.1,134.9,3.3,-1.1,6.1,4.2,199.5,339.5 SymbolCircleDef,2,Fill,50115,0.2,1.3,3.3,-1.1,6.1,4.2,199.5,339.5,2.3,1.2,5.3,0,45.1,134.9 SymbolLineDef,1,Points,43605,0.3,2.1,2.3,1.2,,,,,,,,,, SymbolLineDef,2,Lines,50115,0.2,1.3,3.3,-1.1,2.1,2.2,,,,,,,, SymbolLineDef,4,LineStrip,43605,0.3,2.1,2.3,1.2,1.2,1.4,3.3,3.5,4.8,5.2,,,, SymbolLineDef,8,LineLoop,50115,0.2,1.3,3.3,-1.1,1.2,1.4,3.3,3.5,4.8,5.2,,,, SymbolLineDef,16,Triangles,43605,0.3,2.1,2.3,1.2,3.3,1.2,3.3,2.1,,,,,, SymbolLineDef,32,TriangleStrip,50115,0.2,1.3,2.3,1.2,3.3,1.2,3.3,2.1,4.8,1.2,,,, SymbolLineDef,64,TriangleFan,43605,0.3,2.1,2.3,1.2,3.3,1.2,3.3,2.1,2.8,2.6,,,, SymbolClone,15,Symbol,49920,,,,,,,,,,,,,, SymbolClone,240,Symbol,15360,,,,,,,,,,,,,, SymbolClone,3840,SymbolTemplate,195,,,,,,,,,,,,,, SymbolClone,61440,SymbolTemplate,60,,,,,,,,,,,,,, cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/TestingRepos/V3_3/MiniHost.def000066400000000000000000000006301210750432300255320ustar00rootroot00000000000000 127.0.0.1 8000 8001 3 3 HostData.csv 1 38.0 -90.2 1000 cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/XSOF.cpp000066400000000000000000000006771210750432300214560ustar00rootroot00000000000000// XSOF.cpp: Body of the XSOF class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "XSOF.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSOF::XSOF() { } XSOF::~XSOF() { } void XSOF::OnPacketReceived(CigiBasePacket *Packet) { printf("Received SOF\n"); } cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/XSOF.h000066400000000000000000000010111210750432300211020ustar00rootroot00000000000000// XSOF.h: interface for the XSOF class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSOF_INCLUDED_) #define _PROC_XSOF_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSOFV3_2.h" class XSOF : public CigiBaseEventProcessor { public: XSOF(); virtual ~XSOF(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSOFV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSOFV3_2 *TPckt; }; #endif // _PROC_XSOF_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/stdafx.cpp000066400000000000000000000004421210750432300221560ustar00rootroot00000000000000// stdafx.cpp : source file that includes just the standard includes // HostSendCcl.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file cigi-ccl-3.3.3a+svn818/Testing/HostSendCcl/stdafx.h000066400000000000000000000004311210750432300216210ustar00rootroot00000000000000// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include #include // TODO: reference additional headers your program requires here cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/000077500000000000000000000000001210750432300174445ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/DefaultProc.cpp000066400000000000000000000026061210750432300223640ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *
 *  FILENAME:   DefaultProc.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "DefaultProc.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::DefaultProc() { } // ================================================ // ~DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::~DefaultProc() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void DefaultProc::OnPacketReceived(CigiBasePacket *Packet) { unsigned char *buff = ((CigiDefaultPacket *)Packet)->GetDataPtr(); cout << "Received an Unsupported packet: id " << hex << (int *)buff << endl; } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/DefaultProc.h000066400000000000000000000027011210750432300220250ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) #define _DEFAULT_PACKET_PROCESSING_INCLUDED_ #include using namespace std; //========================================================= //! The base class for the SOF Event Packet Processing //! class DefaultProc : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! DefaultProc(); //========================================================= //! General Destructor //! virtual ~DefaultProc(); //==> Incoming Packet Processing //========================================================= //! The callback handler for the CIGI SOF packet //! \param Packet - The pointer to the SOF packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/IgRcvCcl.cpp000066400000000000000000000637711210750432300216220ustar00rootroot00000000000000/**
 *  The CIGI IG tester
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   IgRcvCcl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This contains the code needed to run the IG side CIGI
 *   communications tester.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  12/21/2007 Greg Basler                       MPV_CR_DR_1
 *  Initial Release.
 * 
* The Boeing Company * 1.0 */ #include "Network.h" // network includes winsock2.h which must be included before windows.h // Tiny XML includes #define TINYXML_USE_STL #define TIXML_USE_STL #include #include // CIGI related includes // From CCL #include #include #include #include // Handling routines #include "DefaultProc.h" #include "XArtPartCtrlV1.h" #include "XArtPartCtrlV2.h" #include "XArtPartCtrlV3.h" #include "XAtmosCtrlV3.h" #include "XCelestialCtrlV3.h" #include "XCollDetSegDefV1.h" #include "XCollDetSegDefV2.h" #include "XCollDetSegDefV3.h" #include "XCollDetVolDefV2.h" #include "XCollDetVolDefV3.h" #include "XCompCtrlV1.h" #include "XCompCtrlV2.h" #include "XCompCtrlV3.h" #include "XConfClampEntityCtrlV3.h" #include "XEarthModelDefV3.h" #include "XEntityCtrlV1.h" #include "XEntityCtrlV2.h" #include "XEntityCtrlV3.h" #include "XEntityCtrlV3_3.h" #include "XEnvCondReqV3.h" #include "XEnvRgnCtrlV3.h" #include "XEventNotificationV3.h" #include "XHatHotReqV3.h" #include "XHatHotReqV3_2.h" #include "XIGCtrl.h" #include "XIGCtrlV1.h" #include "XIGCtrlV2.h" #include "XIGCtrlV3.h" #include "XIGCtrlV3_2.h" #include "XIGCtrlV3_3.h" #include "XLosSegReqV1.h" #include "XLosSegReqV2.h" #include "XLosSegReqV3.h" #include "XLosSegReqV3_2.h" #include "XLosVectReqV1.h" #include "XLosVectReqV2.h" #include "XLosVectReqV3.h" #include "XLosVectReqV3_2.h" #include "XMaritimeSurfaceCtrlV3.h" #include "XMotionTrackCtrlV3.h" #include "XPositionReqV3.h" #include "XRateCtrlV1.h" #include "XRateCtrlV2.h" #include "XRateCtrlV3.h" #include "XRateCtrlV3_2.h" #include "XSensorCtrlV1.h" #include "XSensorCtrlV2.h" #include "XSensorCtrlV3.h" #include "XShortArtPartCtrlV3.h" #include "XShortCompCtrlV3.h" #include "XTerrestrialSurfaceCtrlV3.h" #include "XTrajectoryV1.h" #include "XTrajectoryV2.h" #include "XTrajectoryV3.h" #include "XViewCtrlV1.h" #include "XViewCtrlV2.h" #include "XViewCtrlV3.h" #include "XViewDefV1.h" #include "XViewDefV2.h" #include "XViewDefV3.h" #include "XWaveCtrlV3.h" #include "XWeatherCtrlV1.h" #include "XWeatherCtrlV2.h" #include "XWeatherCtrlV3.h" #include "XEnvCtrlV1.h" #include "XEnvCtrlV2.h" #include "XSpecEffDefV1.h" #include "XSpecEffDefV2.h" #include "XHatReqV1.h" #include "XHatReqV2.h" #include "XHotReqV2.h" #include "XCompCtrlV3_3.h" #include "XShortCompCtrlV3_3.h" #include "XSymbolSurfaceDefV3_3.h" #include "XSymbolCtrlV3_3.h" #include "XShortSymbolCtrlV3_3.h" #include "XSymbolTextDefV3_3.h" #include "XSymbolCircleDefV3_3.h" #include "XSymbolLineDefV3_3.h" #include "XSymbolCloneV3_3.h" // System includes #include #include #include #ifdef WIN32 #include #include #endif #ifdef WIN32 #include #else #include #endif // Special database information structure typedef struct Database_info { int id; double lat; double lon; double alt; } DbInfo; using namespace std; // ================================================ // Global variables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Networking class/object Network network; // CIGI specific static CigiIGSession *IGSn; static CigiOutgoingMsg *OmsgPtr; static CigiIncomingMsg *ImsgPtr; static DefaultProc DefaultPckt; static CigiSOFV3_2 CSOF; static XArtPartCtrlV1 Pr_ArtPartCtrlV1; static XArtPartCtrlV2 Pr_ArtPartCtrlV2; static XArtPartCtrlV3 Pr_ArtPartCtrlV3; static XAtmosCtrlV3 Pr_AtmosCtrlV3; static XCelestialCtrlV3 Pr_CelestialCtrlV3; static XCollDetSegDefV1 Pr_CollDetSegDefV1; static XCollDetSegDefV2 Pr_CollDetSegDefV2; static XCollDetSegDefV3 Pr_CollDetSegDefV3; static XCollDetVolDefV2 Pr_CollDetVolDefV2; static XCollDetVolDefV3 Pr_CollDetVolDefV3; static XCompCtrlV1 Pr_CompCtrlV1; static XCompCtrlV2 Pr_CompCtrlV2; static XCompCtrlV3 Pr_CompCtrlV3; static XConfClampEntityCtrlV3 Pr_ConfClampEntityCtrlV3; static XEarthModelDefV3 Pr_EarthModelDefV3; static XEntityCtrlV1 Pr_EntityCtrlV1; static XEntityCtrlV2 Pr_EntityCtrlV2; static XEntityCtrlV3 Pr_EntityCtrlV3; static XEntityCtrlV3_3 Pr_EntityCtrlV3_3; static XEnvCondReqV3 Pr_EnvCondReqV3; static XEnvRgnCtrlV3 Pr_EnvRgnCtrlV3; static XEventNotificationV3 Pr_EventNotificationV3; static XHatHotReqV3 Pr_HatHotReqV3; static XHatHotReqV3_2 Pr_HatHotReqV3_2; static XIGCtrl Pr_IGCtrl; static XIGCtrlV1 Pr_IGCtrlV1; static XIGCtrlV2 Pr_IGCtrlV2; static XIGCtrlV3 Pr_IGCtrlV3; static XIGCtrlV3_2 Pr_IGCtrlV3_2; static XIGCtrlV3_3 Pr_IGCtrlV3_3; static XLosSegReqV1 Pr_LosSegReqV1; static XLosSegReqV2 Pr_LosSegReqV2; static XLosSegReqV3 Pr_LosSegReqV3; static XLosSegReqV3_2 Pr_LosSegReqV3_2; static XLosVectReqV1 Pr_LosVectReqV1; static XLosVectReqV2 Pr_LosVectReqV2; static XLosVectReqV3 Pr_LosVectReqV3; static XLosVectReqV3_2 Pr_LosVectReqV3_2; static XMaritimeSurfaceCtrlV3 Pr_MaritimeSurfaceCtrlV3; static XMotionTrackCtrlV3 Pr_MotionTrackCtrlV3; static XPositionReqV3 Pr_PositionReqV3; static XRateCtrlV1 Pr_RateCtrlV1; static XRateCtrlV2 Pr_RateCtrlV2; static XRateCtrlV3 Pr_RateCtrlV3; static XRateCtrlV3_2 Pr_RateCtrlV3_2; static XSensorCtrlV1 Pr_SensorCtrlV1; static XSensorCtrlV2 Pr_SensorCtrlV2; static XSensorCtrlV3 Pr_SensorCtrlV3; static XShortArtPartCtrlV3 Pr_ShortArtPartCtrlV3; static XShortCompCtrlV3 Pr_ShortCompCtrlV3; static XTerrestrialSurfaceCtrlV3 Pr_TerrestrialSurfaceCtrlV3; static XTrajectoryV1 Pr_TrajectoryV1; static XTrajectoryV2 Pr_TrajectoryV2; static XTrajectoryV3 Pr_TrajectoryV3; static XViewCtrlV1 Pr_ViewCtrlV1; static XViewCtrlV2 Pr_ViewCtrlV2; static XViewCtrlV3 Pr_ViewCtrlV3; static XViewDefV1 Pr_ViewDefV1; static XViewDefV2 Pr_ViewDefV2; static XViewDefV3 Pr_ViewDefV3; static XWaveCtrlV3 Pr_WaveCtrlV3; static XWeatherCtrlV1 Pr_WeatherCtrlV1; static XWeatherCtrlV2 Pr_WeatherCtrlV2; static XWeatherCtrlV3 Pr_WeatherCtrlV3; static XEnvCtrlV1 Pr_EnvCtrlV1; static XEnvCtrlV2 Pr_EnvCtrlV2; static XSpecEffDefV1 Pr_SpecEffDefV1; static XSpecEffDefV2 Pr_SpecEffDefV2; static XHatReqV1 Pr_HatReqV1; static XHatReqV2 Pr_HatReqV2; static XHotReqV2 Pr_HotReqV2; static XCompCtrlV3_3 Pr_CompCtrlV3_3; static XShortCompCtrlV3_3 Pr_ShortCompCtrlV3_3; static XSymbolSurfaceDefV3_3 Pr_SymbolSurfaceDefV3_3; static XSymbolCtrlV3_3 Pr_SymbolCtrlV3_3; static XShortSymbolCtrlV3_3 Pr_ShortSymbolCtrlV3_3; static XSymbolTextDefV3_3 Pr_SymbolTextDefV3_3; static XSymbolCircleDefV3_3 Pr_SymbolCircleDefV3_3; static XSymbolLineDefV3_3 Pr_SymbolLineDefV3_3; static XSymbolCloneV3_3 Pr_SymbolCloneV3_3; // CIGI network message buffers and information int recvLen; static unsigned char *pCigiOutBuf; #define RECV_BUFFER_SIZE 32768 static unsigned char CInBuf[RECV_BUFFER_SIZE]; static int CigiInSz; static int CigiOutSz; static int Port_H2IG; static int Port_IG2H; static string HostAddr; static int MajorVer; static int MinorVer; static bool PrtIgCtrl; static float timeDelayLimit; static int Hz; static CigiSOFV3_2 check_SOF; // ================================================ // Pre-declaration of Local routines // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void); int init_cigi_if(void); void waitUntilBeginningOfFrame(void); #ifndef WIN32 float timevaldiff( struct timeval *t1, struct timeval *t2 ); #endif // ================================================ // Main // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int main(int argc, char* argv[]) { CigiInSz = 0; ReadConfig(); init_cigi_if(); /* CIGI messaging */ CigiOutgoingMsg &Omsg = *OmsgPtr; Omsg.BeginMsg(); while(1) { cout << "================================\n"; cout << "Frame: " << Omsg.GetFrameCnt() << endl; cout << "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n"; /* process incoming CIGI message - this could be long */ if( CigiInSz > 0 ) { try { ImsgPtr->ProcessIncomingMsg((unsigned char *)CInBuf,CigiInSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } } cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n"; // load the IG Control Omsg << CSOF; // wait until start of frame time waitUntilBeginningOfFrame(); // Do packaging here to // Package msg try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // Update Frame IDs Omsg.UpdateSOF(pCigiOutBuf); // send SOF message int sentBytes = network.send(pCigiOutBuf,CigiOutSz); // Check frame counter check_SOF.Unpack(pCigiOutBuf,false,NULL); cout << check_SOF.GetFrameCntr() << endl; Omsg.FreeMsg(); // Frees the buffer containing the message that was just sent // wait for Host message long HoldTime; bool RcvrProc = false; long CheckTime = (long)time(&HoldTime); while(!RcvrProc) { if((CigiInSz = network.recv( CInBuf, RECV_BUFFER_SIZE )) > 0) RcvrProc = true; else { long TstTime = (long)time(&HoldTime); if((TstTime - CheckTime) > 1) { cout << "Did not receive IG Control\n"; RcvrProc = true; CigiInSz = 0; } } } } // shut down the network network.closeSocket(); delete IGSn; return 0; } // ================================================ // Read Configuration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void) { TiXmlNode *bnode = NULL; // base node TiXmlText *CfgDta = NULL; TiXmlHandle *hConfig = NULL; // pointer to a Config handle TiXmlElement *Config = NULL; TiXmlText *DbDta = NULL; TiXmlDocument doc("CigiDummyIG.def"); bool stat = doc.LoadFile(); //set default values Port_H2IG = 8000; Port_IG2H = 8001; HostAddr = "127.0.0.1"; MajorVer = 3; MinorVer = 3; PrtIgCtrl = false; if(stat) { bnode = doc.FirstChild("MiniHostInitialization"); if(bnode == NULL) stat = false; // The file is not a Mission Function Initialization file } if(stat) { // get base configuration Config = bnode->FirstChildElement("Config"); if(Config != NULL) { hConfig = new TiXmlHandle(Config); CfgDta = hConfig->FirstChildElement("Host_Addr").Child(0).Text(); if(CfgDta) HostAddr = CfgDta->Value(); CfgDta = hConfig->FirstChildElement("Port_To_IG").Child(0).Text(); Port_H2IG = (CfgDta) ? atoi(CfgDta->Value()) : 8000; CfgDta = hConfig->FirstChildElement("Port_To_Host").Child(0).Text(); Port_IG2H = (CfgDta) ? atoi(CfgDta->Value()) : 8001; CfgDta = hConfig->FirstChildElement("Hertz_rate").Child(0).Text(); Hz = (CfgDta) ? atoi(CfgDta->Value()) : 60; timeDelayLimit = 1.0f/((float)Hz); CfgDta = hConfig->FirstChildElement("Major_Version_Cigi").Child(0).Text(); MajorVer = (CfgDta) ? atoi(CfgDta->Value()) : 0; if((MajorVer == 1) || (MajorVer == 2)) MinorVer = 0; else if(MajorVer == 3) { CfgDta = hConfig->FirstChildElement("Minor_Version_Cigi").Child(0).Text(); MinorVer = (CfgDta) ? atoi(CfgDta->Value()) : 3; if(MinorVer < 2) MinorVer = 0; else if(MinorVer > 3) MinorVer = 3; } else { MajorVer = 3; MinorVer = 3; } CfgDta = hConfig->FirstChildElement("Print_IGCtrl").Child(0).Text(); PrtIgCtrl = (memcmp((void *)CfgDta->Value(),"true",4) == 0) ? true : false; delete hConfig; } } } // ================================================ // Initialize interface to CIGI // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int init_cigi_if(void){ int err_status = 0; /* open sockets to CIGI */ // hostemu-ip-addr, hostemu-socket, local-socket printf("init_cigi_if: initializing ports to CIGI\n"); bool netstatus = network.openSocket( HostAddr.c_str(), Port_IG2H, Port_H2IG ); if( !netstatus ) { printf( "could not connect to CIGI host server\n" ); exit( 1 ); } else { printf( "successfully connected to CIGI host server\n" ); } IGSn = new CigiIGSession(1,32768,2,32768); // Add packet event handlers here! CigiOutgoingMsg &Omsg = IGSn->GetOutgoingMsgMgr(); CigiIncomingMsg &Imsg = IGSn->GetIncomingMsgMgr(); OmsgPtr = &Omsg; ImsgPtr = &Imsg; IGSn->SetCigiVersion(MajorVer,MinorVer); IGSn->SetSynchronous(true); Imsg.SetReaderCigiVersion(MajorVer,MinorVer); Imsg.UsingIteration(false); // set up a default handler for unhandled packets Imsg.RegisterEventProcessor(0, (CigiBaseEventProcessor *) &DefaultPckt); // Register all the Event processors if(MajorVer == 1) { if(PrtIgCtrl) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_IGCtrlV1); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_IGCtrl); Imsg.RegisterEventProcessor(CIGI_ENTITY_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_EntityCtrlV1); Imsg.RegisterEventProcessor(CIGI_COMP_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_CompCtrlV1); Imsg.RegisterEventProcessor(CIGI_ART_PART_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_ArtPartCtrlV1); Imsg.RegisterEventProcessor(CIGI_RATE_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_RateCtrlV1); Imsg.RegisterEventProcessor(CIGI_ENV_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_EnvCtrlV1); Imsg.RegisterEventProcessor(CIGI_WEATHER_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_WeatherCtrlV1); Imsg.RegisterEventProcessor(CIGI_VIEW_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_ViewCtrlV1); Imsg.RegisterEventProcessor(CIGI_SENSOR_CTRL_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_SensorCtrlV1); Imsg.RegisterEventProcessor(CIGI_TRAJECTORY_DEF_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_TrajectoryV1); Imsg.RegisterEventProcessor(CIGI_SPEC_EFF_DEF_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_SpecEffDefV1); Imsg.RegisterEventProcessor(CIGI_VIEW_DEF_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_ViewDefV1); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_CollDetSegDefV1); Imsg.RegisterEventProcessor(CIGI_HAT_REQ_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_HatReqV1); Imsg.RegisterEventProcessor(CIGI_LOS_SEG_REQ_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_LosSegReqV1); Imsg.RegisterEventProcessor(CIGI_LOS_VECT_REQ_PACKET_ID_V1,(CigiBaseEventProcessor *) &Pr_LosVectReqV1); } else if(MajorVer == 2) { if(PrtIgCtrl) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_IGCtrlV2); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_IGCtrl); Imsg.RegisterEventProcessor(CIGI_ENTITY_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_EntityCtrlV2); Imsg.RegisterEventProcessor(CIGI_COMP_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_CompCtrlV2); Imsg.RegisterEventProcessor(CIGI_ART_PART_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_ArtPartCtrlV2); Imsg.RegisterEventProcessor(CIGI_RATE_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_RateCtrlV2); Imsg.RegisterEventProcessor(CIGI_ENV_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_EnvCtrlV2); Imsg.RegisterEventProcessor(CIGI_WEATHER_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_WeatherCtrlV2); Imsg.RegisterEventProcessor(CIGI_VIEW_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_ViewCtrlV2); Imsg.RegisterEventProcessor(CIGI_SENSOR_CTRL_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_SensorCtrlV2); Imsg.RegisterEventProcessor(CIGI_TRAJECTORY_DEF_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_TrajectoryV2); Imsg.RegisterEventProcessor(CIGI_SPEC_EFF_DEF_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_SpecEffDefV2); Imsg.RegisterEventProcessor(CIGI_VIEW_DEF_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_ViewDefV2); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_CollDetSegDefV2); Imsg.RegisterEventProcessor(CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_CollDetVolDefV2); Imsg.RegisterEventProcessor(CIGI_HAT_REQ_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_HatReqV2); Imsg.RegisterEventProcessor(CIGI_HOT_REQ_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_HotReqV2); Imsg.RegisterEventProcessor(CIGI_LOS_SEG_REQ_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_LosSegReqV2); Imsg.RegisterEventProcessor(CIGI_LOS_VECT_REQ_PACKET_ID_V2,(CigiBaseEventProcessor *) &Pr_LosVectReqV2); } else { if(MajorVer != 3) { MajorVer = 3; MinorVer = 3; } else { if(MinorVer < 2) MinorVer = 0; else if(MinorVer > 3) MinorVer = 3; } if(MinorVer < 2) { if(PrtIgCtrl) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_IGCtrlV3); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_IGCtrl); Imsg.RegisterEventProcessor(CIGI_ENTITY_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_EntityCtrlV3); Imsg.RegisterEventProcessor(CIGI_RATE_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_RateCtrlV3); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_REQ_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_HatHotReqV3); Imsg.RegisterEventProcessor(CIGI_LOS_SEG_REQ_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_LosSegReqV3); Imsg.RegisterEventProcessor(CIGI_LOS_VECT_REQ_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_LosVectReqV3); Imsg.RegisterEventProcessor(CIGI_COMP_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CompCtrlV3); Imsg.RegisterEventProcessor(CIGI_SHORT_COMP_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ShortCompCtrlV3); } else { if(PrtIgCtrl) { if(MinorVer < 3) Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_IGCtrlV3_2); else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_IGCtrlV3_3); } else Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_IGCtrl); Imsg.RegisterEventProcessor(CIGI_RATE_CTRL_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_RateCtrlV3_2); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_REQ_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_HatHotReqV3_2); Imsg.RegisterEventProcessor(CIGI_LOS_SEG_REQ_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_LosSegReqV3_2); Imsg.RegisterEventProcessor(CIGI_LOS_VECT_REQ_PACKET_ID_V3_2,(CigiBaseEventProcessor *) &Pr_LosVectReqV3_2); if(MinorVer < 3) { Imsg.RegisterEventProcessor(CIGI_ENTITY_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_EntityCtrlV3); Imsg.RegisterEventProcessor(CIGI_COMP_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CompCtrlV3); Imsg.RegisterEventProcessor(CIGI_SHORT_COMP_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ShortCompCtrlV3); } else { Imsg.RegisterEventProcessor(CIGI_ENTITY_CTRL_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_EntityCtrlV3_3); Imsg.RegisterEventProcessor(CIGI_COMP_CTRL_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_CompCtrlV3_3); Imsg.RegisterEventProcessor(CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_ShortCompCtrlV3_3); Imsg.RegisterEventProcessor(CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_SymbolSurfaceDefV3_3); Imsg.RegisterEventProcessor(CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_SymbolCtrlV3_3); Imsg.RegisterEventProcessor(CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_ShortSymbolCtrlV3_3); Imsg.RegisterEventProcessor(CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_SymbolTextDefV3_3); Imsg.RegisterEventProcessor(CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_SymbolCircleDefV3_3); Imsg.RegisterEventProcessor(CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_SymbolLineDefV3_3); Imsg.RegisterEventProcessor(CIGI_SYMBOL_CLONE_PACKET_ID_V3_3,(CigiBaseEventProcessor *) &Pr_SymbolCloneV3_3); } } Imsg.RegisterEventProcessor(CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ConfClampEntityCtrlV3); Imsg.RegisterEventProcessor(CIGI_ART_PART_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ArtPartCtrlV3); Imsg.RegisterEventProcessor(CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ShortArtPartCtrlV3); Imsg.RegisterEventProcessor(CIGI_CELESTIAL_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CelestialCtrlV3); Imsg.RegisterEventProcessor(CIGI_ATMOS_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_AtmosCtrlV3); Imsg.RegisterEventProcessor(CIGI_ENV_RGN_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_EnvRgnCtrlV3); Imsg.RegisterEventProcessor(CIGI_WEATHER_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_WeatherCtrlV3); Imsg.RegisterEventProcessor(CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_MaritimeSurfaceCtrlV3); Imsg.RegisterEventProcessor(CIGI_WAVE_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_WaveCtrlV3); Imsg.RegisterEventProcessor(CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_TerrestrialSurfaceCtrlV3); Imsg.RegisterEventProcessor(CIGI_VIEW_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ViewCtrlV3); Imsg.RegisterEventProcessor(CIGI_SENSOR_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_SensorCtrlV3); Imsg.RegisterEventProcessor(CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_MotionTrackCtrlV3); Imsg.RegisterEventProcessor(CIGI_EARTH_MODEL_DEF_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_EarthModelDefV3); Imsg.RegisterEventProcessor(CIGI_TRAJECTORY_DEF_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_TrajectoryV3); Imsg.RegisterEventProcessor(CIGI_VIEW_DEF_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_ViewDefV3); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CollDetSegDefV3); Imsg.RegisterEventProcessor(CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_CollDetVolDefV3); Imsg.RegisterEventProcessor(CIGI_POSITION_REQ_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_PositionReqV3); Imsg.RegisterEventProcessor(CIGI_ENV_COND_REQ_PACKET_ID_V3,(CigiBaseEventProcessor *) &Pr_EnvCondReqV3); } // initialize the SOF CSOF.SetDatabaseID(1); CSOF.SetIGStatus(0); CSOF.SetIGMode(CigiBaseSOF::Operate); CSOF.SetTimeStampValid(false); CSOF.SetEarthRefModel(CigiBaseSOF::WGS84); CSOF.SetTimeStamp(0); CSOF.SetFrameCntr(0); return err_status; } // ================================================ // waitUntilBeginningOfFrame // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv #ifdef WIN32 void waitUntilBeginningOfFrame( void ) { static DWORD t1 = 0; static DWORD t2 = 0; static bool firsttimethrough = true; if(firsttimethrough) { t1 = GetTickCount(); firsttimethrough = false; } do { t2 = GetTickCount(); // number of milliseconds } while((t2 - t1) < timeDelayLimit); t1 = t2; } #else void waitUntilBeginningOfFrame( void ) { static struct timeval t1; static struct timeval t2; static bool firsttimethrough = true; float diff; float busy_wait_time = 0.0f; gettimeofday( &t2, NULL ); if( firsttimethrough ) { gettimeofday( &t1, NULL ); firsttimethrough = false; } while( (diff = timevaldiff( &t1, &t2 )) < timeDelayLimit ) { if(busy_wait_time != 0.0f && timeDelayLimit - diff > busy_wait_time) { float sleep_time = timeDelayLimit - diff - busy_wait_time; struct timespec req; req.tv_sec = (time_t)sleep_time; req.tv_nsec = (long)((sleep_time-req.tv_sec)*1e9); if(pselect(0, NULL, NULL, NULL, &req, NULL)==-1) { printf("Error calling pselect"); busy_wait_time = 0.0f; } } gettimeofday( &t2, NULL ); } //printf("over frame by %f ms\n", diff - timeDelayLimit); t1 = t2; } // ================================================ // timevaldiff // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float timevaldiff( struct timeval *t1, struct timeval *t2 ) { return (t2->tv_sec - t1->tv_sec) + (t2->tv_usec - t1->tv_usec)/1000000.0f; } #endif cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/IgRcvCcl.sln000066400000000000000000000016711210750432300216230ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgRcvCcl", "IgRcvCcl.vcproj", "{7EF4CA42-244C-43EF-AEEB-5A1153DF0487}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {7EF4CA42-244C-43EF-AEEB-5A1153DF0487}.Debug.ActiveCfg = Debug|Win32 {7EF4CA42-244C-43EF-AEEB-5A1153DF0487}.Debug.Build.0 = Debug|Win32 {7EF4CA42-244C-43EF-AEEB-5A1153DF0487}.Release.ActiveCfg = Release|Win32 {7EF4CA42-244C-43EF-AEEB-5A1153DF0487}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/IgRcvCcl.vcproj000066400000000000000000000331021210750432300223240ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/ReadMe.txt000066400000000000000000000023761210750432300213520ustar00rootroot00000000000000======================================================================== CONSOLE APPLICATION : IgRcvCcl Project Overview ======================================================================== AppWizard has created this IgRcvCcl application for you. This file contains a summary of what you will find in each of the files that make up your IgRcvCcl application. IgRcvCcl.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. IgRcvCcl.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named IgRcvCcl.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" comments to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/000077500000000000000000000000001210750432300221325ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V1/000077500000000000000000000000001210750432300224205ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V1/CigiDummyIG.def000066400000000000000000000005411210750432300252070ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 1 0 false cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V2/000077500000000000000000000000001210750432300224215ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V2/CigiDummyIG.def000066400000000000000000000005411210750432300252100ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 2 0 false cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V3.2/000077500000000000000000000000001210750432300225625ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V3.2/CigiDummyIG.def000066400000000000000000000005411210750432300253510ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 3 2 false cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V3.3/000077500000000000000000000000001210750432300225635ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V3.3/CigiDummyIG.def000066400000000000000000000005411210750432300253520ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 3 3 false cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V3/000077500000000000000000000000001210750432300224225ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/Testing Repos/V3/CigiDummyIG.def000066400000000000000000000005411210750432300252110ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 3 0 false cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XArtPartCtrlV1.cpp000066400000000000000000000027211210750432300227130ustar00rootroot00000000000000// XArtPartCtrlV1.cpp: Body of the XArtPartCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XArtPartCtrlV1.h" #include "CigiArtPartCtrlV1.h" #include "CigiArtPartCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XArtPartCtrlV1::XArtPartCtrlV1() { } XArtPartCtrlV1::~XArtPartCtrlV1() { } void XArtPartCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiArtPartCtrlV1 *InPckt = (CigiArtPartCtrlV1 *)Packet; printf("Articulated Part Control:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartIDV1()); printf("\tArticulated Part Enable = %d\n",InPckt->GetArtPartEn()); printf("\tX Offset Enable = %d\n",InPckt->GetXOffEn()); printf("\tY Offset Enable = %d\n",InPckt->GetYOffEn()); printf("\tZ Offset Enable = %d\n",InPckt->GetZOffEn()); printf("\tRoll Enable = %d\n",InPckt->GetRollEn()); printf("\tPitch Enable = %d\n",InPckt->GetPitchEn()); printf("\tYaw Enable = %d\n",InPckt->GetYawEn()); printf("\tX Offset = %f\n",InPckt->GetXOff()); printf("\tY Offset = %f\n",InPckt->GetYOff()); printf("\tZ Offset = %f\n",InPckt->GetZOff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XArtPartCtrlV1.h000066400000000000000000000011531210750432300223560ustar00rootroot00000000000000// XArtPartCtrlV1.h: interface for the XArtPartCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XArtPartCtrlV1_INCLUDED_) #define _PROC_XArtPartCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiArtPartCtrlV3.h" class XArtPartCtrlV1 : public CigiBaseEventProcessor { public: XArtPartCtrlV1(); virtual ~XArtPartCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiArtPartCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiArtPartCtrlV3 *TPckt; }; #endif // _PROC_XArtPartCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XArtPartCtrlV2.cpp000066400000000000000000000027161210750432300227200ustar00rootroot00000000000000// XArtPartCtrlV2.cpp: Body of the XArtPartCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XArtPartCtrlV2.h" #include "CigiArtPartCtrlV1.h" #include "CigiArtPartCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XArtPartCtrlV2::XArtPartCtrlV2() { } XArtPartCtrlV2::~XArtPartCtrlV2() { } void XArtPartCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiArtPartCtrlV2 *InPckt = (CigiArtPartCtrlV2 *)Packet; printf("Articulated Part Control:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tArticulated Part Enable = %d\n",InPckt->GetArtPartEn()); printf("\tX Offset Enable = %d\n",InPckt->GetXOffEn()); printf("\tY Offset Enable = %d\n",InPckt->GetYOffEn()); printf("\tZ Offset Enable = %d\n",InPckt->GetZOffEn()); printf("\tRoll Enable = %d\n",InPckt->GetRollEn()); printf("\tPitch Enable = %d\n",InPckt->GetPitchEn()); printf("\tYaw Enable = %d\n",InPckt->GetYawEn()); printf("\tX Offset = %f\n",InPckt->GetXOff()); printf("\tY Offset = %f\n",InPckt->GetYOff()); printf("\tZ Offset = %f\n",InPckt->GetZOff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XArtPartCtrlV2.h000066400000000000000000000011531210750432300223570ustar00rootroot00000000000000// XArtPartCtrlV2.h: interface for the XArtPartCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XArtPartCtrlV2_INCLUDED_) #define _PROC_XArtPartCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiArtPartCtrlV3.h" class XArtPartCtrlV2 : public CigiBaseEventProcessor { public: XArtPartCtrlV2(); virtual ~XArtPartCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiArtPartCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiArtPartCtrlV3 *TPckt; }; #endif // _PROC_XArtPartCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XArtPartCtrlV3.cpp000066400000000000000000000027151210750432300227200ustar00rootroot00000000000000// XArtPartCtrlV3.cpp: Body of the XArtPartCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XArtPartCtrlV3.h" #include "CigiArtPartCtrlV1.h" #include "CigiArtPartCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XArtPartCtrlV3::XArtPartCtrlV3() { } XArtPartCtrlV3::~XArtPartCtrlV3() { } void XArtPartCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiArtPartCtrlV3 *InPckt = (CigiArtPartCtrlV3 *)Packet; printf("Articulated Part Control:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tArticulated Part Enable = %d\n",InPckt->GetArtPartEn()); printf("\tX Offset Enable = %d\n",InPckt->GetXOffEn()); printf("\tY Offset Enable = %d\n",InPckt->GetYOffEn()); printf("\tZ Offset Enable = %d\n",InPckt->GetZOffEn()); printf("\tRoll Enable = %d\n",InPckt->GetRollEn()); printf("\tPitch Enable = %d\n",InPckt->GetPitchEn()); printf("\tYaw Enable = %d\n",InPckt->GetYawEn()); printf("\tX Offset = %f\n",InPckt->GetXOff()); printf("\tY Offset = %f\n",InPckt->GetYOff()); printf("\tZ Offset = %f\n",InPckt->GetZOff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XArtPartCtrlV3.h000066400000000000000000000011531210750432300223600ustar00rootroot00000000000000// XArtPartCtrlV3.h: interface for the XArtPartCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XArtPartCtrlV3_INCLUDED_) #define _PROC_XArtPartCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiArtPartCtrlV3.h" class XArtPartCtrlV3 : public CigiBaseEventProcessor { public: XArtPartCtrlV3(); virtual ~XArtPartCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiArtPartCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiArtPartCtrlV3 *TPckt; }; #endif // _PROC_XArtPartCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XAtmosCtrlV3.cpp000066400000000000000000000020611210750432300224200ustar00rootroot00000000000000// XAtmosCtrlV3.cpp: Body of the XAtmosCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XAtmosCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XAtmosCtrlV3::XAtmosCtrlV3() { } XAtmosCtrlV3::~XAtmosCtrlV3() { } void XAtmosCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiAtmosCtrlV3 *InPckt = (CigiAtmosCtrlV3 *)Packet; printf("Atmosphere Control:\n"); printf("\tAtmosphere Enable = %d\n",InPckt->GetAtmosEn()); printf("\tHumidity = %d\n",InPckt->GetHumidity()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tVisibility = %f\n",InPckt->GetVisibility()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tVertical Wind Speed = %f\n",InPckt->GetVertWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); printf("\tBarometric Pressure = %f\n",InPckt->GetBaroPress()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XAtmosCtrlV3.h000066400000000000000000000011231210750432300220630ustar00rootroot00000000000000// XAtmosCtrlV3.h: interface for the XAtmosCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XAtmosCtrlV3_INCLUDED_) #define _PROC_XAtmosCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiAtmosCtrl.h" class XAtmosCtrlV3 : public CigiBaseEventProcessor { public: XAtmosCtrlV3(); virtual ~XAtmosCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiAtmosCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiAtmosCtrlV3 *TPckt; }; #endif // _PROC_XAtmosCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCelestialCtrlV3.cpp000066400000000000000000000022501210750432300232420ustar00rootroot00000000000000// XCelestialCtrlV3.cpp: Body of the XCelestialCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XCelestialCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCelestialCtrlV3::XCelestialCtrlV3() { } XCelestialCtrlV3::~XCelestialCtrlV3() { } void XCelestialCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiCelestialCtrlV3 *InPckt = (CigiCelestialCtrlV3 *)Packet; printf("Celestial Control:\n"); printf("\tHour = %d\n",InPckt->GetHour()); printf("\tMinute = %d\n",InPckt->GetMinute()); printf("\tEphemeris Enable = %d\n",InPckt->GetEphemerisEn()); printf("\tSun Enable = %d\n",InPckt->GetSunEn()); printf("\tMoon Enable = %d\n",InPckt->GetMoonEn()); printf("\tStar Enable = %d\n",InPckt->GetStarEn()); printf("\tDate Valid = %d\n",InPckt->GetDateVld()); printf("\tMonth = %d\n",InPckt->GetMonth()); printf("\tDay = %d\n",InPckt->GetDay()); printf("\tYear = %d\n",InPckt->GetYear()); printf("\tStar Intensity = %f\n",InPckt->GetStarInt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCelestialCtrlV3.h000066400000000000000000000011771210750432300227160ustar00rootroot00000000000000// XCelestialCtrlV3.h: interface for the XCelestialCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCelestialCtrlV3_INCLUDED_) #define _PROC_XCelestialCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCelestialCtrl.h" class XCelestialCtrlV3 : public CigiBaseEventProcessor { public: XCelestialCtrlV3(); virtual ~XCelestialCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCelestialCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCelestialCtrlV3 *TPckt; }; #endif // _PROC_XCelestialCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetSegDefV1.cpp000066400000000000000000000021661210750432300231200ustar00rootroot00000000000000// XCollDetSegDefV1.cpp: Body of the XCollDetSegDefV1 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegDefV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegDefV1::XCollDetSegDefV1() { } XCollDetSegDefV1::~XCollDetSegDefV1() { } void XCollDetSegDefV1::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegDefV1 *InPckt = (CigiCollDetSegDefV1 *)Packet; printf("Collision Detection Segment Definition:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSegment ID = %d\n",InPckt->GetSegmentID()); printf("\tSegment Enable = %d\n",InPckt->GetSegmentEn()); printf("\tStart X = %f\n",InPckt->GetX1()); printf("\tStart Y = %f\n",InPckt->GetY1()); printf("\tStart Z = %f\n",InPckt->GetZ1()); printf("\tEnding X = %f\n",InPckt->GetX2()); printf("\tEnding Y = %f\n",InPckt->GetY2()); printf("\tEnding Z = %f\n",InPckt->GetZ2()); printf("\tMask = %d\n",InPckt->GetMask()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetSegDefV1.h000066400000000000000000000012011210750432300225520ustar00rootroot00000000000000// XCollDetSegDefV1.h: interface for the XCollDetSegDefV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetSegDefV1_INCLUDED_) #define _PROC_XCollDetSegDefV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegDefV1.h" class XCollDetSegDefV1 : public CigiBaseEventProcessor { public: XCollDetSegDefV1(); virtual ~XCollDetSegDefV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegDefV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegDefV1 *TPckt; }; #endif // _PROC_XCollDetSegDefV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetSegDefV2.cpp000066400000000000000000000021661210750432300231210ustar00rootroot00000000000000// XCollDetSegDefV2.cpp: Body of the XCollDetSegDefV2 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegDefV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegDefV2::XCollDetSegDefV2() { } XCollDetSegDefV2::~XCollDetSegDefV2() { } void XCollDetSegDefV2::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegDefV2 *InPckt = (CigiCollDetSegDefV2 *)Packet; printf("Collision Detection Segment Definition:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSegment ID = %d\n",InPckt->GetSegmentID()); printf("\tSegment Enable = %d\n",InPckt->GetSegmentEn()); printf("\tStart X = %f\n",InPckt->GetX1()); printf("\tStart Y = %f\n",InPckt->GetY1()); printf("\tStart Z = %f\n",InPckt->GetZ1()); printf("\tEnding X = %f\n",InPckt->GetX2()); printf("\tEnding Y = %f\n",InPckt->GetY2()); printf("\tEnding Z = %f\n",InPckt->GetZ2()); printf("\tMask = %d\n",InPckt->GetMask()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetSegDefV2.h000066400000000000000000000012011210750432300225530ustar00rootroot00000000000000// XCollDetSegDefV2.h: interface for the XCollDetSegDefV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetSegDefV2_INCLUDED_) #define _PROC_XCollDetSegDefV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegDefV2.h" class XCollDetSegDefV2 : public CigiBaseEventProcessor { public: XCollDetSegDefV2(); virtual ~XCollDetSegDefV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegDefV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegDefV2 *TPckt; }; #endif // _PROC_XCollDetSegDefV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetSegDefV3.cpp000066400000000000000000000021661210750432300231220ustar00rootroot00000000000000// XCollDetSegDefV3.cpp: Body of the XCollDetSegDefV3 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegDefV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegDefV3::XCollDetSegDefV3() { } XCollDetSegDefV3::~XCollDetSegDefV3() { } void XCollDetSegDefV3::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegDefV3 *InPckt = (CigiCollDetSegDefV3 *)Packet; printf("Collision Detection Segment Definition:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSegment ID = %d\n",InPckt->GetSegmentID()); printf("\tSegment Enable = %d\n",InPckt->GetSegmentEn()); printf("\tStart X = %f\n",InPckt->GetX1()); printf("\tStart Y = %f\n",InPckt->GetY1()); printf("\tStart Z = %f\n",InPckt->GetZ1()); printf("\tEnding X = %f\n",InPckt->GetX2()); printf("\tEnding Y = %f\n",InPckt->GetY2()); printf("\tEnding Z = %f\n",InPckt->GetZ2()); printf("\tMask = %d\n",InPckt->GetMask()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetSegDefV3.h000066400000000000000000000012011210750432300225540ustar00rootroot00000000000000// XCollDetSegDefV3.h: interface for the XCollDetSegDefV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetSegDefV3_INCLUDED_) #define _PROC_XCollDetSegDefV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegDefV3.h" class XCollDetSegDefV3 : public CigiBaseEventProcessor { public: XCollDetSegDefV3(); virtual ~XCollDetSegDefV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegDefV3 *TPckt; }; #endif // _PROC_XCollDetSegDefV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetVolDefV2.cpp000066400000000000000000000021571210750432300231430ustar00rootroot00000000000000// XCollDetVolDefV2.cpp: Body of the XCollDetVolDefV2 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetVolDefV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetVolDefV2::XCollDetVolDefV2() { } XCollDetVolDefV2::~XCollDetVolDefV2() { } void XCollDetVolDefV2::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetVolDefV2 *InPckt = (CigiCollDetVolDefV2 *)Packet; bool ok = true; printf("Collision Detection Volume Definition:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tVolume ID = %d\n",InPckt->GetVolID()); printf("\tVolume Enable = %d\n",InPckt->GetVolEn()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); printf("\tHeight or Radius = %f\n",InPckt->GetHeightOrRadius()); printf("\tWidth = %f\n",InPckt->GetWidth()); printf("\tDepth = %f\n",InPckt->GetDepth()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetVolDefV2.h000066400000000000000000000012011210750432300225750ustar00rootroot00000000000000// XCollDetVolDefV2.h: interface for the XCollDetVolDefV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetVolDefV2_INCLUDED_) #define _PROC_XCollDetVolDefV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetVolDefV2.h" class XCollDetVolDefV2 : public CigiBaseEventProcessor { public: XCollDetVolDefV2(); virtual ~XCollDetVolDefV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetVolDefV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetVolDefV2 *TPckt; }; #endif // _PROC_XCollDetVolDefV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetVolDefV3.cpp000066400000000000000000000027561210750432300231510ustar00rootroot00000000000000// XCollDetVolDefV3.cpp: Body of the XCollDetVolDefV3 class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetVolDefV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetVolDefV3::XCollDetVolDefV3() { } XCollDetVolDefV3::~XCollDetVolDefV3() { } void XCollDetVolDefV3::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetVolDefV3 *InPckt = (CigiCollDetVolDefV3 *)Packet; bool ok = true; printf("Collision Detection Volume Definition:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tVolume ID = %d\n",InPckt->GetVolID()); printf("\tVolume Enable = %d\n",InPckt->GetVolEn()); printf("\tVolume Type = %d : ",InPckt->GetVolType()); switch(InPckt->GetVolType()) { case 0: printf("Sphere\n"); break; case 1: printf("Cuboid\n"); break; default: printf("\n"); break; } printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); printf("\tHeight or Radius = %f\n",InPckt->GetHeightOrRadius()); printf("\tWidth = %f\n",InPckt->GetWidth()); printf("\tDepth = %f\n",InPckt->GetDepth()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCollDetVolDefV3.h000066400000000000000000000012011210750432300225760ustar00rootroot00000000000000// XCollDetVolDefV3.h: interface for the XCollDetVolDefV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetVolDefV3_INCLUDED_) #define _PROC_XCollDetVolDefV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetVolDefV3.h" class XCollDetVolDefV3 : public CigiBaseEventProcessor { public: XCollDetVolDefV3(); virtual ~XCollDetVolDefV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetVolDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetVolDefV3 *TPckt; }; #endif // _PROC_XCollDetVolDefV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV1.cpp000066400000000000000000000023661210750432300222410ustar00rootroot00000000000000// XCompCtrlV1.cpp: Body of the XCompCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XCompCtrlV1.h" #include "CigiExceptions.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCompCtrlV1::XCompCtrlV1() { } XCompCtrlV1::~XCompCtrlV1() { } void XCompCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiCompCtrlV1 *InPckt = (CigiCompCtrlV1 *)Packet; bool ok = true; printf("Component Control:\n"); printf("\tComp ID = %d\n",InPckt->GetCompID()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tComp Class = %d : ",InPckt->GetCompAssoc()); switch(InPckt->GetCompAssoc()) { case 0: printf("Entity\n"); break; case 1: printf("Environment\n"); break; case 2: printf("View\n"); break; default: printf("\n"); break; } printf("\tComponent State = %d\n",InPckt->GetCompState()); printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0)); printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV1.h000066400000000000000000000011121210750432300216720ustar00rootroot00000000000000// XCompCtrlV1.h: interface for the XCompCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCompCtrlV1_INCLUDED_) #define _PROC_XCompCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCompCtrlV1.h" class XCompCtrlV1 : public CigiBaseEventProcessor { public: XCompCtrlV1(); virtual ~XCompCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCompCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCompCtrlV3 *TPckt; }; #endif // _PROC_XCompCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV2.cpp000066400000000000000000000025561210750432300222430ustar00rootroot00000000000000// XCompCtrlV2.cpp: Body of the XCompCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XCompCtrlV2.h" #include "CigiExceptions.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCompCtrlV2::XCompCtrlV2() { } XCompCtrlV2::~XCompCtrlV2() { } void XCompCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiCompCtrlV2 *InPckt = (CigiCompCtrlV2 *)Packet; bool ok = true; printf("Component Control:\n"); printf("\tComp ID = %d\n",InPckt->GetCompID()); printf("\tInstance ID = %d\n",InPckt->GetInstanceID()); printf("\tComp Class = %d : ",InPckt->GetCompClassV2()); switch(InPckt->GetCompClassV2()) { case 0: printf("EntityV2\n"); break; case 1: printf("EnvironmentV2\n"); break; case 2: printf("ViewV2\n"); break; case 3: printf("ViewGrpV2\n"); break; case 4: printf("SensorV2\n"); break; case 5: printf("SystemV2\n"); break; default: printf("\n"); break; } printf("\tComponent State = %d\n",InPckt->GetCompState()); printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0)); printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV2.h000066400000000000000000000011121210750432300216730ustar00rootroot00000000000000// XCompCtrlV2.h: interface for the XCompCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCompCtrlV2_INCLUDED_) #define _PROC_XCompCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCompCtrlV2.h" class XCompCtrlV2 : public CigiBaseEventProcessor { public: XCompCtrlV2(); virtual ~XCompCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCompCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCompCtrlV3 *TPckt; }; #endif // _PROC_XCompCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV3.cpp000066400000000000000000000041671210750432300222440ustar00rootroot00000000000000// XCompCtrlV3.cpp: Body of the XCompCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XCompCtrlV3.h" #include "CigiExceptions.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCompCtrlV3::XCompCtrlV3() { } XCompCtrlV3::~XCompCtrlV3() { } void XCompCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiCompCtrlV3 *InPckt = (CigiCompCtrlV3 *)Packet; bool ok = true; printf("Component Control:\n"); printf("\tComp ID = %d\n",InPckt->GetCompID()); printf("\tInstance ID = %d\n",InPckt->GetInstanceID()); printf("\tComp Class = %d : ",InPckt->GetCompClassV3()); switch(InPckt->GetCompClassV3()) { case 0: printf("EntityV3\n"); break; case 1: printf("ViewV3\n"); break; case 2: printf("ViewGrpV3\n"); break; case 3: printf("SensorV3\n"); break; case 4: printf("RegionalSeaSurfaceV3\n"); break; case 5: printf("RegionalTerrainSurfaceV3\n"); break; case 6: printf("RegionalLayeredWeatherV3\n"); break; case 7: printf("GlobalSeaSurfaceV3\n"); break; case 8: printf("GlobalTerrainSurfaceV3\n"); break; case 9: printf("GlobalLayeredWeatherV3\n"); break; case 10: printf("AtmosphereV3\n"); break; case 11: printf("CelestialSphereV3\n"); break; case 12: printf("EventV3\n"); break; case 13: printf("SystemV3\n"); break; default: printf("\n"); break; } printf("\tComponent State = %d\n",InPckt->GetCompState()); printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0)); printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1)); printf("\tComponent Data 2 = %d\n",InPckt->GetLongCompData(2)); printf("\tComponent Data 3 = %d\n",InPckt->GetLongCompData(3)); printf("\tComponent Data 4 = %d\n",InPckt->GetLongCompData(4)); printf("\tComponent Data 5 = %d\n",InPckt->GetLongCompData(5)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV3.h000066400000000000000000000011121210750432300216740ustar00rootroot00000000000000// XCompCtrlV3.h: interface for the XCompCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCompCtrlV3_INCLUDED_) #define _PROC_XCompCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCompCtrlV3.h" class XCompCtrlV3 : public CigiBaseEventProcessor { public: XCompCtrlV3(); virtual ~XCompCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCompCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCompCtrlV3 *TPckt; }; #endif // _PROC_XCompCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV3_3.cpp000066400000000000000000000044001210750432300224540ustar00rootroot00000000000000// XCompCtrlV3_3.cpp: Body of the XCompCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XCompCtrlV3_3.h" #include "CigiExceptions.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCompCtrlV3_3::XCompCtrlV3_3() { } XCompCtrlV3_3::~XCompCtrlV3_3() { } void XCompCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiCompCtrlV3_3 *InPckt = (CigiCompCtrlV3_3 *)Packet; bool ok = true; printf("Component Control:\n"); printf("\tComp ID = %d\n",InPckt->GetCompID()); printf("\tInstance ID = %d\n",InPckt->GetInstanceID()); printf("\tComp Class = %d : ",InPckt->GetCompClassV3()); switch(InPckt->GetCompClassV3()) { case 0: printf("EntityV3\n"); break; case 1: printf("ViewV3\n"); break; case 2: printf("ViewGrpV3\n"); break; case 3: printf("SensorV3\n"); break; case 4: printf("RegionalSeaSurfaceV3\n"); break; case 5: printf("RegionalTerrainSurfaceV3\n"); break; case 6: printf("RegionalLayeredWeatherV3\n"); break; case 7: printf("GlobalSeaSurfaceV3\n"); break; case 8: printf("GlobalTerrainSurfaceV3\n"); break; case 9: printf("GlobalLayeredWeatherV3\n"); break; case 10: printf("AtmosphereV3\n"); break; case 11: printf("CelestialSphereV3\n"); break; case 12: printf("EventV3\n"); break; case 13: printf("SystemV3\n"); break; case 14: printf("SymbolSurfaceV3_3\n"); break; case 15: printf("SymbolV3_3\n"); break; default: printf("\n"); break; } printf("\tComponent State = %d\n",InPckt->GetCompState()); printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0)); printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1)); printf("\tComponent Data 2 = %d\n",InPckt->GetLongCompData(2)); printf("\tComponent Data 3 = %d\n",InPckt->GetLongCompData(3)); printf("\tComponent Data 4 = %d\n",InPckt->GetLongCompData(4)); printf("\tComponent Data 5 = %d\n",InPckt->GetLongCompData(5)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XCompCtrlV3_3.h000066400000000000000000000011401210750432300221170ustar00rootroot00000000000000// XCompCtrlV3_3.h: interface for the XCompCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCompCtrlV3_3_INCLUDED_) #define _PROC_XCompCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCompCtrlV3_3.h" class XCompCtrlV3_3 : public CigiBaseEventProcessor { public: XCompCtrlV3_3(); virtual ~XCompCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCompCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCompCtrlV3_3 *TPckt; }; #endif // _PROC_XCompCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XConfClampEntityCtrlV3.cpp000066400000000000000000000016021210750432300243740ustar00rootroot00000000000000// XConfClampEntityCtrlV3.cpp: Body of the XConfClampEntityCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XConfClampEntityCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XConfClampEntityCtrlV3::XConfClampEntityCtrlV3() { } XConfClampEntityCtrlV3::~XConfClampEntityCtrlV3() { } void XConfClampEntityCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiConfClampEntityCtrlV3 *InPckt = (CigiConfClampEntityCtrlV3 *)Packet; bool ok = true; printf("Conformal Clamped Entity Control:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tYaw = %f\n",InPckt->GetYaw()); printf("\tLat = %f\n",InPckt->GetLat()); printf("\tLon = %f\n",InPckt->GetLon()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XConfClampEntityCtrlV3.h000066400000000000000000000013031210750432300240370ustar00rootroot00000000000000// XConfClampEntityCtrlV3.h: interface for the XConfClampEntityCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XConfClampEntityCtrlV3_INCLUDED_) #define _PROC_XConfClampEntityCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiConfClampEntityCtrlV3.h" class XConfClampEntityCtrlV3 : public CigiBaseEventProcessor { public: XConfClampEntityCtrlV3(); virtual ~XConfClampEntityCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiConfClampEntityCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiConfClampEntityCtrlV3 *TPckt; }; #endif // _PROC_XConfClampEntityCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEarthModelDefV3.cpp000066400000000000000000000015401210750432300231540ustar00rootroot00000000000000// XEarthModelDefV3.cpp: Body of the XEarthModelDefV3 class. // ////////////////////////////////////////////////////////////////////// #include "XEarthModelDefV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEarthModelDefV3::XEarthModelDefV3() { } XEarthModelDefV3::~XEarthModelDefV3() { } void XEarthModelDefV3::OnPacketReceived(CigiBasePacket *Packet) { CigiEarthModelDefV3 *InPckt = (CigiEarthModelDefV3 *)Packet; bool ok = true; printf("Earth Reference Model Definition:\n"); printf("\tCustom Earth Reference Model Enable = %d\n",InPckt->GetCustomERMEn()); printf("\tEquatorial Radius = %f\n",InPckt->GetEquatorialRadius()); printf("\tFlattening = %f\n",InPckt->GetFlattening()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEarthModelDefV3.h000066400000000000000000000012011210750432300226130ustar00rootroot00000000000000// XEarthModelDefV3.h: interface for the XEarthModelDefV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEarthModelDefV3_INCLUDED_) #define _PROC_XEarthModelDefV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEarthModelDefV3.h" class XEarthModelDefV3 : public CigiBaseEventProcessor { public: XEarthModelDefV3(); virtual ~XEarthModelDefV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEarthModelDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEarthModelDefV3 *TPckt; }; #endif // _PROC_XEarthModelDefV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV1.cpp000066400000000000000000000045521210750432300226160ustar00rootroot00000000000000// XEntityCtrlV1.cpp: Body of the XEntityCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XEntityCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEntityCtrlV1::XEntityCtrlV1() { } XEntityCtrlV1::~XEntityCtrlV1() { } void XEntityCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiEntityCtrlV1 *InPckt = (CigiEntityCtrlV1 *)Packet; bool ok = true; printf("Entity Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tEntity State = %d : ",InPckt->GetEntityState()); switch(InPckt->GetEntityState()) { case 0: printf("DestructV1\n"); break; case 1: printf("ConstructV1\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tCollision Detection Enable = %d : ",InPckt->GetCollisionDetectEn()); switch(InPckt->GetCollisionDetectEn()) { case 0: printf("Disable\n"); break; case 1: printf("Enable\n"); break; default: printf("\n"); break; } printf("\tAnimation State = %d : ",InPckt->GetEffectState()); switch(InPckt->GetEffectState()) { case 0: printf("NoActionV1\n"); break; case 1: printf("LoadV1\n"); break; case 2: printf("LoadActivateV1\n"); break; case 3: printf("ActivateV1\n"); break; case 4: printf("DeactivateV1\n"); break; case 5: printf("DeactivateUnloadV1\n"); break; default: printf("\n"); break; } printf("\tEntity Type = %d\n",InPckt->GetEntityType()); printf("\tParent ID = %d\n",InPckt->GetParentID()); printf("\tTemperature = %f\n",InPckt->GetTemp()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tHeading = %f\n",InPckt->GetHeading()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV1.h000066400000000000000000000011401210750432300222510ustar00rootroot00000000000000// XEntityCtrlV1.h: interface for the XEntityCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEntityCtrlV1_INCLUDED_) #define _PROC_XEntityCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEntityCtrlV1.h" class XEntityCtrlV1 : public CigiBaseEventProcessor { public: XEntityCtrlV1(); virtual ~XEntityCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEntityCtrlV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEntityCtrlV1 *TPckt; }; #endif // _PROC_XEntityCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV2.cpp000066400000000000000000000044341210750432300226160ustar00rootroot00000000000000// XEntityCtrlV2.cpp: Body of the XEntityCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XEntityCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEntityCtrlV2::XEntityCtrlV2() { } XEntityCtrlV2::~XEntityCtrlV2() { } void XEntityCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiEntityCtrlV2 *InPckt = (CigiEntityCtrlV2 *)Packet; bool ok = true; printf("Entity Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tEntity State = %d : ",InPckt->GetEntityState()); switch(InPckt->GetEntityState()) { case 0: printf("LoadHideV2\n"); break; case 1: printf("LoadShowV2\n"); break; case 2: printf("UnloadV2\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tCollision Detection Enable = %d : ",InPckt->GetCollisionDetectEn()); switch(InPckt->GetCollisionDetectEn()) { case 0: printf("Disable\n"); break; case 1: printf("Enable\n"); break; default: printf("\n"); break; } printf("\tAnimation State = %d : ",InPckt->GetEffectState()); switch(InPckt->GetEffectState()) { case 0: printf("StopV2\n"); break; case 1: printf("PlayV2\n"); break; case 2: printf("RestartV2\n"); break; default: printf("\n"); break; } printf("\tEntity Type = %d\n",InPckt->GetEntityType()); printf("\tParent ID = %d\n",InPckt->GetParentID()); printf("\tOpacity = %f\n",InPckt->GetOpacity()); printf("\tTemperature = %f\n",InPckt->GetTemp()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tHeading = %f\n",InPckt->GetHeading()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV2.h000066400000000000000000000011401210750432300222520ustar00rootroot00000000000000// XEntityCtrlV2.h: interface for the XEntityCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEntityCtrlV2_INCLUDED_) #define _PROC_XEntityCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEntityCtrlV2.h" class XEntityCtrlV2 : public CigiBaseEventProcessor { public: XEntityCtrlV2(); virtual ~XEntityCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEntityCtrlV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEntityCtrlV2 *TPckt; }; #endif // _PROC_XEntityCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV3.cpp000066400000000000000000000065541210750432300226240ustar00rootroot00000000000000// XEntityCtrlV3.cpp: Body of the XEntityCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XEntityCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEntityCtrlV3::XEntityCtrlV3() { } XEntityCtrlV3::~XEntityCtrlV3() { } void XEntityCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiEntityCtrlV3 *InPckt = (CigiEntityCtrlV3 *)Packet; bool ok = true; printf("Entity Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tEntity State = %d : ",InPckt->GetEntityState()); switch(InPckt->GetEntityState()) { case 0: printf("Standby\n"); break; case 1: printf("Active\n"); break; case 2: printf("Remove\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tCollision Detection Enable = %d : ",InPckt->GetCollisionDetectEn()); switch(InPckt->GetCollisionDetectEn()) { case 0: printf("Disable\n"); break; case 1: printf("Enable\n"); break; default: printf("\n"); break; } printf("\tInherit Alpha = %d : ",InPckt->GetInheritAlpha()); switch(InPckt->GetCollisionDetectEn()) { case 0: printf("NoInherit\n"); break; case 1: printf("Inherit\n"); break; default: printf("\n"); break; } printf("\tGround Clamp = %d : ",InPckt->GetGrndClamp()); switch(InPckt->GetGrndClamp()) { case 0: printf("NoClamp\n"); break; case 1: printf("Altitude Clamp\n"); break; case 2: printf("Conformal Clamp\n"); break; default: printf("\n"); break; } printf("\tAnimation Direction = %d : ",InPckt->GetAnimationDir()); switch(InPckt->GetAnimationDir()) { case 0: printf("Forward\n"); break; case 1: printf("Backward\n"); break; default: printf("\n"); break; } printf("\tAnimation Loop Mode = %d : ",InPckt->GetAnimationLoopMode()); switch(InPckt->GetAnimationLoopMode()) { case 0: printf("OneShot\n"); break; case 1: printf("Continuous\n"); break; default: printf("\n"); break; } printf("\tAnimation State = %d : ",InPckt->GetAnimationState()); switch(InPckt->GetAnimationState()) { case 0: printf("Stop\n"); break; case 1: printf("Pause\n"); break; case 2: printf("Play\n"); break; case 3: printf("Continue\n"); break; default: printf("\n"); break; } printf("\tAlpha = %d\n",InPckt->GetAlpha()); printf("\tEntity Type = %d\n",InPckt->GetEntityType()); printf("\tParent ID = %d\n",InPckt->GetParentID()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV3.h000066400000000000000000000011401210750432300222530ustar00rootroot00000000000000// XEntityCtrlV3.h: interface for the XEntityCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEntityCtrlV3_INCLUDED_) #define _PROC_XEntityCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEntityCtrlV3.h" class XEntityCtrlV3 : public CigiBaseEventProcessor { public: XEntityCtrlV3(); virtual ~XEntityCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEntityCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEntityCtrlV3 *TPckt; }; #endif // _PROC_XEntityCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV3_3.cpp000066400000000000000000000067701210750432300230460ustar00rootroot00000000000000// XEntityCtrlV3_3.cpp: Body of the XEntityCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XEntityCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEntityCtrlV3_3::XEntityCtrlV3_3() { } XEntityCtrlV3_3::~XEntityCtrlV3_3() { } void XEntityCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiEntityCtrlV3_3 *InPckt = (CigiEntityCtrlV3_3 *)Packet; bool ok = true; printf("Entity Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tEntity State = %d : ",InPckt->GetEntityState()); switch(InPckt->GetEntityState()) { case 0: printf("Standby\n"); break; case 1: printf("Active\n"); break; case 2: printf("Remove\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tCollision Detection Enable = %d : ",InPckt->GetCollisionDetectEn()); switch(InPckt->GetCollisionDetectEn()) { case 0: printf("Disable\n"); break; case 1: printf("Enable\n"); break; default: printf("\n"); break; } printf("\tInherit Alpha = %d : ",InPckt->GetInheritAlpha()); switch(InPckt->GetCollisionDetectEn()) { case 0: printf("NoInherit\n"); break; case 1: printf("Inherit\n"); break; default: printf("\n"); break; } printf("\tGround Clamp = %d : ",InPckt->GetGrndClamp()); switch(InPckt->GetGrndClamp()) { case 0: printf("NoClamp\n"); break; case 1: printf("Altitude Clamp\n"); break; case 2: printf("Conformal Clamp\n"); break; default: printf("\n"); break; } printf("\tAnimation Direction = %d : ",InPckt->GetAnimationDir()); switch(InPckt->GetAnimationDir()) { case 0: printf("Forward\n"); break; case 1: printf("Backward\n"); break; default: printf("\n"); break; } printf("\tAnimation Loop Mode = %d : ",InPckt->GetAnimationLoopMode()); switch(InPckt->GetAnimationLoopMode()) { case 0: printf("OneShot\n"); break; case 1: printf("Continuous\n"); break; default: printf("\n"); break; } printf("\tAnimation State = %d : ",InPckt->GetAnimationState()); switch(InPckt->GetAnimationState()) { case 0: printf("Stop\n"); break; case 1: printf("Pause\n"); break; case 2: printf("Play\n"); break; case 3: printf("Continue\n"); break; default: printf("\n"); break; } if(InPckt->GetSmoothingEn()) printf("\tSmoothing Enabled\n"); else printf("\tSmoothing Disabled\n"); printf("\tAlpha = %d\n",InPckt->GetAlpha()); printf("\tEntity Type = %d\n",InPckt->GetEntityType()); printf("\tParent ID = %d\n",InPckt->GetParentID()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEntityCtrlV3_3.h000066400000000000000000000011661210750432300225050ustar00rootroot00000000000000// XEntityCtrlV3_3.h: interface for the XEntityCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEntityCtrlV3_3_INCLUDED_) #define _PROC_XEntityCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEntityCtrlV3_3.h" class XEntityCtrlV3_3 : public CigiBaseEventProcessor { public: XEntityCtrlV3_3(); virtual ~XEntityCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEntityCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEntityCtrlV3_3 *TPckt; }; #endif // _PROC_XEntityCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvCondReqV3.cpp000066400000000000000000000025051210750432300225170ustar00rootroot00000000000000// XEnvCondReqV3.cpp: Body of the XEnvCondReqV3 class. // ////////////////////////////////////////////////////////////////////// #include "XEnvCondReqV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEnvCondReqV3::XEnvCondReqV3() { } XEnvCondReqV3::~XEnvCondReqV3() { } void XEnvCondReqV3::OnPacketReceived(CigiBasePacket *Packet) { CigiEnvCondReqV3 *InPckt = (CigiEnvCondReqV3 *)Packet; bool ok = true; printf("Environmental Condition Request:\n"); if((InPckt->GetReqType() & (unsigned char)CigiBaseEnvCondReq::Maritime) != 0) printf("\tRequest Type = 1 : Maritime\n"); if((InPckt->GetReqType() & (unsigned char)CigiBaseEnvCondReq::Terrestrial) != 0) printf("\tRequest Type = 2 : Terrestrial\n"); if((InPckt->GetReqType() & (unsigned char)CigiBaseEnvCondReq::Weather) != 0) printf("\tRequest Type = 4 : Weather\n"); if((InPckt->GetReqType() & (unsigned char)CigiBaseEnvCondReq::Aerosol) != 0) printf("\tRequest Type = 8 : Aerosol\n"); printf("\tRequest ID = %d\n",InPckt->GetReqID()); printf("\tLatitude = %f\n",InPckt->GetLat()); printf("\tLongitude = %f\n",InPckt->GetLon()); printf("\tAltitude = %f\n",InPckt->GetAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvCondReqV3.h000066400000000000000000000011401210750432300221560ustar00rootroot00000000000000// XEnvCondReqV3.h: interface for the XEnvCondReqV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEnvCondReqV3_INCLUDED_) #define _PROC_XEnvCondReqV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEnvCondReqV3.h" class XEnvCondReqV3 : public CigiBaseEventProcessor { public: XEnvCondReqV3(); virtual ~XEnvCondReqV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEnvCondReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEnvCondReqV3 *TPckt; }; #endif // _PROC_XEnvCondReqV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvCtrlV1.cpp000066400000000000000000000022101210750432300220570ustar00rootroot00000000000000// XEnvCtrlV1.cpp: Body of the XEnvCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XEnvCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEnvCtrlV1::XEnvCtrlV1() { } XEnvCtrlV1::~XEnvCtrlV1() { } void XEnvCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiEnvCtrlV1 *InPckt = (CigiEnvCtrlV1 *)Packet; printf("Environmental Control:\n"); printf("\tHour = %d\n",InPckt->GetHour()); printf("\tMinute = %d\n",InPckt->GetMinute()); printf("\tEphemeris Enable = %d\n",InPckt->GetEphemerisEn()); printf("\tHumidity = %d\n",InPckt->GetHumidity()); printf("\tMonth = %d\n",InPckt->GetMonth()); printf("\tDay = %d\n",InPckt->GetDay()); printf("\tYear = %d\n",InPckt->GetYear()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tVisibility = %f\n",InPckt->GetVisibility()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvCtrlV1.h000066400000000000000000000010771210750432300215360ustar00rootroot00000000000000// XEnvCtrlV1.h: interface for the XEnvCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEnvCtrlV1_INCLUDED_) #define _PROC_XEnvCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEnvCtrlV1.h" class XEnvCtrlV1 : public CigiBaseEventProcessor { public: XEnvCtrlV1(); virtual ~XEnvCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEnvCtrlV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEnvCtrlV1 *TPckt; }; #endif // _PROC_XEnvCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvCtrlV2.cpp000066400000000000000000000024741210750432300220740ustar00rootroot00000000000000// XEnvCtrlV2.cpp: Body of the XEnvCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XEnvCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEnvCtrlV2::XEnvCtrlV2() { } XEnvCtrlV2::~XEnvCtrlV2() { } void XEnvCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiEnvCtrlV2 *InPckt = (CigiEnvCtrlV2 *)Packet; printf("Environmental Control:\n"); printf("\tHour = %d\n",InPckt->GetHour()); printf("\tMinute = %d\n",InPckt->GetMinute()); printf("\tEphemeris Enable = %d\n",InPckt->GetEphemerisEn()); printf("\tAtmosphere Enable = %d\n",InPckt->GetAtmosEn()); printf("\tHumidity = %d\n",InPckt->GetHumidity()); printf("\tMonth = %d\n",InPckt->GetMonth()); printf("\tDay = %d\n",InPckt->GetDay()); printf("\tYear = %d\n",InPckt->GetYear()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tVisibility = %f\n",InPckt->GetVisibility()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); printf("\tBarometric Pressure = %f\n",InPckt->GetBaroPress()); printf("\tAerosol = %f\n",InPckt->GetAerosol()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvCtrlV2.h000066400000000000000000000010771210750432300215370ustar00rootroot00000000000000// XEnvCtrlV2.h: interface for the XEnvCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEnvCtrlV2_INCLUDED_) #define _PROC_XEnvCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEnvCtrlV2.h" class XEnvCtrlV2 : public CigiBaseEventProcessor { public: XEnvCtrlV2(); virtual ~XEnvCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEnvCtrlV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEnvCtrlV2 *TPckt; }; #endif // _PROC_XEnvCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvRgnCtrlV3.cpp000066400000000000000000000044651210750432300225460ustar00rootroot00000000000000// XEnvRgnCtrlV3.cpp: Body of the XEnvRgnCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XEnvRgnCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEnvRgnCtrlV3::XEnvRgnCtrlV3() { } XEnvRgnCtrlV3::~XEnvRgnCtrlV3() { } void XEnvRgnCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiEnvRgnCtrlV3 *InPckt = (CigiEnvRgnCtrlV3 *)Packet; printf("Environmental Region Control\n"); printf("\tRegion ID = %d\n",InPckt->GetRegionID()); printf("\tRegion State = %d : ",InPckt->GetRgnState()); switch(InPckt->GetRgnState()) { case 0: printf("Inactive\n"); break; case 1: printf("Active\n"); break; case 2: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tWeather Property = %d : ",InPckt->GetWeatherProp()); switch(InPckt->GetWeatherProp()) { case 0: printf("UseLast\n"); break; case 1: printf("Merge\n"); break; default: printf("\n"); break; } printf("\tAerosol = %d : ",InPckt->GetAerosol()); switch(InPckt->GetAerosol()) { case 0: printf("UseLast\n"); break; case 1: printf("Merge\n"); break; default: printf("\n"); break; } printf("\tMaritime Surface = %d : ",InPckt->GetMaritimeSurface()); switch(InPckt->GetMaritimeSurface()) { case 0: printf("UseLast\n"); break; case 1: printf("Merge\n"); break; default: printf("\n"); break; } printf("\tTerrestrial Surface = %d : ",InPckt->GetTerrestrialSurface()); switch(InPckt->GetTerrestrialSurface()) { case 0: printf("UseLast\n"); break; case 1: printf("Merge\n"); break; default: printf("\n"); break; } printf("\tLat = %f\n",InPckt->GetLat()); printf("\tLon = %f\n",InPckt->GetLon()); printf("\tX Size = %f\n",InPckt->GetXSize()); printf("\tY Size = %f\n",InPckt->GetYSize()); printf("\tCorner Radius = %f\n",InPckt->GetCornerRadius()); printf("\tRotation = %f\n",InPckt->GetRotation()); printf("\tTransition = %f\n",InPckt->GetTransition()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEnvRgnCtrlV3.h000066400000000000000000000011401210750432300221760ustar00rootroot00000000000000// XEnvRgnCtrlV3.h: interface for the XEnvRgnCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEnvRgnCtrlV3_INCLUDED_) #define _PROC_XEnvRgnCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEnvRgnCtrlV3.h" class XEnvRgnCtrlV3 : public CigiBaseEventProcessor { public: XEnvRgnCtrlV3(); virtual ~XEnvRgnCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEnvRgnCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEnvRgnCtrlV3 *TPckt; }; #endif // _PROC_XEnvRgnCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEventNotificationV3.cpp000066400000000000000000000015711210750432300241450ustar00rootroot00000000000000// XEventNotificationV3.cpp: Body of the XEventNotificationV3 class. // ////////////////////////////////////////////////////////////////////// #include "XEventNotificationV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEventNotificationV3::XEventNotificationV3() { } XEventNotificationV3::~XEventNotificationV3() { } void XEventNotificationV3::OnPacketReceived(CigiBasePacket *Packet) { CigiEventNotificationV3 *InPckt = (CigiEventNotificationV3 *)Packet; printf("===> EventNotification <===\n"); printf("EventID ==> %d\n",InPckt->GetEventID()); printf("EventData ==> %f\n",InPckt->GetLEventData(0)); printf("EventData ==> %f\n",InPckt->GetLEventData(1)); printf("EventData ==> %f\n",InPckt->GetLEventData(2)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XEventNotificationV3.h000066400000000000000000000012551210750432300236110ustar00rootroot00000000000000// XEventNotificationV3.h: interface for the XEventNotificationV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEventNotificationV3_INCLUDED_) #define _PROC_XEventNotificationV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEventNotificationV3.h" class XEventNotificationV3 : public CigiBaseEventProcessor { public: XEventNotificationV3(); virtual ~XEventNotificationV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEventNotificationV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEventNotificationV3 *TPckt; }; #endif // _PROC_XEventNotificationV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatHotReqV3.cpp000066400000000000000000000026111210750432300223500ustar00rootroot00000000000000// XHatHotReqV3.cpp: Body of the XHatHotReqV3 class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotReqV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotReqV3::XHatHotReqV3() { } XHatHotReqV3::~XHatHotReqV3() { } void XHatHotReqV3::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotReqV3 *InPckt = (CigiHatHotReqV3 *)Packet; bool ok = true; printf("Hot/Hat Request:\n"); printf("\tHat-Hot ID = %d\n",InPckt->GetHatHotID()); printf("\tRequest Type = %d : ",InPckt->GetReqType()); switch(InPckt->GetReqType()) { case 0: printf("HAT\n"); break; case 1: printf("HOT\n"); break; case 2: printf("Extended\n"); break; default: printf("\n"); break; } printf("\tSource Coordinate System = %d : ",InPckt->GetSrcCoordSys()); switch(InPckt->GetSrcCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatHotReqV3.h000066400000000000000000000011251210750432300220140ustar00rootroot00000000000000// XHatHotReqV3.h: interface for the XHatHotReqV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHatHotReqV3_INCLUDED_) #define _PROC_XHatHotReqV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotReqV3.h" class XHatHotReqV3 : public CigiBaseEventProcessor { public: XHatHotReqV3(); virtual ~XHatHotReqV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotReqV3 *TPckt; }; #endif // _PROC_XHatHotReqV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatHotReqV3_2.cpp000066400000000000000000000027341210750432300225770ustar00rootroot00000000000000// XHatHotReqV3_2.cpp: Body of the XHatHotReqV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotReqV3_2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotReqV3_2::XHatHotReqV3_2() { } XHatHotReqV3_2::~XHatHotReqV3_2() { } void XHatHotReqV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotReqV3_2 *InPckt = (CigiHatHotReqV3_2 *)Packet; bool ok = true; printf("Hot/Hat Request:\n"); printf("\tHat-Hot ID = %d\n",InPckt->GetHatHotID()); printf("\tRequest Type = %d : ",InPckt->GetReqType()); switch(InPckt->GetReqType()) { case 0: printf("HAT\n"); break; case 1: printf("HOT\n"); break; case 2: printf("Extended\n"); break; default: printf("\n"); break; } printf("\tSource Coordinate System = %d : ",InPckt->GetSrcCoordSys()); switch(InPckt->GetSrcCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tUpdate Period = %d\n",InPckt->GetUpdatePeriod()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatHotReqV3_2.h000066400000000000000000000011531210750432300222360ustar00rootroot00000000000000// XHatHotReqV3_2.h: interface for the XHatHotReqV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHatHotReqV3_2_INCLUDED_) #define _PROC_XHatHotReqV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotReqV3_2.h" class XHatHotReqV3_2 : public CigiBaseEventProcessor { public: XHatHotReqV3_2(); virtual ~XHatHotReqV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotReqV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotReqV3_2 *TPckt; }; #endif // _PROC_XHatHotReqV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatReqV1.cpp000066400000000000000000000013711210750432300216750ustar00rootroot00000000000000// XHatReqV1.cpp: Body of the XHatReqV1 class. // ////////////////////////////////////////////////////////////////////// #include "XHatReqV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatReqV1::XHatReqV1() { } XHatReqV1::~XHatReqV1() { } void XHatReqV1::OnPacketReceived(CigiBasePacket *Packet) { CigiHatReqV1 *InPckt = (CigiHatReqV1 *)Packet; bool ok = true; printf("Hat Request:\n"); printf("\tHat ID = %d\n",InPckt->GetHatHotID()); printf("\tLatitude = %f\n",InPckt->GetLat()); printf("\tLongitude = %f\n",InPckt->GetLon()); printf("\tAltitude = %f\n",InPckt->GetAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatReqV1.h000066400000000000000000000010641210750432300213410ustar00rootroot00000000000000// XHatReqV1.h: interface for the XHatReqV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHatReqV1_INCLUDED_) #define _PROC_XHatReqV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatReqV1.h" class XHatReqV1 : public CigiBaseEventProcessor { public: XHatReqV1(); virtual ~XHatReqV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatReqV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatReqV1 *TPckt; }; #endif // _PROC_XHatReqV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatReqV2.cpp000066400000000000000000000013711210750432300216760ustar00rootroot00000000000000// XHatReqV2.cpp: Body of the XHatReqV2 class. // ////////////////////////////////////////////////////////////////////// #include "XHatReqV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatReqV2::XHatReqV2() { } XHatReqV2::~XHatReqV2() { } void XHatReqV2::OnPacketReceived(CigiBasePacket *Packet) { CigiHatReqV2 *InPckt = (CigiHatReqV2 *)Packet; bool ok = true; printf("Hat Request:\n"); printf("\tHat ID = %d\n",InPckt->GetHatHotID()); printf("\tLatitude = %f\n",InPckt->GetLat()); printf("\tLongitude = %f\n",InPckt->GetLon()); printf("\tAltitude = %f\n",InPckt->GetAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHatReqV2.h000066400000000000000000000010641210750432300213420ustar00rootroot00000000000000// XHatReqV2.h: interface for the XHatReqV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHatReqV2_INCLUDED_) #define _PROC_XHatReqV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatReqV2.h" class XHatReqV2 : public CigiBaseEventProcessor { public: XHatReqV2(); virtual ~XHatReqV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatReqV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatReqV2 *TPckt; }; #endif // _PROC_XHatReqV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHotReqV2.cpp000066400000000000000000000013071210750432300217130ustar00rootroot00000000000000// XHotReqV2.cpp: Body of the XHotReqV2 class. // ////////////////////////////////////////////////////////////////////// #include "XHotReqV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHotReqV2::XHotReqV2() { } XHotReqV2::~XHotReqV2() { } void XHotReqV2::OnPacketReceived(CigiBasePacket *Packet) { CigiHotReqV2 *InPckt = (CigiHotReqV2 *)Packet; bool ok = true; printf("Hot Request:\n"); printf("\tHot ID = %d\n",InPckt->GetHatHotID()); printf("\tLatitude = %f\n",InPckt->GetLat()); printf("\tLongitude = %f\n",InPckt->GetLon()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XHotReqV2.h000066400000000000000000000010641210750432300213600ustar00rootroot00000000000000// XHotReqV2.h: interface for the XHotReqV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHotReqV2_INCLUDED_) #define _PROC_XHotReqV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHotReqV2.h" class XHotReqV2 : public CigiBaseEventProcessor { public: XHotReqV2(); virtual ~XHotReqV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHotReqV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHotReqV2 *TPckt; }; #endif // _PROC_XHotReqV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrl.cpp000066400000000000000000000007421210750432300214270ustar00rootroot00000000000000// XIGCtrl.cpp: Body of the XIGCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrl::XIGCtrl() { } XIGCtrl::~XIGCtrl() { } void XIGCtrl::OnPacketReceived(CigiBasePacket *Packet) { /* This Does not print anything! */ } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrl.h000066400000000000000000000010521210750432300210670ustar00rootroot00000000000000// XIGCtrl.h: interface for the XIGCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrl_INCLUDED_) #define _PROC_XIGCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV3_2.h" class XIGCtrl : public CigiBaseEventProcessor { public: XIGCtrl(); virtual ~XIGCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV3_2 *TPckt; }; #endif // _PROC_XIGCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV1.cpp000066400000000000000000000017331210750432300216370ustar00rootroot00000000000000// XIGCtrlV1.cpp: Body of the XIGCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrlV1::XIGCtrlV1() { } XIGCtrlV1::~XIGCtrlV1() { } void XIGCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiIGCtrlV1 *InPckt = (CigiIGCtrlV1 *)Packet; bool ok = true; printf("IGCtrl\n"); printf("Version ==> %d\n",InPckt->GetVersion()); printf("DatabaseID ==> %d\n",InPckt->GetDatabaseID()); printf("IGMode ==> %d\n",InPckt->GetIGMode()); printf("Tracking Device Enable V1 ==> %d\n",InPckt->GetTrackDeviceEn()); printf("Boresight Track Device V1 ==> %d\n",InPckt->GetBoresightTrackDevice()); printf("FrameCntr ==> %d\n",InPckt->GetFrameCntr()); printf("TimeStampV1 ==> %d\n",InPckt->GetTimeStamp()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV1.h000066400000000000000000000010641210750432300213010ustar00rootroot00000000000000// XIGCtrlV1.h: interface for the XIGCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrlV1_INCLUDED_) #define _PROC_XIGCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV1.h" class XIGCtrlV1 : public CigiBaseEventProcessor { public: XIGCtrlV1(); virtual ~XIGCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV1 *TPckt; }; #endif // _PROC_XIGCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV2.cpp000066400000000000000000000017331210750432300216400ustar00rootroot00000000000000// XIGCtrlV2.cpp: Body of the XIGCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrlV2::XIGCtrlV2() { } XIGCtrlV2::~XIGCtrlV2() { } void XIGCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiIGCtrlV2 *InPckt = (CigiIGCtrlV2 *)Packet; bool ok = true; printf("IGCtrl\n"); printf("Version ==> %d\n",InPckt->GetVersion()); printf("DatabaseID ==> %d\n",InPckt->GetDatabaseID()); printf("IGMode ==> %d\n",InPckt->GetIGMode()); printf("Tracking Device Enable V2 ==> %d\n",InPckt->GetTrackDeviceEn()); printf("Boresight Track Device V2 ==> %d\n",InPckt->GetBoresightTrackDevice()); printf("FrameCntr ==> %d\n",InPckt->GetFrameCntr()); printf("TimeStampV2 ==> %d\n",InPckt->GetTimeStamp()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV2.h000066400000000000000000000010641210750432300213020ustar00rootroot00000000000000// XIGCtrlV2.h: interface for the XIGCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrlV2_INCLUDED_) #define _PROC_XIGCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV2.h" class XIGCtrlV2 : public CigiBaseEventProcessor { public: XIGCtrlV2(); virtual ~XIGCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV2 *TPckt; }; #endif // _PROC_XIGCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV3.cpp000066400000000000000000000015761210750432300216460ustar00rootroot00000000000000// XIGCtrlV3.cpp: Body of the XIGCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrlV3::XIGCtrlV3() { } XIGCtrlV3::~XIGCtrlV3() { } void XIGCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiIGCtrlV3 *InPckt = (CigiIGCtrlV3 *)Packet; bool ok = true; printf("IGCtrl\n"); printf("Version ==> %d\n",InPckt->GetVersion()); printf("DatabaseID ==> %d\n",InPckt->GetDatabaseID()); printf("IGMode ==> %d\n",InPckt->GetIGMode()); printf("TimestampValid ==> %d\n",InPckt->GetTimeStampValid()); printf("FrameCntr ==> %d\n",InPckt->GetFrameCntr()); printf("TimeStampV3 ==> %d\n",InPckt->GetTimeStamp()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV3.h000066400000000000000000000010641210750432300213030ustar00rootroot00000000000000// XIGCtrlV3.h: interface for the XIGCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrlV3_INCLUDED_) #define _PROC_XIGCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV3.h" class XIGCtrlV3 : public CigiBaseEventProcessor { public: XIGCtrlV3(); virtual ~XIGCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV3 *TPckt; }; #endif // _PROC_XIGCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV3_2.cpp000066400000000000000000000020231210750432300220530ustar00rootroot00000000000000// XIGCtrlV3_2.cpp: Body of the XIGCtrlV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrlV3_2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrlV3_2::XIGCtrlV3_2() { } XIGCtrlV3_2::~XIGCtrlV3_2() { } void XIGCtrlV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiIGCtrlV3_2 *InPckt = (CigiIGCtrlV3_2 *)Packet; bool ok = true; printf("IGCtrl:\n"); printf("Version ==> %d\n",InPckt->GetVersion()); printf("DatabaseID ==> %d\n",InPckt->GetDatabaseID()); printf("IGMode ==> %d\n",InPckt->GetIGMode()); printf("TimestampValid ==> %d\n",InPckt->GetTimeStampValid()); printf("MinorVersion ==> %d\n",InPckt->GetMinorVersion()); printf("FrameCntr ==> %d\n",InPckt->GetFrameCntr()); printf("TimeStampV3_2 ==> %d\n",InPckt->GetTimeStamp()); printf("IGFrameCntr ==> %d\n",InPckt->GetLastRcvdIGFrame()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV3_2.h000066400000000000000000000011121210750432300215160ustar00rootroot00000000000000// XIGCtrlV3_2.h: interface for the XIGCtrlV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrlV3_2_INCLUDED_) #define _PROC_XIGCtrlV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV3_2.h" class XIGCtrlV3_2 : public CigiBaseEventProcessor { public: XIGCtrlV3_2(); virtual ~XIGCtrlV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV3_2 *TPckt; }; #endif // _PROC_XIGCtrlV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV3_3.cpp000066400000000000000000000022101210750432300220520ustar00rootroot00000000000000// XIGCtrlV3_3.cpp: Body of the XIGCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrlV3_3::XIGCtrlV3_3() { } XIGCtrlV3_3::~XIGCtrlV3_3() { } void XIGCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiIGCtrlV3_3 *InPckt = (CigiIGCtrlV3_3 *)Packet; bool ok = true; printf("IGCtrl:\n"); printf("Version ==> %d\n",InPckt->GetVersion()); printf("DatabaseID ==> %d\n",InPckt->GetDatabaseID()); printf("IGMode ==> %d\n",InPckt->GetIGMode()); printf("TimestampValid ==> %d\n",InPckt->GetTimeStampValid()); if(InPckt->GetSmoothingEn()) printf("Smoothing Enabled\n"); else printf("Smoothing Disabled\n"); printf("MinorVersion ==> %d\n",InPckt->GetMinorVersion()); printf("FrameCntr ==> %d\n",InPckt->GetFrameCntr()); printf("TimeStampV3_2 ==> %d\n",InPckt->GetTimeStamp()); printf("IGFrameCntr ==> %d\n",InPckt->GetLastRcvdIGFrame()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XIGCtrlV3_3.h000066400000000000000000000011121210750432300215170ustar00rootroot00000000000000// XIGCtrlV3_3.h: interface for the XIGCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrlV3_3_INCLUDED_) #define _PROC_XIGCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV3_3.h" class XIGCtrlV3_3 : public CigiBaseEventProcessor { public: XIGCtrlV3_3(); virtual ~XIGCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV3_3 *TPckt; }; #endif // _PROC_XIGCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV1.cpp000066400000000000000000000017321210750432300223560ustar00rootroot00000000000000// XLosSegReqV1.cpp: Body of the XLosSegReqV1 class. // ////////////////////////////////////////////////////////////////////// #include "XLosSegReqV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosSegReqV1::XLosSegReqV1() { } XLosSegReqV1::~XLosSegReqV1() { } void XLosSegReqV1::OnPacketReceived(CigiBasePacket *Packet) { CigiLosSegReqV1 *InPckt = (CigiLosSegReqV1 *)Packet; printf("Line of Sight Segment Request\n"); printf("\tLine of Sight ID = %d\n",InPckt->GetLosID()); printf("\tSource Lat = %f\n",InPckt->GetSrcLat()); printf("\tSource Lon = %f\n",InPckt->GetSrcLon()); printf("\tSource Alt = %f\n",InPckt->GetSrcAlt()); printf("\tDestination Lat = %f\n",InPckt->GetDstLat()); printf("\tDestination Lon = %f\n",InPckt->GetDstLon()); printf("\tDestination Alt = %f\n",InPckt->GetDstAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV1.h000066400000000000000000000011251210750432300220170ustar00rootroot00000000000000// XLosSegReqV1.h: interface for the XLosSegReqV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosSegReqV1_INCLUDED_) #define _PROC_XLosSegReqV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosSegReqV1.h" class XLosSegReqV1 : public CigiBaseEventProcessor { public: XLosSegReqV1(); virtual ~XLosSegReqV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosSegReqV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosSegReqV1 *TPckt; }; #endif // _PROC_XLosSegReqV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV2.cpp000066400000000000000000000017321210750432300223570ustar00rootroot00000000000000// XLosSegReqV2.cpp: Body of the XLosSegReqV2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosSegReqV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosSegReqV2::XLosSegReqV2() { } XLosSegReqV2::~XLosSegReqV2() { } void XLosSegReqV2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosSegReqV2 *InPckt = (CigiLosSegReqV2 *)Packet; printf("Line of Sight Segment Request\n"); printf("\tLine of Sight ID = %d\n",InPckt->GetLosID()); printf("\tSource Lat = %f\n",InPckt->GetSrcLat()); printf("\tSource Lon = %f\n",InPckt->GetSrcLon()); printf("\tSource Alt = %f\n",InPckt->GetSrcAlt()); printf("\tDestination Lat = %f\n",InPckt->GetDstLat()); printf("\tDestination Lon = %f\n",InPckt->GetDstLon()); printf("\tDestination Alt = %f\n",InPckt->GetDstAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV2.h000066400000000000000000000011251210750432300220200ustar00rootroot00000000000000// XLosSegReqV2.h: interface for the XLosSegReqV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosSegReqV2_INCLUDED_) #define _PROC_XLosSegReqV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosSegReqV2.h" class XLosSegReqV2 : public CigiBaseEventProcessor { public: XLosSegReqV2(); virtual ~XLosSegReqV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosSegReqV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosSegReqV2 *TPckt; }; #endif // _PROC_XLosSegReqV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV3.cpp000066400000000000000000000043171210750432300223620ustar00rootroot00000000000000// XLosSegReqV3.cpp: Body of the XLosSegReqV3 class. // ////////////////////////////////////////////////////////////////////// #include "XLosSegReqV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosSegReqV3::XLosSegReqV3() { } XLosSegReqV3::~XLosSegReqV3() { } void XLosSegReqV3::OnPacketReceived(CigiBasePacket *Packet) { CigiLosSegReqV3 *InPckt = (CigiLosSegReqV3 *)Packet; printf("Line of Sight Segment Request\n"); printf("\tLine of Sight ID = %d\n",InPckt->GetLosID()); printf("\tRequest Type = %d : ",InPckt->GetReqType()); switch(InPckt->GetReqType()) { case 0: printf("Basic\n"); break; case 1: printf("Extended\n"); break; default: printf("\n"); break; } printf("\tSource Coordinate System = %d : ",InPckt->GetSrcCoordSys()); switch(InPckt->GetSrcCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tDestination Coordinate System = %d : ",InPckt->GetDstCoordSys()); switch(InPckt->GetDstCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tResponse Coordinate System = %d : ",InPckt->GetResponseCoordSys()); switch(InPckt->GetResponseCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tAlpha Threshold = %d\n",InPckt->GetAlphaThresh()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSource X Offset = %f\n",InPckt->GetSrcXoff()); printf("\tSource Y Offset = %f\n",InPckt->GetSrcYoff()); printf("\tSource Z Offset = %f\n",InPckt->GetSrcZoff()); printf("\tDestination X Offset = %f\n",InPckt->GetDstXoff()); printf("\tDestination Y Offset = %f\n",InPckt->GetDstYoff()); printf("\tDestination Z Offset = %f\n",InPckt->GetDstZoff()); printf("\tMask = %d\n",InPckt->GetMask()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV3.h000066400000000000000000000011251210750432300220210ustar00rootroot00000000000000// XLosSegReqV3.h: interface for the XLosSegReqV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosSegReqV3_INCLUDED_) #define _PROC_XLosSegReqV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosSegReqV3.h" class XLosSegReqV3 : public CigiBaseEventProcessor { public: XLosSegReqV3(); virtual ~XLosSegReqV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosSegReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosSegReqV3 *TPckt; }; #endif // _PROC_XLosSegReqV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV3_2.cpp000066400000000000000000000046741210750432300226110ustar00rootroot00000000000000// XLosSegReqV3_2.cpp: Body of the XLosSegReqV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosSegReqV3_2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosSegReqV3_2::XLosSegReqV3_2() { } XLosSegReqV3_2::~XLosSegReqV3_2() { } void XLosSegReqV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosSegReqV3_2 *InPckt = (CigiLosSegReqV3_2 *)Packet; printf("Line of Sight Segment Request\n"); printf("\tLine of Sight ID = %d\n",InPckt->GetLosID()); printf("\tRequest Type = %d : ",InPckt->GetReqType()); switch(InPckt->GetReqType()) { case 0: printf("Basic\n"); break; case 1: printf("Extended\n"); break; default: printf("\n"); break; } printf("\tSource Coordinate System = %d : ",InPckt->GetSrcCoordSys()); switch(InPckt->GetSrcCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tDestination Coordinate System = %d : ",InPckt->GetDstCoordSys()); switch(InPckt->GetDstCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tResponse Coordinate System = %d : ",InPckt->GetResponseCoordSys()); switch(InPckt->GetResponseCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tDestination Entity ID Valid = %d\n",InPckt->GetDestEntityIDValid()); printf("\tAlpha Threshold = %d\n",InPckt->GetAlphaThresh()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSource X Offset = %f\n",InPckt->GetSrcXoff()); printf("\tSource Y Offset = %f\n",InPckt->GetSrcYoff()); printf("\tSource Z Offset = %f\n",InPckt->GetSrcZoff()); printf("\tDestination X Offset = %f\n",InPckt->GetDstXoff()); printf("\tDestination Y Offset = %f\n",InPckt->GetDstYoff()); printf("\tDestination Z Offset = %f\n",InPckt->GetDstZoff()); printf("\tMask = %d\n",InPckt->GetMask()); printf("\tUpdate Period = %d\n",InPckt->GetUpdatePeriod()); printf("\tDestination Entity ID = %d\n",InPckt->GetDestEntityID()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosSegReqV3_2.h000066400000000000000000000011531210750432300222430ustar00rootroot00000000000000// XLosSegReqV3_2.h: interface for the XLosSegReqV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosSegReqV3_2_INCLUDED_) #define _PROC_XLosSegReqV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosSegReqV3_2.h" class XLosSegReqV3_2 : public CigiBaseEventProcessor { public: XLosSegReqV3_2(); virtual ~XLosSegReqV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosSegReqV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosSegReqV3_2 *TPckt; }; #endif // _PROC_XLosSegReqV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV1.cpp000066400000000000000000000017621210750432300225440ustar00rootroot00000000000000// XLosVectReqV1.cpp: Body of the XLosVectReqV1 class. // ////////////////////////////////////////////////////////////////////// #include "XLosVectReqV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosVectReqV1::XLosVectReqV1() { } XLosVectReqV1::~XLosVectReqV1() { } void XLosVectReqV1::OnPacketReceived(CigiBasePacket *Packet) { CigiLosVectReqV1 *InPckt = (CigiLosVectReqV1 *)Packet; bool ok = true; printf("Line of Site Vector Request:\n"); printf("\tLine of Site ID = %d\n",InPckt->GetLosID()); printf("\tVector Azimuth = %f\n",InPckt->GetVectAz()); printf("\tVector Elevation = %f\n",InPckt->GetVectEl()); printf("\tMax Range = %f\n",InPckt->GetMaxRange()); printf("\tSource Lat = %f\n",InPckt->GetSrcLat()); printf("\tSource Lon = %f\n",InPckt->GetSrcLon()); printf("\tSource Alt = %f\n",InPckt->GetSrcAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV1.h000066400000000000000000000011401210750432300221770ustar00rootroot00000000000000// XLosVectReqV1.h: interface for the XLosVectReqV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosVectReqV1_INCLUDED_) #define _PROC_XLosVectReqV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosVectReqV1.h" class XLosVectReqV1 : public CigiBaseEventProcessor { public: XLosVectReqV1(); virtual ~XLosVectReqV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosVectReqV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosVectReqV1 *TPckt; }; #endif // _PROC_XLosVectReqV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV2.cpp000066400000000000000000000020551210750432300225410ustar00rootroot00000000000000// XLosVectReqV2.cpp: Body of the XLosVectReqV2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosVectReqV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosVectReqV2::XLosVectReqV2() { } XLosVectReqV2::~XLosVectReqV2() { } void XLosVectReqV2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosVectReqV2 *InPckt = (CigiLosVectReqV2 *)Packet; bool ok = true; printf("Line of Site Vector Request:\n"); printf("\tLine of Site ID = %d\n",InPckt->GetLosID()); printf("\tVector Azimuth = %f\n",InPckt->GetVectAz()); printf("\tVector Elevation = %f\n",InPckt->GetVectEl()); printf("\tMinimum Range = %f\n",InPckt->GetMinRange()); printf("\tMax Range = %f\n",InPckt->GetMaxRange()); printf("\tSource Lat = %f\n",InPckt->GetSrcLat()); printf("\tSource Lon = %f\n",InPckt->GetSrcLon()); printf("\tSource Alt = %f\n",InPckt->GetSrcAlt()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV2.h000066400000000000000000000011401210750432300222000ustar00rootroot00000000000000// XLosVectReqV2.h: interface for the XLosVectReqV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosVectReqV2_INCLUDED_) #define _PROC_XLosVectReqV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosVectReqV2.h" class XLosVectReqV2 : public CigiBaseEventProcessor { public: XLosVectReqV2(); virtual ~XLosVectReqV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosVectReqV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosVectReqV2 *TPckt; }; #endif // _PROC_XLosVectReqV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV3.cpp000066400000000000000000000040001210750432300225320ustar00rootroot00000000000000// XLosVectReqV3.cpp: Body of the XLosVectReqV3 class. // ////////////////////////////////////////////////////////////////////// #include "XLosVectReqV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosVectReqV3::XLosVectReqV3() { } XLosVectReqV3::~XLosVectReqV3() { } void XLosVectReqV3::OnPacketReceived(CigiBasePacket *Packet) { CigiLosVectReqV3 *InPckt = (CigiLosVectReqV3 *)Packet; bool ok = true; printf("Line of Site Vector Request:\n"); printf("\tLine of Site ID = %d\n",InPckt->GetLosID()); printf("\tRequest Type = %d : ",InPckt->GetReqType()); switch(InPckt->GetReqType()) { case 0: printf("Basic\n"); break; case 1: printf("Extended\n"); break; default: printf("\n"); break; } printf("\tSource Coordinate System = %d : ",InPckt->GetSrcCoordSys()); switch(InPckt->GetSrcCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tResponse Coordinate System = %d : ",InPckt->GetResponseCoordSys()); switch(InPckt->GetResponseCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tAlpha Threshold = %d\n",InPckt->GetAlphaThresh()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tVector Azimuth = %f\n",InPckt->GetVectAz()); printf("\tVector Elevation = %f\n",InPckt->GetVectEl()); printf("\tMinimum Range = %f\n",InPckt->GetMinRange()); printf("\tMax Range = %f\n",InPckt->GetMaxRange()); printf("\tSource X Offset = %f\n",InPckt->GetSrcXoff()); printf("\tSource Y Offset = %f\n",InPckt->GetSrcYoff()); printf("\tSource Z Offset = %f\n",InPckt->GetSrcZoff()); printf("\tMask = %d\n",InPckt->GetMask()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV3.h000066400000000000000000000011401210750432300222010ustar00rootroot00000000000000// XLosVectReqV3.h: interface for the XLosVectReqV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosVectReqV3_INCLUDED_) #define _PROC_XLosVectReqV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosVectReqV3.h" class XLosVectReqV3 : public CigiBaseEventProcessor { public: XLosVectReqV3(); virtual ~XLosVectReqV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosVectReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosVectReqV3 *TPckt; }; #endif // _PROC_XLosVectReqV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV3_2.cpp000066400000000000000000000041231210750432300227610ustar00rootroot00000000000000// XLosVectReqV3_2.cpp: Body of the XLosVectReqV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XLosVectReqV3_2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosVectReqV3_2::XLosVectReqV3_2() { } XLosVectReqV3_2::~XLosVectReqV3_2() { } void XLosVectReqV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiLosVectReqV3_2 *InPckt = (CigiLosVectReqV3_2 *)Packet; bool ok = true; printf("Line of Site Vector Request:\n"); printf("\tLine of Site ID = %d\n",InPckt->GetLosID()); printf("\tRequest Type = %d : ",InPckt->GetReqType()); switch(InPckt->GetReqType()) { case 0: printf("Basic\n"); break; case 1: printf("Extended\n"); break; default: printf("\n"); break; } printf("\tSource Coordinate System = %d : ",InPckt->GetSrcCoordSys()); switch(InPckt->GetSrcCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tResponse Coordinate System = %d : ",InPckt->GetResponseCoordSys()); switch(InPckt->GetResponseCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tAlpha Threshold = %d\n",InPckt->GetAlphaThresh()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tVector Azimuth = %f\n",InPckt->GetVectAz()); printf("\tVector Elevation = %f\n",InPckt->GetVectEl()); printf("\tMinimum Range = %f\n",InPckt->GetMinRange()); printf("\tMax Range = %f\n",InPckt->GetMaxRange()); printf("\tSource X Offset = %f\n",InPckt->GetSrcXoff()); printf("\tSource Y Offset = %f\n",InPckt->GetSrcYoff()); printf("\tSource Z Offset = %f\n",InPckt->GetSrcZoff()); printf("\tMask = %d\n",InPckt->GetMask()); printf("\tUpdate Period = %d\n",InPckt->GetUpdatePeriod()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XLosVectReqV3_2.h000066400000000000000000000011661210750432300224320ustar00rootroot00000000000000// XLosVectReqV3_2.h: interface for the XLosVectReqV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosVectReqV3_2_INCLUDED_) #define _PROC_XLosVectReqV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosVectReqV3_2.h" class XLosVectReqV3_2 : public CigiBaseEventProcessor { public: XLosVectReqV3_2(); virtual ~XLosVectReqV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosVectReqV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosVectReqV3_2 *TPckt; }; #endif // _PROC_XLosVectReqV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XMaritimeSurfaceCtrlV3.cpp000066400000000000000000000025411210750432300244200ustar00rootroot00000000000000// XMaritimeSurfaceCtrlV3.cpp: Body of the XMaritimeSurfaceCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XMaritimeSurfaceCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XMaritimeSurfaceCtrlV3::XMaritimeSurfaceCtrlV3() { } XMaritimeSurfaceCtrlV3::~XMaritimeSurfaceCtrlV3() { } void XMaritimeSurfaceCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiMaritimeSurfaceCtrlV3 *InPckt = (CigiMaritimeSurfaceCtrlV3 *)Packet; bool ok = true; printf("Maritime Surface Control:\n"); printf("\tEntity Region ID = %d\n",InPckt->GetEntityRgnID()); printf("\tSurface Conditions Enable = %d\n",InPckt->GetSurfaceCondEn()); printf("\tWhite Cap Enable = %d\n",InPckt->GetWhitecapEn()); printf("\tScope = %d : ",InPckt->GetScope()); switch(InPckt->GetScope()) { case 0: printf("Global\n"); break; case 1: printf("Regional\n"); break; case 2: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tSurface Height = %f\n",InPckt->GetSurfaceHeight()); printf("\tWater Temperature = %f\n",InPckt->GetWaterTemp()); printf("\tClarity = %f\n",InPckt->GetClarity()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XMaritimeSurfaceCtrlV3.h000066400000000000000000000013031210750432300240600ustar00rootroot00000000000000// XMaritimeSurfaceCtrlV3.h: interface for the XMaritimeSurfaceCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XMaritimeSurfaceCtrlV3_INCLUDED_) #define _PROC_XMaritimeSurfaceCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiMaritimeSurfaceCtrlV3.h" class XMaritimeSurfaceCtrlV3 : public CigiBaseEventProcessor { public: XMaritimeSurfaceCtrlV3(); virtual ~XMaritimeSurfaceCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiMaritimeSurfaceCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiMaritimeSurfaceCtrlV3 *TPckt; }; #endif // _PROC_XMaritimeSurfaceCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XMotionTrackCtrlV3.cpp000066400000000000000000000026411210750432300235730ustar00rootroot00000000000000// XMotionTrackCtrlV3.cpp: Body of the XMotionTrackCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XMotionTrackCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XMotionTrackCtrlV3::XMotionTrackCtrlV3() { } XMotionTrackCtrlV3::~XMotionTrackCtrlV3() { } void XMotionTrackCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiMotionTrackCtrlV3 *InPckt = (CigiMotionTrackCtrlV3 *)Packet; bool ok = true; printf("Motion Tracker Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tTracker ID = %d\n",InPckt->GetTrackerID()); printf("\tTracker Enable = %d\n",InPckt->GetTrackerEn()); printf("\tBoresight Enable = %d\n",InPckt->GetBoresightEn()); printf("\tX Enable = %d\n",InPckt->GetXEn()); printf("\tY Enable = %d\n",InPckt->GetYEn()); printf("\tZ Enable = %d\n",InPckt->GetZEn()); printf("\tRoll Enable = %d\n",InPckt->GetRollEn()); printf("\tPitch Enable = %d\n",InPckt->GetPitchEn()); printf("\tYaw Enable = %d\n",InPckt->GetYawEn()); printf("\tScope = %d : ",InPckt->GetScope()); switch(InPckt->GetScope()) { case 0: printf("View\n"); break; case 1: printf("ViewGrp\n"); break; default: printf("\n"); break; } } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XMotionTrackCtrlV3.h000066400000000000000000000012271210750432300232370ustar00rootroot00000000000000// XMotionTrackCtrlV3.h: interface for the XMotionTrackCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XMotionTrackCtrlV3_INCLUDED_) #define _PROC_XMotionTrackCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiMotionTrackCtrlV3.h" class XMotionTrackCtrlV3 : public CigiBaseEventProcessor { public: XMotionTrackCtrlV3(); virtual ~XMotionTrackCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiMotionTrackCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiMotionTrackCtrlV3 *TPckt; }; #endif // _PROC_XMotionTrackCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XPositionReqV3.cpp000066400000000000000000000032621210750432300227700ustar00rootroot00000000000000// XPositionReqV3.cpp: Body of the XPostionReqV3 class. // ////////////////////////////////////////////////////////////////////// #include "XPositionReqV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XPositionReqV3::XPositionReqV3() { } XPositionReqV3::~XPositionReqV3() { } void XPositionReqV3::OnPacketReceived(CigiBasePacket *Packet) { CigiPositionReqV3 *InPckt = (CigiPositionReqV3 *)Packet; bool ok = true; printf("Position Request\n"); printf("\tObject ID = %d\n",InPckt->GetObjectID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tUpdate Mode = %d : ",InPckt->GetUpdateMode()); switch(InPckt->GetUpdateMode()) { case 0: printf("OneShot\n"); break; case 1: printf("Continuous\n"); break; default: printf("\n"); break; } printf("\tObject Class = %d : ",InPckt->GetObjectClass()); switch(InPckt->GetObjectClass()) { case 0: printf("Entity\n"); break; case 1: printf("ArtPart\n"); break; case 2: printf("View\n"); break; case 3: printf("ViewGrp\n"); break; case 4: printf("MotionTracker\n"); break; default: printf("\n"); break; } printf("\tCoordinate System = %d : ",InPckt->GetCoordSys()); switch(InPckt->GetCoordSys()) { case 0: printf("Geodetic\n"); break; case 1: printf("ParentEntity\n"); break; case 2: printf("Submodel\n"); break; default: printf("\n"); break; } } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XPositionReqV3.h000066400000000000000000000011471210750432300224350ustar00rootroot00000000000000// XPositionReqV3.h: interface for the XPostionReqV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XPostionReqV3_INCLUDED_) #define _PROC_XPostionReqV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiPositionReqV3.h" class XPositionReqV3 : public CigiBaseEventProcessor { public: XPositionReqV3(); virtual ~XPositionReqV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiPositionReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiPositionReqV3 *TPckt; }; #endif // _PROC_XPostionReqV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV1.cpp000066400000000000000000000017651210750432300222400ustar00rootroot00000000000000// XRateCtrlV1.cpp: Body of the XRateCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XRateCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XRateCtrlV1::XRateCtrlV1() { } XRateCtrlV1::~XRateCtrlV1() { } void XRateCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiRateCtrlV1 *InPckt = (CigiRateCtrlV1 *)Packet; bool ok = true; printf("Rate Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tX Rate = %f\n",InPckt->GetXRate()); printf("\tY Rate = %f\n",InPckt->GetYRate()); printf("\tZ Rate = %f\n",InPckt->GetZRate()); printf("\tRoll Rate = %f\n",InPckt->GetRollRate()); printf("\tPitch Rate = %f\n",InPckt->GetPitchRate()); printf("\tYaw Rate = %f\n",InPckt->GetYawRate()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV1.h000066400000000000000000000011121210750432300216670ustar00rootroot00000000000000// XRateCtrlV1.h: interface for the XRateCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XRateCtrlV1_INCLUDED_) #define _PROC_XRateCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiRateCtrlV1.h" class XRateCtrlV1 : public CigiBaseEventProcessor { public: XRateCtrlV1(); virtual ~XRateCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiRateCtrlV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiRateCtrlV1 *TPckt; }; #endif // _PROC_XRateCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV2.cpp000066400000000000000000000017651210750432300222410ustar00rootroot00000000000000// XRateCtrlV2.cpp: Body of the XRateCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XRateCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XRateCtrlV2::XRateCtrlV2() { } XRateCtrlV2::~XRateCtrlV2() { } void XRateCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiRateCtrlV2 *InPckt = (CigiRateCtrlV2 *)Packet; bool ok = true; printf("Rate Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tX Rate = %f\n",InPckt->GetXRate()); printf("\tY Rate = %f\n",InPckt->GetYRate()); printf("\tZ Rate = %f\n",InPckt->GetZRate()); printf("\tRoll Rate = %f\n",InPckt->GetRollRate()); printf("\tPitch Rate = %f\n",InPckt->GetPitchRate()); printf("\tYaw Rate = %f\n",InPckt->GetYawRate()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV2.h000066400000000000000000000011121210750432300216700ustar00rootroot00000000000000// XRateCtrlV2.h: interface for the XRateCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XRateCtrlV2_INCLUDED_) #define _PROC_XRateCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiRateCtrlV2.h" class XRateCtrlV2 : public CigiBaseEventProcessor { public: XRateCtrlV2(); virtual ~XRateCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiRateCtrlV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiRateCtrlV2 *TPckt; }; #endif // _PROC_XRateCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV3.cpp000066400000000000000000000021021210750432300222240ustar00rootroot00000000000000// XRateCtrlV3.cpp: Body of the XRateCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XRateCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XRateCtrlV3::XRateCtrlV3() { } XRateCtrlV3::~XRateCtrlV3() { } void XRateCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiRateCtrlV3 *InPckt = (CigiRateCtrlV3 *)Packet; bool ok = true; printf("Rate Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tApply to Articulated Part = %d\n",InPckt->GetApplyToArtPart()); printf("\tX Rate = %f\n",InPckt->GetXRate()); printf("\tY Rate = %f\n",InPckt->GetYRate()); printf("\tZ Rate = %f\n",InPckt->GetZRate()); printf("\tRoll Rate = %f\n",InPckt->GetRollRate()); printf("\tPitch Rate = %f\n",InPckt->GetPitchRate()); printf("\tYaw Rate = %f\n",InPckt->GetYawRate()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV3.h000066400000000000000000000011121210750432300216710ustar00rootroot00000000000000// XRateCtrlV3.h: interface for the XRateCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XRateCtrlV3_INCLUDED_) #define _PROC_XRateCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiRateCtrlV3.h" class XRateCtrlV3 : public CigiBaseEventProcessor { public: XRateCtrlV3(); virtual ~XRateCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiRateCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiRateCtrlV3 *TPckt; }; #endif // _PROC_XRateCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV3_2.cpp000066400000000000000000000025221210750432300224530ustar00rootroot00000000000000// XRateCtrlV3_2.cpp: Body of the XRateCtrlV3_2 class. // ////////////////////////////////////////////////////////////////////// #include "XRateCtrlV3_2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XRateCtrlV3_2::XRateCtrlV3_2() { } XRateCtrlV3_2::~XRateCtrlV3_2() { } void XRateCtrlV3_2::OnPacketReceived(CigiBasePacket *Packet) { CigiRateCtrlV3_2 *InPckt = (CigiRateCtrlV3_2 *)Packet; bool ok = true; printf("Rate Control\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID = %d\n",InPckt->GetArtPartID()); printf("\tApply to Articulated Part = %d\n",InPckt->GetApplyToArtPart()); printf("\tCoordinate System = %d : ",InPckt->GetCoordSys()); switch(InPckt->GetCoordSys()) { case 0: printf("World\n"); break; case 1: printf("Local\n"); break; default: printf("\n"); break; } printf("\tX Rate = %f\n",InPckt->GetXRate()); printf("\tY Rate = %f\n",InPckt->GetYRate()); printf("\tZ Rate = %f\n",InPckt->GetZRate()); printf("\tRoll Rate = %f\n",InPckt->GetRollRate()); printf("\tPitch Rate = %f\n",InPckt->GetPitchRate()); printf("\tYaw Rate = %f\n",InPckt->GetYawRate()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XRateCtrlV3_2.h000066400000000000000000000011401210750432300221130ustar00rootroot00000000000000// XRateCtrlV3_2.h: interface for the XRateCtrlV3_2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XRateCtrlV3_2_INCLUDED_) #define _PROC_XRateCtrlV3_2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiRateCtrlV3_2.h" class XRateCtrlV3_2 : public CigiBaseEventProcessor { public: XRateCtrlV3_2(); virtual ~XRateCtrlV3_2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiRateCtrlV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiRateCtrlV3_2 *TPckt; }; #endif // _PROC_XRateCtrlV3_2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSensorCtrlV1.cpp000066400000000000000000000041701210750432300226070ustar00rootroot00000000000000// XSensorCtrlV1.cpp: Body of the XSensorCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorCtrlV1::XSensorCtrlV1() { } XSensorCtrlV1::~XSensorCtrlV1() { } void XSensorCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorCtrlV1 *InPckt = (CigiSensorCtrlV1 *)Packet; bool ok = true; printf("Sensor Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tSensor ID = %d\n",InPckt->GetSensorID()); printf("\tSensor On = %d\n",InPckt->GetSensorOn()); printf("\tPolarity = %d : ",InPckt->GetPolarity()); switch(InPckt->GetPolarity()) { case 0: printf("WhiteHot\n"); break; case 1: printf("BlackHot\n"); break; default: printf("\n"); break; } printf("\tLine Drop Enable = %d\n",InPckt->GetLineDropEn()); printf("\tTrack Mode = %d : ",InPckt->GetTrackMode()); switch(InPckt->GetTrackMode()) { case 0: printf("TrackOff\n"); break; case 1: printf("ForceCorrelate\n"); break; case 2: printf("Scene\n"); break; case 3: printf("Target\n"); break; case 4: printf("Ship\n"); break; case 5: printf("TMDefA\n"); break; case 6: printf("TMDefB\n"); break; case 7: printf("TMDefC\n"); break; default: printf("\n"); break; } printf("\tAuto Gain Enable = %d\n",InPckt->GetAutoGainEn()); printf("\tTrack Polarity = %d : ",InPckt->GetTrackPolarity()); switch(InPckt->GetTrackPolarity()) { case 0: printf("TrackWhite\n"); break; case 1: printf("TrackBlack\n"); break; default: printf("\n"); break; } printf("\tGain = %f\n",InPckt->GetGain()); printf("\tLevel = %f\n",InPckt->GetLevel()); printf("\tAC Coupling = %f\n",InPckt->GetACCoupling()); printf("\tNoise = %f\n",InPckt->GetNoise()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSensorCtrlV1.h000066400000000000000000000011401210750432300222460ustar00rootroot00000000000000// XSensorCtrlV1.h: interface for the XSensorCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSensorCtrlV1_INCLUDED_) #define _PROC_XSensorCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorCtrlV1.h" class XSensorCtrlV1 : public CigiBaseEventProcessor { public: XSensorCtrlV1(); virtual ~XSensorCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorCtrlV3 *TPckt; }; #endif // _PROC_XSensorCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSensorCtrlV2.cpp000066400000000000000000000041701210750432300226100ustar00rootroot00000000000000// XSensorCtrlV2.cpp: Body of the XSensorCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorCtrlV2::XSensorCtrlV2() { } XSensorCtrlV2::~XSensorCtrlV2() { } void XSensorCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorCtrlV2 *InPckt = (CigiSensorCtrlV2 *)Packet; bool ok = true; printf("Sensor Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tSensor ID = %d\n",InPckt->GetSensorID()); printf("\tSensor On = %d\n",InPckt->GetSensorOn()); printf("\tPolarity = %d : ",InPckt->GetPolarity()); switch(InPckt->GetPolarity()) { case 0: printf("WhiteHot\n"); break; case 1: printf("BlackHot\n"); break; default: printf("\n"); break; } printf("\tLine Drop Enable = %d\n",InPckt->GetLineDropEn()); printf("\tTrack Mode = %d : ",InPckt->GetTrackMode()); switch(InPckt->GetTrackMode()) { case 0: printf("TrackOff\n"); break; case 1: printf("ForceCorrelate\n"); break; case 2: printf("Scene\n"); break; case 3: printf("Target\n"); break; case 4: printf("Ship\n"); break; case 5: printf("TMDefA\n"); break; case 6: printf("TMDefB\n"); break; case 7: printf("TMDefC\n"); break; default: printf("\n"); break; } printf("\tAuto Gain Enable = %d\n",InPckt->GetAutoGainEn()); printf("\tTrack Polarity = %d : ",InPckt->GetTrackPolarity()); switch(InPckt->GetTrackPolarity()) { case 0: printf("TrackWhite\n"); break; case 1: printf("TrackBlack\n"); break; default: printf("\n"); break; } printf("\tGain = %f\n",InPckt->GetGain()); printf("\tLevel = %f\n",InPckt->GetLevel()); printf("\tAC Coupling = %f\n",InPckt->GetACCoupling()); printf("\tNoise = %f\n",InPckt->GetNoise()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSensorCtrlV2.h000066400000000000000000000011401210750432300222470ustar00rootroot00000000000000// XSensorCtrlV2.h: interface for the XSensorCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSensorCtrlV2_INCLUDED_) #define _PROC_XSensorCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorCtrlV2.h" class XSensorCtrlV2 : public CigiBaseEventProcessor { public: XSensorCtrlV2(); virtual ~XSensorCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorCtrlV3 *TPckt; }; #endif // _PROC_XSensorCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSensorCtrlV3.cpp000066400000000000000000000046031210750432300226120ustar00rootroot00000000000000// XSensorCtrlV3.cpp: Body of the XSensorCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XSensorCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorCtrlV3::XSensorCtrlV3() { } XSensorCtrlV3::~XSensorCtrlV3() { } void XSensorCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorCtrlV3 *InPckt = (CigiSensorCtrlV3 *)Packet; bool ok = true; printf("Sensor Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tSensor ID = %d\n",InPckt->GetSensorID()); printf("\tSensor On = %d\n",InPckt->GetSensorOn()); printf("\tPolarity = %d : ",InPckt->GetPolarity()); switch(InPckt->GetPolarity()) { case 0: printf("WhiteHot\n"); break; case 1: printf("BlackHot\n"); break; default: printf("\n"); break; } printf("\tLine Drop Enable = %d\n",InPckt->GetLineDropEn()); printf("\tAuto Gain Enable = %d\n",InPckt->GetAutoGainEn()); printf("\tTrack Polarity = %d : ",InPckt->GetTrackPolarity()); switch(InPckt->GetTrackPolarity()) { case 0: printf("TrackWhite\n"); break; case 1: printf("TrackBlack\n"); break; default: printf("\n"); break; } printf("\tResponse Type = %d : ",InPckt->GetResponseType()); switch(InPckt->GetResponseType()) { case 0: printf("GatePos\n"); break; case 1: printf("GateAndTargetPos\n"); break; default: printf("\n"); break; } printf("\tTrack Mode = %d : ",InPckt->GetTrackMode()); switch(InPckt->GetTrackMode()) { case 0: printf("TrackOff\n"); break; case 1: printf("ForceCorrelate\n"); break; case 2: printf("Scene\n"); break; case 3: printf("Target\n"); break; case 4: printf("Ship\n"); break; case 5: printf("TMDefA\n"); break; case 6: printf("TMDefB\n"); break; case 7: printf("TMDefC\n"); break; default: printf("\n"); break; } printf("\tGain = %f\n",InPckt->GetGain()); printf("\tLevel = %f\n",InPckt->GetLevel()); printf("\tAC Coupling = %f\n",InPckt->GetACCoupling()); printf("\tNoise = %f\n",InPckt->GetNoise()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSensorCtrlV3.h000066400000000000000000000011401210750432300222500ustar00rootroot00000000000000// XSensorCtrlV3.h: interface for the XSensorCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSensorCtrlV3_INCLUDED_) #define _PROC_XSensorCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorCtrlV3.h" class XSensorCtrlV3 : public CigiBaseEventProcessor { public: XSensorCtrlV3(); virtual ~XSensorCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorCtrlV3 *TPckt; }; #endif // _PROC_XSensorCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortArtPartCtrlV3.cpp000066400000000000000000000041441210750432300237360ustar00rootroot00000000000000// XShortArtPartCtrlV3.cpp: Body of the XShortArtPartCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XShortArtPartCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortArtPartCtrlV3::XShortArtPartCtrlV3() { } XShortArtPartCtrlV3::~XShortArtPartCtrlV3() { } void XShortArtPartCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiShortArtPartCtrlV3 *InPckt = (CigiShortArtPartCtrlV3 *)Packet; printf("Short Articulated Control:\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tArticulated Part ID 1 = %d\n",InPckt->GetArtPart1()); printf("\tArticulated Part ID 2 = %d\n",InPckt->GetArtPart2()); printf("\tDegree of Freedom Select 1 = %d : ",InPckt->GetDofSelect1()); switch(InPckt->GetDofSelect1()) { case 0: printf("Not Used\n"); break; case 1: printf("X Offset\n"); break; case 2: printf("Y Offset\n"); break; case 3: printf("Z Offset\n"); break; case 4: printf("Yaw\n"); break; case 5: printf("Pitch\n"); break; case 6: printf("Roll\n"); break; default: printf("\n"); break; } printf("\tDegree of Freedom Select 2 = %d : ",InPckt->GetDofSelect2()); switch(InPckt->GetDofSelect2()) { case 0: printf("Not Used\n"); break; case 1: printf("X Offset\n"); break; case 2: printf("Y Offset\n"); break; case 3: printf("Z Offset\n"); break; case 4: printf("Yaw\n"); break; case 5: printf("Pitch\n"); break; case 6: printf("Roll\n"); break; default: printf("\n"); break; } printf("\tArticulated Part 1 Enable = %d\n",InPckt->GetArtPart1En()); printf("\tArticulated Part 2 Enable = %d\n",InPckt->GetArtPart2En()); printf("\tDegree of Freedom 1 = %f\n",InPckt->GetDof1()); printf("\tDegree of Freedom 2 = %f\n",InPckt->GetDof2()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortArtPartCtrlV3.h000066400000000000000000000012421210750432300233770ustar00rootroot00000000000000// XShortArtPartCtrlV3.h: interface for the XShortArtPartCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortArtPartCtrlV3_INCLUDED_) #define _PROC_XShortArtPartCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortArtPartCtrlV3.h" class XShortArtPartCtrlV3 : public CigiBaseEventProcessor { public: XShortArtPartCtrlV3(); virtual ~XShortArtPartCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortArtPartCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortArtPartCtrlV3 *TPckt; }; #endif // _PROC_XShortArtPartCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortCompCtrlV3.cpp000066400000000000000000000036211210750432300232560ustar00rootroot00000000000000// XShortCompCtrlV3.cpp: Body of the XShortCompCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XShortCompCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortCompCtrlV3::XShortCompCtrlV3() { } XShortCompCtrlV3::~XShortCompCtrlV3() { } void XShortCompCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiShortCompCtrlV3 *InPckt = (CigiShortCompCtrlV3 *)Packet; bool ok = true; printf("Short Component Control:\n"); printf("\tComponent ID = %d\n",InPckt->GetCompID()); printf("\tInstance ID = %d\n",InPckt->GetInstanceID()); printf("\tComponent Class = %d : ",InPckt->GetCompClassV3()); switch(InPckt->GetCompClassV3()) { case 0: printf("EntityV3\n"); break; case 1: printf("ViewV3\n"); break; case 2: printf("ViewGrpV3\n"); break; case 3: printf("SensorV3\n"); break; case 4: printf("RegionalSeaSurfaceV3\n"); break; case 5: printf("RegionalTerrainSurfaceV3\n"); break; case 6: printf("RegionalLayeredWeatherV3\n"); break; case 7: printf("GlobalSeaSurfaceV3\n"); break; case 8: printf("GlobalTerrainSurfaceV3\n"); break; case 9: printf("GlobalLayeredWeatherV3\n"); break; case 10: printf("AtmosphereV3\n"); break; case 11: printf("CelestialSphereV3\n"); break; case 12: printf("EventV3\n"); break; case 13: printf("SystemV3\n"); break; default: printf("\n"); break; } printf("\tComponent State = %d\n",InPckt->GetCompState()); printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0)); printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortCompCtrlV3.h000066400000000000000000000012011210750432300227130ustar00rootroot00000000000000// XShortCompCtrlV3.h: interface for the XShortCompCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortCompCtrlV3_INCLUDED_) #define _PROC_XShortCompCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortCompCtrlV3.h" class XShortCompCtrlV3 : public CigiBaseEventProcessor { public: XShortCompCtrlV3(); virtual ~XShortCompCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortCompCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortCompCtrlV3 *TPckt; }; #endif // _PROC_XShortCompCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortCompCtrlV3_3.cpp000066400000000000000000000040321210750432300234750ustar00rootroot00000000000000// XShortCompCtrlV3_3.cpp: Body of the XShortCompCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XShortCompCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortCompCtrlV3_3::XShortCompCtrlV3_3() { } XShortCompCtrlV3_3::~XShortCompCtrlV3_3() { } void XShortCompCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiShortCompCtrlV3_3 *InPckt = (CigiShortCompCtrlV3_3 *)Packet; bool ok = true; printf("Short Component Control:\n"); printf("\tComponent ID = %d\n",InPckt->GetCompID()); printf("\tInstance ID = %d\n",InPckt->GetInstanceID()); printf("\tComponent Class = %d : ",InPckt->GetCompClassV3()); switch(InPckt->GetCompClassV3()) { case 0: printf("EntityV3\n"); break; case 1: printf("ViewV3\n"); break; case 2: printf("ViewGrpV3\n"); break; case 3: printf("SensorV3\n"); break; case 4: printf("RegionalSeaSurfaceV3\n"); break; case 5: printf("RegionalTerrainSurfaceV3\n"); break; case 6: printf("RegionalLayeredWeatherV3\n"); break; case 7: printf("GlobalSeaSurfaceV3\n"); break; case 8: printf("GlobalTerrainSurfaceV3\n"); break; case 9: printf("GlobalLayeredWeatherV3\n"); break; case 10: printf("AtmosphereV3\n"); break; case 11: printf("CelestialSphereV3\n"); break; case 12: printf("EventV3\n"); break; case 13: printf("SystemV3\n"); break; case 14: printf("SymbolSurfaceV3_3\n"); break; case 15: printf("SymbolV3_3\n"); break; default: printf("\n"); break; } printf("\tComponent State = %d\n",InPckt->GetCompState()); printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0)); printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1)); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortCompCtrlV3_3.h000066400000000000000000000012271210750432300231450ustar00rootroot00000000000000// XShortCompCtrlV3_3.h: interface for the XShortCompCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortCompCtrlV3_3_INCLUDED_) #define _PROC_XShortCompCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortCompCtrlV3_3.h" class XShortCompCtrlV3_3 : public CigiBaseEventProcessor { public: XShortCompCtrlV3_3(); virtual ~XShortCompCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortCompCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortCompCtrlV3_3 *TPckt; }; #endif // _PROC_XShortCompCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortSymbolCtrlV3_3.cpp000066400000000000000000000075741210750432300240620ustar00rootroot00000000000000// XShortSymbolCtrlV3_3.cpp: Body of the XShortSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XShortSymbolCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortSymbolCtrlV3_3::XShortSymbolCtrlV3_3() { } XShortSymbolCtrlV3_3::~XShortSymbolCtrlV3_3() { } void XShortSymbolCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiShortSymbolCtrlV3_3 *InPckt = (CigiShortSymbolCtrlV3_3 *)Packet; printf("Short Symbol Control:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tSymbol State = %d : ",InPckt->GetSymbolState()); switch(InPckt->GetSymbolState()) { case 0: printf("Hidden\n"); break; case 1: printf("Visible\n"); break; case 2: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tFlash Control = %d : ",InPckt->GetFlashCtrl()); switch(InPckt->GetFlashCtrl()) { case 0: printf("Continue\n"); break; case 1: printf("Reset\n"); break; default: printf("\n"); break; } printf("\tInherit Color = %d : ",InPckt->GetInheritColor()); switch(InPckt->GetInheritColor()) { case 0: printf("NotInherit\n"); break; case 1: printf("Inherit\n"); break; default: printf("\n"); break; } int ndx = 0; for(ndx=0;ndx<2;ndx++) { printf("\tDatum %d type = %d : ",ndx,InPckt->GetDatumType(ndx)); switch(InPckt->GetDatumType(ndx)) { case 0: printf("None\n"); break; case 1: printf("SurfaceIdDatumType\n"); printf("\tDatum %d: Surface ID = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 2: printf("ParentIdDatumType\n"); printf("\tDatum %d: Parent ID = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 3: printf("LayerDatumType\n"); printf("\tDatum %d: Layer = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 4: printf("FlashDutyCycleDatumType\n"); printf("\tDatum %d: Flash Duty Cycle = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 5: printf("FlashPeriodDatumType\n"); printf("\tDatum %d: Flash Period = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 6: printf("UPositionDatumType\n"); printf("\tDatum %d: U Position = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 7: printf("VPositionDatumType\n"); printf("\tDatum %d: V Position = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 8: printf("RotationDatumType\n"); printf("\tDatum %d: Rotation = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 9: printf("ColorDatumType\n"); Cigi_uint8 tRed,tGreen,tBlue,tAlpha; tRed = tGreen = tBlue = tAlpha = 0; InPckt->GetColorDatum(ndx,tRed,tGreen,tBlue,tAlpha); printf("\tDatum %d: Color:\n\t\t=> Red = %d\n\t\t=> Green = %d\n\t\t=> Blue = %d\n\t\t=> Alpha = %d\n", ndx,tRed,tGreen,tBlue,tAlpha); break; case 10: printf("ScaleUDatumType\n"); printf("\tDatum %d: U Scale = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 11: printf("ScaleVDatumType\n"); printf("\tDatum %d: V Scale = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; default: printf("\n"); break; } } } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XShortSymbolCtrlV3_3.h000066400000000000000000000012551210750432300235150ustar00rootroot00000000000000// XShortSymbolCtrlV3_3.h: interface for the XShortSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortSymbolCtrlV3_3_INCLUDED_) #define _PROC_XShortSymbolCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortSymbolCtrlV3_3.h" class XShortSymbolCtrlV3_3 : public CigiBaseEventProcessor { public: XShortSymbolCtrlV3_3(); virtual ~XShortSymbolCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortSymbolCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortSymbolCtrlV3_3 *TPckt; }; #endif // _PROC_XShortSymbolCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSpecEffDefV1.cpp000066400000000000000000000030471210750432300224450ustar00rootroot00000000000000// XSpecEffDefV1.cpp: Body of the XSpecEffDefV1 class. // ////////////////////////////////////////////////////////////////////// #include "XSpecEffDefV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSpecEffDefV1::XSpecEffDefV1() { } XSpecEffDefV1::~XSpecEffDefV1() { } void XSpecEffDefV1::OnPacketReceived(CigiBasePacket *Packet) { CigiSpecEffDefV1 *InPckt = (CigiSpecEffDefV1 *)Packet; bool ok = true; printf("Special Effect\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSequence Direction = %d : ",InPckt->GetSeqDir()); switch(InPckt->GetSeqDir()) { case 0: printf("Forward\n"); break; case 1: printf("Backward\n"); break; default: printf("\n"); break; } printf("\tColor Enable = %d\n",InPckt->GetColorEn()); printf("\tRed Component = %d\n",InPckt->GetRed()); printf("\tGreen Component = %d\n",InPckt->GetGreen()); printf("\tBlue Component = %d\n",InPckt->GetBlue()); printf("\tX Scale = %f\n",InPckt->GetXScale()); printf("\tY Scale = %f\n",InPckt->GetYScale()); printf("\tZ Scale = %f\n",InPckt->GetZScale()); printf("\tTime Scale = %f\n",InPckt->GetTimeScale()); printf("\tEffect Count = %d\n",InPckt->GetEffectCnt()); printf("\tSeperation = %f\n",InPckt->GetSeparation()); printf("\tBurst Rate = %f\n",InPckt->GetBurstRate()); printf("\tDuration = %f\n",InPckt->GetDuration()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSpecEffDefV1.h000066400000000000000000000011401210750432300221020ustar00rootroot00000000000000// XSpecEffDefV1.h: interface for the XSpecEffDefV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSpecEffDefV1_INCLUDED_) #define _PROC_XSpecEffDefV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSpecEffDefV1.h" class XSpecEffDefV1 : public CigiBaseEventProcessor { public: XSpecEffDefV1(); virtual ~XSpecEffDefV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSpecEffDefV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSpecEffDefV1 *TPckt; }; #endif // _PROC_XSpecEffDefV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSpecEffDefV2.cpp000066400000000000000000000030471210750432300224460ustar00rootroot00000000000000// XSpecEffDefV2.cpp: Body of the XSpecEffDefV2 class. // ////////////////////////////////////////////////////////////////////// #include "XSpecEffDefV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSpecEffDefV2::XSpecEffDefV2() { } XSpecEffDefV2::~XSpecEffDefV2() { } void XSpecEffDefV2::OnPacketReceived(CigiBasePacket *Packet) { CigiSpecEffDefV2 *InPckt = (CigiSpecEffDefV2 *)Packet; bool ok = true; printf("Special Effect\n"); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tSequence Direction = %d : ",InPckt->GetSeqDir()); switch(InPckt->GetSeqDir()) { case 0: printf("Forward\n"); break; case 1: printf("Backward\n"); break; default: printf("\n"); break; } printf("\tColor Enable = %d\n",InPckt->GetColorEn()); printf("\tRed Component = %d\n",InPckt->GetRed()); printf("\tGreen Component = %d\n",InPckt->GetGreen()); printf("\tBlue Component = %d\n",InPckt->GetBlue()); printf("\tX Scale = %f\n",InPckt->GetXScale()); printf("\tY Scale = %f\n",InPckt->GetYScale()); printf("\tZ Scale = %f\n",InPckt->GetZScale()); printf("\tTime Scale = %f\n",InPckt->GetTimeScale()); printf("\tEffect Count = %d\n",InPckt->GetEffectCnt()); printf("\tSeperation = %f\n",InPckt->GetSeparation()); printf("\tBurst Rate = %f\n",InPckt->GetBurstRate()); printf("\tDuration = %f\n",InPckt->GetDuration()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSpecEffDefV2.h000066400000000000000000000011401210750432300221030ustar00rootroot00000000000000// XSpecEffDefV2.h: interface for the XSpecEffDefV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSpecEffDefV2_INCLUDED_) #define _PROC_XSpecEffDefV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSpecEffDefV2.h" class XSpecEffDefV2 : public CigiBaseEventProcessor { public: XSpecEffDefV2(); virtual ~XSpecEffDefV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSpecEffDefV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSpecEffDefV2 *TPckt; }; #endif // _PROC_XSpecEffDefV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolCircleDefV3_3.cpp000066400000000000000000000033731210750432300237470ustar00rootroot00000000000000// XSymbolCircleDefV3_3.cpp: Body of the XSymbolCircleDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolCircleDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolCircleDefV3_3::XSymbolCircleDefV3_3() { } XSymbolCircleDefV3_3::~XSymbolCircleDefV3_3() { } void XSymbolCircleDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolCircleDefV3_3 *InPckt = (CigiSymbolCircleDefV3_3 *)Packet; printf("Symbol Circle Definition:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tDrawing Style = %d : ",InPckt->GetDrawingStyle()); switch(InPckt->GetDrawingStyle()) { case 0: printf("Line\n"); break; case 1: printf("Fill\n"); break; default: printf("\n"); break; } printf("\tStipple Pattern = %d\n",InPckt->GetStipplePattern()); printf("\tLine Width = %f\n",InPckt->GetLineWidth()); printf("\tStipple Pattern Length = %f\n",InPckt->GetStipplePatternLen()); // Circle Data int CircleCnt = InPckt->GetCircleCount(); int ndx = 0; for(ndx=0;ndxGetCircle(ndx); printf("\tCenter U Position = %f\n",Circle->GetCenterUPosition()); printf("\tCenter V Position = %f\n",Circle->GetCenterVPosition()); printf("\tRadius = %f\n",Circle->GetRadius()); printf("\tInner Radius = %f\n",Circle->GetInnerRadius()); printf("\tStart Angle = %f\n",Circle->GetStartAngle()); printf("\tEnd Angle = %f\n",Circle->GetEndAngle()); } } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolCircleDefV3_3.h000066400000000000000000000012551210750432300234110ustar00rootroot00000000000000// XSymbolCircleDefV3_3.h: interface for the XSymbolCircleDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolCircleDefV3_3_INCLUDED_) #define _PROC_XSymbolCircleDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolCircleDefV3_3.h" class XSymbolCircleDefV3_3 : public CigiBaseEventProcessor { public: XSymbolCircleDefV3_3(); virtual ~XSymbolCircleDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolCircleDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolCircleDefV3_3 *TPckt; }; #endif // _PROC_XSymbolCircleDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolCloneV3_3.cpp000066400000000000000000000017271210750432300231700ustar00rootroot00000000000000// XSymbolCloneV3_3.cpp: Body of the XSymbolCloneV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolCloneV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolCloneV3_3::XSymbolCloneV3_3() { } XSymbolCloneV3_3::~XSymbolCloneV3_3() { } void XSymbolCloneV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolCloneV3_3 *InPckt = (CigiSymbolCloneV3_3 *)Packet; printf("Symbol Clone:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tSource Type = %d : ",InPckt->GetSourceType()); switch(InPckt->GetSourceType()) { case 0: printf("Symbol\n"); break; case 1: printf("Symbol Template\n"); break; default: printf("\n"); break; } printf("\tSource ID = %d\n",InPckt->GetSourceID()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolCloneV3_3.h000066400000000000000000000012011210750432300226200ustar00rootroot00000000000000// XSymbolCloneV3_3.h: interface for the XSymbolCloneV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolCloneV3_3_INCLUDED_) #define _PROC_XSymbolCloneV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolCloneV3_3.h" class XSymbolCloneV3_3 : public CigiBaseEventProcessor { public: XSymbolCloneV3_3(); virtual ~XSymbolCloneV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolCloneV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolCloneV3_3 *TPckt; }; #endif // _PROC_XSymbolCloneV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolCtrlV3_3.cpp000066400000000000000000000047051210750432300230330ustar00rootroot00000000000000// XSymbolCtrlV3_3.cpp: Body of the XSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolCtrlV3_3::XSymbolCtrlV3_3() { } XSymbolCtrlV3_3::~XSymbolCtrlV3_3() { } void XSymbolCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolCtrlV3_3 *InPckt = (CigiSymbolCtrlV3_3 *)Packet; printf("Symbol Control:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tSymbol State = %d : ",InPckt->GetSymbolState()); switch(InPckt->GetSymbolState()) { case 0: printf("Hidden\n"); break; case 1: printf("Visible\n"); break; case 2: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tFlash Control = %d : ",InPckt->GetFlashCtrl()); switch(InPckt->GetFlashCtrl()) { case 0: printf("Continue\n"); break; case 1: printf("Reset\n"); break; default: printf("\n"); break; } printf("\tInherit Color = %d : ",InPckt->GetInheritColor()); switch(InPckt->GetInheritColor()) { case 0: printf("NotInherit\n"); break; case 1: printf("Inherit\n"); break; default: printf("\n"); break; } printf("\tParent ID = %d\n",InPckt->GetParentSymbolID()); printf("\tSurface ID = %d\n",InPckt->GetSurfaceID()); printf("\tLayer ID = %d\n",InPckt->GetLayer()); printf("\tFlash Duty Cycle percentage = %d\n",InPckt->GetFlashDutyCycle()); printf("\tFlash Period = %f\n",InPckt->GetFlashPeriod()); printf("\tU Position = %f\n",InPckt->GetUPosition()); printf("\tV Position = %f\n",InPckt->GetVPosition()); printf("\tRotation = %f\n",InPckt->GetRotation()); printf("\tRed = %d\n",InPckt->GetRed()); printf("\tGreen = %d\n",InPckt->GetGreen()); printf("\tBlue = %d\n",InPckt->GetBlue()); printf("\tAlpha = %d\n",InPckt->GetAlpha()); printf("\tU Scale = %f\n",InPckt->GetScaleU()); printf("\tV Scale = %f\n",InPckt->GetScaleV()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolCtrlV3_3.h000066400000000000000000000011661210750432300224760ustar00rootroot00000000000000// XSymbolCtrlV3_3.h: interface for the XSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolCtrlV3_3_INCLUDED_) #define _PROC_XSymbolCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolCtrlV3_3.h" class XSymbolCtrlV3_3 : public CigiBaseEventProcessor { public: XSymbolCtrlV3_3(); virtual ~XSymbolCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolCtrlV3_3 *TPckt; }; #endif // _PROC_XSymbolCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolLineDefV3_3.cpp000066400000000000000000000033501210750432300234300ustar00rootroot00000000000000// XSymbolLineDefV3_3.cpp: Body of the XSymbolLineDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolLineDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolLineDefV3_3::XSymbolLineDefV3_3() { } XSymbolLineDefV3_3::~XSymbolLineDefV3_3() { } void XSymbolLineDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolLineDefV3_3 *InPckt = (CigiSymbolLineDefV3_3 *)Packet; printf("Symbol Line Definition:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tDrawing Primitive = %d : ",InPckt->GetPrimitive()); switch(InPckt->GetPrimitive()) { case 0: printf("Points\n"); break; case 1: printf("Lines\n"); break; case 2: printf("LineStrip\n"); break; case 3: printf("LineLoop\n"); break; case 4: printf("Triangles\n"); break; case 5: printf("TriangleStrip\n"); break; case 6: printf("TriangleFan\n"); break; default: printf("\n"); break; } printf("\tStipple Pattern = %d\n",InPckt->GetStipplePattern()); printf("\tLine Width = %f\n",InPckt->GetLineWidth()); printf("\tStipple Pattern Length = %f\n",InPckt->GetStipplePatternLen()); // Circle Data int VtxCnt = InPckt->GetVertexCount(); int ndx = 0; for(ndx=0;ndxGetVertex(ndx); printf("\tVertex U Position = %f\n",Vtx->GetVertexU()); printf("\tVertex V Position = %f\n",Vtx->GetVertexV()); } } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolLineDefV3_3.h000066400000000000000000000012271210750432300230760ustar00rootroot00000000000000// XSymbolLineDefV3_3.h: interface for the XSymbolLineDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolLineDefV3_3_INCLUDED_) #define _PROC_XSymbolLineDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolLineDefV3_3.h" class XSymbolLineDefV3_3 : public CigiBaseEventProcessor { public: XSymbolLineDefV3_3(); virtual ~XSymbolLineDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolLineDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolLineDefV3_3 *TPckt; }; #endif // _PROC_XSymbolLineDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolSurfaceDefV3_3.cpp000066400000000000000000000056511210750432300241370ustar00rootroot00000000000000// XSymbolSurfaceDefV3_3.cpp: Body of the XSymbolSurfaceDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolSurfaceDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolSurfaceDefV3_3::XSymbolSurfaceDefV3_3() { } XSymbolSurfaceDefV3_3::~XSymbolSurfaceDefV3_3() { } void XSymbolSurfaceDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolSurfaceDefV3_3 *InPckt = (CigiSymbolSurfaceDefV3_3 *)Packet; printf("Symbol Surface Definition:\n"); printf("\tSurface ID = %d\n",InPckt->GetSurfaceID()); printf("\tSurface State = %d : ",InPckt->GetSurfaceState()); switch(InPckt->GetSurfaceState()) { case 0: printf("Active\n"); break; case 1: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttached()); switch(InPckt->GetAttached()) { case 0: printf("EntityAttached\n"); break; case 1: printf("ViewAttached\n"); break; default: printf("\n"); break; } printf("\tBillBoard State = %d : ",InPckt->GetBillboardState()); switch(InPckt->GetBillboardState()) { case 0: printf("NotBillboard\n"); break; case 1: printf("Billboard\n"); break; default: printf("\n"); break; } printf("\tPerspective Growth = %d : ",InPckt->GetPerspectiveGrowth()); switch(InPckt->GetPerspectiveGrowth()) { case 0: printf("Disable\n"); break; case 1: printf("Enable\n"); break; default: printf("\n"); break; } if(InPckt->GetAttached() == CigiBaseSymbolSurfaceDef::EntityAttached) { printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset = %f\n",InPckt->GetXOffset()); printf("\tY Offset = %f\n",InPckt->GetYOffset()); printf("\tZ Offset = %f\n",InPckt->GetZOffset()); printf("\tYaw = %f\n",InPckt->GetYaw()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tWidth = %f\n",InPckt->GetWidth()); printf("\tHeight = %f\n",InPckt->GetHeight()); } else { printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tLeft Edge Position = %f\n",InPckt->GetLeftEdgePosition()); printf("\tRight Edge Position = %f\n",InPckt->GetRightEdgePosition()); printf("\tTop Edge Position = %f\n",InPckt->GetTopEdgePosition()); printf("\tBottom Edge Position = %f\n",InPckt->GetBottomEdgePosition()); } printf("\tMinimum U Coordinate = %f\n",InPckt->GetMinU()); printf("\tMaximum U Coordinate = %f\n",InPckt->GetMaxU()); printf("\tMinimum V Coordinate = %f\n",InPckt->GetMinV()); printf("\tMaximum V Coordinate = %f\n",InPckt->GetMaxV()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolSurfaceDefV3_3.h000066400000000000000000000012701210750432300235750ustar00rootroot00000000000000// XSymbolSurfaceDefV3_3.h: interface for the XSymbolSurfaceDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolSurfaceDefV3_3_INCLUDED_) #define _PROC_XSymbolSurfaceDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolSurfaceDefV3_3.h" class XSymbolSurfaceDefV3_3 : public CigiBaseEventProcessor { public: XSymbolSurfaceDefV3_3(); virtual ~XSymbolSurfaceDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolSurfaceDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolSurfaceDefV3_3 *TPckt; }; #endif // _PROC_XSymbolSurfaceDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolTextDefV3_3.cpp000066400000000000000000000035201210750432300234640ustar00rootroot00000000000000// XSymbolTextDefV3_3.cpp: Body of the XSymbolTextDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolTextDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolTextDefV3_3::XSymbolTextDefV3_3() { } XSymbolTextDefV3_3::~XSymbolTextDefV3_3() { } void XSymbolTextDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolTextDefV3_3 *InPckt = (CigiSymbolTextDefV3_3 *)Packet; printf("Symbol Text Definition:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tAlignment State = %d : ",InPckt->GetAlignment()); switch(InPckt->GetAlignment()) { case 0: printf("TopLeft\n"); break; case 1: printf("TopCenter\n"); break; case 2: printf("TopRight\n"); break; case 3: printf("CenterLeft\n"); break; case 4: printf("Center\n"); break; case 5: printf("CenterRight\n"); break; case 6: printf("BottomLeft\n"); break; case 7: printf("BottomCenter\n"); break; case 8: printf("BottomRight\n"); break; default: printf("\n"); break; } printf("\tOrientation State = %d : ",InPckt->GetOrientation()); switch(InPckt->GetOrientation()) { case 0: printf("LeftToRight\n"); break; case 1: printf("TopToBottom\n"); break; case 2: printf("RightToLeft\n"); break; case 3: printf("BottomToTop\n"); break; default: printf("\n"); break; } printf("\tFont ID = %d\n",InPckt->GetFontID()); printf("\tFont Size = %f\n",InPckt->GetFontSize()); printf("\tText = %s\n",(InPckt->GetText()).c_str()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XSymbolTextDefV3_3.h000066400000000000000000000012271210750432300231330ustar00rootroot00000000000000// XSymbolTextDefV3_3.h: interface for the XSymbolTextDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolTextDefV3_3_INCLUDED_) #define _PROC_XSymbolTextDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolTextDefV3_3.h" class XSymbolTextDefV3_3 : public CigiBaseEventProcessor { public: XSymbolTextDefV3_3(); virtual ~XSymbolTextDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolTextDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolTextDefV3_3 *TPckt; }; #endif // _PROC_XSymbolTextDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTerrestrialSurfaceCtrlV3.cpp000066400000000000000000000024541210750432300251540ustar00rootroot00000000000000// XTerrestrialSurfaceCtrlV3.cpp: Body of the XTerrestrialSurfaceCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XTerrestrialSurfaceCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTerrestrialSurfaceCtrlV3::XTerrestrialSurfaceCtrlV3() { } XTerrestrialSurfaceCtrlV3::~XTerrestrialSurfaceCtrlV3() { } void XTerrestrialSurfaceCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiTerrestrialSurfaceCtrlV3 *InPckt = (CigiTerrestrialSurfaceCtrlV3 *)Packet; printf("Terrestrial Surface Control:\n"); printf("\tEntity Region ID = %d\n",InPckt->GetEntityRgnID()); printf("\tSurface Condition ID = %d\n",InPckt->GetSurfaceCondID()); printf("\tSurface Condition Enable = %d\n",InPckt->GetSurfaceCondEn()); printf("\tScope = %d : ",InPckt->GetScope()); switch(InPckt->GetScope()) { case 0: printf("Global\n"); break; case 1: printf("Regional\n"); break; case 2: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tSeverity = %d\n",InPckt->GetSeverity()); printf("\tCoverage = %d\n",InPckt->GetCoverage()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTerrestrialSurfaceCtrlV3.h000066400000000000000000000013441210750432300246160ustar00rootroot00000000000000// XTerrestrialSurfaceCtrlV3.h: interface for the XTerrestrialSurfaceCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTerrestrialSurfaceCtrlV3_INCLUDED_) #define _PROC_XTerrestrialSurfaceCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTerrestrialSurfaceCtrlV3.h" class XTerrestrialSurfaceCtrlV3 : public CigiBaseEventProcessor { public: XTerrestrialSurfaceCtrlV3(); virtual ~XTerrestrialSurfaceCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTerrestrialSurfaceCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTerrestrialSurfaceCtrlV3 *TPckt; }; #endif // _PROC_XTerrestrialSurfaceCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTrajectoryV1.cpp000066400000000000000000000017161210750432300226420ustar00rootroot00000000000000// XTrajectoryV1.cpp: Body of the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #include "XTrajectoryV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTrajectoryV1::XTrajectoryV1() { } XTrajectoryV1::~XTrajectoryV1() { } void XTrajectoryV1::OnPacketReceived(CigiBasePacket *Packet) { CigiTrajectoryDefV1 *InPckt = (CigiTrajectoryDefV1 *)Packet; printf("Trajectory:\n"); printf("\tEntityID = %d\n",InPckt->GetEntityID()); printf("\tAcceleration = %f\n",InPckt->GetAccel()); printf("\tRetardation Rate = %f\n",InPckt->GetRetardationRate()); printf("\tTerminal Velocity = %f\n",InPckt->GetTermVel()); printf("\tX Offset = %f\n",InPckt->GetXoff()); printf("\tY Offset = %f\n",InPckt->GetYoff()); printf("\tZ Offset = %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTrajectoryV1.h000066400000000000000000000011471210750432300223050ustar00rootroot00000000000000// XTrajectoryV1.h: interface for the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTrajectoryV1_INCLUDED_) #define _PROC_XTrajectoryV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTrajectoryDefV1.h" class XTrajectoryV1 : public CigiBaseEventProcessor { public: XTrajectoryV1(); virtual ~XTrajectoryV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTrajectoryDefV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTrajectoryDefV1 *TPckt; }; #endif // _PROC_XTrajectoryV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTrajectoryV2.cpp000066400000000000000000000014701210750432300226400ustar00rootroot00000000000000// XTrajectoryV2.cpp: Body of the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #include "XTrajectoryV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTrajectoryV2::XTrajectoryV2() { } XTrajectoryV2::~XTrajectoryV2() { } void XTrajectoryV2::OnPacketReceived(CigiBasePacket *Packet) { CigiTrajectoryDefV2 *InPckt = (CigiTrajectoryDefV2 *)Packet; printf("Trajectory:\n"); printf("\tEntityID = %d\n",InPckt->GetEntityID()); printf("\tAcceleration = %f\n",InPckt->GetAccel()); printf("\tRetardation Rate = %f\n",InPckt->GetRetardationRate()); printf("\tTerminal Velocity = %f\n",InPckt->GetTermVel()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTrajectoryV2.h000066400000000000000000000011471210750432300223060ustar00rootroot00000000000000// XTrajectoryV2.h: interface for the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTrajectoryV2_INCLUDED_) #define _PROC_XTrajectoryV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTrajectoryDefV2.h" class XTrajectoryV2 : public CigiBaseEventProcessor { public: XTrajectoryV2(); virtual ~XTrajectoryV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTrajectoryDefV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTrajectoryDefV2 *TPckt; }; #endif // _PROC_XTrajectoryV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTrajectoryV3.cpp000066400000000000000000000016571210750432300226500ustar00rootroot00000000000000// XTrajectoryV3.cpp: Body of the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #include "XTrajectoryV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTrajectoryV3::XTrajectoryV3() { } XTrajectoryV3::~XTrajectoryV3() { } void XTrajectoryV3::OnPacketReceived(CigiBasePacket *Packet) { CigiTrajectoryDefV3 *InPckt = (CigiTrajectoryDefV3 *)Packet; printf("Trajectory:\n"); printf("\tEntityID = %d\n",InPckt->GetEntityID()); printf("\tX Acceleration = %f\n",InPckt->GetAccelX()); printf("\tY Acceleration = %f\n",InPckt->GetAccelY()); printf("\tZ Acceleration = %f\n",InPckt->GetAccelZ()); printf("\tRetardation Rate = %f\n",InPckt->GetRetardationRate()); printf("\tTerminal Velocity = %f\n",InPckt->GetTermVel()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XTrajectoryV3.h000066400000000000000000000011471210750432300223070ustar00rootroot00000000000000// XTrajectoryV3.h: interface for the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTrajectoryV3_INCLUDED_) #define _PROC_XTrajectoryV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTrajectoryDefV3.h" class XTrajectoryV3 : public CigiBaseEventProcessor { public: XTrajectoryV3(); virtual ~XTrajectoryV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTrajectoryDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTrajectoryDefV3 *TPckt; }; #endif // _PROC_XTrajectoryV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewCtrlV1.cpp000066400000000000000000000017551210750432300222560ustar00rootroot00000000000000// XViewCtrlV1.cpp: Body of the XViewCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XViewCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewCtrlV1::XViewCtrlV1() { } XViewCtrlV1::~XViewCtrlV1() { } void XViewCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiViewCtrlV1 *InPckt = (CigiViewCtrlV1 *)Packet; printf("View Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tGroup ID = %d\n",InPckt->GetGroupID()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset = %f\n",InPckt->GetXOff()); printf("\tY Offset = %f\n",InPckt->GetYOff()); printf("\tZ Offset = %f\n",InPckt->GetZOff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewCtrlV1.h000066400000000000000000000011121210750432300217060ustar00rootroot00000000000000// XViewCtrlV1.h: interface for the XViewCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewCtrlV1_INCLUDED_) #define _PROC_XViewCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewCtrlV1.h" class XViewCtrlV1 : public CigiBaseEventProcessor { public: XViewCtrlV1(); virtual ~XViewCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewCtrlV3 *TPckt; }; #endif // _PROC_XViewCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewCtrlV2.cpp000066400000000000000000000025061210750432300222520ustar00rootroot00000000000000// XViewCtrlV2.cpp: Body of the XViewCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XViewCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewCtrlV2::XViewCtrlV2() { } XViewCtrlV2::~XViewCtrlV2() { } void XViewCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiViewCtrlV2 *InPckt = (CigiViewCtrlV2 *)Packet; printf("View Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tGroup ID = %d\n",InPckt->GetGroupID()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset Enable = %d\n",InPckt->GetXOffEn()); printf("\tY Offset Enable = %d\n",InPckt->GetYOffEn()); printf("\tZ Offset Enable = %d\n",InPckt->GetZOffEn()); printf("\tRoll Enable = %d\n",InPckt->GetRollEn()); printf("\tPitch Enable = %d\n",InPckt->GetPitchEn()); printf("\tYaw Enable = %d\n",InPckt->GetYawEn()); printf("\tX Offset = %f\n",InPckt->GetXOff()); printf("\tY Offset = %f\n",InPckt->GetYOff()); printf("\tZ Offset = %f\n",InPckt->GetZOff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewCtrlV2.h000066400000000000000000000011121210750432300217070ustar00rootroot00000000000000// XViewCtrlV2.h: interface for the XViewCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewCtrlV2_INCLUDED_) #define _PROC_XViewCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewCtrlV2.h" class XViewCtrlV2 : public CigiBaseEventProcessor { public: XViewCtrlV2(); virtual ~XViewCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewCtrlV3 *TPckt; }; #endif // _PROC_XViewCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewCtrlV3.cpp000066400000000000000000000025031210750432300222500ustar00rootroot00000000000000// XViewCtrlV3.cpp: Body of the XViewCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XViewCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewCtrlV3::XViewCtrlV3() { } XViewCtrlV3::~XViewCtrlV3() { } void XViewCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiViewCtrlV3 *InPckt = (CigiViewCtrlV3 *)Packet; printf("View Control:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tGroup ID = %d\n",InPckt->GetGroupID()); printf("\tX Offset Enable = %d\n",InPckt->GetXOffEn()); printf("\tY Offset Enable = %d\n",InPckt->GetYOffEn()); printf("\tZ Offset Enable = %d\n",InPckt->GetZOffEn()); printf("\tRoll Enable = %d\n",InPckt->GetRollEn()); printf("\tPitch Enable = %d\n",InPckt->GetPitchEn()); printf("\tYaw Enable = %d\n",InPckt->GetYawEn()); printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset = %f\n",InPckt->GetXOff()); printf("\tY Offset = %f\n",InPckt->GetYOff()); printf("\tZ Offset = %f\n",InPckt->GetZOff()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tYaw = %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewCtrlV3.h000066400000000000000000000011121210750432300217100ustar00rootroot00000000000000// XViewCtrlV3.h: interface for the XViewCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewCtrlV3_INCLUDED_) #define _PROC_XViewCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewCtrlV3.h" class XViewCtrlV3 : public CigiBaseEventProcessor { public: XViewCtrlV3(); virtual ~XViewCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewCtrlV3 *TPckt; }; #endif // _PROC_XViewCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewDefV1.cpp000066400000000000000000000042071210750432300220430ustar00rootroot00000000000000// XViewDefV1.cpp: Body of the XViewDefV1 class. // ////////////////////////////////////////////////////////////////////// #include "XViewDefV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewDefV1::XViewDefV1() { } XViewDefV1::~XViewDefV1() { } void XViewDefV1::OnPacketReceived(CigiBasePacket *Packet) { CigiViewDefV1 *InPckt = (CigiViewDefV1 *)Packet; printf("View Definition:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tGroup ID = %d\n",InPckt->GetGroupID()); printf("\tView Type = %d\n",InPckt->GetViewType()); printf("\tReplicate Mode = %d : ",InPckt->GetPixelReplicateMode()); switch(InPckt->GetPixelReplicateMode()) { case 0: printf("ReplicateNone\n"); break; case 1: printf("Replicate1x2\n"); break; case 2: printf("Replicate2x1\n"); break; case 3: printf("Replicate2x2\n"); break; case 4: printf("ReplicateDefA\n"); break; case 5: printf("ReplicateDefB\n"); break; case 6: printf("ReplicateDefC\n"); break; case 7: printf("ReplicateDefD\n"); break; default: printf("\n"); break; } printf("\tMirror Mode = %d : ",InPckt->GetMirrorMode()); switch(InPckt->GetMirrorMode()) { case 0: printf("MirrorNone\n"); break; case 1: printf("Horizontal\n"); break; case 2: printf("Vertical\n"); break; case 3: printf("Horiz_Vert\n"); break; default: printf("\n"); break; } printf("\tTracker Assigned = %d\n",InPckt->GetTrackerAssigned()); printf("\tNear FOV Clipping Plane = %f\n",InPckt->GetFOVNear()); printf("\tFar FOV Clipping Plane = %f\n",InPckt->GetFOVFar()); printf("\tLeft FOV Clipping Plane = %f\n",InPckt->GetFOVLeft()); printf("\tRight FOV Clipping Plane = %f\n",InPckt->GetFOVRight()); printf("\tTop FOV Clipping Plane = %f\n",InPckt->GetFOVTop()); printf("\tBottom FOV Clipping Plane = %f\n",InPckt->GetFOVBottom()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewDefV1.h000066400000000000000000000010751210750432300215100ustar00rootroot00000000000000// XViewDefV1.h: interface for the XViewDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewDefV1_INCLUDED_) #define _PROC_XViewDefV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewDefV1.h" class XViewDefV1 : public CigiBaseEventProcessor { public: XViewDefV1(); virtual ~XViewDefV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewDefV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewDefV1 *TPckt; }; #endif // _PROC_XViewDefV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewDefV2.cpp000066400000000000000000000051261210750432300220450ustar00rootroot00000000000000// XViewDefV2.cpp: Body of the XViewDefV2 class. // ////////////////////////////////////////////////////////////////////// #include "XViewDefV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewDefV2::XViewDefV2() { } XViewDefV2::~XViewDefV2() { } void XViewDefV2::OnPacketReceived(CigiBasePacket *Packet) { CigiViewDefV2 *InPckt = (CigiViewDefV2 *)Packet; printf("View Definition:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tGroup ID = %d\n",InPckt->GetGroupID()); printf("\tView Type = %d\n",InPckt->GetViewType()); printf("\tReplicate Mode = %d : ",InPckt->GetPixelReplicateMode()); switch(InPckt->GetPixelReplicateMode()) { case 0: printf("ReplicateNone\n"); break; case 1: printf("Replicate1x2\n"); break; case 2: printf("Replicate2x1\n"); break; case 3: printf("Replicate2x2\n"); break; case 4: printf("ReplicateDefA\n"); break; case 5: printf("ReplicateDefB\n"); break; case 6: printf("ReplicateDefC\n"); break; case 7: printf("ReplicateDefD\n"); break; default: printf("\n"); break; } printf("\tMirror Mode = %d : ",InPckt->GetMirrorMode()); switch(InPckt->GetMirrorMode()) { case 0: printf("MirrorNone\n"); break; case 1: printf("Horizontal\n"); break; case 2: printf("Vertical\n"); break; case 3: printf("Horiz_Vert\n"); break; default: printf("\n"); break; } printf("\tTracker Assigned = %d\n",InPckt->GetTrackerAssigned()); printf("\tNear FOV Clipping Plane Enable = %d\n",InPckt->GetFOVNearEn()); printf("\tFar FOV Clipping Plane Enable = %d\n",InPckt->GetFOVFarEn()); printf("\tLeft FOV Clipping Plane Enable = %d\n",InPckt->GetFOVLeftEn()); printf("\tRight FOV Clipping Plane Enable = %d\n",InPckt->GetFOVRightEn()); printf("\tTop FOV Clipping Plane Enable = %d\n",InPckt->GetFOVTopEn()); printf("\tBottom FOV Clipping Plane Enable = %d\n",InPckt->GetFOVBottomEn()); printf("\tNear FOV Clipping Plane = %f\n",InPckt->GetFOVNear()); printf("\tFar FOV Clipping Plane = %f\n",InPckt->GetFOVFar()); printf("\tLeft FOV Clipping Plane = %f\n",InPckt->GetFOVLeft()); printf("\tRight FOV Clipping Plane = %f\n",InPckt->GetFOVRight()); printf("\tTop FOV Clipping Plane = %f\n",InPckt->GetFOVTop()); printf("\tBottom FOV Clipping Plane = %f\n",InPckt->GetFOVBottom()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewDefV2.h000066400000000000000000000010751210750432300215110ustar00rootroot00000000000000// XViewDefV2.h: interface for the XViewDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewDefV2_INCLUDED_) #define _PROC_XViewDefV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewDefV2.h" class XViewDefV2 : public CigiBaseEventProcessor { public: XViewDefV2(); virtual ~XViewDefV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewDefV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewDefV2 *TPckt; }; #endif // _PROC_XViewDefV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewDefV3.cpp000066400000000000000000000055271210750432300220530ustar00rootroot00000000000000// XViewDefV3.cpp: Body of the XViewDefV3 class. // ////////////////////////////////////////////////////////////////////// #include "XViewDefV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewDefV3::XViewDefV3() { } XViewDefV3::~XViewDefV3() { } void XViewDefV3::OnPacketReceived(CigiBasePacket *Packet) { CigiViewDefV3 *InPckt = (CigiViewDefV3 *)Packet; printf("View Definition:\n"); printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tGroup ID = %d\n",InPckt->GetGroupID()); printf("\tNear FOV Clipping Plane Enable = %d\n",InPckt->GetFOVNearEn()); printf("\tFar FOV Clipping Plane Enable = %d\n",InPckt->GetFOVFarEn()); printf("\tLeft FOV Clipping Plane Enable = %d\n",InPckt->GetFOVLeftEn()); printf("\tRight FOV Clipping Plane Enable = %d\n",InPckt->GetFOVRightEn()); printf("\tTop FOV Clipping Plane Enable = %d\n",InPckt->GetFOVTopEn()); printf("\tBottom FOV Clipping Plane Enable = %d\n",InPckt->GetFOVBottomEn()); printf("\tMirror Mode = %d : ",InPckt->GetMirrorMode()); switch(InPckt->GetMirrorMode()) { case 0: printf("MirrorNone\n"); break; case 1: printf("Horizontal\n"); break; case 2: printf("Vertical\n"); break; case 3: printf("Horiz_Vert\n"); break; default: printf("\n"); break; } printf("\tReplicate Mode = %d : ",InPckt->GetPixelReplicateMode()); switch(InPckt->GetPixelReplicateMode()) { case 0: printf("ReplicateNone\n"); break; case 1: printf("Replicate1x2\n"); break; case 2: printf("Replicate2x1\n"); break; case 3: printf("Replicate2x2\n"); break; case 4: printf("ReplicateDefA\n"); break; case 5: printf("ReplicateDefB\n"); break; case 6: printf("ReplicateDefC\n"); break; case 7: printf("ReplicateDefD\n"); break; default: printf("\n"); break; } printf("\tProjection Type = %d : ",InPckt->GetProjectionType()); switch(InPckt->GetProjectionType()) { case 0: printf("Perspective\n"); break; case 1: printf("Orthographic\n"); break; default: printf("\n"); break; } printf("\tReorder = %d\n",InPckt->GetReorder()); printf("\tView Type = %d\n",InPckt->GetViewType()); printf("\tNear FOV Clipping Plane = %f\n",InPckt->GetFOVNear()); printf("\tFar FOV Clipping Plane = %f\n",InPckt->GetFOVFar()); printf("\tLeft FOV Clipping Plane = %f\n",InPckt->GetFOVLeft()); printf("\tRight FOV Clipping Plane = %f\n",InPckt->GetFOVRight()); printf("\tTop FOV Clipping Plane = %f\n",InPckt->GetFOVTop()); printf("\tBottom FOV Clipping Plane = %f\n",InPckt->GetFOVBottom()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XViewDefV3.h000066400000000000000000000010751210750432300215120ustar00rootroot00000000000000// XViewDefV3.h: interface for the XViewDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewDefV3_INCLUDED_) #define _PROC_XViewDefV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewDefV3.h" class XViewDefV3 : public CigiBaseEventProcessor { public: XViewDefV3(); virtual ~XViewDefV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewDefV3 *TPckt; }; #endif // _PROC_XViewDefV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWaveCtrlV3.cpp000066400000000000000000000031531210750432300222420ustar00rootroot00000000000000// XWaveCtrlV3.cpp: Body of the XWaveCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XWaveCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWaveCtrlV3::XWaveCtrlV3() { } XWaveCtrlV3::~XWaveCtrlV3() { } void XWaveCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiWaveCtrlV3 *InPckt = (CigiWaveCtrlV3 *)Packet; printf("Wave Control:\n"); printf("\tEntity Region ID = %d\n",InPckt->GetEntityRgnID()); printf("\tWave ID = %d\n",InPckt->GetWaveID()); printf("\tWave Enable = %d\n",InPckt->GetWaveEn()); printf("\tScope = %d : ",InPckt->GetScope()); switch(InPckt->GetScope()) { case 0: printf("Global\n"); break; case 1: printf("Regional\n"); break; case 2: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tBreaker = %d : ",InPckt->GetBreaker()); switch(InPckt->GetBreaker()) { case 0: printf("Plunging\n"); break; case 1: printf("Spilling\n"); break; case 2: printf("Surging\n"); break; default: printf("\n"); break; } printf("\tWave Height = %f\n",InPckt->GetWaveHt()); printf("\tWavelength = %f\n",InPckt->GetWaveLen()); printf("\tPeriod = %f\n",InPckt->GetPeriod()); printf("\tDirection = %f\n",InPckt->GetDirection()); printf("\tPhase Offset = %f\n",InPckt->GetPhaseOff()); printf("\tLeading = %f\n",InPckt->GetLeading()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWaveCtrlV3.h000066400000000000000000000011121210750432300217000ustar00rootroot00000000000000// XWaveCtrlV3.h: interface for the XWaveCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWaveCtrlV3_INCLUDED_) #define _PROC_XWaveCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWaveCtrlV3.h" class XWaveCtrlV3 : public CigiBaseEventProcessor { public: XWaveCtrlV3(); virtual ~XWaveCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWaveCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWaveCtrlV3 *TPckt; }; #endif // _PROC_XWaveCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWeatherCtrlV1.cpp000066400000000000000000000027061210750432300227400ustar00rootroot00000000000000// XWeatherCtrlV1.cpp: Body of the XWeatherCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #include "XWeatherCtrlV1.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWeatherCtrlV1::XWeatherCtrlV1() { } XWeatherCtrlV1::~XWeatherCtrlV1() { } void XWeatherCtrlV1::OnPacketReceived(CigiBasePacket *Packet) { CigiWeatherCtrlV1 *InPckt = (CigiWeatherCtrlV1 *)Packet; printf("Weather Control:\n"); printf("\tID = %d\n",InPckt->GetEntityID()); printf("\tWeather Enable = %d\n",InPckt->GetWeatherEn()); printf("\tScud Enable = %d\n",InPckt->GetScudEn()); printf("\tRandom Winds Enable = %d\n",InPckt->GetRandomWindsEn()); printf("\tSeverity = %d\n",InPckt->GetSeverity()); printf("\tPhenomenon Type = %d\n",InPckt->GetPhenomenonType()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tOpacity = %f\n",InPckt->GetOpacity()); printf("\tScud Frequency = %f\n",InPckt->GetScudFreq()); printf("\tCoverage = %f\n",InPckt->GetCoverage()); printf("\tBase Elevation = %f\n",InPckt->GetBaseElev()); printf("\tThickness = %f\n",InPckt->GetThickness()); printf("\tTransition = %f\n",InPckt->GetTransition()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWeatherCtrlV1.h000066400000000000000000000011531210750432300224000ustar00rootroot00000000000000// XWeatherCtrlV1.h: interface for the XWeatherCtrlV1 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWeatherCtrlV1_INCLUDED_) #define _PROC_XWeatherCtrlV1_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWeatherCtrlV1.h" class XWeatherCtrlV1 : public CigiBaseEventProcessor { public: XWeatherCtrlV1(); virtual ~XWeatherCtrlV1(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWeatherCtrlV1 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWeatherCtrlV1 *TPckt; }; #endif // _PROC_XWeatherCtrlV1_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWeatherCtrlV2.cpp000066400000000000000000000027061210750432300227410ustar00rootroot00000000000000// XWeatherCtrlV2.cpp: Body of the XWeatherCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #include "XWeatherCtrlV2.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWeatherCtrlV2::XWeatherCtrlV2() { } XWeatherCtrlV2::~XWeatherCtrlV2() { } void XWeatherCtrlV2::OnPacketReceived(CigiBasePacket *Packet) { CigiWeatherCtrlV2 *InPckt = (CigiWeatherCtrlV2 *)Packet; printf("Weather Control:\n"); printf("\tID = %d\n",InPckt->GetEntityID()); printf("\tWeather Enable = %d\n",InPckt->GetWeatherEn()); printf("\tScud Enable = %d\n",InPckt->GetScudEn()); printf("\tRandom Winds Enable = %d\n",InPckt->GetRandomWindsEn()); printf("\tSeverity = %d\n",InPckt->GetSeverity()); printf("\tPhenomenon Type = %d\n",InPckt->GetPhenomenonType()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tOpacity = %f\n",InPckt->GetOpacity()); printf("\tScud Frequency = %f\n",InPckt->GetScudFreq()); printf("\tCoverage = %f\n",InPckt->GetCoverage()); printf("\tBase Elevation = %f\n",InPckt->GetBaseElev()); printf("\tThickness = %f\n",InPckt->GetThickness()); printf("\tTransition = %f\n",InPckt->GetTransition()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWeatherCtrlV2.h000066400000000000000000000011531210750432300224010ustar00rootroot00000000000000// XWeatherCtrlV2.h: interface for the XWeatherCtrlV2 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWeatherCtrlV2_INCLUDED_) #define _PROC_XWeatherCtrlV2_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWeatherCtrlV2.h" class XWeatherCtrlV2 : public CigiBaseEventProcessor { public: XWeatherCtrlV2(); virtual ~XWeatherCtrlV2(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWeatherCtrlV2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWeatherCtrlV2 *TPckt; }; #endif // _PROC_XWeatherCtrlV2_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWeatherCtrlV3.cpp000066400000000000000000000057771210750432300227550ustar00rootroot00000000000000// XWeatherCtrlV3.cpp: Body of the XWeatherCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #include "XWeatherCtrlV3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWeatherCtrlV3::XWeatherCtrlV3() { } XWeatherCtrlV3::~XWeatherCtrlV3() { } void XWeatherCtrlV3::OnPacketReceived(CigiBasePacket *Packet) { CigiWeatherCtrlV3 *InPckt = (CigiWeatherCtrlV3 *)Packet; printf("Weather Control:\n"); printf("\tID = %d\n",InPckt->GetEntityID()); printf("\tLayer ID = %d\n",InPckt->GetLayerID()); printf("\tHumidity = %d\n",InPckt->GetHumidity()); printf("\tWeather Enable = %d\n",InPckt->GetWeatherEn()); printf("\tScud Enable = %d\n",InPckt->GetScudEn()); printf("\tRandom Winds Enable = %d\n",InPckt->GetRandomWindsEn()); printf("\tRandom Lightning Enable = %d\n",InPckt->GetRandomLightningEn()); printf("\tCloud Type = %d : ",InPckt->GetCloudType()); switch(InPckt->GetCloudType()) { case 0: printf("None\n"); break; case 1: printf("Altocumulus\n"); break; case 2: printf("Altostratus\n"); break; case 3: printf("Cirrocumulus\n"); break; case 4: printf("Cirrostratus\n"); break; case 5: printf("Cirrus\n"); break; case 6: printf("Cumulonimbus\n"); break; case 7: printf("Cumulus\n"); break; case 8: printf("Nimbostratus\n"); break; case 9: printf("Stratocumulus\n"); break; case 10: printf("Stratus\n"); break; case 11: printf("DefA\n"); break; case 12: printf("DefB\n"); break; case 13: printf("DefC\n"); break; case 14: printf("DefD\n"); break; case 15: printf("DefE\n"); break; default: printf("\n"); break; } printf("\tScope = %d : ",InPckt->GetScope()); switch(InPckt->GetScope()) { case 0: printf("Global\n"); break; case 1: printf("Regional\n"); break; case 2: printf("Entity\n"); break; default: printf("\n"); break; } printf("\tSeverity = %d\n",InPckt->GetSeverity()); printf("\tAir Temperature = %f\n",InPckt->GetAirTemp()); printf("\tVisibility Range = %f\n",InPckt->GetVisibilityRng()); printf("\tScud Frequency = %f\n",InPckt->GetScudFreq()); printf("\tCoverage = %f\n",InPckt->GetCoverage()); printf("\tBase Elevation = %f\n",InPckt->GetBaseElev()); printf("\tThickness = %f\n",InPckt->GetThickness()); printf("\tTransition = %f\n",InPckt->GetTransition()); printf("\tHorizontal Wind Speed = %f\n",InPckt->GetHorizWindSp()); printf("\tVertical Wind Speed = %f\n",InPckt->GetVertWindSp()); printf("\tWind Direction = %f\n",InPckt->GetWindDir()); printf("\tBarometric Pressure = %f\n",InPckt->GetBaroPress()); printf("\tAerosol = %f\n",InPckt->GetAerosol()); } cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/XWeatherCtrlV3.h000066400000000000000000000011531210750432300224020ustar00rootroot00000000000000// XWeatherCtrlV3.h: interface for the XWeatherCtrlV3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWeatherCtrlV3_INCLUDED_) #define _PROC_XWeatherCtrlV3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWeatherCtrlV3.h" class XWeatherCtrlV3 : public CigiBaseEventProcessor { public: XWeatherCtrlV3(); virtual ~XWeatherCtrlV3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWeatherCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWeatherCtrlV3 *TPckt; }; #endif // _PROC_XWeatherCtrlV3_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/stdafx.cpp000066400000000000000000000004371210750432300214450ustar00rootroot00000000000000// stdafx.cpp : source file that includes just the standard includes // IgRcvCcl.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file cigi-ccl-3.3.3a+svn818/Testing/IgRcvCcl/stdafx.h000066400000000000000000000004311210750432300211040ustar00rootroot00000000000000// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include #include // TODO: reference additional headers your program requires here cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/000077500000000000000000000000001210750432300176035ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/AllCigi.h000066400000000000000000000004231210750432300212570ustar00rootroot00000000000000#include "CigiAllPackets.h" #include "CigiErrorCodes.h" #include "CigiException.h" #include "CigiExceptions.h" #include "CigiOutgoingMsg.h" #include "CigiHostSession.h" #include "CigiIGSession.h" #include "CigiIncomingMsg.h" #include "CigiSwapping.h" #include "CigiIO.h" cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/DefaultProc.cpp000066400000000000000000000023341210750432300225210ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "DefaultProc.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::DefaultProc() { } // ================================================ // ~DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::~DefaultProc() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void DefaultProc::OnPacketReceived(CigiBasePacket *Packet) { } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/DefaultProc.h000066400000000000000000000027011210750432300221640ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *   for the LCPS
 *  
 *  FILENAME:   DefaultProc.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    LCPS
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) #define _DEFAULT_PACKET_PROCESSING_INCLUDED_ #include using namespace std; //========================================================= //! The base class for the SOF Event Packet Processing //! class DefaultProc : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! DefaultProc(); //========================================================= //! General Destructor //! virtual ~DefaultProc(); //==> Incoming Packet Processing //========================================================= //! The callback handler for the CIGI SOF packet //! \param Packet - The pointer to the SOF packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/IgSendCcl.cpp000066400000000000000000000302741210750432300221100ustar00rootroot00000000000000/**
 *  The CIGI IG tester
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   IgSendCcl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This contains the code needed to run the IG side CIGI
 *   communications tester.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  12/21/2007 Greg Basler                       MPV_CR_DR_1
 *  Initial Release.
 * 
* The Boeing Company * 1.0 */ #include "Network.h" // network includes winsock2.h which must be included before windows.h // Tiny XML includes #define TINYXML_USE_STL #define TIXML_USE_STL #include #include // CIGI related includes // From CCL #include #include #include #include #include #include #include #include #include #include // Test Includes #include "OutputProc3.h" #include "OutputProc2.h" #include "OutputProc1.h" // Handling routines #include "DefaultProc.h" #include "XIGCtrl.h" // System includes #include #include #include #ifdef WIN32 #include #include #endif #ifdef WIN32 #include #else #include #endif // Special database information structure typedef struct Database_info { int id; double lat; double lon; double alt; } DbInfo; using namespace std; // ================================================ // Global variables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Networking class/object Network network; // CIGI specific static CigiIGSession *IGSn; static CigiOutgoingMsg *OmsgPtr; static CigiIncomingMsg *ImsgPtr; static DefaultProc DefaultPckt; static CigiSOFV1 CSOF1; static CigiSOFV2 CSOF2; static CigiSOFV3 CSOF3; static CigiSOFV3_2 CSOF3_2; static CigiBaseSOF *pSOF; static XIGCtrl Pr_IGCtrl; // Packet Output processor OutputProcessor *OutProc; // CIGI network message buffers and information int recvLen; static unsigned char *pCigiOutBuf; #define RECV_BUFFER_SIZE 32768 static unsigned char CInBuf[RECV_BUFFER_SIZE]; static int CigiInSz; static int CigiOutSz; static int Port_H2IG; static int Port_IG2H; static string HostAddr; static int MajorVer; static int MinorVer; static string CsvFile; static float timeDelayLimit; static int Hz; static CigiSOFV3_2 check_SOF; // ================================================ // Pre-declaration of Local routines // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void); int init_cigi_if(void); void waitUntilBeginningOfFrame(void); #ifndef WIN32 float timevaldiff( struct timeval *t1, struct timeval *t2 ); #endif // ================================================ // Main // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int main(int argc, char* argv[]) { CigiInSz = 0; OutProc = NULL; ReadConfig(); init_cigi_if(); /* CIGI messaging */ CigiOutgoingMsg &Omsg = *OmsgPtr; Omsg.BeginMsg(); while(1) { /* process incoming CIGI message - this could be long */ if( CigiInSz > 0 ) { try { ImsgPtr->ProcessIncomingMsg((unsigned char *)CInBuf,CigiInSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } } // load the SOF Omsg << *pSOF; OutProc->Out(); // wait until start of frame time waitUntilBeginningOfFrame(); // Do packaging here to // Package msg try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // Update Frame IDs Omsg.UpdateSOF(pCigiOutBuf); // send SOF message int sentBytes = network.send(pCigiOutBuf,CigiOutSz); // Check frame counter check_SOF.Unpack(pCigiOutBuf,false,NULL); // cout << check_SOF.GetFrameCntr() << endl; Omsg.FreeMsg(); // Frees the buffer containing the message that was just sent // wait for Host message long HoldTime; bool RcvrProc = false; long CheckTime = (long)time(&HoldTime); while(!RcvrProc) { if((CigiInSz = network.recv( CInBuf, RECV_BUFFER_SIZE )) > 0) RcvrProc = true; else { long TstTime = (long)time(&HoldTime); if((TstTime - CheckTime) > 1) { cout << "Did not receive IG Control\n"; RcvrProc = true; CigiInSz = 0; } } } } // shut down the network network.closeSocket(); delete IGSn; if(OutProc != NULL) delete OutProc; return 0; } // ================================================ // Read Configuration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void) { TiXmlNode *bnode = NULL; // base node TiXmlText *CfgDta = NULL; TiXmlHandle *hConfig = NULL; // pointer to a Config handle TiXmlElement *Config = NULL; TiXmlText *DbDta = NULL; TiXmlDocument doc("CigiDummyIG.def"); bool stat = doc.LoadFile(); //set default values Port_H2IG = 8000; Port_IG2H = 8001; HostAddr = "127.0.0.1"; MajorVer = 3; MinorVer = 3; if(stat) { bnode = doc.FirstChild("MiniHostInitialization"); if(bnode == NULL) stat = false; // The file is not a Mission Function Initialization file } if(stat) { // get base configuration Config = bnode->FirstChildElement("Config"); if(Config != NULL) { hConfig = new TiXmlHandle(Config); CfgDta = hConfig->FirstChildElement("Host_Addr").Child(0).Text(); if(CfgDta) HostAddr = CfgDta->Value(); CfgDta = hConfig->FirstChildElement("Port_To_IG").Child(0).Text(); Port_H2IG = (CfgDta) ? atoi(CfgDta->Value()) : 8000; CfgDta = hConfig->FirstChildElement("Port_To_Host").Child(0).Text(); Port_IG2H = (CfgDta) ? atoi(CfgDta->Value()) : 8001; CfgDta = hConfig->FirstChildElement("Hertz_rate").Child(0).Text(); Hz = (CfgDta) ? atoi(CfgDta->Value()) : 60; timeDelayLimit = 1.0f/((float)Hz); CfgDta = hConfig->FirstChildElement("Major_Version_Cigi").Child(0).Text(); MajorVer = (CfgDta) ? atoi(CfgDta->Value()) : 0; if((MajorVer == 1) || (MajorVer == 2)) MinorVer = 0; else if(MajorVer == 3) { CfgDta = hConfig->FirstChildElement("Minor_Version_Cigi").Child(0).Text(); MinorVer = (CfgDta) ? atoi(CfgDta->Value()) : 3; if(MinorVer < 2) MinorVer = 0; else if(MinorVer > 3) MinorVer = 3; } else { MajorVer = 3; MinorVer = 3; } CfgDta = hConfig->FirstChildElement("Csv_File_Name").Child(0).Text(); if(CfgDta) CsvFile = CfgDta->Value(); else CsvFile.clear(); delete hConfig; } } } // ================================================ // Initialize interface to CIGI // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int init_cigi_if(void){ int err_status = 0; /* open sockets to CIGI */ // hostemu-ip-addr, hostemu-socket, local-socket printf("init_cigi_if: initializing ports to CIGI\n"); bool netstatus = network.openSocket( HostAddr.c_str(), Port_IG2H, Port_H2IG ); if( !netstatus ) { printf( "could not connect to CIGI host server\n" ); exit( 1 ); } else { printf( "successfully connected to CIGI host server\n" ); } IGSn = new CigiIGSession(1,32768,2,32768); // Add packet event handlers here! CigiOutgoingMsg &Omsg = IGSn->GetOutgoingMsgMgr(); CigiIncomingMsg &Imsg = IGSn->GetIncomingMsgMgr(); OmsgPtr = &Omsg; ImsgPtr = &Imsg; // Version specific items pSOF = &CSOF2; int tIGCtrl_ID = CIGI_IG_CTRL_PACKET_ID_V3_2; OutProc = NULL; if(MajorVer == 3) { if(MinorVer < 2) { tIGCtrl_ID = CIGI_IG_CTRL_PACKET_ID_V3; pSOF = &CSOF3; } else { tIGCtrl_ID = CIGI_IG_CTRL_PACKET_ID_V3_2; pSOF = &CSOF3_2; } OutProc = new OutputProcessor3; } else if(MajorVer == 2) { tIGCtrl_ID = CIGI_IG_CTRL_PACKET_ID_V2; pSOF = &CSOF2; OutProc = new OutputProcessor2; } else if(MajorVer == 1) { tIGCtrl_ID = CIGI_IG_CTRL_PACKET_ID_V1; pSOF = &CSOF1; OutProc = new OutputProcessor1; } if(OutProc == NULL) { MajorVer = 3; MinorVer = 3; OutProc = new OutputProcessor3; } IGSn->SetCigiVersion(MajorVer,MinorVer); IGSn->SetSynchronous(true); Imsg.SetReaderCigiVersion(MajorVer,MinorVer); Imsg.UsingIteration(false); // set up a default handler for unhandled packets Imsg.RegisterEventProcessor(0, (CigiBaseEventProcessor *) &DefaultPckt); // Register all the IG Ctrl processor Imsg.RegisterEventProcessor(tIGCtrl_ID,(CigiBaseEventProcessor *) &Pr_IGCtrl); // Initialize the outgoing message processor OutProc->Init(IGSn,CsvFile,MajorVer,MinorVer); // initialize the SOF pSOF->SetDatabaseID(1); pSOF->SetIGStatus(0); pSOF->SetIGMode(CigiBaseSOF::Operate); CSOF1.SetFrameCntr(0); CSOF2.SetFrameCntr(0); CSOF2.SetTimeStamp(0.0f); CSOF3.SetFrameCntr(0); CSOF3.SetTimeStamp(0); CSOF3.SetTimeStampValid(false); CSOF3.SetEarthRefModel(CigiBaseSOF::WGS84); CSOF3_2.SetFrameCntr(0); CSOF3_2.SetTimeStamp(0); CSOF3_2.SetTimeStampValid(false); CSOF3_2.SetEarthRefModel(CigiBaseSOF::WGS84); CSOF3_2.SetLastRcvdHostFrame(0); return err_status; } // ================================================ // waitUntilBeginningOfFrame // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv #ifdef WIN32 void waitUntilBeginningOfFrame( void ) { static DWORD t1 = 0; static DWORD t2 = 0; static bool firsttimethrough = true; if(firsttimethrough) { t1 = GetTickCount(); firsttimethrough = false; } do { t2 = GetTickCount(); // number of milliseconds } while((t2 - t1) < timeDelayLimit); t1 = t2; } #else void waitUntilBeginningOfFrame( void ) { static struct timeval t1; static struct timeval t2; static bool firsttimethrough = true; float diff; float busy_wait_time = 0.0f; gettimeofday( &t2, NULL ); if( firsttimethrough ) { gettimeofday( &t1, NULL ); firsttimethrough = false; } while( (diff = timevaldiff( &t1, &t2 )) < timeDelayLimit ) { if(busy_wait_time != 0.0f && timeDelayLimit - diff > busy_wait_time) { float sleep_time = timeDelayLimit - diff - busy_wait_time; struct timespec req; req.tv_sec = (time_t)sleep_time; req.tv_nsec = (long)((sleep_time-req.tv_sec)*1e9); if(pselect(0, NULL, NULL, NULL, &req, NULL)==-1) { printf("Error calling pselect"); busy_wait_time = 0.0f; } } gettimeofday( &t2, NULL ); } //printf("over frame by %f ms\n", diff - timeDelayLimit); t1 = t2; } // ================================================ // timevaldiff // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float timevaldiff( struct timeval *t1, struct timeval *t2 ) { return (t2->tv_sec - t1->tv_sec) + (t2->tv_usec - t1->tv_usec)/1000000.0f; } #endif cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/IgSendCcl.sln000066400000000000000000000016731210750432300221230ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgSendCcl", "IgSendCcl.vcproj", "{5C26D4CD-0FFC-472D-8235-912039E33804}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {5C26D4CD-0FFC-472D-8235-912039E33804}.Debug.ActiveCfg = Debug|Win32 {5C26D4CD-0FFC-472D-8235-912039E33804}.Debug.Build.0 = Debug|Win32 {5C26D4CD-0FFC-472D-8235-912039E33804}.Release.ActiveCfg = Release|Win32 {5C26D4CD-0FFC-472D-8235-912039E33804}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/IgSendCcl.vcproj000066400000000000000000000227141210750432300226310ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc.cpp000066400000000000000000000050731210750432300224400ustar00rootroot00000000000000// OutputProcessor.cpp: implementation of the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor::OutputProcessor() { CrntSession = NULL; OmsgPtr = NULL; HPrsLn = NULL; CsvFile = "HostData.csv"; TstID = 0; } OutputProcessor::~OutputProcessor() { if(HPrsLn != NULL) delete HPrsLn; list::iterator iPrs; for(iPrs=Parsers.begin();iPrs!=Parsers.end();iPrs++) { if(*iPrs != NULL) delete *iPrs; } Parsers.clear(); } void OutputProcessor::Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer) { CrntSession = CrntSessionIn; CigiOutgoingMsg &Omsg = CrntSession->GetOutgoingMsgMgr(); OmsgPtr = &Omsg; list::iterator iPrs; for(iPrs=Parsers.begin();iPrs!=Parsers.end();iPrs++) { (*iPrs)->Init(OmsgPtr); } HPrsLn = new ParseLine; TstID = 0; if(!CsvFileNm.empty()) CsvFile = CsvFileNm; } bool OutputProcessor::Out() { static ifstream Hinfl(CsvFile.c_str(),ios::in); bool Valid = true; if(Hinfl.is_open() != 0) { if(!Hinfl.eof()) { Hinfl.getline(line,511); if(line[0] != 0) { HPrsLn->ParseBuf(line); ProcLine(*HPrsLn); } } else { Hinfl.close(); Valid = false; } } else Valid = false; return(Valid); } void OutputProcessor::ProcLine(ParseLine &PrsLn) { if(OmsgPtr == NULL) return; TstID++; printf("\n\n================================\nIG Output Test No. %d\nvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n",TstID); ParseValue *pPV = PrsLn.Get1stVal(); string CmpStr = pPV->GetStr(); list::iterator iPrs; for(iPrs=Parsers.begin();iPrs!=Parsers.end();iPrs++) { if(*((*iPrs)->GetPcktID()) == (char *)pPV->GetStr()) { (*iPrs)->ProcPckt(pPV); break; } } printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc.h000066400000000000000000000016011210750432300220760ustar00rootroot00000000000000// OutputProcessor.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_INCLUDED_) #define _OUTPUT_PROCESSOR_INCLUDED_ #include "AllCigi.h" #include #include class PcktParsingProcessor; class ParseLine; class ParseValue; class OutputProcessor { public: OutputProcessor(); virtual ~OutputProcessor(); virtual void Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer); bool Out(void); void ProcLine(ParseLine &PrsLn); protected: CigiSession *CrntSession; CigiOutgoingMsg *OmsgPtr; std::string CsvFile; std::list Parsers; ParseLine *HPrsLn; char line[512]; int TstID; }; #endif // !defined(_OUTPUT_PROCESSOR_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc1.cpp000066400000000000000000000025261210750432300225210ustar00rootroot00000000000000// OutputProcessor1.cpp: implementation of the OutputProcessor1 class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc1.h" #include "Proc_HatRespV1.h" #include "Proc_LosRespV1.h" #include "Proc_CollDetSegRespV1.h" #include "Proc_SensorRespV1.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor1::OutputProcessor1() { } OutputProcessor1::~OutputProcessor1() { } void OutputProcessor1::Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer) { Parsers.push_back((PcktParsingProcessor *)(new Proc_HatRespV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosRespV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetSegRespV1)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorRespV1)); OutputProcessor::Init(CrntSessionIn, CsvFileNm, MajorVer, MinorVer); } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc1.h000066400000000000000000000010771210750432300221660ustar00rootroot00000000000000// OutputProcessor1.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_1_INCLUDED_) #define _OUTPUT_PROCESSOR_1_INCLUDED_ #include "OutputProc.h" class OutputProcessor1 : public OutputProcessor { public: OutputProcessor1(); virtual ~OutputProcessor1(); virtual void Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer); }; #endif // !defined(_OUTPUT_PROCESSOR_1_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc2.cpp000066400000000000000000000032021210750432300225120ustar00rootroot00000000000000// OutputProcessor2.cpp: implementation of the OutputProcessor2 class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc2.h" #include "Proc_HatRespV2.h" #include "Proc_LosRespV2.h" #include "Proc_CollDetSegRespV2.h" #include "Proc_SensorRespV2.h" #include "Proc_HotRespV2.h" #include "Proc_CollDetVolRespV2.h" #include "Proc_IGMsgV2.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor2::OutputProcessor2() { } OutputProcessor2::~OutputProcessor2() { } void OutputProcessor2::Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer) { Parsers.push_back((PcktParsingProcessor *)(new Proc_HatRespV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosRespV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetSegRespV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorRespV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HotRespV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetVolRespV2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_IGMsgV2)); OutputProcessor::Init(CrntSessionIn, CsvFileNm, MajorVer, MinorVer); } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc2.h000066400000000000000000000010771210750432300221670ustar00rootroot00000000000000// OutputProcessor2.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_2_INCLUDED_) #define _OUTPUT_PROCESSOR_2_INCLUDED_ #include "OutputProc.h" class OutputProcessor2 : public OutputProcessor { public: OutputProcessor2(); virtual ~OutputProcessor2(); virtual void Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer); }; #endif // !defined(_OUTPUT_PROCESSOR_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc3.cpp000066400000000000000000000063131210750432300225210ustar00rootroot00000000000000// OutputProcessor3.cpp: implementation of the OutputProcessor3 class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "PcktParsingProcessor.h" #include "ParseLine.h" #include "ParseValue.h" #include "OutputProc3.h" #include "Proc_HatHotRespV3.h" #include "Proc_HatHotXRespV3.h" #include "Proc_LosRespV3.h" #include "Proc_LosXRespV3.h" #include "Proc_SensorRespV3.h" #include "Proc_SensorXRespV3.h" #include "Proc_PositionRespV3.h" #include "Proc_WeatherCondRespV3.h" #include "Proc_AerosolRespV3.h" #include "Proc_MaritimeSurfaceRespV3.h" #include "Proc_TerrestrialSurfaceRespV3.h" #include "Proc_CollDetSegRespV3.h" #include "Proc_CollDetVolRespV3.h" #include "Proc_AnimationStopV3.h" #include "Proc_EventNotificationV3.h" #include "Proc_IGMsgV3.h" #include "Proc_HatHotRespV3_2.h" #include "Proc_HatHotXRespV3_2.h" #include "Proc_LosRespV3_2.h" #include "Proc_LosXRespV3_2.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// OutputProcessor3::OutputProcessor3() { } OutputProcessor3::~OutputProcessor3() { } void OutputProcessor3::Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer) { if(MajorVer == 3) { Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_SensorXRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_PositionRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_WeatherCondRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_AerosolRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_MaritimeSurfaceRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_TerrestrialSurfaceRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetSegRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_CollDetVolRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_AnimationStopV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_EventNotificationV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_IGMsgV3)); if(MinorVer < 2) { Parsers.push_back((PcktParsingProcessor *)(new Proc_HatHotRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HatHotXRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosRespV3)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosXRespV3)); } else { Parsers.push_back((PcktParsingProcessor *)(new Proc_HatHotRespV3_2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_HatHotXRespV3_2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosRespV3_2)); Parsers.push_back((PcktParsingProcessor *)(new Proc_LosXRespV3_2)); } } OutputProcessor::Init(CrntSessionIn, CsvFileNm, MajorVer, MinorVer); } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/OutputProc3.h000066400000000000000000000010771210750432300221700ustar00rootroot00000000000000// OutputProcessor3.h: interface for the OutputProcessor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_OUTPUT_PROCESSOR_3_INCLUDED_) #define _OUTPUT_PROCESSOR_3_INCLUDED_ #include "OutputProc.h" class OutputProcessor3 : public OutputProcessor { public: OutputProcessor3(); virtual ~OutputProcessor3(); virtual void Init(CigiSession *CrntSessionIn, string &CsvFileNm, int MajorVer, int MinorVer); }; #endif // !defined(_OUTPUT_PROCESSOR_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/ParseLine.cpp000066400000000000000000000025571210750432300222020ustar00rootroot00000000000000// ParseLine.cpp: implementation of the ParseLine class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "ParseLine.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// ParseLine::ParseLine() { Val1 = NULL; ValCnt = 0; } ParseLine::ParseLine(char *Buff) { Val1 = NULL; ValCnt = 0; ParseBuf(Buff); } ParseLine::~ParseLine() { Clear(); } void ParseLine::Clear() { ParseValue *Crnt; ParseValue *Nxt; Crnt = Val1; while(Crnt != NULL) { Nxt = Crnt->nxt(); delete Crnt; Crnt = Nxt; } Val1 = NULL; } void ParseLine::ParseBuf(char *Buff) { char tbuf[255]; char *p = Buff; char *b = tbuf; bool go = true; ParseValue *cVal = new ParseValue; Val1 = cVal; ValCnt = 1; while(go) { switch(*p) { case ',': *b = 0; cVal->SetDta(tbuf); cVal->Next = new ParseValue; cVal = cVal->Next; b = tbuf; ValCnt++; break; case 0x0a: case 0x0d: case 0: go = false; *b = 0; cVal->SetDta(tbuf); cVal->Next = NULL; break; default: *b++ = *p; break; } p++; } } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/ParseLine.h000066400000000000000000000013471210750432300216430ustar00rootroot00000000000000// ParseLine.h: interface for the ParseLine class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_PARSELINE_H__A40EAAC5_829E_43DF_A3FD_03C9D565A6EB__INCLUDED_) #define AFX_PARSELINE_H__A40EAAC5_829E_43DF_A3FD_03C9D565A6EB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class ParseValue; #include "ParseValue.h" class ParseLine { public: ParseLine(); ParseLine(char *Buff); virtual ~ParseLine(); void ParseBuf(char *Buff); ParseValue * Get1stVal() { return(Val1); } void Clear(); int GetValCnt() { return(ValCnt); } protected: int ValCnt; ParseValue * Val1; }; #endif // !defined(AFX_PARSELINE_H__A40EAAC5_829E_43DF_A3FD_03C9D565A6EB__INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/ParseValue.cpp000066400000000000000000000027121210750432300223600ustar00rootroot00000000000000// ParseValue.cpp: implementation of the ParseValue class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "ParseValue.h" #include "stdlib.h" #include "string.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// ParseValue::ParseValue() { memset(dta,0,255); Next = NULL; } ParseValue::~ParseValue() { } unsigned char ParseValue::GetUChar() { int t = atoi(dta); unsigned char tuc = (unsigned char)t; return(tuc); } char ParseValue::GetChar() { int t = atoi(dta); char tc = (char)t; return(tc); } unsigned short ParseValue::GetUShort() { int t = atoi(dta); unsigned short tus = (unsigned short)t; return(tus); } short ParseValue::GetShort() { int t = atoi(dta); short ts = (short)t; return(ts); } unsigned long ParseValue::GetULong() { union cnvt { long l; unsigned long ul; } td; td.l = atol(dta); return(td.ul); } long ParseValue::GetLong() { return(atol(dta)); } float ParseValue::Getfloat() { double td = atof(dta); float tf = (float)td; return(tf); } double ParseValue::Getdouble() { return(atof(dta)); } bool ParseValue::GetBool() { bool rslt = false; if((dta[0] == 'T')||(dta[0] == 't')) rslt = true; return(rslt); } void ParseValue::SetDta(char *buf) { strcpy(dta,buf); } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/ParseValue.h000066400000000000000000000016271210750432300220310ustar00rootroot00000000000000// ParseValue.h: interface for the ParseValue class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_PARSEVALUE_H__57CC0107_2674_49FA_A326_8E383F2E1735__INCLUDED_) #define AFX_PARSEVALUE_H__57CC0107_2674_49FA_A326_8E383F2E1735__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class ParseLine; #include "ParseLine.h" class ParseValue { friend class ParseLine; public: void SetDta(char *buf); ParseValue(); virtual ~ParseValue(); char *GetStr() { return(dta); } unsigned char GetUChar(); char GetChar(); unsigned short GetUShort(); short GetShort(); unsigned long GetULong(); long GetLong(); float Getfloat(); double Getdouble(); bool GetBool(); ParseValue * nxt() { return(Next); } protected: char dta[255]; ParseValue * Next; }; #endif // !defined(AFX_PARSEVALUE_H__57CC0107_2674_49FA_A326_8E383F2E1735__INCLUDED_) cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/PcktParsingProcessor.h000066400000000000000000000014161210750432300241030ustar00rootroot00000000000000// PcktParsingProcessor.h: interface for the Packet Parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PACKET_PARSING_PROCESSOR_INCLUDED_) #define _PACKET_PARSING_PROCESSOR_INCLUDED_ #include "AllCigi.h" #include class ParseValue; class PcktParsingProcessor { public: PcktParsingProcessor(void) { Omsg = NULL; } virtual ~PcktParsingProcessor(void) { } std::string * GetPcktID(void) { return(&PcktID); } void Init(CigiOutgoingMsg *OmsgIn) { Omsg = OmsgIn; } virtual void ProcPckt(ParseValue *pPV) = 0; protected: std::string PcktID; CigiOutgoingMsg *Omsg; char *DefHex; }; #endif // _PACKET_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_AerosolRespV3.cpp000066400000000000000000000035601210750432300237450ustar00rootroot00000000000000// Proc_AerosolRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_AerosolRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_AerosolRespV3::Proc_AerosolRespV3() { PcktID = "AerosolRespV3"; } Proc_AerosolRespV3::~Proc_AerosolRespV3() { } void Proc_AerosolRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Aerosol Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_AerosolRespV3.SetRequestID(pPV->GetUChar(),true); printf("\tRequest ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AerosolRespV3.SetLayerID(pPV->GetUChar(),true); printf("\tLayer ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_AerosolRespV3.SetAerosolConcentration(pPV->Getfloat(),true); printf("\tAerosol Concentration = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_AerosolRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_AerosolRespV3.h000066400000000000000000000011741210750432300234110ustar00rootroot00000000000000// Proc_AerosolRespV3.h: Interface for the Proc_AerosolRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_AEROSOLRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_AEROSOLRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiAerosolRespV3.h" class Proc_AerosolRespV3 : public PcktParsingProcessor { public: Proc_AerosolRespV3(); virtual ~Proc_AerosolRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiAerosolRespV3 Om_AerosolRespV3; }; #endif // PROC_AEROSOLRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_AnimationStopV3.cpp000066400000000000000000000023341210750432300242720ustar00rootroot00000000000000// Proc_AnimationStopV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_AnimationStopV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_AnimationStopV3::Proc_AnimationStopV3() { PcktID = "AnimationStopV3"; } Proc_AnimationStopV3::~Proc_AnimationStopV3() { } void Proc_AnimationStopV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Animation Stop V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_AnimationStopV3.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_AnimationStopV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_AnimationStopV3.h000066400000000000000000000012221210750432300237320ustar00rootroot00000000000000// Proc_AnimationStopV3.h: Interface for the Proc_AnimationStopV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_ANIMATIONSTOPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_ANIMATIONSTOPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiAnimationStopV3.h" class Proc_AnimationStopV3 : public PcktParsingProcessor { public: Proc_AnimationStopV3(); virtual ~Proc_AnimationStopV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiAnimationStopV3 Om_AnimationStopV3; }; #endif // PROC_ANIMATIONSTOPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetSegRespV1.cpp000066400000000000000000000055031210750432300243230ustar00rootroot00000000000000// Proc_CollDetSegRespV1.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetSegRespV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetSegRespV1::Proc_CollDetSegRespV1() { PcktID = "CollDetSegRespV1"; } Proc_CollDetSegRespV1::~Proc_CollDetSegRespV1() { } void Proc_CollDetSegRespV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Collision Detection Segment Response V1:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_CollDetSegRespV1.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV1.SetSegID(pPV->GetUChar(),true); printf("\tSegment ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV1.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV1.SetX(pPV->Getfloat(),true); printf("\tX = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV1.SetY(pPV->Getfloat(),true); printf("\tY = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV1.SetZ(pPV->Getfloat(),true); printf("\tZ = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_CollDetSegRespV1; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetSegRespV1.h000066400000000000000000000012351210750432300237660ustar00rootroot00000000000000// Proc_CollDetSegRespV1.h: Interface for the Proc_CollDetSegRespV1 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_COLLDETSEGRESPV1_PARSING_PROCESSOR_INCLUDED_) #define PROC_COLLDETSEGRESPV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiCollDetSegRespV1.h" class Proc_CollDetSegRespV1 : public PcktParsingProcessor { public: Proc_CollDetSegRespV1(); virtual ~Proc_CollDetSegRespV1(); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetSegRespV1 Om_CollDetSegRespV1; }; #endif // PROC_COLLDETSEGRESPV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetSegRespV2.cpp000066400000000000000000000074401210750432300243260ustar00rootroot00000000000000// Proc_CollDetSegRespV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetSegRespV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetSegRespV2::Proc_CollDetSegRespV2() { PcktID = "CollDetSegRespV2"; } Proc_CollDetSegRespV2::~Proc_CollDetSegRespV2() { } void Proc_CollDetSegRespV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Collision Detection Segment Response V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_CollDetSegRespV2.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV2.SetSegID(pPV->GetUChar(),true); printf("\tSegment ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NonEntity",pPV->GetStr()) == 0) { Om_CollDetSegRespV2.SetCollType(CigiBaseCollDetSegResp::NonEntity,true); printf("\tCollision Type = 0 : NonEntity\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_CollDetSegRespV2.SetCollType(CigiBaseCollDetSegResp::Entity,true); printf("\tCollision Type = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV2.SetCollEntityID(pPV->GetUShort(),true); printf("\tCollision Entity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV2.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV2.SetX(pPV->Getfloat(),true); printf("\tX = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV2.SetY(pPV->Getfloat(),true); printf("\tY = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV2.SetZ(pPV->Getfloat(),true); printf("\tZ = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_CollDetSegRespV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetSegRespV2.h000066400000000000000000000012351210750432300237670ustar00rootroot00000000000000// Proc_CollDetSegRespV2.h: Interface for the Proc_CollDetSegRespV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_COLLDETSEGRESPV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_COLLDETSEGRESPV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiCollDetSegRespV2.h" class Proc_CollDetSegRespV2 : public PcktParsingProcessor { public: Proc_CollDetSegRespV2(); virtual ~Proc_CollDetSegRespV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetSegRespV2 Om_CollDetSegRespV2; }; #endif // PROC_COLLDETSEGRESPV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetSegRespV3.cpp000066400000000000000000000063101210750432300243220ustar00rootroot00000000000000// Proc_CollDetSegRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetSegRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetSegRespV3::Proc_CollDetSegRespV3() { PcktID = "CollDetSegRespV3"; } Proc_CollDetSegRespV3::~Proc_CollDetSegRespV3() { } void Proc_CollDetSegRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Collision Detection Segment Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_CollDetSegRespV3.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV3.SetSegID(pPV->GetUChar(),true); printf("\tSegment ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NonEntity",pPV->GetStr()) == 0) { Om_CollDetSegRespV3.SetCollType(CigiBaseCollDetSegResp::NonEntity,true); printf("\tCollision Type = 0 : NonEntity\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_CollDetSegRespV3.SetCollType(CigiBaseCollDetSegResp::Entity,true); printf("\tCollision Type = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV3.SetCollEntityID(pPV->GetUShort(),true); printf("\tCollision Entity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV3.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetSegRespV3.SetIntersectDist(pPV->Getfloat(),true); printf("\tIntersection Distance = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_CollDetSegRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetSegRespV3.h000066400000000000000000000012351210750432300237700ustar00rootroot00000000000000// Proc_CollDetSegRespV3.h: Interface for the Proc_CollDetSegRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_COLLDETSEGRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_COLLDETSEGRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiCollDetSegRespV3.h" class Proc_CollDetSegRespV3 : public PcktParsingProcessor { public: Proc_CollDetSegRespV3(); virtual ~Proc_CollDetSegRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetSegRespV3 Om_CollDetSegRespV3; }; #endif // PROC_COLLDETSEGRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetVolRespV2.cpp000066400000000000000000000050401210750432300243420ustar00rootroot00000000000000// Proc_CollDetVolRespV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetVolRespV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetVolRespV2::Proc_CollDetVolRespV2() { PcktID = "CollDetVolRespV2"; } Proc_CollDetVolRespV2::~Proc_CollDetVolRespV2() { } void Proc_CollDetVolRespV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Collision Detection Volume Response V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_CollDetVolRespV2.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolRespV2.SetVolID(pPV->GetUChar(),true); printf("\tVolume ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NonEntity",pPV->GetStr()) == 0) { Om_CollDetVolRespV2.SetCollType(CigiBaseCollDetVolResp::NonEntity,true); printf("\tCollision Type = 0 : NonEntity\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_CollDetVolRespV2.SetCollType(CigiBaseCollDetVolResp::Entity,true); printf("\tCollision Type = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolRespV2.SetCollEntityID(pPV->GetUShort(),true); printf("\tCollision Entity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_CollDetVolRespV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetVolRespV2.h000066400000000000000000000012351210750432300240110ustar00rootroot00000000000000// Proc_CollDetVolRespV2.h: Interface for the Proc_CollDetVolRespV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_COLLDETVOLRESPV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_COLLDETVOLRESPV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiCollDetVolRespV2.h" class Proc_CollDetVolRespV2 : public PcktParsingProcessor { public: Proc_CollDetVolRespV2(); virtual ~Proc_CollDetVolRespV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetVolRespV2 Om_CollDetVolRespV2; }; #endif // PROC_COLLDETVOLRESPV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetVolRespV3.cpp000066400000000000000000000055661210750432300243600ustar00rootroot00000000000000// Proc_CollDetVolRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_CollDetVolRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_CollDetVolRespV3::Proc_CollDetVolRespV3() { PcktID = "CollDetVolRespV3"; } Proc_CollDetVolRespV3::~Proc_CollDetVolRespV3() { } void Proc_CollDetVolRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Collision Detection Volume Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_CollDetVolRespV3.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolRespV3.SetVolID(pPV->GetUChar(),true); printf("\tVolume ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("NonEntity",pPV->GetStr()) == 0) { Om_CollDetVolRespV3.SetCollType(CigiBaseCollDetVolResp::NonEntity,true); printf("\tCollision Type = 0 : NonEntity\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_CollDetVolRespV3.SetCollType(CigiBaseCollDetVolResp::Entity,true); printf("\tCollision Type = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolRespV3.SetCollEntityID(pPV->GetUShort(),true); printf("\tCollision Entity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_CollDetVolRespV3.SetCollVolID(pPV->GetUChar(),true); printf("\tCollision Volume ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_CollDetVolRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_CollDetVolRespV3.h000066400000000000000000000012351210750432300240120ustar00rootroot00000000000000// Proc_CollDetVolRespV3.h: Interface for the Proc_CollDetVolRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_COLLDETVOLRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_COLLDETVOLRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiCollDetVolRespV3.h" class Proc_CollDetVolRespV3 : public PcktParsingProcessor { public: Proc_CollDetVolRespV3(); virtual ~Proc_CollDetVolRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiCollDetVolRespV3 Om_CollDetVolRespV3; }; #endif // PROC_COLLDETVOLRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_EventNotificationV3.cpp000066400000000000000000000044451210750432300251420ustar00rootroot00000000000000// Proc_EventNotificationV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_EventNotificationV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_EventNotificationV3::Proc_EventNotificationV3() { PcktID = "EventNotificationV3"; } Proc_EventNotificationV3::~Proc_EventNotificationV3() { } void Proc_EventNotificationV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Event Notification V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_EventNotificationV3.SetEventID(pPV->GetUShort(),true); printf("\tEventID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EventNotificationV3.SetEventData((Cigi_uint32)pPV->GetULong(),0,true); printf("\tEventData 1 = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EventNotificationV3.SetEventData((Cigi_uint32)pPV->GetULong(),1,true); printf("\tEventData 2 = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_EventNotificationV3.SetEventData((Cigi_uint32)pPV->GetULong(),2,true); printf("\tEventData 3 = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_EventNotificationV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_EventNotificationV3.h000066400000000000000000000012761210750432300246060ustar00rootroot00000000000000// Proc_EventNotificationV3.h: Interface for the Proc_EventNotificationV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_EVENTNOTIFICATIONV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_EVENTNOTIFICATIONV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiEventNotificationV3.h" class Proc_EventNotificationV3 : public PcktParsingProcessor { public: Proc_EventNotificationV3(); virtual ~Proc_EventNotificationV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiEventNotificationV3 Om_EventNotificationV3; }; #endif // PROC_EVENTNOTIFICATIONV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotRespV3.cpp000066400000000000000000000052771210750432300235370ustar00rootroot00000000000000// Proc_HatHotRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatHotRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatHotRespV3::Proc_HatHotRespV3() { PcktID = "HatHotRespV3"; } Proc_HatHotRespV3::~Proc_HatHotRespV3() { } void Proc_HatHotRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HAT HOT Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HatHotRespV3.SetHatHotID(pPV->GetUShort(),true); printf("\tHat Hot ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotRespV3.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("HAT",pPV->GetStr()) == 0) { Om_HatHotRespV3.SetReqType(CigiBaseHatHotResp::HAT,true); printf("\tRequest Type = 0 : HAT\n"); } else if(strcmp("HOT",pPV->GetStr()) == 0) { Om_HatHotRespV3.SetReqType(CigiBaseHatHotResp::HOT,true); printf("\tRequest Type = 1 : HOT\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(Om_HatHotRespV3.GetReqType() == CigiBaseHatHotResp::HAT) { Om_HatHotRespV3.SetHat(pPV->Getdouble(),true); printf("\tHat = %f\n",pPV->Getdouble()); } else if(Om_HatHotRespV3.GetReqType() == CigiBaseHatHotResp::HOT) { Om_HatHotRespV3.SetHot(pPV->Getdouble(),true); printf("\tHot = %f\n",pPV->Getdouble()); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HatHotRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotRespV3.h000066400000000000000000000011611210750432300231700ustar00rootroot00000000000000// Proc_HatHotRespV3.h: Interface for the Proc_HatHotRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HATHOTRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_HATHOTRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHatHotRespV3.h" class Proc_HatHotRespV3 : public PcktParsingProcessor { public: Proc_HatHotRespV3(); virtual ~Proc_HatHotRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatHotRespV3 Om_HatHotRespV3; }; #endif // PROC_HATHOTRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotRespV3_2.cpp000066400000000000000000000060611210750432300237500ustar00rootroot00000000000000// Proc_HatHotRespV3_2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatHotRespV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatHotRespV3_2::Proc_HatHotRespV3_2() { PcktID = "HatHotRespV3_2"; } Proc_HatHotRespV3_2::~Proc_HatHotRespV3_2() { } void Proc_HatHotRespV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HAT HOT Response V3_2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HatHotRespV3_2.SetHatHotID(pPV->GetUShort(),true); printf("\tHat Hot ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotRespV3_2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("HAT",pPV->GetStr()) == 0) { Om_HatHotRespV3_2.SetReqType(CigiBaseHatHotResp::HAT,true); printf("\tRequest Type = 0 : HAT\n"); } else if(strcmp("HOT",pPV->GetStr()) == 0) { Om_HatHotRespV3_2.SetReqType(CigiBaseHatHotResp::HOT,true); printf("\tRequest Type = 1 : HOT\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotRespV3_2.SetHostFrame(pPV->GetUChar(),true); printf("\tHost Frame ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(Om_HatHotRespV3_2.GetReqType() == CigiBaseHatHotResp::HAT) { Om_HatHotRespV3_2.SetHat(pPV->Getdouble(),true); printf("\tHat = %f\n",pPV->Getdouble()); } else if(Om_HatHotRespV3_2.GetReqType() == CigiBaseHatHotResp::HOT) { Om_HatHotRespV3_2.SetHot(pPV->Getdouble(),true); printf("\tHot = %f\n",pPV->Getdouble()); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HatHotRespV3_2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotRespV3_2.h000066400000000000000000000012071210750432300234120ustar00rootroot00000000000000// Proc_HatHotRespV3_2.h: Interface for the Proc_HatHotRespV3_2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HATHOTRESPV3_2_PARSING_PROCESSOR_INCLUDED_) #define PROC_HATHOTRESPV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHatHotRespV3_2.h" class Proc_HatHotRespV3_2 : public PcktParsingProcessor { public: Proc_HatHotRespV3_2(); virtual ~Proc_HatHotRespV3_2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatHotRespV3_2 Om_HatHotRespV3_2; }; #endif // PROC_HATHOTRESPV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotXRespV3.cpp000066400000000000000000000061601210750432300236570ustar00rootroot00000000000000// Proc_HatHotXRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatHotXRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatHotXRespV3::Proc_HatHotXRespV3() { PcktID = "HatHotXRespV3"; } Proc_HatHotXRespV3::~Proc_HatHotXRespV3() { } void Proc_HatHotXRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HAT HOT Extended Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HatHotXRespV3.SetHatHotID(pPV->GetUShort(),true); printf("\tHat Hot ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3.SetHat(pPV->Getdouble(),true); printf("\tHat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3.SetHot(pPV->Getdouble(),true); printf("\tHot = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3.SetNormAz(pPV->Getfloat(),true); printf("\tNormal Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3.SetNormEl(pPV->Getfloat(),true); printf("\tNormal Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HatHotXRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotXRespV3.h000066400000000000000000000011741210750432300233240ustar00rootroot00000000000000// Proc_HatHotXRespV3.h: Interface for the Proc_HatHotXRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HATHOTXRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_HATHOTXRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHatHotXRespV3.h" class Proc_HatHotXRespV3 : public PcktParsingProcessor { public: Proc_HatHotXRespV3(); virtual ~Proc_HatHotXRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatHotXRespV3 Om_HatHotXRespV3; }; #endif // PROC_HATHOTXRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotXRespV3_2.cpp000066400000000000000000000067411210750432300241050ustar00rootroot00000000000000// Proc_HatHotXRespV3_2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatHotXRespV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatHotXRespV3_2::Proc_HatHotXRespV3_2() { PcktID = "HatHotXRespV3_2"; } Proc_HatHotXRespV3_2::~Proc_HatHotXRespV3_2() { } void Proc_HatHotXRespV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HAT HOT Extended Response V3_2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetHatHotID(pPV->GetUShort(),true); printf("\tHat Hot ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetHostFrame(pPV->GetUChar(),true); printf("\tHost Frame ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetHat(pPV->Getdouble(),true); printf("\tHat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetHot(pPV->Getdouble(),true); printf("\tHot = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetNormAz(pPV->Getfloat(),true); printf("\tNormal Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatHotXRespV3_2.SetNormEl(pPV->Getfloat(),true); printf("\tNormal Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HatHotXRespV3_2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatHotXRespV3_2.h000066400000000000000000000012221210750432300235370ustar00rootroot00000000000000// Proc_HatHotXRespV3_2.h: Interface for the Proc_HatHotXRespV3_2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HATHOTXRESPV3_2_PARSING_PROCESSOR_INCLUDED_) #define PROC_HATHOTXRESPV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHatHotXRespV3_2.h" class Proc_HatHotXRespV3_2 : public PcktParsingProcessor { public: Proc_HatHotXRespV3_2(); virtual ~Proc_HatHotXRespV3_2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatHotXRespV3_2 Om_HatHotXRespV3_2; }; #endif // PROC_HATHOTXRESPV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatRespV1.cpp000066400000000000000000000041241210750432300230500ustar00rootroot00000000000000// Proc_HatRespV1.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatRespV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatRespV1::Proc_HatRespV1() { PcktID = "HatRespV1"; } Proc_HatRespV1::~Proc_HatRespV1() { } void Proc_HatRespV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HAT Response V1:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HatRespV1.SetHatHotID(pPV->GetUShort(),true); printf("\tHat ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatRespV1.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatRespV1.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatRespV1.SetHat(pPV->Getdouble(),true); printf("\tHat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HatRespV1; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatRespV1.h000066400000000000000000000011201210750432300225060ustar00rootroot00000000000000// Proc_HatRespV1.h: Interface for the Proc_HatRespV1 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HATRESPV1_PARSING_PROCESSOR_INCLUDED_) #define PROC_HATRESPV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHatRespV1.h" class Proc_HatRespV1 : public PcktParsingProcessor { public: Proc_HatRespV1(); virtual ~Proc_HatRespV1(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatRespV1 Om_HatRespV1; }; #endif // PROC_HATRESPV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatRespV2.cpp000066400000000000000000000041241210750432300230510ustar00rootroot00000000000000// Proc_HatRespV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HatRespV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HatRespV2::Proc_HatRespV2() { PcktID = "HatRespV2"; } Proc_HatRespV2::~Proc_HatRespV2() { } void Proc_HatRespV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HAT Response V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HatRespV2.SetHatHotID(pPV->GetUShort(),true); printf("\tHat ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatRespV2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatRespV2.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HatRespV2.SetHat(pPV->Getdouble(),true); printf("\tHat = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HatRespV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HatRespV2.h000066400000000000000000000011201210750432300225070ustar00rootroot00000000000000// Proc_HatRespV2.h: Interface for the Proc_HatRespV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HATRESPV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_HATRESPV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHatRespV2.h" class Proc_HatRespV2 : public PcktParsingProcessor { public: Proc_HatRespV2(); virtual ~Proc_HatRespV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHatRespV2 Om_HatRespV2; }; #endif // PROC_HATRESPV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HotRespV2.cpp000066400000000000000000000041241210750432300230670ustar00rootroot00000000000000// Proc_HotRespV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_HotRespV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_HotRespV2::Proc_HotRespV2() { PcktID = "HotRespV2"; } Proc_HotRespV2::~Proc_HotRespV2() { } void Proc_HotRespV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("HOT Response V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_HotRespV2.SetHatHotID(pPV->GetUShort(),true); printf("\tHot ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HotRespV2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HotRespV2.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_HotRespV2.SetHot(pPV->Getdouble(),true); printf("\tHot = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_HotRespV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_HotRespV2.h000066400000000000000000000011201210750432300225250ustar00rootroot00000000000000// Proc_HotRespV2.h: Interface for the Proc_HotRespV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_HOTRESPV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_HOTRESPV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiHotRespV2.h" class Proc_HotRespV2 : public PcktParsingProcessor { public: Proc_HotRespV2(); virtual ~Proc_HotRespV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiHotRespV2 Om_HotRespV2; }; #endif // PROC_HOTRESPV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_IGMsgV2.cpp000066400000000000000000000026751210750432300224620ustar00rootroot00000000000000// Proc_IGMsgV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_IGMsgV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_IGMsgV2::Proc_IGMsgV2() { PcktID = "IGMsgV2"; } Proc_IGMsgV2::~Proc_IGMsgV2() { } void Proc_IGMsgV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("IG Message V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_IGMsgV2.SetMsgID(pPV->GetUShort(),true); printf("\tMessage ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_IGMsgV2.SetMsg(pPV->GetStr(),true); printf("\tMessage = %s\n",pPV->GetStr()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_IGMsgV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_IGMsgV2.h000066400000000000000000000010721210750432300221150ustar00rootroot00000000000000// Proc_IGMsgV2.h: Interface for the Proc_IGMsgV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_IGMSGV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_IGMSGV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiIGMsgV2.h" class Proc_IGMsgV2 : public PcktParsingProcessor { public: Proc_IGMsgV2(); virtual ~Proc_IGMsgV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiIGMsgV2 Om_IGMsgV2; }; #endif // PROC_IGMSGV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_IGMsgV3.cpp000066400000000000000000000026751210750432300224630ustar00rootroot00000000000000// Proc_IGMsgV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_IGMsgV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_IGMsgV3::Proc_IGMsgV3() { PcktID = "IGMsgV3"; } Proc_IGMsgV3::~Proc_IGMsgV3() { } void Proc_IGMsgV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("IG Message V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_IGMsgV3.SetMsgID(pPV->GetUShort(),true); printf("\tMessage ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_IGMsgV3.SetMsg(pPV->GetStr(),true); printf("\tMessage = %s\n",pPV->GetStr()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_IGMsgV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_IGMsgV3.h000066400000000000000000000010721210750432300221160ustar00rootroot00000000000000// Proc_IGMsgV3.h: Interface for the Proc_IGMsgV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_IGMSGV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_IGMSGV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiIGMsgV3.h" class Proc_IGMsgV3 : public PcktParsingProcessor { public: Proc_IGMsgV3(); virtual ~Proc_IGMsgV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiIGMsgV3 Om_IGMsgV3; }; #endif // PROC_IGMSGV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV1.cpp000066400000000000000000000065711210750432300231010ustar00rootroot00000000000000// Proc_LosRespV1.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosRespV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosRespV1::Proc_LosRespV1() { PcktID = "LosRespV1"; } Proc_LosRespV1::~Proc_LosRespV1() { } void Proc_LosRespV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Line Of Sight Response V1:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_LosRespV1.SetLosID(pPV->GetUShort(),true); printf("\tLine Of Sight ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetVisible(pPV->GetBool(),true); printf("\tVisible = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetRange(pPV->Getdouble(),true); printf("\tRange = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetLatitude(pPV->Getdouble(),true); printf("\tLatitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetLongitude(pPV->Getdouble(),true); printf("\tLongitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV1.SetAltitude(pPV->Getdouble(),true); printf("\tAltitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_LosRespV1; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV1.h000066400000000000000000000011201210750432300225270ustar00rootroot00000000000000// Proc_LosRespV1.h: Interface for the Proc_LosRespV1 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_LOSRESPV1_PARSING_PROCESSOR_INCLUDED_) #define PROC_LOSRESPV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiLosRespV1.h" class Proc_LosRespV1 : public PcktParsingProcessor { public: Proc_LosRespV1(); virtual ~Proc_LosRespV1(); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosRespV1 Om_LosRespV1; }; #endif // PROC_LOSRESPV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV2.cpp000066400000000000000000000065711210750432300231020ustar00rootroot00000000000000// Proc_LosRespV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosRespV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosRespV2::Proc_LosRespV2() { PcktID = "LosRespV2"; } Proc_LosRespV2::~Proc_LosRespV2() { } void Proc_LosRespV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Line Of Sight Response V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_LosRespV2.SetLosID(pPV->GetUShort(),true); printf("\tLine Of Sight ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetVisible(pPV->GetBool(),true); printf("\tVisible = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetRange(pPV->Getdouble(),true); printf("\tRange = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetLatitude(pPV->Getdouble(),true); printf("\tLatitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetLongitude(pPV->Getdouble(),true); printf("\tLongitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV2.SetAltitude(pPV->Getdouble(),true); printf("\tAltitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_LosRespV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV2.h000066400000000000000000000011201210750432300225300ustar00rootroot00000000000000// Proc_LosRespV2.h: Interface for the Proc_LosRespV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_LOSRESPV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_LOSRESPV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiLosRespV2.h" class Proc_LosRespV2 : public PcktParsingProcessor { public: Proc_LosRespV2(); virtual ~Proc_LosRespV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosRespV2 Om_LosRespV2; }; #endif // PROC_LOSRESPV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV3.cpp000066400000000000000000000061021210750432300230710ustar00rootroot00000000000000// Proc_LosRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosRespV3::Proc_LosRespV3() { PcktID = "LosRespV3"; } Proc_LosRespV3::~Proc_LosRespV3() { } void Proc_LosRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Line Of Sight Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_LosRespV3.SetLosID(pPV->GetUShort(),true); printf("\tLine Of Sight ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3.SetEntityIDValid(pPV->GetBool(),true); printf("\tEntity ID Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3.SetVisible(pPV->GetBool(),true); printf("\tVisible = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3.SetRespCount(pPV->GetUChar(),true); printf("\tResponse Count = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3.SetRange(pPV->Getdouble(),true); printf("\tRange = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_LosRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV3.h000066400000000000000000000011201210750432300225310ustar00rootroot00000000000000// Proc_LosRespV3.h: Interface for the Proc_LosRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_LOSRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_LOSRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiLosRespV3.h" class Proc_LosRespV3 : public PcktParsingProcessor { public: Proc_LosRespV3(); virtual ~Proc_LosRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosRespV3 Om_LosRespV3; }; #endif // PROC_LOSRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV3_2.cpp000066400000000000000000000066541210750432300233260ustar00rootroot00000000000000// Proc_LosRespV3_2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosRespV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosRespV3_2::Proc_LosRespV3_2() { PcktID = "LosRespV3_2"; } Proc_LosRespV3_2::~Proc_LosRespV3_2() { } void Proc_LosRespV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Line Of Sight Response V3_2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_LosRespV3_2.SetLosID(pPV->GetUShort(),true); printf("\tLine Of Sight ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetEntityIDValid(pPV->GetBool(),true); printf("\tEntity ID Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetVisible(pPV->GetBool(),true); printf("\tVisible = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetHostFrame(pPV->GetUChar(),true); printf("\tHost Frame = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetRespCount(pPV->GetUChar(),true); printf("\tResponse Count = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosRespV3_2.SetRange(pPV->Getdouble(),true); printf("\tRange = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_LosRespV3_2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosRespV3_2.h000066400000000000000000000011461210750432300227620ustar00rootroot00000000000000// Proc_LosRespV3_2.h: Interface for the Proc_LosRespV3_2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_LOSRESPV3_2_PARSING_PROCESSOR_INCLUDED_) #define PROC_LOSRESPV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiLosRespV3_2.h" class Proc_LosRespV3_2 : public PcktParsingProcessor { public: Proc_LosRespV3_2(); virtual ~Proc_LosRespV3_2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosRespV3_2 Om_LosRespV3_2; }; #endif // PROC_LOSRESPV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosXRespV3.cpp000066400000000000000000000162751210750432300232350ustar00rootroot00000000000000// Proc_LosXRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosXRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosXRespV3::Proc_LosXRespV3() { PcktID = "LosXRespV3"; } Proc_LosXRespV3::~Proc_LosXRespV3() { } void Proc_LosXRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Line Of Sight Extended Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_LosXRespV3.SetLosID(pPV->GetUShort(),true); printf("\tLine Of Sight ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetEntityIDValid(pPV->GetBool(),true); printf("\tEntity ID Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetRangeValid(pPV->GetBool(),true); printf("\tRange Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetVisible(pPV->GetBool(),true); printf("\tVisible = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_LosXRespV3.SetIntersectionCoordSys(CigiBaseLosResp::Geodetic,true); printf("\tIntersectionCoordSys = 0 : Geodetic\n"); } else if(strcmp("Entity",pPV->GetStr()) == 0) { Om_LosXRespV3.SetIntersectionCoordSys(CigiBaseLosResp::Entity,true); printf("\tIntersectionCoordSys = 1 : Entity\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetRespCount(pPV->GetUChar(),true); printf("\tResponse Count = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetRange(pPV->Getdouble(),true); printf("\tRange = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetRed(pPV->GetUChar(),true); printf("\tRed = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetGreen(pPV->GetUChar(),true); printf("\tGreen = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetBlue(pPV->GetUChar(),true); printf("\tBlue = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetAlpha(pPV->GetUChar(),true); printf("\tAlpha = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetNormalAz(pPV->Getfloat(),true); printf("\tNormal Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3.SetNormalEl(pPV->Getfloat(),true); printf("\tNormal Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_LosXRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosXRespV3.h000066400000000000000000000011331210750432300226650ustar00rootroot00000000000000// Proc_LosXRespV3.h: Interface for the Proc_LosXRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_LOSXRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_LOSXRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiLosXRespV3.h" class Proc_LosXRespV3 : public PcktParsingProcessor { public: Proc_LosXRespV3(); virtual ~Proc_LosXRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosXRespV3 Om_LosXRespV3; }; #endif // PROC_LOSXRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosXRespV3_2.cpp000066400000000000000000000156651210750432300234600ustar00rootroot00000000000000// Proc_LosXRespV3_2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_LosXRespV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_LosXRespV3_2::Proc_LosXRespV3_2() { PcktID = "LosXRespV3_2"; } Proc_LosXRespV3_2::~Proc_LosXRespV3_2() { } void Proc_LosXRespV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Line Of Sight Extended Response V3_2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_LosXRespV3_2.SetLosID(pPV->GetUShort(),true); printf("\tLine Of Sight ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetValid(pPV->GetBool(),true); printf("\tValid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetEntityIDValid(pPV->GetBool(),true); printf("\tEntity ID Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetRangeValid(pPV->GetBool(),true); printf("\tRange Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetVisible(pPV->GetBool(),true); printf("\tVisible = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetHostFrame(pPV->GetUChar(),true); printf("\tHost Frame = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetRespCount(pPV->GetUChar(),true); printf("\tResponse Count = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetRange(pPV->Getdouble(),true); printf("\tRange = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetXoff(pPV->Getdouble(),true); printf("\tX Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetYoff(pPV->Getdouble(),true); printf("\tY Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetZoff(pPV->Getdouble(),true); printf("\tZ Offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetRed(pPV->GetUChar(),true); printf("\tRed = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetGreen(pPV->GetUChar(),true); printf("\tGreen = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetBlue(pPV->GetUChar(),true); printf("\tBlue = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetAlpha(pPV->GetUChar(),true); printf("\tAlpha = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetMaterial(pPV->GetULong(),true); printf("\tMaterial = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetNormalAz(pPV->Getfloat(),true); printf("\tNormal Azimuth = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_LosXRespV3_2.SetNormalEl(pPV->Getfloat(),true); printf("\tNormal Elevation = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_LosXRespV3_2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_LosXRespV3_2.h000066400000000000000000000011611210750432300231070ustar00rootroot00000000000000// Proc_LosXRespV3_2.h: Interface for the Proc_LosXRespV3_2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_LOSXRESPV3_2_PARSING_PROCESSOR_INCLUDED_) #define PROC_LOSXRESPV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiLosXRespV3_2.h" class Proc_LosXRespV3_2 : public PcktParsingProcessor { public: Proc_LosXRespV3_2(); virtual ~Proc_LosXRespV3_2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiLosXRespV3_2 Om_LosXRespV3_2; }; #endif // PROC_LOSXRESPV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_MaritimeSurfaceRespV3.cpp000066400000000000000000000042521210750432300254200ustar00rootroot00000000000000// Proc_MaritimeSurfaceRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_MaritimeSurfaceRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_MaritimeSurfaceRespV3::Proc_MaritimeSurfaceRespV3() { PcktID = "MaritimeSurfaceRespV3"; } Proc_MaritimeSurfaceRespV3::~Proc_MaritimeSurfaceRespV3() { } void Proc_MaritimeSurfaceRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Maritime Surface Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_MaritimeSurfaceRespV3.SetRequestID(pPV->GetUChar(),true); printf("\tRequest ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceRespV3.SetSurfaceHeight(pPV->Getfloat(),true); printf("\tSurface Height = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_MaritimeSurfaceRespV3.SetWaterTemp(pPV->Getfloat(),true); printf("\tWater Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_MaritimeSurfaceRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_MaritimeSurfaceRespV3.h000066400000000000000000000013241210750432300250620ustar00rootroot00000000000000// Proc_MaritimeSurfaceRespV3.h: Interface for the Proc_MaritimeSurfaceRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_MARITIMESURFACERESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_MARITIMESURFACERESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiMaritimeSurfaceRespV3.h" class Proc_MaritimeSurfaceRespV3 : public PcktParsingProcessor { public: Proc_MaritimeSurfaceRespV3(); virtual ~Proc_MaritimeSurfaceRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiMaritimeSurfaceRespV3 Om_MaritimeSurfaceRespV3; }; #endif // PROC_MARITIMESURFACERESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_PositionRespV3.cpp000066400000000000000000000131061210750432300241420ustar00rootroot00000000000000// Proc_PositionRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_PositionRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_PositionRespV3::Proc_PositionRespV3() { PcktID = "PositionRespV3"; } Proc_PositionRespV3::~Proc_PositionRespV3() { } void Proc_PositionRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Position Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_PositionRespV3.SetObjectID(pPV->GetUShort(),true); printf("\tObject ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetArtPartID(pPV->GetUChar(),true); printf("\tArticulated Part ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Entity",pPV->GetStr()) == 0) { Om_PositionRespV3.SetObjectClass(CigiBasePositionResp::Entity,true); printf("\tObject Class = 0 : Entity\n"); } else if(strcmp("ArtPart",pPV->GetStr()) == 0) { Om_PositionRespV3.SetObjectClass(CigiBasePositionResp::ArtPart,true); printf("\tObject Class = 1 : ArtPart\n"); } else if(strcmp("View",pPV->GetStr()) == 0) { Om_PositionRespV3.SetObjectClass(CigiBasePositionResp::View,true); printf("\tObject Class = 2 : View\n"); } else if(strcmp("ViewGrp",pPV->GetStr()) == 0) { Om_PositionRespV3.SetObjectClass(CigiBasePositionResp::ViewGrp,true); printf("\tObject Class = 3 : ViewGrp\n"); } else if(strcmp("MotionTracker",pPV->GetStr()) == 0) { Om_PositionRespV3.SetObjectClass(CigiBasePositionResp::MotionTracker,true); printf("\tObject Class = 4 : MotionTracker\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Geodetic",pPV->GetStr()) == 0) { Om_PositionRespV3.SetCoordSys(CigiBasePositionResp::Geodetic,true); printf("\tCoordinate System = 0 : Geodetic\n"); } else if(strcmp("ParentEntity",pPV->GetStr()) == 0) { Om_PositionRespV3.SetCoordSys(CigiBasePositionResp::ParentEntity,true); printf("\tCoordinate System = 1 : ParentEntity\n"); } else if(strcmp("Submodel",pPV->GetStr()) == 0) { Om_PositionRespV3.SetCoordSys(CigiBasePositionResp::Submodel,true); printf("\tCoordinate System = 2 : Submodel\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetLatOrXoff(pPV->Getdouble(),true); printf("\tLat or X offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetLonOrYoff(pPV->Getdouble(),true); printf("\tLon or Y offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetAltOrZoff(pPV->Getdouble(),true); printf("\tAlt or Z offset = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetRoll(pPV->Getfloat(),true); printf("\tRoll = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetPitch(pPV->Getfloat(),true); printf("\tPitch = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_PositionRespV3.SetYaw(pPV->Getfloat(),true); printf("\tYaw = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_PositionRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_PositionRespV3.h000066400000000000000000000012071210750432300236060ustar00rootroot00000000000000// Proc_PositionRespV3.h: Interface for the Proc_PositionRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_POSITIONRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_POSITIONRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiPositionRespV3.h" class Proc_PositionRespV3 : public PcktParsingProcessor { public: Proc_PositionRespV3(); virtual ~Proc_PositionRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiPositionRespV3 Om_PositionRespV3; }; #endif // PROC_POSITIONRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV1.cpp000066400000000000000000000052631210750432300221360ustar00rootroot00000000000000// Proc_SOFV1.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SOFV1.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SOFV1::Proc_SOFV1() { PcktID = "SOFV1"; } Proc_SOFV1::~Proc_SOFV1() { } void Proc_SOFV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Start Of Frame V1:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SOFV1.SetDatabaseID(pPV->GetChar(),true); printf("\tDatabase ID = %d\n",pPV->GetChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV1.SetIGStatus(pPV->GetUChar(),true); printf("\tIG Status = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Reset",pPV->GetStr()) == 0) { Om_SOFV1.SetIGMode(CigiBaseSOF::Reset,true); printf("\tIG Mode = 0 : Reset\n"); } else if(strcmp("Operate",pPV->GetStr()) == 0) { Om_SOFV1.SetIGMode(CigiBaseSOF::Operate,true); printf("\tIG Mode = 1 : Operate\n"); } else if(strcmp("debug",pPV->GetStr()) == 0) { Om_SOFV1.SetIGMode(CigiBaseSOF::debug,true); printf("\tIG Mode = 2 : debug\n"); } else if(strcmp("OfflineMaint",pPV->GetStr()) == 0) { Om_SOFV1.SetIGMode(CigiBaseSOF::OfflineMaint,true); printf("\tIG Mode = 3 : OfflineMaint\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV1.SetFrameCntr(pPV->GetULong(),true); printf("\tFrame Counter = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SOFV1; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV1.h000066400000000000000000000010441210750432300215740ustar00rootroot00000000000000// Proc_SOFV1.h: Interface for the Proc_SOFV1 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SOFV1_PARSING_PROCESSOR_INCLUDED_) #define PROC_SOFV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSOFV1.h" class Proc_SOFV1 : public PcktParsingProcessor { public: Proc_SOFV1(); virtual ~Proc_SOFV1(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSOFV1 Om_SOFV1; }; #endif // PROC_SOFV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV2.cpp000066400000000000000000000057651210750432300221460ustar00rootroot00000000000000// Proc_SOFV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SOFV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SOFV2::Proc_SOFV2() { PcktID = "SOFV2"; } Proc_SOFV2::~Proc_SOFV2() { } void Proc_SOFV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Start Of Frame V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SOFV2.SetDatabaseID(pPV->GetChar(),true); printf("\tDatabase ID = %d\n",pPV->GetChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV2.SetIGStatus(pPV->GetUChar(),true); printf("\tIG Status = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Reset",pPV->GetStr()) == 0) { Om_SOFV2.SetIGMode(CigiBaseSOF::Reset,true); printf("\tIG Mode = 0 : Reset\n"); } else if(strcmp("Operate",pPV->GetStr()) == 0) { Om_SOFV2.SetIGMode(CigiBaseSOF::Operate,true); printf("\tIG Mode = 1 : Operate\n"); } else if(strcmp("debug",pPV->GetStr()) == 0) { Om_SOFV2.SetIGMode(CigiBaseSOF::debug,true); printf("\tIG Mode = 2 : debug\n"); } else if(strcmp("OfflineMaint",pPV->GetStr()) == 0) { Om_SOFV2.SetIGMode(CigiBaseSOF::OfflineMaint,true); printf("\tIG Mode = 3 : OfflineMaint\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV2.SetFrameCntr(pPV->GetULong(),true); printf("\tFrame Counter = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV2.SetTimeStamp(pPV->Getfloat(),true); printf("\tTime Stamp = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SOFV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV2.h000066400000000000000000000010441210750432300215750ustar00rootroot00000000000000// Proc_SOFV2.h: Interface for the Proc_SOFV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SOFV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_SOFV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSOFV2.h" class Proc_SOFV2 : public PcktParsingProcessor { public: Proc_SOFV2(); virtual ~Proc_SOFV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSOFV2 Om_SOFV2; }; #endif // PROC_SOFV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV3.cpp000066400000000000000000000076611210750432300221440ustar00rootroot00000000000000// Proc_SOFV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SOFV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SOFV3::Proc_SOFV3() { PcktID = "SOFV3"; } Proc_SOFV3::~Proc_SOFV3() { } void Proc_SOFV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Start Of Frame V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SOFV3.SetDatabaseID(pPV->GetChar(),true); printf("\tDatabase ID = %d\n",pPV->GetChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3.SetIGStatus(pPV->GetUChar(),true); printf("\tIG Status = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Reset",pPV->GetStr()) == 0) { Om_SOFV3.SetIGMode(CigiBaseSOF::Reset,true); printf("\tIG Mode = 0 : Reset\n"); } else if(strcmp("Operate",pPV->GetStr()) == 0) { Om_SOFV3.SetIGMode(CigiBaseSOF::Operate,true); printf("\tIG Mode = 1 : Operate\n"); } else if(strcmp("debug",pPV->GetStr()) == 0) { Om_SOFV3.SetIGMode(CigiBaseSOF::debug,true); printf("\tIG Mode = 2 : debug\n"); } else if(strcmp("OfflineMaint",pPV->GetStr()) == 0) { Om_SOFV3.SetIGMode(CigiBaseSOF::OfflineMaint,true); printf("\tIG Mode = 3 : OfflineMaint\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3.SetTimeStampValid(pPV->GetBool(),true); printf("\tTime Stamp Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("WGS84",pPV->GetStr()) == 0) { Om_SOFV3.SetEarthRefModel(CigiBaseSOF::WGS84,true); printf("\tEarth Reference Model = 0 : WGS84\n"); } else if(strcmp("HostDefined",pPV->GetStr()) == 0) { Om_SOFV3.SetEarthRefModel(CigiBaseSOF::HostDefined,true); printf("\tEarth Reference Model = 1 : HostDefined\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3.SetFrameCntr(pPV->GetULong(),true); printf("\tFrame Counter = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3.SetTimeStamp(pPV->GetULong(),true); printf("\tTime Stamp = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SOFV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV3.h000066400000000000000000000010441210750432300215760ustar00rootroot00000000000000// Proc_SOFV3.h: Interface for the Proc_SOFV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SOFV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_SOFV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSOFV3.h" class Proc_SOFV3 : public PcktParsingProcessor { public: Proc_SOFV3(); virtual ~Proc_SOFV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSOFV3 Om_SOFV3; }; #endif // PROC_SOFV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV3_2.cpp000066400000000000000000000107621210750432300223610ustar00rootroot00000000000000// Proc_SOFV3_2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SOFV3_2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SOFV3_2::Proc_SOFV3_2() { PcktID = "SOFV3_2"; } Proc_SOFV3_2::~Proc_SOFV3_2() { } void Proc_SOFV3_2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Start Of Frame V3_2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SOFV3_2.SetDatabaseID(pPV->GetUChar(),true); printf("\tDatabase ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3_2.SetIGStatus(pPV->GetUChar(),true); printf("\tIG Status = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Reset",pPV->GetStr()) == 0) { Om_SOFV3_2.SetIGMode(CigiBaseSOF::Reset,true); printf("\tIG Mode = 0 : Reset\n"); } else if(strcmp("Standby",pPV->GetStr()) == 0) { Om_SOFV3_2.SetIGMode(CigiBaseSOF::Standby,true); printf("\tIG Mode = 1 : Standby\n"); } else if(strcmp("Operate",pPV->GetStr()) == 0) { Om_SOFV3_2.SetIGMode(CigiBaseSOF::Operate,true); printf("\tIG Mode = 2 : Operate\n"); } else if(strcmp("debug",pPV->GetStr()) == 0) { Om_SOFV3_2.SetIGMode(CigiBaseSOF::debug,true); printf("\tIG Mode = 3 : debug\n"); } else if(strcmp("OfflineMaint",pPV->GetStr()) == 0) { Om_SOFV3_2.SetIGMode(CigiBaseSOF::OfflineMaint,true); printf("\tIG Mode = 4 : OfflineMaint\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3_2.SetTimeStampValid(pPV->GetBool(),true); printf("\tTime Stamp Valid = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("WGS84",pPV->GetStr()) == 0) { Om_SOFV3_2.SetEarthRefModel(CigiBaseSOF::WGS84,true); printf("\tEarth Reference Model = 0 : WGS84\n"); } else if(strcmp("HostDefined",pPV->GetStr()) == 0) { Om_SOFV3_2.SetEarthRefModel(CigiBaseSOF::HostDefined,true); printf("\tEarth Reference Model = 1 : HostDefined\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3_2.SetFrameCntr(pPV->GetULong(),true); printf("\tFrame Counter = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3_2.SetTimeStamp(pPV->GetULong(),true); printf("\tTime Stamp = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SOFV3_2.SetLastRcvdHostFrame(pPV->GetULong(),true); printf("\tLast Received Host Frame = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SOFV3_2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SOFV3_2.h000066400000000000000000000010721210750432300220200ustar00rootroot00000000000000// Proc_SOFV3_2.h: Interface for the Proc_SOFV3_2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SOFV3_2_PARSING_PROCESSOR_INCLUDED_) #define PROC_SOFV3_2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSOFV3_2.h" class Proc_SOFV3_2 : public PcktParsingProcessor { public: Proc_SOFV3_2(); virtual ~Proc_SOFV3_2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSOFV3_2 Om_SOFV3_2; }; #endif // PROC_SOFV3_2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorRespV1.cpp000066400000000000000000000102051210750432300236020ustar00rootroot00000000000000// Proc_SensorRespV1.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorRespV1.h" #include "ParseValue.h" #include using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorRespV1::Proc_SensorRespV1() { PcktID = "SensorRespV1"; } Proc_SensorRespV1::~Proc_SensorRespV1() { } void Proc_SensorRespV1::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Sensor Response V1:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SensorRespV1.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV1.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Searching",pPV->GetStr()) == 0) { Om_SensorRespV1.SetSensorStat(CigiBaseSensorResp::Searching,true); printf("\tSensor Status = 0 : Searching\n"); } else if(strcmp("Tracking",pPV->GetStr()) == 0) { Om_SensorRespV1.SetSensorStat(CigiBaseSensorResp::Tracking,true); printf("\tSensor Status = 1 : Tracking\n"); } else if(strcmp("NearBrakeLock",pPV->GetStr()) == 0) { Om_SensorRespV1.SetSensorStat(CigiBaseSensorResp::NearBrakeLock,true); printf("\tSensor Status = 2 : NearBrakeLock\n"); } else if(strcmp("BrakeLock",pPV->GetStr()) == 0) { Om_SensorRespV1.SetSensorStat(CigiBaseSensorResp::BrakeLock,true); printf("\tSensor Status = 3 : BrakeLock\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV1.SetGateSzX(pPV->GetUShort(),true); printf("\tGate Size X = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV1.SetGateSzY(pPV->GetUShort(),true); printf("\tGate Size Y = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { float tOff = pPV->Getfloat(); Cigi_int32 tBaOff = CIGI_FLOAT_TO_BA(tOff); float tCnvtOff = (float)CIGI_BA_TO_FLOAT(tBaOff); Om_SensorRespV1.SetGateXoff(tOff,true); printf("\tGate X offset = %f\n",tCnvtOff); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { float tOff = pPV->Getfloat(); Cigi_int32 tBaOff = CIGI_FLOAT_TO_BA(tOff); float tCnvtOff = (float)CIGI_BA_TO_FLOAT(tBaOff); Om_SensorRespV1.SetGateYoff(tOff,true); printf("\tGate Y offset = %f\n",tCnvtOff); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SensorRespV1; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorRespV1.h000066400000000000000000000011611210750432300232500ustar00rootroot00000000000000// Proc_SensorRespV1.h: Interface for the Proc_SensorRespV1 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SENSORRESPV1_PARSING_PROCESSOR_INCLUDED_) #define PROC_SENSORRESPV1_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSensorRespV1.h" class Proc_SensorRespV1 : public PcktParsingProcessor { public: Proc_SensorRespV1(); virtual ~Proc_SensorRespV1(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorRespV1 Om_SensorRespV1; }; #endif // PROC_SENSORRESPV1_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorRespV2.cpp000066400000000000000000000075401210750432300236130ustar00rootroot00000000000000// Proc_SensorRespV2.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorRespV2.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorRespV2::Proc_SensorRespV2() { PcktID = "SensorRespV2"; } Proc_SensorRespV2::~Proc_SensorRespV2() { } void Proc_SensorRespV2::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Sensor Response V2:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SensorRespV2.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV2.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Searching",pPV->GetStr()) == 0) { Om_SensorRespV2.SetSensorStat(CigiBaseSensorResp::Searching,true); printf("\tSensor Status = 0 : Searching\n"); } else if(strcmp("Tracking",pPV->GetStr()) == 0) { Om_SensorRespV2.SetSensorStat(CigiBaseSensorResp::Tracking,true); printf("\tSensor Status = 1 : Tracking\n"); } else if(strcmp("NearBrakeLock",pPV->GetStr()) == 0) { Om_SensorRespV2.SetSensorStat(CigiBaseSensorResp::NearBrakeLock,true); printf("\tSensor Status = 2 : NearBrakeLock\n"); } else if(strcmp("BrakeLock",pPV->GetStr()) == 0) { Om_SensorRespV2.SetSensorStat(CigiBaseSensorResp::BrakeLock,true); printf("\tSensor Status = 3 : BrakeLock\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV2.SetGateSzX(pPV->GetUShort(),true); printf("\tGate Size X = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV2.SetGateSzY(pPV->GetUShort(),true); printf("\tGate Size Y = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV2.SetGateXoff(pPV->Getfloat(),true); printf("\tGate X offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV2.SetGateYoff(pPV->Getfloat(),true); printf("\tGate Y offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SensorRespV2; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorRespV2.h000066400000000000000000000011611210750432300232510ustar00rootroot00000000000000// Proc_SensorRespV2.h: Interface for the Proc_SensorRespV2 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SENSORRESPV2_PARSING_PROCESSOR_INCLUDED_) #define PROC_SENSORRESPV2_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSensorRespV2.h" class Proc_SensorRespV2 : public PcktParsingProcessor { public: Proc_SensorRespV2(); virtual ~Proc_SensorRespV2(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorRespV2 Om_SensorRespV2; }; #endif // PROC_SENSORRESPV2_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorRespV3.cpp000066400000000000000000000102541210750432300236100ustar00rootroot00000000000000// Proc_SensorRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorRespV3::Proc_SensorRespV3() { PcktID = "SensorRespV3"; } Proc_SensorRespV3::~Proc_SensorRespV3() { } void Proc_SensorRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Sensor Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SensorRespV3.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV3.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Searching",pPV->GetStr()) == 0) { Om_SensorRespV3.SetSensorStat(CigiBaseSensorResp::Searching,true); printf("\tSensor Status = 0 : Searching\n"); } else if(strcmp("Tracking",pPV->GetStr()) == 0) { Om_SensorRespV3.SetSensorStat(CigiBaseSensorResp::Tracking,true); printf("\tSensor Status = 1 : Tracking\n"); } else if(strcmp("NearBrakeLock",pPV->GetStr()) == 0) { Om_SensorRespV3.SetSensorStat(CigiBaseSensorResp::NearBrakeLock,true); printf("\tSensor Status = 2 : NearBrakeLock\n"); } else if(strcmp("BrakeLock",pPV->GetStr()) == 0) { Om_SensorRespV3.SetSensorStat(CigiBaseSensorResp::BrakeLock,true); printf("\tSensor Status = 3 : BrakeLock\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV3.SetGateSzX(pPV->GetUShort(),true); printf("\tGate Size X = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV3.SetGateSzY(pPV->GetUShort(),true); printf("\tGate Size Y = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV3.SetGateXoff(pPV->Getfloat(),true); printf("\tGate X offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV3.SetGateYoff(pPV->Getfloat(),true); printf("\tGate Y offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorRespV3.SetFrameCntr(pPV->GetULong(),true); printf("\tFrame Counter = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SensorRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorRespV3.h000066400000000000000000000011611210750432300232520ustar00rootroot00000000000000// Proc_SensorRespV3.h: Interface for the Proc_SensorRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SENSORRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_SENSORRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSensorRespV3.h" class Proc_SensorRespV3 : public PcktParsingProcessor { public: Proc_SensorRespV3(); virtual ~Proc_SensorRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorRespV3 Om_SensorRespV3; }; #endif // PROC_SENSORRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorXRespV3.cpp000066400000000000000000000135471210750432300237500ustar00rootroot00000000000000// Proc_SensorXRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_SensorXRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_SensorXRespV3::Proc_SensorXRespV3() { PcktID = "SensorXRespV3"; } Proc_SensorXRespV3::~Proc_SensorXRespV3() { } void Proc_SensorXRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Sensor Extended Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_SensorXRespV3.SetViewID(pPV->GetUShort(),true); printf("\tView ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetSensorID(pPV->GetUChar(),true); printf("\tSensor ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { if(strcmp("Searching",pPV->GetStr()) == 0) { Om_SensorXRespV3.SetSensorStat(CigiBaseSensorResp::Searching,true); printf("\tSensor Status = 0 : Searching\n"); } else if(strcmp("Tracking",pPV->GetStr()) == 0) { Om_SensorXRespV3.SetSensorStat(CigiBaseSensorResp::Tracking,true); printf("\tSensor Status = 1 : Tracking\n"); } else if(strcmp("NearBrakeLock",pPV->GetStr()) == 0) { Om_SensorXRespV3.SetSensorStat(CigiBaseSensorResp::NearBrakeLock,true); printf("\tSensor Status = 2 : NearBrakeLock\n"); } else if(strcmp("BrakeLock",pPV->GetStr()) == 0) { Om_SensorXRespV3.SetSensorStat(CigiBaseSensorResp::BrakeLock,true); printf("\tSensor Status = 3 : BrakeLock\n"); } } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetEntityTgt(pPV->GetBool(),true); printf("\tEntity Target = %d\n",pPV->GetBool()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetEntityID(pPV->GetUShort(),true); printf("\tEntity ID = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetGateSzX(pPV->GetUShort(),true); printf("\tGate Size X = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetGateSzY(pPV->GetUShort(),true); printf("\tGate Size Y = %u\n",pPV->GetUShort()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetGateXoff(pPV->Getfloat(),true); printf("\tGate X offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetGateYoff(pPV->Getfloat(),true); printf("\tGate Y offset = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetFrameCntr(pPV->GetULong(),true); printf("\tFrame Counter = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetTrackPntLat(pPV->Getdouble(),true); printf("\tTrack Point Latitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetTrackPntLon(pPV->Getdouble(),true); printf("\tTrack Point Longitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_SensorXRespV3.SetTrackPntAlt(pPV->Getdouble(),true); printf("\tTrack Point Altitude = %f\n",pPV->Getdouble()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_SensorXRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_SensorXRespV3.h000066400000000000000000000011741210750432300234060ustar00rootroot00000000000000// Proc_SensorXRespV3.h: Interface for the Proc_SensorXRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_SENSORXRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_SENSORXRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiSensorXRespV3.h" class Proc_SensorXRespV3 : public PcktParsingProcessor { public: Proc_SensorXRespV3(); virtual ~Proc_SensorXRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiSensorXRespV3 Om_SensorXRespV3; }; #endif // PROC_SENSORXRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_TerrestrialSurfaceRespV3.cpp000066400000000000000000000032541210750432300261520ustar00rootroot00000000000000// Proc_TerrestrialSurfaceRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_TerrestrialSurfaceRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_TerrestrialSurfaceRespV3::Proc_TerrestrialSurfaceRespV3() { PcktID = "TerrestrialSurfaceRespV3"; } Proc_TerrestrialSurfaceRespV3::~Proc_TerrestrialSurfaceRespV3() { } void Proc_TerrestrialSurfaceRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Terrestrial Surface Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_TerrestrialSurfaceRespV3.SetRequestID(pPV->GetUChar(),true); printf("\tRequest ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_TerrestrialSurfaceRespV3.SetSurfaceConditionID(pPV->GetULong(),true); printf("\tSurface Condition ID = %u\n",pPV->GetULong()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_TerrestrialSurfaceRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_TerrestrialSurfaceRespV3.h000066400000000000000000000013651210750432300256200ustar00rootroot00000000000000// Proc_TerrestrialSurfaceRespV3.h: Interface for the Proc_TerrestrialSurfaceRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_TERRESTRIALSURFACERESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_TERRESTRIALSURFACERESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiTerrestrialSurfaceRespV3.h" class Proc_TerrestrialSurfaceRespV3 : public PcktParsingProcessor { public: Proc_TerrestrialSurfaceRespV3(); virtual ~Proc_TerrestrialSurfaceRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiTerrestrialSurfaceRespV3 Om_TerrestrialSurfaceRespV3; }; #endif // PROC_TERRESTRIALSURFACERESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_WeatherCondRespV3.cpp000066400000000000000000000071011210750432300245370ustar00rootroot00000000000000// Proc_WeatherCondRespV3.cpp: implementation of the Proc_EntityCtrlV3 Parsing // Processor class.. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #ifndef _WIN32 #include #elif _MSC_VER > 1300 #include #else #include #endif #include "Proc_WeatherCondRespV3.h" #include "ParseValue.h" using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Proc_WeatherCondRespV3::Proc_WeatherCondRespV3() { PcktID = "WeatherCondRespV3"; } Proc_WeatherCondRespV3::~Proc_WeatherCondRespV3() { } void Proc_WeatherCondRespV3::ProcPckt(ParseValue *pPV) { if(Omsg == NULL) return; printf("Weather Condition Response V3:\n"); pPV = pPV->nxt(); // skip the cmd name if(pPV != NULL) { try { Om_WeatherCondRespV3.SetRequestID(pPV->GetUChar(),true); printf("\tRequest ID = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetHumidity(pPV->GetUChar(),true); printf("\tHumidity = %u\n",pPV->GetUChar()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetAirTemp(pPV->Getfloat(),true); printf("\tAir Temperature = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetVisibility(pPV->Getfloat(),true); printf("\tVisibility = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetHorizWindSp(pPV->Getfloat(),true); printf("\tHorizontal Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetVertWindSp(pPV->Getfloat(),true); printf("\tVertical Wind Speed = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetWindDir(pPV->Getfloat(),true); printf("\tWind Direction = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } if(pPV != NULL) { try { Om_WeatherCondRespV3.SetBaroPress(pPV->Getfloat(),true); printf("\tBarometric Pressure = %f\n",pPV->Getfloat()); } catch(CigiValueOutOfRangeException ORX) { if(ORX.HasMessage()) printf("%s\n",ORX.what()); } pPV = pPV->nxt(); } *Omsg << Om_WeatherCondRespV3; } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/Proc_WeatherCondRespV3.h000066400000000000000000000012501210750432300242030ustar00rootroot00000000000000// Proc_WeatherCondRespV3.h: Interface for the Proc_WeatherCondRespV3 parsing // Processor class. // ////////////////////////////////////////////////////////////////////// #if !defined(PROC_WEATHERCONDRESPV3_PARSING_PROCESSOR_INCLUDED_) #define PROC_WEATHERCONDRESPV3_PARSING_PROCESSOR_INCLUDED_ #include "PcktParsingProcessor.h" #include "CigiWeatherCondRespV3.h" class Proc_WeatherCondRespV3 : public PcktParsingProcessor { public: Proc_WeatherCondRespV3(); virtual ~Proc_WeatherCondRespV3(); virtual void ProcPckt(ParseValue *pPV); protected: CigiWeatherCondRespV3 Om_WeatherCondRespV3; }; #endif // PROC_WEATHERCONDRESPV3_PARSING_PROCESSOR_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/ReadMe.txt000066400000000000000000000024041210750432300215010ustar00rootroot00000000000000======================================================================== CONSOLE APPLICATION : IgSendCcl Project Overview ======================================================================== AppWizard has created this IgSendCcl application for you. This file contains a summary of what you will find in each of the files that make up your IgSendCcl application. IgSendCcl.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. IgSendCcl.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named IgSendCcl.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" comments to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/000077500000000000000000000000001210750432300222315ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/V3_2/000077500000000000000000000000001210750432300227425ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/V3_2/CigiDummyIG.def000066400000000000000000000005501210750432300255310ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 3 2 TstDta.csv cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/V3_2/TstDta.csv000066400000000000000000000120361210750432300246640ustar00rootroot00000000000000HatHotRespV3_2,22563,true,HAT,10,648.0712890625 HatHotRespV3_2,26287,true,HOT,8,447.1435546875 HatHotRespV3_2,51687,true,HAT,2,-617.85888671875 HatHotRespV3_2,35135,false,HOT,2,-547.9736328125 HatHotXRespV3_2,56365,true,0,74.27978515625,-847.10693359375,2517893119,164.24560546875,54.0032958984375 HatHotXRespV3_2,62375,true,10,-899.84130859375,299.8046875,3764781055,-176.2646484375,88.406982421875 HatHotXRespV3_2,61009,true,14,2.86865234375,516.78466796875,584450047,21.2255859375,-68.741455078125 HatHotXRespV3_2,63601,false,12,562.92724609375,-654.9072265625,3129737215,-6.185302734375,21.6485595703125 LosRespV3_2,33167,true,true,false,6,198,439,30.426025390625 LosRespV3_2,20863,false,false,true,8,60,32771,572.357177734375 LosRespV3_2,48475,true,false,false,11,146,26391,383.636474609375 LosRespV3_2,64651,false,false,true,4,23,18067,363.128662109375 LosXRespV3_2,40373,true,true,true,true,13,249,42181,108.642578125,122.6806640625,-129.57763671875,-414.306640625,65,85,245,175,2467561471,3.900146484375,-78.310546875 LosXRespV3_2,26911,true,false,true,false,8,64,10687,223.81591796875,192.44384765625,-26.79443359375,-443.05419921875,141,34,139,56,3859546111,157.994384765625,14.3975830078125 LosXRespV3_2,63323,true,true,true,false,6,61,44135,129.974365234375,-203.125,41.19873046875,-305.0537109375,218,34,5,69,434110463,-23.40087890625,53.9208984375 LosXRespV3_2,41275,true,true,true,true,3,53,18829,654.96826171875,53.955078125,-770.6298828125,710.0830078125,71,26,188,204,1436942335,-100.953369140625,28.6083984375 SensorRespV3,58101,222,Searching,9993,62843,-86.30859375,19.0008544921875,1734344703 SensorRespV3,17075,178,Tracking,36169,24161,27.279052734375,14.2767333984375,166199295 SensorRespV3,47009,167,NearBrakeLock,63761,61209,68.9886474609375,-24.54345703125,4126277631 SensorRespV3,31849,42,BrakeLock,15279,37067,72.015380859375,23.6260986328125,2336751615 SensorXRespV3,3691,142,Searching,false,40337,58971,18729,56.326904296875,-5.2239990234375,1696858111,14.0130615234375,77.27783203125,-804.19921875 SensorXRespV3,34073,46,Tracking,true,62833,1443,61971,-34.7662353515625,73.948974609375,1225261055,-26.2188720703125,113.587646484375,-619.873046875 SensorXRespV3,167,159,NearBrakeLock,false,40363,12241,52861,-23.90625,31.1187744140625,2366111743,46.7193603515625,-28.355712890625,250.9765625 SensorXRespV3,51655,113,BrakeLock,false,21135,51405,26623,46.0931396484375,62.4847412109375,1256587263,68.3843994140625,38.946533203125,337.46337890625 PositionRespV3,6695,102,Entity,Geodetic,710.99853515625,-93.56689453125,-532.8369140625,-50.0537109375,1.1700439453125,67.5439453125 PositionRespV3,12395,90,ArtPart,ParentEntity,845.703125,550.78125,584.228515625,114.23583984375,21.719970703125,273.153076171875 PositionRespV3,42261,191,View,Submodel,286.80419921875,-351.6845703125,474.853515625,-166.09130859375,-38.0401611328125,88.9892578125 PositionRespV3,15567,49,ViewGrp,Geodetic,-60.72998046875,866.63818359375,987.60986328125,170.96923828125,-1.3348388671875,75.750732421875 PositionRespV3,51301,196,MotionTracker,ParentEntity,62.98828125,-940.673828125,663.51318359375,-121.61865234375,14.6502685546875,263.0126953125 WeatherCondRespV3,165,54,-67.4423217773438,27.34375,684.5703125,-453.4912109375,222.659912109375,371.307373046875 WeatherCondRespV3,224,15,-80.1754760742188,847.503662109375,589.599609375,587.40234375,127.606201171875,259.857177734375 WeatherCondRespV3,244,57,-61.3656616210938,562.744140625,254.791259765625,644.775390625,296.861572265625,294.0673828125 WeatherCondRespV3,46,94,72.7615356445313,166.717529296875,749.969482421875,994.7509765625,205.828857421875,474.4873046875 AerosolRespV3,168,151,266.265869140625 AerosolRespV3,119,209,546.7529296875 AerosolRespV3,125,92,952.392578125 AerosolRespV3,35,148,112.762451171875 MaritimeSurfaceRespV3,214,-71.4111328125,-39.9002075195313,-39.9002075195313 MaritimeSurfaceRespV3,167,-374.1455078125,35.2926635742188,35.2926635742188 MaritimeSurfaceRespV3,181,445.9228515625,-31.0635375976563,-31.0635375976563 MaritimeSurfaceRespV3,206,380.92041015625,73.1036376953125,73.1036376953125 TerrestrialSurfaceRespV3,147,1472331775 TerrestrialSurfaceRespV3,247,740032511 TerrestrialSurfaceRespV3,80,590217215 TerrestrialSurfaceRespV3,233,1529479167 CollDetSegRespV3,43957,110,NonEntity,43567,4198236159,824.03564453125 CollDetSegRespV3,2711,72,Entity,56429,3080191999,380.92041015625 CollDetSegRespV3,16981,208,NonEntity,42733,3593863167,65.0634765625 CollDetSegRespV3,985,207,Entity,19999,660602879,182.769775390625 CollDetVolRespV3,17139,91,NonEntity,5405,85 CollDetVolRespV3,26407,235,Entity,6507,34 CollDetVolRespV3,33317,225,NonEntity,62655,151 CollDetVolRespV3,17753,134,Entity,15107,54 AnimationStopV3,62801 AnimationStopV3,12577 AnimationStopV3,61605 AnimationStopV3,18585 EventNotificationV3,12053,452853759,3122135039,1907884031 EventNotificationV3,54245,3129999359,1708654591,831651839 EventNotificationV3,9093,2494562303,419430399,2114060287 EventNotificationV3,36095,3931635711,3863085055,504102911 IGMsgV3,15861,This is message alpha. IGMsgV3,6011,This is message beta. IGMsgV3,63583,This is message delta. IGMsgV3,61879,This is message gamma. cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v1/000077500000000000000000000000001210750432300225575ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v1/CigiDummyIG.def000066400000000000000000000005501210750432300253460ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 1 0 TstDta.csv cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v1/TstDta.csv000066400000000000000000000022761210750432300245060ustar00rootroot00000000000000HatRespV1,35905,false,1901854719,825.3173828125 HatRespV1,1365,true,4170448895,-746.58203125 HatRespV1,37401,true,1067188223,-16.17431640625 HatRespV1,32859,true,3503554559,856.3232421875 LosRespV1,60875,true,true,1668022271,908.935546875,-38.397216796875,-110.8740234375,-421.2646484375 LosRespV1,17667,true,true,3889561599,555.23681640625,-21.1541748046875,148.95263671875,513.85498046875 LosRespV1,64757,false,false,2240806911,853.790283203125,-36.002197265625,165.60791015625,13.916015625 LosRespV1,14177,true,true,883163135,370.513916015625,76.22314453125,155.5224609375,947.93701171875 CollDetSegRespV1,61325,52,2123104255,-283.02001953125,999.20654296875,-445.3125 CollDetSegRespV1,41629,13,927072255,-253.41796875,558.16650390625,-239.8681640625 CollDetSegRespV1,17317,79,3377463295,-524.4140625,155.029296875,-102.84423828125 CollDetSegRespV1,49037,109,3188981759,-626.953125,690.97900390625,211.9140625 SensorRespV1,14,198,Searching,28069,25915,21.236572265625,21.236572265625 SensorRespV1,15,248,Tracking,30579,61603,84.979248046875,84.979248046875 SensorRespV1,2,7,NearBrakeLock,23305,23885,-69.971923828125,-69.971923828125 SensorRespV1,26,65,BrakeLock,57763,52429,-32.0526123046875,-32.0526123046875 cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v2/000077500000000000000000000000001210750432300225605ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v2/CigiDummyIG.def000066400000000000000000000005501210750432300253470ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 2 0 TstDta.csv cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v2/TstDta.csv000066400000000000000000000033571210750432300245100ustar00rootroot00000000000000HatRespV2,60203,true,1674182655,785.70556640625 HatRespV2,9453,true,2022834175,-629.21142578125 HatRespV2,28415,true,72876031,-536.865234375 HatRespV2,3237,false,3934650367,659.24072265625 LosRespV2,46319,true,false,3309567999,931.549072265625,68.2745361328125,154.390869140625,-907.1044921875 LosRespV2,36735,true,false,896794623,791.32080078125,-39.52880859375,-81.826171875,817.56591796875 LosRespV2,44987,false,true,645136383,539.61181640625,-9.60205078125,-124.683837890625,-426.20849609375 LosRespV2,571,false,true,1267204095,423.431396484375,16.962890625,-161.21337890625,-294.7998046875 CollDetSegRespV2,11291,104,NonEntity,16475,1100611583,153.076171875,-192.5048828125,360.83984375 CollDetSegRespV2,46387,19,Entity,26873,3344433151,-998.291015625,390.80810546875,985.77880859375 CollDetSegRespV2,4195,17,NonEntity,789,3059089407,-371.826171875,833.06884765625,679.62646484375 CollDetSegRespV2,33701,95,Entity,65209,3121872895,318.42041015625,-250.6103515625,5.55419921875 SensorRespV2,11,96,Searching,8867,12627,-51.87744140625,6.70166015625 SensorRespV2,1,175,Tracking,61697,6457,77.508544921875,61.94091796875 SensorRespV2,12,164,NearBrakeLock,64693,50355,52.6190185546875,48.49365234375 SensorRespV2,22,130,BrakeLock,36743,38217,18.7261962890625,86.24267578125 HotRespV2,61131,false,3219128319,-829.16259765625 HotRespV2,33497,true,1246756863,362.36572265625 HotRespV2,41051,true,2586443775,-420.71533203125 HotRespV2,16787,true,3590586367,-640.31982421875 CollDetVolRespV2,60935,63,NonEntity,20409 CollDetVolRespV2,53023,66,Entity,20471 CollDetVolRespV2,61905,21,NonEntity,24149 CollDetVolRespV2,51,46,Entity,2899 IGMsgV2,34659,This is message alpha. IGMsgV2,57485,This is message beta. IGMsgV2,48347,This is message delta. IGMsgV2,60741,This is message gamma. cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v3/000077500000000000000000000000001210750432300225615ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v3/CigiDummyIG.def000066400000000000000000000005501210750432300253500ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 3 0 TstDta.csv cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/TestingRepos/v3/TstDta.csv000066400000000000000000000117741210750432300245130ustar00rootroot00000000000000HatHotRespV3,26787,false,HAT,566.89453125 HatHotRespV3,39971,true,HOT,-639.46533203125 HatHotRespV3,14041,false,HAT,136.5966796875 HatHotRespV3,43505,true,HOT,647.94921875 HatHotXRespV3,54869,true,-206.97021484375,-47.18017578125,675414015,113.565673828125,63.270263671875 HatHotXRespV3,57211,false,-349.7314453125,-874.3896484375,3071541247,-40.23193359375,-35.947265625 HatHotXRespV3,52743,true,546.81396484375,-911.62109375,4102422527,-133.9892578125,-60.128173828125 HatHotXRespV3,4233,true,0.3662109375,663.39111328125,2526019583,-163.531494140625,-80.6396484375 LosRespV3,46915,true,false,false,21,41577,9.3994140625 LosRespV3,22411,true,true,true,175,4075,301.94091796875 LosRespV3,21061,false,true,true,29,58525,556.121826171875 LosRespV3,37807,true,false,true,229,53015,307.586669921875 LosXRespV3,27591,true,true,false,false,Geodetic,101,38495,76.629638671875,-953.30810546875,320.61767578125,314.453125,108,229,120,60,2266234879,-69.697265625,-25.235595703125 LosXRespV3,35501,true,true,false,true,Entity,239,31563,175.384521484375,-349.67041015625,-733.154296875,167.724609375,41,118,112,87,822607871,-58.99658203125,-38.572998046875 LosXRespV3,31569,true,true,false,false,Geodetic,137,58139,333.953857421875,535.82763671875,835.693359375,-423.828125,176,131,178,94,2574516223,168.145751953125,63.5723876953125 LosXRespV3,21293,true,true,true,true,Entity,156,6077,600.494384765625,553.28369140625,-814.453125,-436.21826171875,200,23,21,197,218628095,41.099853515625,79.1070556640625 SensorRespV3,58101,222,Searching,9993,62843,-86.30859375,19.0008544921875,1734344703 SensorRespV3,17075,178,Tracking,36169,24161,27.279052734375,14.2767333984375,166199295 SensorRespV3,47009,167,NearBrakeLock,63761,61209,68.9886474609375,-24.54345703125,4126277631 SensorRespV3,31849,42,BrakeLock,15279,37067,72.015380859375,23.6260986328125,2336751615 SensorXRespV3,3691,142,Searching,false,40337,58971,18729,56.326904296875,-5.2239990234375,1696858111,14.0130615234375,77.27783203125,-804.19921875 SensorXRespV3,34073,46,Tracking,true,62833,1443,61971,-34.7662353515625,73.948974609375,1225261055,-26.2188720703125,113.587646484375,-619.873046875 SensorXRespV3,167,159,NearBrakeLock,false,40363,12241,52861,-23.90625,31.1187744140625,2366111743,46.7193603515625,-28.355712890625,250.9765625 SensorXRespV3,51655,113,BrakeLock,false,21135,51405,26623,46.0931396484375,62.4847412109375,1256587263,68.3843994140625,38.946533203125,337.46337890625 PositionRespV3,6695,102,Entity,Geodetic,710.99853515625,-93.56689453125,-532.8369140625,-50.0537109375,1.1700439453125,67.5439453125 PositionRespV3,12395,90,ArtPart,ParentEntity,845.703125,550.78125,584.228515625,114.23583984375,21.719970703125,273.153076171875 PositionRespV3,42261,191,View,Submodel,286.80419921875,-351.6845703125,474.853515625,-166.09130859375,-38.0401611328125,88.9892578125 PositionRespV3,15567,49,ViewGrp,Geodetic,-60.72998046875,866.63818359375,987.60986328125,170.96923828125,-1.3348388671875,75.750732421875 PositionRespV3,51301,196,MotionTracker,ParentEntity,62.98828125,-940.673828125,663.51318359375,-121.61865234375,14.6502685546875,263.0126953125 WeatherCondRespV3,165,54,-67.4423217773438,27.34375,684.5703125,-453.4912109375,222.659912109375,371.307373046875 WeatherCondRespV3,224,15,-80.1754760742188,847.503662109375,589.599609375,587.40234375,127.606201171875,259.857177734375 WeatherCondRespV3,244,57,-61.3656616210938,562.744140625,254.791259765625,644.775390625,296.861572265625,294.0673828125 WeatherCondRespV3,46,94,72.7615356445313,166.717529296875,749.969482421875,994.7509765625,205.828857421875,474.4873046875 AerosolRespV3,168,151,266.265869140625 AerosolRespV3,119,209,546.7529296875 AerosolRespV3,125,92,952.392578125 AerosolRespV3,35,148,112.762451171875 MaritimeSurfaceRespV3,214,-71.4111328125,-39.9002075195313,-39.9002075195313 MaritimeSurfaceRespV3,167,-374.1455078125,35.2926635742188,35.2926635742188 MaritimeSurfaceRespV3,181,445.9228515625,-31.0635375976563,-31.0635375976563 MaritimeSurfaceRespV3,206,380.92041015625,73.1036376953125,73.1036376953125 TerrestrialSurfaceRespV3,147,1472331775 TerrestrialSurfaceRespV3,247,740032511 TerrestrialSurfaceRespV3,80,590217215 TerrestrialSurfaceRespV3,233,1529479167 CollDetSegRespV3,43957,110,NonEntity,43567,4198236159,824.03564453125 CollDetSegRespV3,2711,72,Entity,56429,3080191999,380.92041015625 CollDetSegRespV3,16981,208,NonEntity,42733,3593863167,65.0634765625 CollDetSegRespV3,985,207,Entity,19999,660602879,182.769775390625 CollDetVolRespV3,17139,91,NonEntity,5405,85 CollDetVolRespV3,26407,235,Entity,6507,34 CollDetVolRespV3,33317,225,NonEntity,62655,151 CollDetVolRespV3,17753,134,Entity,15107,54 AnimationStopV3,62801 AnimationStopV3,12577 AnimationStopV3,61605 AnimationStopV3,18585 EventNotificationV3,12053,452853759,3122135039,1907884031 EventNotificationV3,54245,3129999359,1708654591,831651839 EventNotificationV3,9093,2494562303,419430399,2114060287 EventNotificationV3,36095,3931635711,3863085055,504102911 IGMsgV3,15861,This is message alpha. IGMsgV3,6011,This is message beta. IGMsgV3,63583,This is message delta. IGMsgV3,61879,This is message gamma. cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/XIGCtrl.cpp000066400000000000000000000007421210750432300215660ustar00rootroot00000000000000// XIGCtrl.cpp: Body of the XIGCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrl::XIGCtrl() { } XIGCtrl::~XIGCtrl() { } void XIGCtrl::OnPacketReceived(CigiBasePacket *Packet) { /* This Does not print anything! */ } cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/XIGCtrl.h000066400000000000000000000010521210750432300212260ustar00rootroot00000000000000// XIGCtrl.h: interface for the XIGCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrl_INCLUDED_) #define _PROC_XIGCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV3_2.h" class XIGCtrl : public CigiBaseEventProcessor { public: XIGCtrl(); virtual ~XIGCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV3_2 *TPckt; }; #endif // _PROC_XIGCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/stdafx.cpp000066400000000000000000000004401210750432300215760ustar00rootroot00000000000000// stdafx.cpp : source file that includes just the standard includes // IgSendCcl.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file cigi-ccl-3.3.3a+svn818/Testing/IgSendCcl/stdafx.h000066400000000000000000000004311210750432300212430ustar00rootroot00000000000000// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include #include // TODO: reference additional headers your program requires here cigi-ccl-3.3.3a+svn818/Testing/Networking/000077500000000000000000000000001210750432300201375ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/Testing/Networking/Network.cpp000066400000000000000000000174771210750432300223140ustar00rootroot00000000000000/**
 *  The Multi-Purpose Viewer
 *  Copyright (c) 2004 The Boeing Company
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 *  FILENAME:   Network.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *
 *  PROGRAM DESCRIPTION:
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 *
 *  07/10/2006 Greg Basler                       1.7.2
 *  Corrected a problem with the code that cause a stray
 *  pointer due to the "JUST_IP_ADDRESSES" declaration.
 * 
* The Boeing Company * 1.7.2 */ #include "Network.h" #include #include #include // ================================================ // Network // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Network::Network() { valid = false; #ifndef JUST_IP_ADDRESSES saddr = NULL; #endif } // ================================================ // ~Network // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Network::~Network() { closeSocket(); #ifndef JUST_IP_ADDRESSES freeaddrinfo(saddr); #endif } // ================================================ // openSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool Network::openSocket( const char * ip, const int port_send, const int port_rcv ) { // Initialize communications. InitializeComm(ip, port_send, port_rcv); return valid; } // ================================================ // openSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool Network::openSocket(const int port_rcv ) { // Initialize communications. InitializeComm(port_rcv); return valid; } // ================================================ // closeSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::closeSocket() { if( !valid ) return; #ifdef WIN32 // Clean up the sockets. closesocket(sndsock); closesocket(rcvsock); // Clean up WinSock. Again, this is not needed for non-Windows platforms. WSACleanup(); #else // Clean up the sockets. close(sndsock); close(rcvsock); #endif valid = false; } // ================================================ // send // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int Network::send( unsigned char * sendbuff, int sendsize ) { if( !valid) return -1; #ifdef JUST_IP_ADDRESSES if(!saddr.sin_family ) return -1; return sendto(sndsock, (const char *)sendbuff, sendsize, 0, (struct sockaddr *)&saddr, sizeof(struct sockaddr)); #else if(!saddr) return -1; return sendto(sndsock, (const char *)sendbuff, sendsize, 0, saddr->ai_addr, saddr->ai_addrlen); #endif // JUST_IP_ADDRESSES } // ================================================ // recv // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int Network::recv( unsigned char * rcvbuff, int recvsize ) { if( !valid ) return -1; return recvfrom(rcvsock, (char *)rcvbuff, recvsize, 0, NULL, 0); } // ================================================ // InitializeComm // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::InitializeComm(const char *ipaddr, const int sndport, const int rcvport) { int status; #ifdef WIN32 // Initialize winsock. If you are using Berkeley sockets on a // non-Win32 platform, you can leave out these first two lines. WSADATA wsainfo; WSAStartup(MAKEWORD(1, 1), &wsainfo); #endif // Open the connection for sending. #ifdef JUST_IP_ADDRESSES saddr.sin_family = AF_INET; saddr.sin_port = htons(sndport); // Use whatever port your host listens on saddr.sin_addr.s_addr = inet_addr(ipaddr); // IP address of host sndsock = socket(AF_INET, SOCK_DGRAM, 0); if( sndsock < 0 ) { // socket could not be created valid = false; return; } #else if(saddr) { freeaddrinfo(saddr); saddr = NULL; } char portstr[6]; snprintf(portstr, sizeof(portstr), "%u", sndport); struct addrinfo hint; hint.ai_flags = 0; //hint.ai_family = AF_INET | AF_INET6; hint.ai_family = AF_UNSPEC; hint.ai_socktype = SOCK_DGRAM; hint.ai_protocol = IPPROTO_UDP; hint.ai_addrlen = 0; hint.ai_addr = NULL; hint.ai_canonname = NULL; hint.ai_next = NULL; int result = getaddrinfo(ipaddr, portstr, &hint, &saddr); if(result) { if(saddr) { freeaddrinfo(saddr); saddr = NULL; } return; } sndsock = socket(saddr->ai_family, saddr->ai_socktype, saddr->ai_protocol); #endif // JUST_IP_ADDRESSES // Open the connection for receiving. memset(&raddr,0,sizeof(raddr)); raddr.sin_family = AF_INET; raddr.sin_port = htons(rcvport); // Use whatever port your host sends to raddr.sin_addr.s_addr = htonl(INADDR_ANY); rcvsock = socket(AF_INET, SOCK_DGRAM, 0); if( rcvsock < 0 ) { // socket could not be created valid = false; return; } // Make the address reusable. int sockparam = 1; /* TRUE; */ setsockopt(rcvsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&sockparam, sizeof(int)); // Make the socket non-blocking. #ifdef WIN32 // This is how sockets are put in non-blocking mode on Windows. unsigned long arg = 1L; ioctlsocket(rcvsock, FIONBIO, &arg); #else // This is how sockets are put in non-blocking mode on non-Windows operating systems (and Cygwin). fcntl( rcvsock, F_SETFL, O_NONBLOCK ); #endif // Bind the socket to the local address. status = bind(rcvsock, (struct sockaddr *)&raddr, sizeof(raddr)); if( status != 0 ) { // socket could not be bound valid = false; return; } // FIXME - more error checking valid = true; } // ================================================ // InitializeComm // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::InitializeComm(const int rcvport) { int status; #ifdef WIN32 // Initialize winsock. If you are using Berkeley sockets on a // non-Win32 platform, you can leave out these first two lines. WSADATA wsainfo; WSAStartup(MAKEWORD(1, 1), &wsainfo); #endif sndsock = socket(AF_INET, SOCK_DGRAM, 0); if( sndsock < 0 ) { // socket could not be created valid = false; return; } // Disable sending. #ifdef JUST_IP_ADDRESSES saddr.sin_family = 0; #else if(saddr) { freeaddrinfo(saddr); saddr = NULL; } #endif // JUST_IP_ADDRESSES // Open the connection for receiving. memset(&raddr,0,sizeof(raddr)); raddr.sin_family = AF_INET; raddr.sin_port = htons(rcvport); // Use whatever port your host sends to raddr.sin_addr.s_addr = htonl(INADDR_ANY); rcvsock = socket(AF_INET, SOCK_DGRAM, 0); if( rcvsock < 0 ) { // socket could not be created valid = false; return; } // Make the address reusable. int sockparam = 1; /* TRUE; */ setsockopt(rcvsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&sockparam, sizeof(int)); // Make the socket non-blocking. #ifdef WIN32 // This is how sockets are put in non-blocking mode on Windows. unsigned long arg = 1L; ioctlsocket(rcvsock, FIONBIO, &arg); #else // This is how sockets are put in non-blocking mode on non-Windows operating systems (and Cygwin). fcntl( rcvsock, F_SETFL, O_NONBLOCK ); #endif // Bind the socket to the local address. status = bind(rcvsock, (struct sockaddr *)&raddr, sizeof(raddr)); if( status != 0 ) { // socket could not be bound valid = false; return; } // FIXME - more error checking valid = true; } cigi-ccl-3.3.3a+svn818/Testing/Networking/Network.h000066400000000000000000000117701210750432300217470ustar00rootroot00000000000000/**
 *  The Multi-Purpose Viewer
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   Network.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 *
 *  07/10/2006 Greg Basler                       1.7.2
 *  Corrected a problem with the code that cause a stray
 *  pointer due to the "JUST_IP_ADDRESSES" declaration.
 * 
* The Boeing Company * 1.7.2 */ #ifndef _MPV_NETWORK_INTERFACE_INCLUDED_ #define _MPV_NETWORK_INTERFACE_INCLUDED_ #ifdef WIN32 #include #else #include #include #include #include #include #include #endif #ifdef WIN32 #define JUST_IP_ADDRESSES #endif //========================================================= //! The class encapsulating the network interface. //! class Network { public: //==> Management //========================================================= //! General Constructor //! Network(); //========================================================= //! General Destructor //! ~Network(); //==> Networking methods //========================================================= //! Opens a network communication socket //! \param ip - The "to" internet address //! \param port_send - The port on which the messages are being sent //! \param port_rcv - the port on which messages are being received //! //! \return Success or Failure //! bool openSocket( const char * ip, const int port_send, const int port_rcv ) ; //========================================================= //! Opens a receive only network communication socket. Only //! recv will work. //! \param port_rcv - the port on which messages are being received //! //! \return Success or Failure //! bool openSocket(const int port_rcv ) ; //========================================================= //! Closes the socket //! void closeSocket() ; //========================================================= //! Sends a message //! \param sendbuff - A pointer to the buffer containing the //! message to be sent. //! \param sendsize - The size of the message //! //! \return The number of bytes sent, or -1 on error. //! int send( unsigned char * sendbuff, int sendsize ) ; //========================================================= //! Receive a message //! \param rcvbuff - A pointer to the buffer to place the //! incoming message. //! \param recvsize - The maximum size of the received message. //! //! \return The number of bytes recieved, or -1 on error. //! int recv( unsigned char * rcvbuff, int recvsize ) ; private: //========================================================= //! Initializes the communication //! \param ipaddr - The "to" internet address //! \param sndport - The port on which the messages are being sent //! \param rcvport - the port on which messages are being received //! void InitializeComm(const char *ipaddr, const int sndport, const int rcvport); //========================================================= //! Initializes incoming communication only //! \param rcvport - the port on which messages are being received //! void InitializeComm(const int rcvport); // Berkeley Sockets stuff //========================================================= //! The send socket //! int sndsock; //========================================================= //! The receive socket //! int rcvsock; //========================================================= //! The sending socket address //! #ifdef JUST_IP_ADDRESSES struct sockaddr_in saddr; #else struct addrinfo *saddr; #endif // JUST_IP_ADDRESSES //========================================================= //! The receiving socket address //! struct sockaddr_in raddr; //========================================================= //! The Valid flag //! bool valid; }; #endif // _MPV_NETWORK_INTERFACE_INCLUDED_ cigi-ccl-3.3.3a+svn818/Testing/Networking/Networking.sln000066400000000000000000000016751210750432300230150ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Networking", "Networking.vcproj", "{328B478F-5BC1-4014-91DE-C60EC257BD9E}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {328B478F-5BC1-4014-91DE-C60EC257BD9E}.Debug.ActiveCfg = Debug|Win32 {328B478F-5BC1-4014-91DE-C60EC257BD9E}.Debug.Build.0 = Debug|Win32 {328B478F-5BC1-4014-91DE-C60EC257BD9E}.Release.ActiveCfg = Release|Win32 {328B478F-5BC1-4014-91DE-C60EC257BD9E}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/Testing/Networking/Networking.vcproj000066400000000000000000000056341210750432300235230ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/Testing/Networking/ReadMe.txt000066400000000000000000000016111210750432300220340ustar00rootroot00000000000000======================================================================== STATIC LIBRARY : Networking Project Overview ======================================================================== AppWizard has created this Networking library project for you. No source files were created as part of your project. Networking.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" comments to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// cigi-ccl-3.3.3a+svn818/bootstrap000077500000000000000000000033141210750432300163370ustar00rootroot00000000000000#! /bin/sh # # This script is used to call the autoconf, automake, etc tools. # These tools create some template files and a 'configure' script. # The configure script, in conjunction with the template files, is used # to create Makefiles. Only Cigi developers should need to run this script. # # This script was provided by Axel Volley (at MPI?) # # If we're on OS X, use glibtoolize instead of toolize HOSTTYPE=`uname` if [ "$HOSTTYPE" == "Darwin" ]; then LIBTOOLIZE=glibtoolize else LIBTOOLIZE=libtoolize fi # Check Autoconf version if [ -x `which autoconf` ]; then AC_VER=`autoconf --version | head -1 | sed 's/^[^0-9]*//'` AC_VER_MAJOR=`echo $AC_VER | cut -f1 -d'.'` AC_VER_MINOR=`echo $AC_VER | cut -f2 -d'.' | sed 's/[^0-9]*$//'` if [ "$AC_VER_MAJOR" -lt "2" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "13" ]; then echo "Autoconf 2.13 or greater needed to build configure." exit 1 fi if [ "$AC_VER_MINOR" -lt "50" ]; then if [ ! -e configure.in ]; then ln -s configure.ac configure.in fi echo "If you see some warnings about cross-compiling, don't worry; this is normal." else rm -f configure.in fi else echo autoconf not found. CIGI CL CVS requires autoconf to bootstrap itself. exit 1 fi run_cmd() { echo running $* ... if ! $*; then echo failed! exit 1 fi } # Check if /usr/local/share/aclocal exists if [ -d /usr/local/share/aclocal ]; then ACLOCAL_INCLUDE="$ACLOCAL_INCLUDE -I /usr/local/share/aclocal" fi run_cmd aclocal $ACLOCAL_INCLUDE run_cmd $LIBTOOLIZE --automake --copy run_cmd automake --add-missing --copy run_cmd autoconf echo echo "Now type './configure' to configure CIGI class lib." echo cigi-ccl-3.3.3a+svn818/ccl_dll/000077500000000000000000000000001210750432300157675ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/ccl_dll/ccl_dll.sln000066400000000000000000000020721210750432300201020ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccl_dll", "ccl_dll.vcproj", "{5F4E4776-BB82-43C9-B3C1-1EC98613D6AD}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution dllDebugMT_DLL = dllDebugMT_DLL dllReleaseMT_DLL = dllReleaseMT_DLL EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {5F4E4776-BB82-43C9-B3C1-1EC98613D6AD}.dllDebugMT_DLL.ActiveCfg = dllDebugMT_DLL|Win32 {5F4E4776-BB82-43C9-B3C1-1EC98613D6AD}.dllDebugMT_DLL.Build.0 = dllDebugMT_DLL|Win32 {5F4E4776-BB82-43C9-B3C1-1EC98613D6AD}.dllReleaseMT_DLL.ActiveCfg = dllReleaseMT_DLL|Win32 {5F4E4776-BB82-43C9-B3C1-1EC98613D6AD}.dllReleaseMT_DLL.Build.0 = dllReleaseMT_DLL|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/ccl_dll/ccl_dll.vcproj000066400000000000000000000755441210750432300206270ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/ccl_lib/000077500000000000000000000000001210750432300157625ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/ccl_lib/ccl_lib.sln000066400000000000000000000035061210750432300200730ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccl_lib", "ccl_lib.vcproj", "{C0B88FB5-7583-4546-A898-70821569969A}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution libDebugMT = libDebugMT libDebugMT_DLL = libDebugMT_DLL libDebugST = libDebugST libReleaseMT = libReleaseMT libReleaseMT_DLL = libReleaseMT_DLL libReleaseST = libReleaseST EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {C0B88FB5-7583-4546-A898-70821569969A}.libDebugMT.ActiveCfg = libDebugMT|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libDebugMT.Build.0 = libDebugMT|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libDebugMT_DLL.ActiveCfg = libDebugMT_DLL|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libDebugMT_DLL.Build.0 = libDebugMT_DLL|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libDebugST.ActiveCfg = libDebugST|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libDebugST.Build.0 = libDebugST|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libReleaseMT.ActiveCfg = libReleaseMT|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libReleaseMT.Build.0 = libReleaseMT|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libReleaseMT_DLL.ActiveCfg = libReleaseMT_DLL|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libReleaseMT_DLL.Build.0 = libReleaseMT_DLL|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libReleaseST.ActiveCfg = libReleaseST|Win32 {C0B88FB5-7583-4546-A898-70821569969A}.libReleaseST.Build.0 = libReleaseST|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/ccl_lib/ccl_lib.vcproj000066400000000000000000007373621210750432300206200ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/cigicl.pc.in000066400000000000000000000004051210750432300165550ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: CIGI Class Library Description: Library for unpacking, manipulating, and packing CIGI packets Version: @VERSION@ Libs: -L${libdir} -lcigicl Cflags: -I${includedir}/cigicl cigi-ccl-3.3.3a+svn818/cigicl.pc.in_cmake000066400000000000000000000005421210750432300177170ustar00rootroot00000000000000prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_PREFIX@/lib includedir=@CMAKE_INSTALL_PREFIX@/include Name: CIGI Class Library Description: Library for unpacking, manipulating, and packing CIGI packets Version: @VERSION@ Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lcigicl Cflags: -I@CMAKE_INSTALL_PREFIX@/include/cigicl cigi-ccl-3.3.3a+svn818/configure.ac000066400000000000000000000010271210750432300166610ustar00rootroot00000000000000AC_INIT([CIGI Class Library], [3.3.2], [http://cigi.sourceforge.net], [cigicl]) AM_INIT_AUTOMAKE AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LIBTOOL # check the endian-ness of the compiling machine AC_C_BIGENDIAN # the variable ac_cv_c_bigendian is defined by the AC_C_BIGENDIAN macro if test $ac_cv_c_bigendian = no; then # the following will append a -D argument to the compiler's argument list AC_DEFINE(CIGI_LITTLE_ENDIAN) fi AC_CONFIG_FILES([ cigicl.pc Makefile include/Makefile source/Makefile]) AC_OUTPUT cigi-ccl-3.3.3a+svn818/examples/000077500000000000000000000000001210750432300162115ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/000077500000000000000000000000001210750432300203205ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/CigiDummyIG.def000066400000000000000000000003631210750432300231110ustar00rootroot00000000000000 127.0.0.1 8000 8001 60 cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/CigiDummyIG.sln000066400000000000000000000016771210750432300231600ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CigiDummyIG", "CigiDummyIG.vcproj", "{BC172A11-CFFB-4DC9-AB96-3E0DA19E5B10}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {BC172A11-CFFB-4DC9-AB96-3E0DA19E5B10}.Debug.ActiveCfg = Debug|Win32 {BC172A11-CFFB-4DC9-AB96-3E0DA19E5B10}.Debug.Build.0 = Debug|Win32 {BC172A11-CFFB-4DC9-AB96-3E0DA19E5B10}.Release.ActiveCfg = Release|Win32 {BC172A11-CFFB-4DC9-AB96-3E0DA19E5B10}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/CigiDummyIG.vcproj000066400000000000000000000552111210750432300236600ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/DefaultProc.cpp000066400000000000000000000025431210750432300232400ustar00rootroot00000000000000/**
 *  This Class will process any unassigned packets
 *
 *  FILENAME:   DefaultProc.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "DefaultProc.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::DefaultProc() { } // ================================================ // ~DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::~DefaultProc() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void DefaultProc::OnPacketReceived(CigiBasePacket *Packet) { unsigned char *buff = ((CigiDefaultPacket *)Packet)->GetDataPtr(); cout << "Received an Umsupported packet: id " << hex << (int *)buff << endl; } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/DefaultProc.h000066400000000000000000000026241210750432300227050ustar00rootroot00000000000000/**
 *  This Class will process any unassigned packets
 *
 *  FILENAME:   DefaultProc.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) #define _DEFAULT_PACKET_PROCESSING_INCLUDED_ #include using namespace std; //========================================================= //! The base class for the SOF Event Packet Processing //! class DefaultProc : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! DefaultProc(); //========================================================= //! General Destructor //! virtual ~DefaultProc(); //==> Incoming Packet Processing //========================================================= //! The default callback handler for the CIGI //! \param Packet - The pointer to the default packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/DummyIG.cpp000066400000000000000000000420211210750432300223360ustar00rootroot00000000000000/**
 *  The CIGI Dummy IG
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   DummyIG.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 * 
* The Boeing Company * 1.0 */ #include "Network.h" // network includes winsock2.h which must be included before windows.h // Tiny XML includes #define TINYXML_USE_STL #define TIXML_USE_STL #include #include // CIGI related includes // From CCL #include #include #include #include // Handling routines #include "DefaultProc.h" #include "XIGCtrl.h" #include "XEntityCtrl.h" #include "XConfClampEntityCtrl.h" #include "XCompCtrl.h" #include "XShortCompCtrl.h" #include "XArtPartCtrl.h" #include "XShortArtPartCtrl.h" #include "XRateCtrl.h" #include "XCelestialCtrl.h" #include "XAtmosCtrl.h" #include "XEnvRgnCtrl.h" #include "XWeatherCtrl.h" #include "XMaritimeSurfaceCtrl.h" #include "XWaveCtrl.h" #include "XTerrestrialSurfaceCtrl.h" #include "XViewCtrl.h" #include "XSensorCtrl.h" #include "XMotionTrackCtrl.h" #include "XEarthModelDef.h" #include "XTrajectory.h" #include "XViewDef.h" #include "XCollDetSegDef.h" #include "XCollDetVolDef.h" #include "XHatHotReq.h" #include "XLosSegReq.h" #include "XLosVectReq.h" #include "XPostionReq.h" #include "XEnvCondReq.h" #include "XSymbolSurfaceDefV3_3.h" #include "XSymbolCtrlV3_3.h" #include "XShortSymbolCtrlV3_3.h" #include "XSymbolTextDefV3_3.h" #include "XSymbolCircleDefV3_3.h" #include "XSymbolLineDefV3_3.h" #include "XSymbolCloneV3_3.h" // System includes #include #include #include #ifdef WIN32 #include #include #endif #ifdef WIN32 #include #else #include #endif // Special database information structure typedef struct Database_info { int id; double lat; double lon; double alt; } DbInfo; using namespace std; // ================================================ // Global variables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Networking class/object Network network; // CIGI specific static CigiIGSession *IGSn; static CigiOutgoingMsg *OmsgPtr; static CigiIncomingMsg *ImsgPtr; static DefaultProc DefaultPckt; static CigiSOFV3_2 CSOF; static XIGCtrl Pr_IGCtrl; static XEntityCtrl Pr_EntityCtrl; static XConfClampEntityCtrl Pr_ConfClampEntityCtrl; static XCompCtrl Pr_CompCtrl; static XShortCompCtrl Pr_ShortCompCtrl; static XArtPartCtrl Pr_ArtPartCtrl; static XShortArtPartCtrl Pr_ShortArtPartCtrl; static XRateCtrl Pr_RateCtrl; static XCelestialCtrl Pr_CelestialCtrl; static XAtmosCtrl Pr_AtmosCtrl; static XEnvRgnCtrl Pr_EnvRgnCtrl; static XWeatherCtrl Pr_WeatherCtrl; static XMaritimeSurfaceCtrl Pr_MaritimeSurfaceCtrl; static XWaveCtrl Pr_WaveCtrl; static XTerrestrialSurfaceCtrl Pr_TerrestrialSurfaceCtrl; static XViewCtrl Pr_ViewCtrl; static XSensorCtrl Pr_SensorCtrl; static XMotionTrackCtrl Pr_MotionTrackCtrl; static XEarthModelDef Pr_EarthModelDef; static XTrajectory Pr_Trajectory; static XViewDef Pr_ViewDef; static XCollDetSegDef Pr_CollDetSegDef; static XCollDetVolDef Pr_CollDetVolDef; static XHatHotReq Pr_HatHotReq; static XLosSegReq Pr_LosSegReq; static XLosVectReq Pr_LosVectReq; static XPositionReq Pr_PositionReq; static XEnvCondReq Pr_EnvCondReq; static XSymbolSurfaceDefV3_3 Pr_SymbolSurfaceDef; static XSymbolCtrlV3_3 Pr_SymbolCtrl; static XShortSymbolCtrlV3_3 Pr_ShortSymbolCtrl; static XSymbolTextDefV3_3 Pr_SymbolTextDef; static XSymbolCircleDefV3_3 Pr_SymbolCircleDef; static XSymbolLineDefV3_3 Pr_SymbolLineDef; static XSymbolCloneV3_3 Pr_SymbolClone; // CIGI network message buffers and information int recvLen; static unsigned char *pCigiOutBuf; #define RECV_BUFFER_SIZE 32768 static unsigned char CInBuf[RECV_BUFFER_SIZE]; static int CigiInSz; static int CigiOutSz; static int Port_H2IG; static int Port_IG2H; static string HostAddr; static float timeDelayLimit; static int Hz; static CigiSOFV3_2 check_SOF; // ================================================ // Pre-declaration of Local routines // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void); int init_cigi_if(void); void waitUntilBeginningOfFrame(void); #ifndef WIN32 float timevaldiff( struct timeval *t1, struct timeval *t2 ); #endif // ================================================ // Main // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int main(int argc, char* argv[]) { CigiInSz = 0; ReadConfig(); init_cigi_if(); /* CIGI messaging */ CigiOutgoingMsg &Omsg = *OmsgPtr; Omsg.BeginMsg(); while(1) { cout << "================================\n"; cout << "Frame: " << Omsg.GetFrameCnt() << endl; cout << "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n"; /* process incoming CIGI message - this could be long */ if( CigiInSz > 0 ) { try { ImsgPtr->ProcessIncomingMsg((unsigned char *)CInBuf,CigiInSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } } cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n"; // load the IG Control Omsg << CSOF; // wait until start of frame time waitUntilBeginningOfFrame(); // Do packaging here to // Package msg try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // Update Frame IDs Omsg.UpdateSOF(pCigiOutBuf); // send SOF message int sentBytes = network.send(pCigiOutBuf,CigiOutSz); // Check frame counter check_SOF.Unpack(pCigiOutBuf,false,NULL); cout << check_SOF.GetFrameCntr() << endl; Omsg.FreeMsg(); // Frees the buffer containing the message that was just sent // wait for Host message long HoldTime; bool RcvrProc = false; long CheckTime = time(&HoldTime); while(!RcvrProc) { if((CigiInSz = network.recv( CInBuf, RECV_BUFFER_SIZE )) > 0) RcvrProc = true; else { long TstTime = time(&HoldTime); if((TstTime - CheckTime) > 1) { cout << "Did not receive IG Control\n"; RcvrProc = true; CigiInSz = 0; } } } } // shut down the network network.closeSocket(); delete IGSn; return 0; } // ================================================ // Read Configuration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void) { TiXmlNode *bnode = NULL; // base node TiXmlText *Port_To_IG = NULL; TiXmlText *Port_To_Host = NULL; TiXmlText *Host_Addr = NULL; TiXmlText *Hertz_rate = NULL; TiXmlHandle *hConfig = NULL; // pointer to a Config handle TiXmlElement *Config = NULL; TiXmlText *DbDta = NULL; TiXmlDocument doc("CigiDummyIG.def"); bool stat = doc.LoadFile(); //set default values Port_H2IG = 8000; Port_IG2H = 8001; HostAddr = "127.0.0.1"; if(stat) { bnode = doc.FirstChild("MiniHostInitialization"); if(bnode == NULL) stat = false; // The file is not a Mission Function Initialization file } if(stat) { // get base configuration Config = bnode->FirstChildElement("Config"); if(Config != NULL) { hConfig = new TiXmlHandle(Config); Host_Addr = hConfig->FirstChildElement("Host_Addr").Child(0).Text(); if(Host_Addr) HostAddr = Host_Addr->Value(); Port_To_IG = hConfig->FirstChildElement("Port_To_IG").Child(0).Text(); Port_H2IG = (Port_To_IG) ? atoi(Port_To_IG->Value()) : 8000; Port_To_Host = hConfig->FirstChildElement("Port_To_Host").Child(0).Text(); Port_IG2H = (Port_To_Host) ? atoi(Port_To_Host->Value()) : 8001; Hertz_rate = hConfig->FirstChildElement("Hertz_rate").Child(0).Text(); Hz = (Hertz_rate) ? atoi(Hertz_rate->Value()) : 60; timeDelayLimit = 1.0f/((float)Hz); delete hConfig; } } } // ================================================ // Initialize interface to CIGI // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int init_cigi_if(void){ int err_status = 0; /* open sockets to CIGI */ // hostemu-ip-addr, hostemu-socket, local-socket printf("init_cigi_if: initializing ports to CIGI\n"); bool netstatus = network.openSocket( HostAddr.c_str(), Port_IG2H, Port_H2IG ); if( !netstatus ) { printf( "could not connect to CIGI host server\n" ); exit( 1 ); } else { printf( "successfully connected to CIGI host server\n" ); } IGSn = new CigiIGSession(1,32768,2,32768); // Add packet event handlers here! CigiOutgoingMsg &Omsg = IGSn->GetOutgoingMsgMgr(); CigiIncomingMsg &Imsg = IGSn->GetIncomingMsgMgr(); OmsgPtr = &Omsg; ImsgPtr = &Imsg; IGSn->SetCigiVersion(3,3); IGSn->SetSynchronous(true); Imsg.SetReaderCigiVersion(3,3); Imsg.UsingIteration(false); // set up a default handler for unhandled packets Imsg.RegisterEventProcessor(0, (CigiBaseEventProcessor *) &DefaultPckt); // Register all the Event processors Imsg.RegisterEventProcessor(CIGI_IG_CTRL_PACKET_ID_V3_2, (CigiBaseEventProcessor *) &Pr_IGCtrl); Imsg.RegisterEventProcessor(CIGI_ENTITY_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_EntityCtrl); Imsg.RegisterEventProcessor(CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_ConfClampEntityCtrl); Imsg.RegisterEventProcessor(CIGI_COMP_CTRL_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_CompCtrl); Imsg.RegisterEventProcessor(CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_ShortCompCtrl); Imsg.RegisterEventProcessor(CIGI_ART_PART_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_ArtPartCtrl); Imsg.RegisterEventProcessor(CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_ShortArtPartCtrl); Imsg.RegisterEventProcessor(CIGI_RATE_CTRL_PACKET_ID_V3_2, (CigiBaseEventProcessor *) &Pr_RateCtrl); Imsg.RegisterEventProcessor(CIGI_CELESTIAL_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_CelestialCtrl); Imsg.RegisterEventProcessor(CIGI_ATMOS_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_AtmosCtrl); Imsg.RegisterEventProcessor(CIGI_ENV_RGN_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_EnvRgnCtrl); Imsg.RegisterEventProcessor(CIGI_WEATHER_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_WeatherCtrl); Imsg.RegisterEventProcessor(CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_MaritimeSurfaceCtrl); Imsg.RegisterEventProcessor(CIGI_WAVE_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_WaveCtrl); Imsg.RegisterEventProcessor(CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_TerrestrialSurfaceCtrl); Imsg.RegisterEventProcessor(CIGI_VIEW_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_ViewCtrl); Imsg.RegisterEventProcessor(CIGI_SENSOR_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_SensorCtrl); Imsg.RegisterEventProcessor(CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_MotionTrackCtrl); Imsg.RegisterEventProcessor(CIGI_EARTH_MODEL_DEF_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_EarthModelDef); Imsg.RegisterEventProcessor(CIGI_TRAJECTORY_DEF_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_Trajectory); Imsg.RegisterEventProcessor(CIGI_VIEW_DEF_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_ViewDef); Imsg.RegisterEventProcessor(CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_CollDetSegDef); Imsg.RegisterEventProcessor(CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_CollDetVolDef); Imsg.RegisterEventProcessor(CIGI_HAT_HOT_REQ_PACKET_ID_V3_2, (CigiBaseEventProcessor *) &Pr_HatHotReq); Imsg.RegisterEventProcessor(CIGI_LOS_SEG_REQ_PACKET_ID_V3_2, (CigiBaseEventProcessor *) &Pr_LosSegReq); Imsg.RegisterEventProcessor(CIGI_LOS_VECT_REQ_PACKET_ID_V3_2, (CigiBaseEventProcessor *) &Pr_LosVectReq); Imsg.RegisterEventProcessor(CIGI_POSITION_REQ_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_PositionReq); Imsg.RegisterEventProcessor(CIGI_ENV_COND_REQ_PACKET_ID_V3, (CigiBaseEventProcessor *) &Pr_EnvCondReq); Imsg.RegisterEventProcessor(CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_SymbolSurfaceDef); Imsg.RegisterEventProcessor(CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_SymbolCtrl); Imsg.RegisterEventProcessor(CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_ShortSymbolCtrl); Imsg.RegisterEventProcessor(CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_SymbolTextDef); Imsg.RegisterEventProcessor(CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_SymbolCircleDef); Imsg.RegisterEventProcessor(CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_SymbolLineDef); Imsg.RegisterEventProcessor(CIGI_SYMBOL_CLONE_PACKET_ID_V3_3, (CigiBaseEventProcessor *) &Pr_SymbolClone); // initialize the SOF CSOF.SetDatabaseID(1); CSOF.SetIGStatus(0); CSOF.SetIGMode(CigiBaseSOF::Operate); CSOF.SetTimeStampValid(false); CSOF.SetEarthRefModel(CigiBaseSOF::WGS84); CSOF.SetTimeStamp(0); CSOF.SetFrameCntr(0); return err_status; } // ================================================ // waitUntilBeginningOfFrame // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv #ifdef WIN32 void waitUntilBeginningOfFrame( void ) { static DWORD t1 = 0; static DWORD t2 = 0; static bool firsttimethrough = true; if(firsttimethrough) { t1 = GetTickCount(); firsttimethrough = false; } do { t2 = GetTickCount(); // number of milliseconds } while((t2 - t1) < timeDelayLimit); t1 = t2; } #else void waitUntilBeginningOfFrame( void ) { static struct timeval t1; static struct timeval t2; static bool firsttimethrough = true; float diff; float busy_wait_time = 0.0f; gettimeofday( &t2, NULL ); if( firsttimethrough ) { gettimeofday( &t1, NULL ); firsttimethrough = false; } while( (diff = timevaldiff( &t1, &t2 )) < timeDelayLimit ) { if(busy_wait_time != 0.0f && timeDelayLimit - diff > busy_wait_time) { float sleep_time = timeDelayLimit - diff - busy_wait_time; struct timespec req; req.tv_sec = (time_t)sleep_time; req.tv_nsec = (long)((sleep_time-req.tv_sec)*1e9); if(pselect(0, NULL, NULL, NULL, &req, NULL)==-1) { printf("Error calling pselect"); busy_wait_time = 0.0f; } } gettimeofday( &t2, NULL ); } //printf("over frame by %f ms\n", diff - timeDelayLimit); t1 = t2; } // ================================================ // timevaldiff // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float timevaldiff( struct timeval *t1, struct timeval *t2 ) { return (t2->tv_sec - t1->tv_sec) + (t2->tv_usec - t1->tv_usec)/1000000.0f; } #endif cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/Network.cpp000066400000000000000000000174771210750432300224750ustar00rootroot00000000000000/**
 *  The Multi-Purpose Viewer
 *  Copyright (c) 2004 The Boeing Company
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 *  FILENAME:   Network.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *
 *  PROGRAM DESCRIPTION:
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 *
 *  07/10/2006 Greg Basler                       1.7.2
 *  Corrected a problem with the code that cause a stray
 *  pointer due to the "JUST_IP_ADDRESSES" declaration.
 * 
* The Boeing Company * 1.7.2 */ #include "Network.h" #include #include #include // ================================================ // Network // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Network::Network() { valid = false; #ifndef JUST_IP_ADDRESSES saddr = NULL; #endif } // ================================================ // ~Network // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Network::~Network() { closeSocket(); #ifndef JUST_IP_ADDRESSES freeaddrinfo(saddr); #endif } // ================================================ // openSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool Network::openSocket( const char * ip, const int port_send, const int port_rcv ) { // Initialize communications. InitializeComm(ip, port_send, port_rcv); return valid; } // ================================================ // openSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool Network::openSocket(const int port_rcv ) { // Initialize communications. InitializeComm(port_rcv); return valid; } // ================================================ // closeSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::closeSocket() { if( !valid ) return; #ifdef WIN32 // Clean up the sockets. closesocket(sndsock); closesocket(rcvsock); // Clean up WinSock. Again, this is not needed for non-Windows platforms. WSACleanup(); #else // Clean up the sockets. close(sndsock); close(rcvsock); #endif valid = false; } // ================================================ // send // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int Network::send( unsigned char * sendbuff, int sendsize ) { if( !valid) return -1; #ifdef JUST_IP_ADDRESSES if(!saddr.sin_family ) return -1; return sendto(sndsock, (const char *)sendbuff, sendsize, 0, (struct sockaddr *)&saddr, sizeof(struct sockaddr)); #else if(!saddr) return -1; return sendto(sndsock, (const char *)sendbuff, sendsize, 0, saddr->ai_addr, saddr->ai_addrlen); #endif // JUST_IP_ADDRESSES } // ================================================ // recv // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int Network::recv( unsigned char * rcvbuff, int recvsize ) { if( !valid ) return -1; return recvfrom(rcvsock, (char *)rcvbuff, recvsize, 0, NULL, 0); } // ================================================ // InitializeComm // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::InitializeComm(const char *ipaddr, const int sndport, const int rcvport) { int status; #ifdef WIN32 // Initialize winsock. If you are using Berkeley sockets on a // non-Win32 platform, you can leave out these first two lines. WSADATA wsainfo; WSAStartup(MAKEWORD(1, 1), &wsainfo); #endif // Open the connection for sending. #ifdef JUST_IP_ADDRESSES saddr.sin_family = AF_INET; saddr.sin_port = htons(sndport); // Use whatever port your host listens on saddr.sin_addr.s_addr = inet_addr(ipaddr); // IP address of host sndsock = socket(AF_INET, SOCK_DGRAM, 0); if( sndsock < 0 ) { // socket could not be created valid = false; return; } #else if(saddr) { freeaddrinfo(saddr); saddr = NULL; } char portstr[6]; snprintf(portstr, sizeof(portstr), "%u", sndport); struct addrinfo hint; hint.ai_flags = 0; //hint.ai_family = AF_INET | AF_INET6; hint.ai_family = AF_UNSPEC; hint.ai_socktype = SOCK_DGRAM; hint.ai_protocol = IPPROTO_UDP; hint.ai_addrlen = 0; hint.ai_addr = NULL; hint.ai_canonname = NULL; hint.ai_next = NULL; int result = getaddrinfo(ipaddr, portstr, &hint, &saddr); if(result) { if(saddr) { freeaddrinfo(saddr); saddr = NULL; } return; } sndsock = socket(saddr->ai_family, saddr->ai_socktype, saddr->ai_protocol); #endif // JUST_IP_ADDRESSES // Open the connection for receiving. memset(&raddr,0,sizeof(raddr)); raddr.sin_family = AF_INET; raddr.sin_port = htons(rcvport); // Use whatever port your host sends to raddr.sin_addr.s_addr = htonl(INADDR_ANY); rcvsock = socket(AF_INET, SOCK_DGRAM, 0); if( rcvsock < 0 ) { // socket could not be created valid = false; return; } // Make the address reusable. int sockparam = 1; /* TRUE; */ setsockopt(rcvsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&sockparam, sizeof(int)); // Make the socket non-blocking. #ifdef WIN32 // This is how sockets are put in non-blocking mode on Windows. unsigned long arg = 1L; ioctlsocket(rcvsock, FIONBIO, &arg); #else // This is how sockets are put in non-blocking mode on non-Windows operating systems (and Cygwin). fcntl( rcvsock, F_SETFL, O_NONBLOCK ); #endif // Bind the socket to the local address. status = bind(rcvsock, (struct sockaddr *)&raddr, sizeof(raddr)); if( status != 0 ) { // socket could not be bound valid = false; return; } // FIXME - more error checking valid = true; } // ================================================ // InitializeComm // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::InitializeComm(const int rcvport) { int status; #ifdef WIN32 // Initialize winsock. If you are using Berkeley sockets on a // non-Win32 platform, you can leave out these first two lines. WSADATA wsainfo; WSAStartup(MAKEWORD(1, 1), &wsainfo); #endif sndsock = socket(AF_INET, SOCK_DGRAM, 0); if( sndsock < 0 ) { // socket could not be created valid = false; return; } // Disable sending. #ifdef JUST_IP_ADDRESSES saddr.sin_family = 0; #else if(saddr) { freeaddrinfo(saddr); saddr = NULL; } #endif // JUST_IP_ADDRESSES // Open the connection for receiving. memset(&raddr,0,sizeof(raddr)); raddr.sin_family = AF_INET; raddr.sin_port = htons(rcvport); // Use whatever port your host sends to raddr.sin_addr.s_addr = htonl(INADDR_ANY); rcvsock = socket(AF_INET, SOCK_DGRAM, 0); if( rcvsock < 0 ) { // socket could not be created valid = false; return; } // Make the address reusable. int sockparam = 1; /* TRUE; */ setsockopt(rcvsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&sockparam, sizeof(int)); // Make the socket non-blocking. #ifdef WIN32 // This is how sockets are put in non-blocking mode on Windows. unsigned long arg = 1L; ioctlsocket(rcvsock, FIONBIO, &arg); #else // This is how sockets are put in non-blocking mode on non-Windows operating systems (and Cygwin). fcntl( rcvsock, F_SETFL, O_NONBLOCK ); #endif // Bind the socket to the local address. status = bind(rcvsock, (struct sockaddr *)&raddr, sizeof(raddr)); if( status != 0 ) { // socket could not be bound valid = false; return; } // FIXME - more error checking valid = true; } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/Network.h000066400000000000000000000117701210750432300221300ustar00rootroot00000000000000/**
 *  The Multi-Purpose Viewer
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   Network.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 *
 *  07/10/2006 Greg Basler                       1.7.2
 *  Corrected a problem with the code that cause a stray
 *  pointer due to the "JUST_IP_ADDRESSES" declaration.
 * 
* The Boeing Company * 1.7.2 */ #ifndef _MPV_NETWORK_INTERFACE_INCLUDED_ #define _MPV_NETWORK_INTERFACE_INCLUDED_ #ifdef WIN32 #include #else #include #include #include #include #include #include #endif #ifdef WIN32 #define JUST_IP_ADDRESSES #endif //========================================================= //! The class encapsulating the network interface. //! class Network { public: //==> Management //========================================================= //! General Constructor //! Network(); //========================================================= //! General Destructor //! ~Network(); //==> Networking methods //========================================================= //! Opens a network communication socket //! \param ip - The "to" internet address //! \param port_send - The port on which the messages are being sent //! \param port_rcv - the port on which messages are being received //! //! \return Success or Failure //! bool openSocket( const char * ip, const int port_send, const int port_rcv ) ; //========================================================= //! Opens a receive only network communication socket. Only //! recv will work. //! \param port_rcv - the port on which messages are being received //! //! \return Success or Failure //! bool openSocket(const int port_rcv ) ; //========================================================= //! Closes the socket //! void closeSocket() ; //========================================================= //! Sends a message //! \param sendbuff - A pointer to the buffer containing the //! message to be sent. //! \param sendsize - The size of the message //! //! \return The number of bytes sent, or -1 on error. //! int send( unsigned char * sendbuff, int sendsize ) ; //========================================================= //! Receive a message //! \param rcvbuff - A pointer to the buffer to place the //! incoming message. //! \param recvsize - The maximum size of the received message. //! //! \return The number of bytes recieved, or -1 on error. //! int recv( unsigned char * rcvbuff, int recvsize ) ; private: //========================================================= //! Initializes the communication //! \param ipaddr - The "to" internet address //! \param sndport - The port on which the messages are being sent //! \param rcvport - the port on which messages are being received //! void InitializeComm(const char *ipaddr, const int sndport, const int rcvport); //========================================================= //! Initializes incoming communication only //! \param rcvport - the port on which messages are being received //! void InitializeComm(const int rcvport); // Berkeley Sockets stuff //========================================================= //! The send socket //! int sndsock; //========================================================= //! The receive socket //! int rcvsock; //========================================================= //! The sending socket address //! #ifdef JUST_IP_ADDRESSES struct sockaddr_in saddr; #else struct addrinfo *saddr; #endif // JUST_IP_ADDRESSES //========================================================= //! The receiving socket address //! struct sockaddr_in raddr; //========================================================= //! The Valid flag //! bool valid; }; #endif // _MPV_NETWORK_INTERFACE_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XArtPartCtrl.cpp000066400000000000000000000024561210750432300233650ustar00rootroot00000000000000// XArtPartCtrl.cpp: Body of the XArtPartCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XArtPartCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XArtPartCtrl::XArtPartCtrl() { } XArtPartCtrl::~XArtPartCtrl() { } void XArtPartCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiArtPartCtrlV3 *InPckt = (CigiArtPartCtrlV3 *)Packet; printf("===> ArtPartCtrl <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("ArtPartID ==> %d\n",InPckt->GetArtPartID()); printf("ArtPartEn ==> %d\n",InPckt->GetArtPartEn()); printf("XOffEn ==> %d\n",InPckt->GetXOffEn()); printf("YOffEn ==> %d\n",InPckt->GetYOffEn()); printf("ZOffEn ==> %d\n",InPckt->GetZOffEn()); printf("RollEn ==> %d\n",InPckt->GetRollEn()); printf("PitchEn ==> %d\n",InPckt->GetPitchEn()); printf("YawEn ==> %d\n",InPckt->GetYawEn()); printf("XOff ==> %f\n",InPckt->GetXOff()); printf("YOff ==> %f\n",InPckt->GetYOff()); printf("ZOff ==> %f\n",InPckt->GetZOff()); printf("Roll ==> %f\n",InPckt->GetRoll()); printf("Pitch ==> %f\n",InPckt->GetPitch()); printf("Yaw ==> %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XArtPartCtrl.h000066400000000000000000000011331210750432300230210ustar00rootroot00000000000000// XArtPartCtrl.h: interface for the XArtPartCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XArtPartCtrl_INCLUDED_) #define _PROC_XArtPartCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiArtPartCtrlV3.h" class XArtPartCtrl : public CigiBaseEventProcessor { public: XArtPartCtrl(); virtual ~XArtPartCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiArtPartCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiArtPartCtrlV3 *TPckt; }; #endif // _PROC_XArtPartCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XAtmosCtrl.cpp000066400000000000000000000017541210750432300230730ustar00rootroot00000000000000// XAtmosCtrl.cpp: Body of the XAtmosCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XAtmosCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XAtmosCtrl::XAtmosCtrl() { } XAtmosCtrl::~XAtmosCtrl() { } void XAtmosCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiAtmosCtrlV3 *InPckt = (CigiAtmosCtrlV3 *)Packet; printf("===> AtmosCtrl <===\n"); printf("AtmosEn ==> %d\n",InPckt->GetAtmosEn()); printf("Humidity ==> %d\n",InPckt->GetHumidity()); printf("AirTemp ==> %f\n",InPckt->GetAirTemp()); printf("Visibility ==> %f\n",InPckt->GetVisibility()); printf("HorizWindSp ==> %f\n",InPckt->GetHorizWindSp()); printf("VertWindSp ==> %f\n",InPckt->GetVertWindSp()); printf("WindDir ==> %f\n",InPckt->GetWindDir()); printf("BaroPress ==> %f\n",InPckt->GetBaroPress()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XAtmosCtrl.h000066400000000000000000000011031210750432300225240ustar00rootroot00000000000000// XAtmosCtrl.h: interface for the XAtmosCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XAtmosCtrl_INCLUDED_) #define _PROC_XAtmosCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiAtmosCtrl.h" class XAtmosCtrl : public CigiBaseEventProcessor { public: XAtmosCtrl(); virtual ~XAtmosCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiAtmosCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiAtmosCtrlV3 *TPckt; }; #endif // _PROC_XAtmosCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCelestialCtrl.cpp000066400000000000000000000022001210750432300237000ustar00rootroot00000000000000// XCelestialCtrl.cpp: Body of the XCelestialCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XCelestialCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCelestialCtrl::XCelestialCtrl() { } XCelestialCtrl::~XCelestialCtrl() { } void XCelestialCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiCelestialCtrlV3 *InPckt = (CigiCelestialCtrlV3 *)Packet; printf("===> CelestialCtrl <===\n"); printf("Hour ==> %d\n",InPckt->GetHour()); printf("Minute ==> %d\n",InPckt->GetMinute()); printf("EphemerisEn ==> %d\n",InPckt->GetEphemerisEn()); printf("SunEn ==> %d\n",InPckt->GetSunEn()); printf("MoonEn ==> %d\n",InPckt->GetMoonEn()); printf("StarEn ==> %d\n",InPckt->GetStarEn()); printf("DateVld ==> %d\n",InPckt->GetDateVld()); printf("Month ==> %d\n",InPckt->GetMonth()); printf("Day ==> %d\n",InPckt->GetDay()); printf("Year ==> %d\n",InPckt->GetYear()); printf("StarInt ==> %f\n",InPckt->GetStarInt()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCelestialCtrl.h000066400000000000000000000011571210750432300233570ustar00rootroot00000000000000// XCelestialCtrl.h: interface for the XCelestialCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCelestialCtrl_INCLUDED_) #define _PROC_XCelestialCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCelestialCtrl.h" class XCelestialCtrl : public CigiBaseEventProcessor { public: XCelestialCtrl(); virtual ~XCelestialCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCelestialCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCelestialCtrlV3 *TPckt; }; #endif // _PROC_XCelestialCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCollDetSegDef.cpp000066400000000000000000000020561210750432300235630ustar00rootroot00000000000000// XCollDetSegDef.cpp: Body of the XCollDetSegDef class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetSegDef.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetSegDef::XCollDetSegDef() { } XCollDetSegDef::~XCollDetSegDef() { } void XCollDetSegDef::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetSegDefV3 *InPckt = (CigiCollDetSegDefV3 *)Packet; printf("===> CollDetSegDef <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("SegmentID ==> %d\n",InPckt->GetSegmentID()); printf("SegmentEn ==> %d\n",InPckt->GetSegmentEn()); printf("X1 ==> %f\n",InPckt->GetX1()); printf("Y1 ==> %f\n",InPckt->GetY1()); printf("Z1 ==> %f\n",InPckt->GetZ1()); printf("X2 ==> %f\n",InPckt->GetX2()); printf("Y2 ==> %f\n",InPckt->GetY2()); printf("Z2 ==> %f\n",InPckt->GetZ2()); printf("Mask ==> %d\n",InPckt->GetMask()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCollDetSegDef.h000066400000000000000000000011611210750432300232240ustar00rootroot00000000000000// XCollDetSegDef.h: interface for the XCollDetSegDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetSegDef_INCLUDED_) #define _PROC_XCollDetSegDef_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetSegDefV3.h" class XCollDetSegDef : public CigiBaseEventProcessor { public: XCollDetSegDef(); virtual ~XCollDetSegDef(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetSegDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetSegDefV3 *TPckt; }; #endif // _PROC_XCollDetSegDef_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCollDetVolDef.cpp000066400000000000000000000023621210750432300236050ustar00rootroot00000000000000// XCollDetVolDef.cpp: Body of the XCollDetVolDef class. // ////////////////////////////////////////////////////////////////////// #include "XCollDetVolDef.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCollDetVolDef::XCollDetVolDef() { } XCollDetVolDef::~XCollDetVolDef() { } void XCollDetVolDef::OnPacketReceived(CigiBasePacket *Packet) { CigiCollDetVolDefV3 *InPckt = (CigiCollDetVolDefV3 *)Packet; bool ok = true; printf("===> CollDetVolDef <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("VolID ==> %d\n",InPckt->GetVolID()); printf("VolEn ==> %d\n",InPckt->GetVolEn()); printf("VolType ==> %d\n",InPckt->GetVolType()); printf("Xoff ==> %f\n",InPckt->GetXoff()); printf("Yoff ==> %f\n",InPckt->GetYoff()); printf("Zoff ==> %f\n",InPckt->GetZoff()); printf("HeightOrRadius ==> %f\n",InPckt->GetHeightOrRadius()); printf("Width ==> %f\n",InPckt->GetWidth()); printf("Depth ==> %f\n",InPckt->GetDepth()); printf("Roll ==> %f\n",InPckt->GetRoll()); printf("Pitch ==> %f\n",InPckt->GetPitch()); printf("Yaw ==> %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCollDetVolDef.h000066400000000000000000000011611210750432300232460ustar00rootroot00000000000000// XCollDetVolDef.h: interface for the XCollDetVolDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCollDetVolDef_INCLUDED_) #define _PROC_XCollDetVolDef_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCollDetVolDefV3.h" class XCollDetVolDef : public CigiBaseEventProcessor { public: XCollDetVolDef(); virtual ~XCollDetVolDef(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCollDetVolDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCollDetVolDefV3 *TPckt; }; #endif // _PROC_XCollDetVolDef_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCompCtrl.cpp000066400000000000000000000022321210750432300226760ustar00rootroot00000000000000// XCompCtrl.cpp: Body of the XCompCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XCompCtrl.h" #include "CigiExceptions.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XCompCtrl::XCompCtrl() { } XCompCtrl::~XCompCtrl() { } void XCompCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiCompCtrlV3 *InPckt = (CigiCompCtrlV3 *)Packet; bool ok = true; printf("===> CompCtrl <===\n"); printf("CompID ==> %d\n",InPckt->GetCompID()); printf("InstanceID ==> %d\n",InPckt->GetInstanceID()); printf("CompClassV3 ==> %d\n",InPckt->GetCompClassV3()); printf("CompState ==> %d\n",InPckt->GetCompState()); printf("CompData ==> %d\n",InPckt->GetLongCompData(0)); printf("CompData ==> %d\n",InPckt->GetLongCompData(1)); printf("CompData ==> %d\n",InPckt->GetLongCompData(2)); printf("CompData ==> %d\n",InPckt->GetLongCompData(3)); printf("CompData ==> %d\n",InPckt->GetLongCompData(4)); printf("CompData ==> %d\n",InPckt->GetLongCompData(5)); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XCompCtrl.h000066400000000000000000000010721210750432300223440ustar00rootroot00000000000000// XCompCtrl.h: interface for the XCompCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XCompCtrl_INCLUDED_) #define _PROC_XCompCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiCompCtrlV3.h" class XCompCtrl : public CigiBaseEventProcessor { public: XCompCtrl(); virtual ~XCompCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiCompCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiCompCtrlV3 *TPckt; }; #endif // _PROC_XCompCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XConfClampEntityCtrl.cpp000066400000000000000000000015551210750432300250460ustar00rootroot00000000000000// XConfClampEntityCtrl.cpp: Body of the XConfClampEntityCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XConfClampEntityCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XConfClampEntityCtrl::XConfClampEntityCtrl() { } XConfClampEntityCtrl::~XConfClampEntityCtrl() { } void XConfClampEntityCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiConfClampEntityCtrlV3 *InPckt = (CigiConfClampEntityCtrlV3 *)Packet; bool ok = true; printf("===> ConfClampEntityCtrl <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("Yaw ==> %f\n",InPckt->GetYaw()); printf("Lat ==> %f\n",InPckt->GetLat()); printf("Lon ==> %f\n",InPckt->GetLon()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XConfClampEntityCtrl.h000066400000000000000000000012631210750432300245070ustar00rootroot00000000000000// XConfClampEntityCtrl.h: interface for the XConfClampEntityCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XConfClampEntityCtrl_INCLUDED_) #define _PROC_XConfClampEntityCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiConfClampEntityCtrlV3.h" class XConfClampEntityCtrl : public CigiBaseEventProcessor { public: XConfClampEntityCtrl(); virtual ~XConfClampEntityCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiConfClampEntityCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiConfClampEntityCtrlV3 *TPckt; }; #endif // _PROC_XConfClampEntityCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEarthModelDef.cpp000066400000000000000000000014551210750432300236240ustar00rootroot00000000000000// XEarthModelDef.cpp: Body of the XEarthModelDef class. // ////////////////////////////////////////////////////////////////////// #include "XEarthModelDef.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEarthModelDef::XEarthModelDef() { } XEarthModelDef::~XEarthModelDef() { } void XEarthModelDef::OnPacketReceived(CigiBasePacket *Packet) { CigiEarthModelDefV3 *InPckt = (CigiEarthModelDefV3 *)Packet; bool ok = true; printf("===> EarthModelDef <===\n"); printf("CustomERMEn ==> %d\n",InPckt->GetCustomERMEn()); printf("EquatorialRadius ==> %f\n",InPckt->GetEquatorialRadius()); printf("Flattening ==> %f\n",InPckt->GetFlattening()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEarthModelDef.h000066400000000000000000000011611210750432300232630ustar00rootroot00000000000000// XEarthModelDef.h: interface for the XEarthModelDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEarthModelDef_INCLUDED_) #define _PROC_XEarthModelDef_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEarthModelDefV3.h" class XEarthModelDef : public CigiBaseEventProcessor { public: XEarthModelDef(); virtual ~XEarthModelDef(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEarthModelDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEarthModelDefV3 *TPckt; }; #endif // _PROC_XEarthModelDef_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEntityCtrl.cpp000066400000000000000000000032601210750432300232560ustar00rootroot00000000000000// XEntityCtrl.cpp: Body of the XEntityCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XEntityCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEntityCtrl::XEntityCtrl() { } XEntityCtrl::~XEntityCtrl() { } void XEntityCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiEntityCtrlV3_3 *InPckt = (CigiEntityCtrlV3_3 *)Packet; bool ok = true; printf("===> EntityCtrl <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("EntityState ==> %d\n",InPckt->GetEntityState()); printf("AttachState ==> %d\n",InPckt->GetAttachState()); printf("CollisionDetectEn ==> %d\n",InPckt->GetCollisionDetectEn()); printf("InheritAlpha ==> %d\n",InPckt->GetInheritAlpha()); printf("GrndClamp ==> %d\n",InPckt->GetGrndClamp()); printf("AnimationDir ==> %d\n",InPckt->GetAnimationDir()); printf("AnimationLoopMode ==> %d\n",InPckt->GetAnimationLoopMode()); printf("AnimationState ==> %d\n",InPckt->GetAnimationState()); if(InPckt->GetSmoothingEn()) printf("Smoothing Enabled\n"); else printf("Smoothing Disabled\n"); printf("Alpha ==> %d\n",InPckt->GetAlpha()); printf("EntityType ==> %d\n",InPckt->GetEntityType()); printf("ParentID ==> %d\n",InPckt->GetParentID()); printf("Roll ==> %f\n",InPckt->GetRoll()); printf("Pitch ==> %f\n",InPckt->GetPitch()); printf("Yaw ==> %f\n",InPckt->GetYaw()); printf("Xoff ==> %f\n",InPckt->GetXoff()); printf("Yoff ==> %f\n",InPckt->GetYoff()); printf("Zoff ==> %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEntityCtrl.h000066400000000000000000000011261210750432300227220ustar00rootroot00000000000000// XEntityCtrl.h: interface for the XEntityCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEntityCtrl_INCLUDED_) #define _PROC_XEntityCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEntityCtrlV3_3.h" class XEntityCtrl : public CigiBaseEventProcessor { public: XEntityCtrl(); virtual ~XEntityCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEntityCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEntityCtrlV3_3 *TPckt; }; #endif // _PROC_XEntityCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEnvCondReq.cpp000066400000000000000000000014111210750432300231550ustar00rootroot00000000000000// XEnvCondReq.cpp: Body of the XEnvCondReq class. // ////////////////////////////////////////////////////////////////////// #include "XEnvCondReq.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEnvCondReq::XEnvCondReq() { } XEnvCondReq::~XEnvCondReq() { } void XEnvCondReq::OnPacketReceived(CigiBasePacket *Packet) { CigiEnvCondReqV3 *InPckt = (CigiEnvCondReqV3 *)Packet; bool ok = true; printf("===> EnvCondReq <===\n"); printf("ReqType ==> %d\n",InPckt->GetReqType()); printf("Lat ==> %f\n",InPckt->GetLat()); printf("Lon ==> %f\n",InPckt->GetLon()); printf("Alt ==> %f\n",InPckt->GetAlt()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEnvCondReq.h000066400000000000000000000011201210750432300226170ustar00rootroot00000000000000// XEnvCondReq.h: interface for the XEnvCondReq class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEnvCondReq_INCLUDED_) #define _PROC_XEnvCondReq_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEnvCondReqV3.h" class XEnvCondReq : public CigiBaseEventProcessor { public: XEnvCondReq(); virtual ~XEnvCondReq(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEnvCondReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEnvCondReqV3 *TPckt; }; #endif // _PROC_XEnvCondReq_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEnvRgnCtrl.cpp000066400000000000000000000024151210750432300232020ustar00rootroot00000000000000// XEnvRgnCtrl.cpp: Body of the XEnvRgnCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XEnvRgnCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEnvRgnCtrl::XEnvRgnCtrl() { } XEnvRgnCtrl::~XEnvRgnCtrl() { } void XEnvRgnCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiEnvRgnCtrlV3 *InPckt = (CigiEnvRgnCtrlV3 *)Packet; printf("===> EnvRgnCtrl <===\n"); printf("RegionID ==> %d\n",InPckt->GetRegionID()); printf("RgnState ==> %d\n",InPckt->GetRgnState()); printf("WeatherProp ==> %d\n",InPckt->GetWeatherProp()); printf("Aerosol ==> %d\n",InPckt->GetAerosol()); printf("MaritimeSurface ==> %d\n",InPckt->GetMaritimeSurface()); printf("TerrestrialSurface ==> %d\n",InPckt->GetTerrestrialSurface()); printf("Lat ==> %f\n",InPckt->GetLat()); printf("Lon ==> %f\n",InPckt->GetLon()); printf("XSize ==> %f\n",InPckt->GetXSize()); printf("YSize ==> %f\n",InPckt->GetYSize()); printf("CornerRadius ==> %f\n",InPckt->GetCornerRadius()); printf("Rotation ==> %f\n",InPckt->GetRotation()); printf("Transition ==> %f\n",InPckt->GetTransition()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEnvRgnCtrl.h000066400000000000000000000011201210750432300226370ustar00rootroot00000000000000// XEnvRgnCtrl.h: interface for the XEnvRgnCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEnvRgnCtrl_INCLUDED_) #define _PROC_XEnvRgnCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEnvRgnCtrlV3.h" class XEnvRgnCtrl : public CigiBaseEventProcessor { public: XEnvRgnCtrl(); virtual ~XEnvRgnCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEnvRgnCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEnvRgnCtrlV3 *TPckt; }; #endif // _PROC_XEnvRgnCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEventNotification.cpp000066400000000000000000000015511210750432300246060ustar00rootroot00000000000000// XEventNotification.cpp: Body of the XEventNotification class. // ////////////////////////////////////////////////////////////////////// #include "XEventNotification.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XEventNotification::XEventNotification() { } XEventNotification::~XEventNotification() { } void XEventNotification::OnPacketReceived(CigiBasePacket *Packet) { CigiEventNotificationV3 *InPckt = (CigiEventNotificationV3 *)Packet; printf("===> EventNotification <===\n"); printf("EventID ==> %d\n",InPckt->GetEventID()); printf("EventData ==> %f\n",InPckt->GetLEventData(0)); printf("EventData ==> %f\n",InPckt->GetLEventData(1)); printf("EventData ==> %f\n",InPckt->GetLEventData(2)); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XEventNotification.h000066400000000000000000000012351210750432300242520ustar00rootroot00000000000000// XEventNotification.h: interface for the XEventNotification class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XEventNotification_INCLUDED_) #define _PROC_XEventNotification_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiEventNotificationV3.h" class XEventNotification : public CigiBaseEventProcessor { public: XEventNotification(); virtual ~XEventNotification(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiEventNotificationV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiEventNotificationV3 *TPckt; }; #endif // _PROC_XEventNotification_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XHatHotReq.cpp000066400000000000000000000017561210750432300230240ustar00rootroot00000000000000// XHatHotReq.cpp: Body of the XHatHotReq class. // ////////////////////////////////////////////////////////////////////// #include "XHatHotReq.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XHatHotReq::XHatHotReq() { } XHatHotReq::~XHatHotReq() { } void XHatHotReq::OnPacketReceived(CigiBasePacket *Packet) { CigiHatHotReqV3_2 *InPckt = (CigiHatHotReqV3_2 *)Packet; bool ok = true; printf("===> HatHotReq <===\n"); printf("HatHotID ==> %d\n",InPckt->GetHatHotID()); printf("ReqType ==> %d\n",InPckt->GetReqType()); printf("SrcCoordSys ==> %d\n",InPckt->GetSrcCoordSys()); printf("UpdatePeriod ==> %d\n",InPckt->GetUpdatePeriod()); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("Xoff ==> %f\n",InPckt->GetXoff()); printf("Yoff ==> %f\n",InPckt->GetYoff()); printf("Zoff ==> %f\n",InPckt->GetZoff()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XHatHotReq.h000066400000000000000000000011131210750432300224540ustar00rootroot00000000000000// XHatHotReq.h: interface for the XHatHotReq class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XHatHotReq_INCLUDED_) #define _PROC_XHatHotReq_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiHatHotReqV3_2.h" class XHatHotReq : public CigiBaseEventProcessor { public: XHatHotReq(); virtual ~XHatHotReq(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiHatHotReqV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiHatHotReqV3_2 *TPckt; }; #endif // _PROC_XHatHotReq_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XIGCtrl.cpp000066400000000000000000000021561210750432300223040ustar00rootroot00000000000000// XIGCtrl.cpp: Body of the XIGCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XIGCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XIGCtrl::XIGCtrl() { } XIGCtrl::~XIGCtrl() { } void XIGCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiIGCtrlV3_3 *InPckt = (CigiIGCtrlV3_3 *)Packet; bool ok = true; printf("===> IGCtrl <===\n"); printf("Version ==> %d\n",InPckt->GetVersion()); printf("DatabaseID ==> %d\n",InPckt->GetDatabaseID()); printf("IGMode ==> %d\n",InPckt->GetIGMode()); printf("TimestampValid ==> %d\n",InPckt->GetTimeStampValid()); if(InPckt->GetSmoothingEn()) printf("Smoothing Enabled\n"); else printf("Smoothing Disabled\n"); printf("MinorVersion ==> %d\n",InPckt->GetMinorVersion()); printf("FrameCntr ==> %d\n",InPckt->GetFrameCntr()); printf("TimeStampV3 ==> %d\n",InPckt->GetTimeStamp()); printf("IGFrameCntr ==> %d\n",InPckt->GetLastRcvdIGFrame()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XIGCtrl.h000066400000000000000000000010521210750432300217430ustar00rootroot00000000000000// XIGCtrl.h: interface for the XIGCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XIGCtrl_INCLUDED_) #define _PROC_XIGCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiIGCtrlV3_3.h" class XIGCtrl : public CigiBaseEventProcessor { public: XIGCtrl(); virtual ~XIGCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiIGCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiIGCtrlV3_3 *TPckt; }; #endif // _PROC_XIGCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XLosSegReq.cpp000066400000000000000000000030001210750432300230110ustar00rootroot00000000000000// XLosSegReq.cpp: Body of the XLosSegReq class. // ////////////////////////////////////////////////////////////////////// #include "XLosSegReq.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosSegReq::XLosSegReq() { } XLosSegReq::~XLosSegReq() { } void XLosSegReq::OnPacketReceived(CigiBasePacket *Packet) { CigiLosSegReqV3_2 *InPckt = (CigiLosSegReqV3_2 *)Packet; printf("===> LosSegReq <===\n"); printf("LosID ==> %d\n",InPckt->GetLosID()); printf("ReqType ==> %d\n",InPckt->GetReqType()); printf("SrcCoordSys ==> %d\n",InPckt->GetSrcCoordSys()); printf("DstCoordSys ==> %d\n",InPckt->GetDstCoordSys()); printf("ResponseCoordSys ==> %d\n",InPckt->GetResponseCoordSys()); printf("DestinationEntityValid ==> %d\n",InPckt->GetDestEntityIDValid()); printf("AlphaThresh ==> %d\n",InPckt->GetAlphaThresh()); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("SrcXoff ==> %f\n",InPckt->GetSrcXoff()); printf("SrcYoff ==> %f\n",InPckt->GetSrcYoff()); printf("SrcZoff ==> %f\n",InPckt->GetSrcZoff()); printf("DstXoff ==> %f\n",InPckt->GetDstXoff()); printf("DstYoff ==> %f\n",InPckt->GetDstYoff()); printf("DstZoff ==> %f\n",InPckt->GetDstZoff()); printf("Mask ==> %d\n",InPckt->GetMask()); printf("UpdatePeriod ==> %d\n",InPckt->GetUpdatePeriod()); printf("DestinationEntityID ==> %d\n",InPckt->GetDestEntityID()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XLosSegReq.h000066400000000000000000000011131210750432300224610ustar00rootroot00000000000000// XLosSegReq.h: interface for the XLosSegReq class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosSegReq_INCLUDED_) #define _PROC_XLosSegReq_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosSegReqV3_2.h" class XLosSegReq : public CigiBaseEventProcessor { public: XLosSegReq(); virtual ~XLosSegReq(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosSegReqV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosSegReqV3_2 *TPckt; }; #endif // _PROC_XLosSegReq_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XLosVectReq.cpp000066400000000000000000000026051210750432300232060ustar00rootroot00000000000000// XLosVectReq.cpp: Body of the XLosVectReq class. // ////////////////////////////////////////////////////////////////////// #include "XLosVectReq.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XLosVectReq::XLosVectReq() { } XLosVectReq::~XLosVectReq() { } void XLosVectReq::OnPacketReceived(CigiBasePacket *Packet) { CigiLosVectReqV3_2 *InPckt = (CigiLosVectReqV3_2 *)Packet; bool ok = true; printf("===> LosVectReq <===\n"); printf("LosID ==> %d\n",InPckt->GetLosID()); printf("ReqType ==> %d\n",InPckt->GetReqType()); printf("SrcCoordSys ==> %d\n",InPckt->GetSrcCoordSys()); printf("ResponseCoordSys ==> %d\n",InPckt->GetResponseCoordSys()); printf("AlphaThresh ==> %d\n",InPckt->GetAlphaThresh()); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("VectAz ==> %f\n",InPckt->GetVectAz()); printf("VectEl ==> %f\n",InPckt->GetVectEl()); printf("MinRange ==> %f\n",InPckt->GetMinRange()); printf("MaxRange ==> %f\n",InPckt->GetMaxRange()); printf("SrcXoff ==> %f\n",InPckt->GetSrcXoff()); printf("SrcYoff ==> %f\n",InPckt->GetSrcYoff()); printf("SrcZoff ==> %f\n",InPckt->GetSrcZoff()); printf("Mask ==> %d\n",InPckt->GetMask()); printf("UpdatePeriod ==> %d\n",InPckt->GetUpdatePeriod()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XLosVectReq.h000066400000000000000000000011261210750432300226500ustar00rootroot00000000000000// XLosVectReq.h: interface for the XLosVectReq class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XLosVectReq_INCLUDED_) #define _PROC_XLosVectReq_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiLosVectReqV3_2.h" class XLosVectReq : public CigiBaseEventProcessor { public: XLosVectReq(); virtual ~XLosVectReq(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiLosVectReqV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiLosVectReqV3_2 *TPckt; }; #endif // _PROC_XLosVectReq_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XMaritimeSurfaceCtrl.cpp000066400000000000000000000021051210750432300250570ustar00rootroot00000000000000// XMaritimeSurfaceCtrl.cpp: Body of the XMaritimeSurfaceCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XMaritimeSurfaceCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XMaritimeSurfaceCtrl::XMaritimeSurfaceCtrl() { } XMaritimeSurfaceCtrl::~XMaritimeSurfaceCtrl() { } void XMaritimeSurfaceCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiMaritimeSurfaceCtrlV3 *InPckt = (CigiMaritimeSurfaceCtrlV3 *)Packet; bool ok = true; printf("===> MaritimeSurfaceCtrl <===\n"); printf("EntityRgnID ==> %d\n",InPckt->GetEntityRgnID()); printf("SurfaceCondEn ==> %d\n",InPckt->GetSurfaceCondEn()); printf("WhitecapEn ==> %d\n",InPckt->GetWhitecapEn()); printf("Scope ==> %d\n",InPckt->GetScope()); printf("SurfaceHeight ==> %f\n",InPckt->GetSurfaceHeight()); printf("WaterTemp ==> %f\n",InPckt->GetWaterTemp()); printf("Clarity ==> %f\n",InPckt->GetClarity()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XMaritimeSurfaceCtrl.h000066400000000000000000000012631210750432300245300ustar00rootroot00000000000000// XMaritimeSurfaceCtrl.h: interface for the XMaritimeSurfaceCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XMaritimeSurfaceCtrl_INCLUDED_) #define _PROC_XMaritimeSurfaceCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiMaritimeSurfaceCtrlV3.h" class XMaritimeSurfaceCtrl : public CigiBaseEventProcessor { public: XMaritimeSurfaceCtrl(); virtual ~XMaritimeSurfaceCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiMaritimeSurfaceCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiMaritimeSurfaceCtrlV3 *TPckt; }; #endif // _PROC_XMaritimeSurfaceCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XMotionTrackCtrl.cpp000066400000000000000000000022601210750432300242330ustar00rootroot00000000000000// XMotionTrackCtrl.cpp: Body of the XMotionTrackCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XMotionTrackCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XMotionTrackCtrl::XMotionTrackCtrl() { } XMotionTrackCtrl::~XMotionTrackCtrl() { } void XMotionTrackCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiMotionTrackCtrlV3 *InPckt = (CigiMotionTrackCtrlV3 *)Packet; bool ok = true; printf("===> MotionTrackCtrl <===\n"); printf("ViewID ==> %d\n",InPckt->GetViewID()); printf("TrackerID ==> %d\n",InPckt->GetTrackerID()); printf("TrackerEn ==> %d\n",InPckt->GetTrackerEn()); printf("BoresightEn ==> %d\n",InPckt->GetBoresightEn()); printf("XEn ==> %d\n",InPckt->GetXEn()); printf("YEn ==> %d\n",InPckt->GetYEn()); printf("ZEn ==> %d\n",InPckt->GetZEn()); printf("RollEn ==> %d\n",InPckt->GetRollEn()); printf("PitchEn ==> %d\n",InPckt->GetPitchEn()); printf("YawEn ==> %d\n",InPckt->GetYawEn()); printf("Scope ==> %d\n",InPckt->GetScope()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XMotionTrackCtrl.h000066400000000000000000000012071210750432300237000ustar00rootroot00000000000000// XMotionTrackCtrl.h: interface for the XMotionTrackCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XMotionTrackCtrl_INCLUDED_) #define _PROC_XMotionTrackCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiMotionTrackCtrlV3.h" class XMotionTrackCtrl : public CigiBaseEventProcessor { public: XMotionTrackCtrl(); virtual ~XMotionTrackCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiMotionTrackCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiMotionTrackCtrlV3 *TPckt; }; #endif // _PROC_XMotionTrackCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XPostionReq.cpp000066400000000000000000000015631210750432300232640ustar00rootroot00000000000000// XPostionReq.cpp: Body of the XPostionReq class. // ////////////////////////////////////////////////////////////////////// #include "XPostionReq.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XPositionReq::XPositionReq() { } XPositionReq::~XPositionReq() { } void XPositionReq::OnPacketReceived(CigiBasePacket *Packet) { CigiPositionReqV3 *InPckt = (CigiPositionReqV3 *)Packet; bool ok = true; printf("===> PositionReq <===\n"); printf("ObjectID ==> %d\n",InPckt->GetObjectID()); printf("ArtPartID ==> %d\n",InPckt->GetArtPartID()); printf("UpdateMode ==> %d\n",InPckt->GetUpdateMode()); printf("ObjectClass ==> %d\n",InPckt->GetObjectClass()); printf("CoordSys ==> %d\n",InPckt->GetCoordSys()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XPostionReq.h000066400000000000000000000011261210750432300227240ustar00rootroot00000000000000// XPostionReq.h: interface for the XPostionReq class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XPostionReq_INCLUDED_) #define _PROC_XPostionReq_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiPositionReqV3.h" class XPositionReq : public CigiBaseEventProcessor { public: XPositionReq(); virtual ~XPositionReq(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiPositionReqV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiPositionReqV3 *TPckt; }; #endif // _PROC_XPostionReq_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XRateCtrl.cpp000066400000000000000000000021321210750432300226720ustar00rootroot00000000000000// XRateCtrl.cpp: Body of the XRateCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XRateCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XRateCtrl::XRateCtrl() { } XRateCtrl::~XRateCtrl() { } void XRateCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiRateCtrlV3_2 *InPckt = (CigiRateCtrlV3_2 *)Packet; bool ok = true; printf("===> RateCtrl <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("ArtPartID ==> %d\n",InPckt->GetArtPartID()); printf("ApplyToArtPart ==> %d\n",InPckt->GetApplyToArtPart()); printf("CoordSystem ==> %d\n",InPckt->GetCoordSys()); printf("XRate ==> %f\n",InPckt->GetXRate()); printf("YRate ==> %f\n",InPckt->GetYRate()); printf("ZRate ==> %f\n",InPckt->GetZRate()); printf("RollRate ==> %f\n",InPckt->GetRollRate()); printf("PitchRate ==> %f\n",InPckt->GetPitchRate()); printf("YawRate ==> %f\n",InPckt->GetYawRate()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XRateCtrl.h000066400000000000000000000011001210750432300223310ustar00rootroot00000000000000// XRateCtrl.h: interface for the XRateCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XRateCtrl_INCLUDED_) #define _PROC_XRateCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiRateCtrlV3_2.h" class XRateCtrl : public CigiBaseEventProcessor { public: XRateCtrl(); virtual ~XRateCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiRateCtrlV3_2 *TPcktIn) { TPckt = TPcktIn; } protected: CigiRateCtrlV3_2 *TPckt; }; #endif // _PROC_XRateCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSensorCtrl.cpp000066400000000000000000000024271210750432300232570ustar00rootroot00000000000000// XSensorCtrl.cpp: Body of the XSensorCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XSensorCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSensorCtrl::XSensorCtrl() { } XSensorCtrl::~XSensorCtrl() { } void XSensorCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiSensorCtrlV3 *InPckt = (CigiSensorCtrlV3 *)Packet; bool ok = true; printf("===> SensorCtrl <===\n"); printf("ViewID ==> %d\n",InPckt->GetViewID()); printf("SensorID ==> %d\n",InPckt->GetSensorID()); printf("TrackMode ==> %d\n",InPckt->GetTrackMode()); printf("SensorOn ==> %d\n",InPckt->GetSensorOn()); printf("Polarity ==> %d\n",InPckt->GetPolarity()); printf("LineDropEn ==> %d\n",InPckt->GetLineDropEn()); printf("AutoGainEn ==> %d\n",InPckt->GetAutoGainEn()); printf("TrackPolarity ==> %d\n",InPckt->GetTrackPolarity()); printf("ResponseType ==> %d\n",InPckt->GetResponseType()); printf("Gain ==> %f\n",InPckt->GetGain()); printf("Level ==> %f\n",InPckt->GetLevel()); printf("ACCoupling ==> %f\n",InPckt->GetACCoupling()); printf("Noise ==> %f\n",InPckt->GetNoise()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSensorCtrl.h000066400000000000000000000011201210750432300227110ustar00rootroot00000000000000// XSensorCtrl.h: interface for the XSensorCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSensorCtrl_INCLUDED_) #define _PROC_XSensorCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSensorCtrlV3.h" class XSensorCtrl : public CigiBaseEventProcessor { public: XSensorCtrl(); virtual ~XSensorCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSensorCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSensorCtrlV3 *TPckt; }; #endif // _PROC_XSensorCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XShortArtPartCtrl.cpp000066400000000000000000000021451210750432300244000ustar00rootroot00000000000000// XShortArtPartCtrl.cpp: Body of the XShortArtPartCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XShortArtPartCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortArtPartCtrl::XShortArtPartCtrl() { } XShortArtPartCtrl::~XShortArtPartCtrl() { } void XShortArtPartCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiShortArtPartCtrlV3 *InPckt = (CigiShortArtPartCtrlV3 *)Packet; printf("===> ShortArtPartCtrl <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("ArtPart1 ==> %d\n",InPckt->GetArtPart1()); printf("ArtPart2 ==> %d\n",InPckt->GetArtPart2()); printf("DofSelect1 ==> %d\n",InPckt->GetDofSelect1()); printf("DofSelect2 ==> %d\n",InPckt->GetDofSelect2()); printf("ArtPart1En ==> %d\n",InPckt->GetArtPart1En()); printf("ArtPart2En ==> %d\n",InPckt->GetArtPart2En()); printf("Dof1 ==> %f\n",InPckt->GetDof1()); printf("Dof2 ==> %f\n",InPckt->GetDof2()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XShortArtPartCtrl.h000066400000000000000000000012221210750432300240400ustar00rootroot00000000000000// XShortArtPartCtrl.h: interface for the XShortArtPartCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortArtPartCtrl_INCLUDED_) #define _PROC_XShortArtPartCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortArtPartCtrlV3.h" class XShortArtPartCtrl : public CigiBaseEventProcessor { public: XShortArtPartCtrl(); virtual ~XShortArtPartCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortArtPartCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortArtPartCtrlV3 *TPckt; }; #endif // _PROC_XShortArtPartCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XShortCompCtrl.cpp000066400000000000000000000017071210750432300237240ustar00rootroot00000000000000// XShortCompCtrl.cpp: Body of the XShortCompCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XShortCompCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortCompCtrl::XShortCompCtrl() { } XShortCompCtrl::~XShortCompCtrl() { } void XShortCompCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiShortCompCtrlV3 *InPckt = (CigiShortCompCtrlV3 *)Packet; bool ok = true; printf("===> ShortCompCtrl <===\n"); printf("CompID ==> %d\n",InPckt->GetCompID()); printf("InstanceID ==> %d\n",InPckt->GetInstanceID()); printf("CompClassV3 ==> %d\n",InPckt->GetCompClassV3()); printf("CompState ==> %d\n",InPckt->GetCompState()); printf("CompData ==> %d\n",InPckt->GetLongCompData(0)); printf("CompData ==> %d\n",InPckt->GetLongCompData(1)); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XShortCompCtrl.h000066400000000000000000000011611210750432300233630ustar00rootroot00000000000000// XShortCompCtrl.h: interface for the XShortCompCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortCompCtrl_INCLUDED_) #define _PROC_XShortCompCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortCompCtrlV3.h" class XShortCompCtrl : public CigiBaseEventProcessor { public: XShortCompCtrl(); virtual ~XShortCompCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortCompCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortCompCtrlV3 *TPckt; }; #endif // _PROC_XShortCompCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XShortSymbolCtrlV3_3.cpp000066400000000000000000000075741210750432300247360ustar00rootroot00000000000000// XShortSymbolCtrlV3_3.cpp: Body of the XShortSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XShortSymbolCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XShortSymbolCtrlV3_3::XShortSymbolCtrlV3_3() { } XShortSymbolCtrlV3_3::~XShortSymbolCtrlV3_3() { } void XShortSymbolCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiShortSymbolCtrlV3_3 *InPckt = (CigiShortSymbolCtrlV3_3 *)Packet; printf("Short Symbol Control:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tSymbol State = %d : ",InPckt->GetSymbolState()); switch(InPckt->GetSymbolState()) { case 0: printf("Hidden\n"); break; case 1: printf("Visible\n"); break; case 2: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tFlash Control = %d : ",InPckt->GetFlashCtrl()); switch(InPckt->GetFlashCtrl()) { case 0: printf("Continue\n"); break; case 1: printf("Reset\n"); break; default: printf("\n"); break; } printf("\tInherit Color = %d : ",InPckt->GetInheritColor()); switch(InPckt->GetInheritColor()) { case 0: printf("NotInherit\n"); break; case 1: printf("Inherit\n"); break; default: printf("\n"); break; } int ndx = 0; for(ndx=0;ndx<2;ndx++) { printf("\tDatum %d type = %d : ",ndx,InPckt->GetDatumType(ndx)); switch(InPckt->GetDatumType(ndx)) { case 0: printf("None\n"); break; case 1: printf("SurfaceIdDatumType\n"); printf("\tDatum %d: Surface ID = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 2: printf("ParentIdDatumType\n"); printf("\tDatum %d: Parent ID = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 3: printf("LayerDatumType\n"); printf("\tDatum %d: Layer = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 4: printf("FlashDutyCycleDatumType\n"); printf("\tDatum %d: Flash Duty Cycle = %d\n",ndx,InPckt->GetUIntDatum(ndx)); break; case 5: printf("FlashPeriodDatumType\n"); printf("\tDatum %d: Flash Period = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 6: printf("UPositionDatumType\n"); printf("\tDatum %d: U Position = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 7: printf("VPositionDatumType\n"); printf("\tDatum %d: V Position = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 8: printf("RotationDatumType\n"); printf("\tDatum %d: Rotation = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 9: printf("ColorDatumType\n"); Cigi_uint8 tRed,tGreen,tBlue,tAlpha; tRed = tGreen = tBlue = tAlpha = 0; InPckt->GetColorDatum(ndx,tRed,tGreen,tBlue,tAlpha); printf("\tDatum %d: Color:\n\t\t=> Red = %d\n\t\t=> Green = %d\n\t\t=> Blue = %d\n\t\t=> Alpha = %d\n", ndx,tRed,tGreen,tBlue,tAlpha); break; case 10: printf("ScaleUDatumType\n"); printf("\tDatum %d: U Scale = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; case 11: printf("ScaleVDatumType\n"); printf("\tDatum %d: V Scale = %f\n",ndx,InPckt->GetFloatDatum(ndx)); break; default: printf("\n"); break; } } } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XShortSymbolCtrlV3_3.h000066400000000000000000000012551210750432300243710ustar00rootroot00000000000000// XShortSymbolCtrlV3_3.h: interface for the XShortSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XShortSymbolCtrlV3_3_INCLUDED_) #define _PROC_XShortSymbolCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiShortSymbolCtrlV3_3.h" class XShortSymbolCtrlV3_3 : public CigiBaseEventProcessor { public: XShortSymbolCtrlV3_3(); virtual ~XShortSymbolCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiShortSymbolCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiShortSymbolCtrlV3_3 *TPckt; }; #endif // _PROC_XShortSymbolCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolCircleDefV3_3.cpp000066400000000000000000000033731210750432300246230ustar00rootroot00000000000000// XSymbolCircleDefV3_3.cpp: Body of the XSymbolCircleDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolCircleDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolCircleDefV3_3::XSymbolCircleDefV3_3() { } XSymbolCircleDefV3_3::~XSymbolCircleDefV3_3() { } void XSymbolCircleDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolCircleDefV3_3 *InPckt = (CigiSymbolCircleDefV3_3 *)Packet; printf("Symbol Circle Definition:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tDrawing Style = %d : ",InPckt->GetDrawingStyle()); switch(InPckt->GetDrawingStyle()) { case 0: printf("Line\n"); break; case 1: printf("Fill\n"); break; default: printf("\n"); break; } printf("\tStipple Pattern = %d\n",InPckt->GetStipplePattern()); printf("\tLine Width = %f\n",InPckt->GetLineWidth()); printf("\tStipple Pattern Length = %f\n",InPckt->GetStipplePatternLen()); // Circle Data int CircleCnt = InPckt->GetCircleCount(); int ndx = 0; for(ndx=0;ndxGetCircle(ndx); printf("\tCenter U Position = %f\n",Circle->GetCenterUPosition()); printf("\tCenter V Position = %f\n",Circle->GetCenterVPosition()); printf("\tRadius = %f\n",Circle->GetRadius()); printf("\tInner Radius = %f\n",Circle->GetInnerRadius()); printf("\tStart Angle = %f\n",Circle->GetStartAngle()); printf("\tEnd Angle = %f\n",Circle->GetEndAngle()); } } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolCircleDefV3_3.h000066400000000000000000000012551210750432300242650ustar00rootroot00000000000000// XSymbolCircleDefV3_3.h: interface for the XSymbolCircleDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolCircleDefV3_3_INCLUDED_) #define _PROC_XSymbolCircleDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolCircleDefV3_3.h" class XSymbolCircleDefV3_3 : public CigiBaseEventProcessor { public: XSymbolCircleDefV3_3(); virtual ~XSymbolCircleDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolCircleDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolCircleDefV3_3 *TPckt; }; #endif // _PROC_XSymbolCircleDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolCloneV3_3.cpp000066400000000000000000000017271210750432300240440ustar00rootroot00000000000000// XSymbolCloneV3_3.cpp: Body of the XSymbolCloneV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolCloneV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolCloneV3_3::XSymbolCloneV3_3() { } XSymbolCloneV3_3::~XSymbolCloneV3_3() { } void XSymbolCloneV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolCloneV3_3 *InPckt = (CigiSymbolCloneV3_3 *)Packet; printf("Symbol Clone:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tSource Type = %d : ",InPckt->GetSourceType()); switch(InPckt->GetSourceType()) { case 0: printf("Symbol\n"); break; case 1: printf("Symbol Template\n"); break; default: printf("\n"); break; } printf("\tSource ID = %d\n",InPckt->GetSourceID()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolCloneV3_3.h000066400000000000000000000012011210750432300234740ustar00rootroot00000000000000// XSymbolCloneV3_3.h: interface for the XSymbolCloneV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolCloneV3_3_INCLUDED_) #define _PROC_XSymbolCloneV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolCloneV3_3.h" class XSymbolCloneV3_3 : public CigiBaseEventProcessor { public: XSymbolCloneV3_3(); virtual ~XSymbolCloneV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolCloneV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolCloneV3_3 *TPckt; }; #endif // _PROC_XSymbolCloneV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolCtrlV3_3.cpp000066400000000000000000000047051210750432300237070ustar00rootroot00000000000000// XSymbolCtrlV3_3.cpp: Body of the XSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolCtrlV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolCtrlV3_3::XSymbolCtrlV3_3() { } XSymbolCtrlV3_3::~XSymbolCtrlV3_3() { } void XSymbolCtrlV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolCtrlV3_3 *InPckt = (CigiSymbolCtrlV3_3 *)Packet; printf("Symbol Control:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tSymbol State = %d : ",InPckt->GetSymbolState()); switch(InPckt->GetSymbolState()) { case 0: printf("Hidden\n"); break; case 1: printf("Visible\n"); break; case 2: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttachState()); switch(InPckt->GetAttachState()) { case 0: printf("Detach\n"); break; case 1: printf("Attach\n"); break; default: printf("\n"); break; } printf("\tFlash Control = %d : ",InPckt->GetFlashCtrl()); switch(InPckt->GetFlashCtrl()) { case 0: printf("Continue\n"); break; case 1: printf("Reset\n"); break; default: printf("\n"); break; } printf("\tInherit Color = %d : ",InPckt->GetInheritColor()); switch(InPckt->GetInheritColor()) { case 0: printf("NotInherit\n"); break; case 1: printf("Inherit\n"); break; default: printf("\n"); break; } printf("\tParent ID = %d\n",InPckt->GetParentSymbolID()); printf("\tSurface ID = %d\n",InPckt->GetSurfaceID()); printf("\tLayer ID = %d\n",InPckt->GetLayer()); printf("\tFlash Duty Cycle percentage = %d\n",InPckt->GetFlashDutyCycle()); printf("\tFlash Period = %f\n",InPckt->GetFlashPeriod()); printf("\tU Position = %f\n",InPckt->GetUPosition()); printf("\tV Position = %f\n",InPckt->GetVPosition()); printf("\tRotation = %f\n",InPckt->GetRotation()); printf("\tRed = %d\n",InPckt->GetRed()); printf("\tGreen = %d\n",InPckt->GetGreen()); printf("\tBlue = %d\n",InPckt->GetBlue()); printf("\tAlpha = %d\n",InPckt->GetAlpha()); printf("\tU Scale = %f\n",InPckt->GetScaleU()); printf("\tV Scale = %f\n",InPckt->GetScaleV()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolCtrlV3_3.h000066400000000000000000000011661210750432300233520ustar00rootroot00000000000000// XSymbolCtrlV3_3.h: interface for the XSymbolCtrlV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolCtrlV3_3_INCLUDED_) #define _PROC_XSymbolCtrlV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolCtrlV3_3.h" class XSymbolCtrlV3_3 : public CigiBaseEventProcessor { public: XSymbolCtrlV3_3(); virtual ~XSymbolCtrlV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolCtrlV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolCtrlV3_3 *TPckt; }; #endif // _PROC_XSymbolCtrlV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolLineDefV3_3.cpp000066400000000000000000000033501210750432300243040ustar00rootroot00000000000000// XSymbolLineDefV3_3.cpp: Body of the XSymbolLineDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolLineDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolLineDefV3_3::XSymbolLineDefV3_3() { } XSymbolLineDefV3_3::~XSymbolLineDefV3_3() { } void XSymbolLineDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolLineDefV3_3 *InPckt = (CigiSymbolLineDefV3_3 *)Packet; printf("Symbol Line Definition:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tDrawing Primitive = %d : ",InPckt->GetPrimitive()); switch(InPckt->GetPrimitive()) { case 0: printf("Points\n"); break; case 1: printf("Lines\n"); break; case 2: printf("LineStrip\n"); break; case 3: printf("LineLoop\n"); break; case 4: printf("Triangles\n"); break; case 5: printf("TriangleStrip\n"); break; case 6: printf("TriangleFan\n"); break; default: printf("\n"); break; } printf("\tStipple Pattern = %d\n",InPckt->GetStipplePattern()); printf("\tLine Width = %f\n",InPckt->GetLineWidth()); printf("\tStipple Pattern Length = %f\n",InPckt->GetStipplePatternLen()); // Circle Data int VtxCnt = InPckt->GetVertexCount(); int ndx = 0; for(ndx=0;ndxGetVertex(ndx); printf("\tVertex U Position = %f\n",Vtx->GetVertexU()); printf("\tVertex V Position = %f\n",Vtx->GetVertexV()); } } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolLineDefV3_3.h000066400000000000000000000012271210750432300237520ustar00rootroot00000000000000// XSymbolLineDefV3_3.h: interface for the XSymbolLineDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolLineDefV3_3_INCLUDED_) #define _PROC_XSymbolLineDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolLineDefV3_3.h" class XSymbolLineDefV3_3 : public CigiBaseEventProcessor { public: XSymbolLineDefV3_3(); virtual ~XSymbolLineDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolLineDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolLineDefV3_3 *TPckt; }; #endif // _PROC_XSymbolLineDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolSurfaceDefV3_3.cpp000066400000000000000000000056511210750432300250130ustar00rootroot00000000000000// XSymbolSurfaceDefV3_3.cpp: Body of the XSymbolSurfaceDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolSurfaceDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolSurfaceDefV3_3::XSymbolSurfaceDefV3_3() { } XSymbolSurfaceDefV3_3::~XSymbolSurfaceDefV3_3() { } void XSymbolSurfaceDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolSurfaceDefV3_3 *InPckt = (CigiSymbolSurfaceDefV3_3 *)Packet; printf("Symbol Surface Definition:\n"); printf("\tSurface ID = %d\n",InPckt->GetSurfaceID()); printf("\tSurface State = %d : ",InPckt->GetSurfaceState()); switch(InPckt->GetSurfaceState()) { case 0: printf("Active\n"); break; case 1: printf("Destroyed\n"); break; default: printf("\n"); break; } printf("\tAttach State = %d : ",InPckt->GetAttached()); switch(InPckt->GetAttached()) { case 0: printf("EntityAttached\n"); break; case 1: printf("ViewAttached\n"); break; default: printf("\n"); break; } printf("\tBillBoard State = %d : ",InPckt->GetBillboardState()); switch(InPckt->GetBillboardState()) { case 0: printf("NotBillboard\n"); break; case 1: printf("Billboard\n"); break; default: printf("\n"); break; } printf("\tPerspective Growth = %d : ",InPckt->GetPerspectiveGrowth()); switch(InPckt->GetPerspectiveGrowth()) { case 0: printf("Disable\n"); break; case 1: printf("Enable\n"); break; default: printf("\n"); break; } if(InPckt->GetAttached() == CigiBaseSymbolSurfaceDef::EntityAttached) { printf("\tEntity ID = %d\n",InPckt->GetEntityID()); printf("\tX Offset = %f\n",InPckt->GetXOffset()); printf("\tY Offset = %f\n",InPckt->GetYOffset()); printf("\tZ Offset = %f\n",InPckt->GetZOffset()); printf("\tYaw = %f\n",InPckt->GetYaw()); printf("\tPitch = %f\n",InPckt->GetPitch()); printf("\tRoll = %f\n",InPckt->GetRoll()); printf("\tWidth = %f\n",InPckt->GetWidth()); printf("\tHeight = %f\n",InPckt->GetHeight()); } else { printf("\tView ID = %d\n",InPckt->GetViewID()); printf("\tLeft Edge Position = %f\n",InPckt->GetLeftEdgePosition()); printf("\tRight Edge Position = %f\n",InPckt->GetRightEdgePosition()); printf("\tTop Edge Position = %f\n",InPckt->GetTopEdgePosition()); printf("\tBottom Edge Position = %f\n",InPckt->GetBottomEdgePosition()); } printf("\tMinimum U Coordinate = %f\n",InPckt->GetMinU()); printf("\tMaximum U Coordinate = %f\n",InPckt->GetMaxU()); printf("\tMinimum V Coordinate = %f\n",InPckt->GetMinV()); printf("\tMaximum V Coordinate = %f\n",InPckt->GetMaxV()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolSurfaceDefV3_3.h000066400000000000000000000012701210750432300244510ustar00rootroot00000000000000// XSymbolSurfaceDefV3_3.h: interface for the XSymbolSurfaceDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolSurfaceDefV3_3_INCLUDED_) #define _PROC_XSymbolSurfaceDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolSurfaceDefV3_3.h" class XSymbolSurfaceDefV3_3 : public CigiBaseEventProcessor { public: XSymbolSurfaceDefV3_3(); virtual ~XSymbolSurfaceDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolSurfaceDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolSurfaceDefV3_3 *TPckt; }; #endif // _PROC_XSymbolSurfaceDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolTextDefV3_3.cpp000066400000000000000000000035201210750432300243400ustar00rootroot00000000000000// XSymbolTextDefV3_3.cpp: Body of the XSymbolTextDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #include "XSymbolTextDefV3_3.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XSymbolTextDefV3_3::XSymbolTextDefV3_3() { } XSymbolTextDefV3_3::~XSymbolTextDefV3_3() { } void XSymbolTextDefV3_3::OnPacketReceived(CigiBasePacket *Packet) { CigiSymbolTextDefV3_3 *InPckt = (CigiSymbolTextDefV3_3 *)Packet; printf("Symbol Text Definition:\n"); printf("\tSymbol ID = %d\n",InPckt->GetSymbolID()); printf("\tAlignment State = %d : ",InPckt->GetAlignment()); switch(InPckt->GetAlignment()) { case 0: printf("TopLeft\n"); break; case 1: printf("TopCenter\n"); break; case 2: printf("TopRight\n"); break; case 3: printf("CenterLeft\n"); break; case 4: printf("Center\n"); break; case 5: printf("CenterRight\n"); break; case 6: printf("BottomLeft\n"); break; case 7: printf("BottomCenter\n"); break; case 8: printf("BottomRight\n"); break; default: printf("\n"); break; } printf("\tOrientation State = %d : ",InPckt->GetOrientation()); switch(InPckt->GetOrientation()) { case 0: printf("LeftToRight\n"); break; case 1: printf("TopToBottom\n"); break; case 2: printf("RightToLeft\n"); break; case 3: printf("BottomToTop\n"); break; default: printf("\n"); break; } printf("\tFont ID = %d\n",InPckt->GetFontID()); printf("\tFont Size = %f\n",InPckt->GetFontSize()); printf("\tText = %s\n",(InPckt->GetText()).c_str()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XSymbolTextDefV3_3.h000066400000000000000000000012271210750432300240070ustar00rootroot00000000000000// XSymbolTextDefV3_3.h: interface for the XSymbolTextDefV3_3 class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XSymbolTextDefV3_3_INCLUDED_) #define _PROC_XSymbolTextDefV3_3_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiSymbolTextDefV3_3.h" class XSymbolTextDefV3_3 : public CigiBaseEventProcessor { public: XSymbolTextDefV3_3(); virtual ~XSymbolTextDefV3_3(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiSymbolTextDefV3_3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiSymbolTextDefV3_3 *TPckt; }; #endif // _PROC_XSymbolTextDefV3_3_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XTerrestrialSurfaceCtrl.cpp000066400000000000000000000020311210750432300256060ustar00rootroot00000000000000// XTerrestrialSurfaceCtrl.cpp: Body of the XTerrestrialSurfaceCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XTerrestrialSurfaceCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTerrestrialSurfaceCtrl::XTerrestrialSurfaceCtrl() { } XTerrestrialSurfaceCtrl::~XTerrestrialSurfaceCtrl() { } void XTerrestrialSurfaceCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiTerrestrialSurfaceCtrlV3 *InPckt = (CigiTerrestrialSurfaceCtrlV3 *)Packet; printf("===> TerrestrialSurfaceCtrl <===\n"); printf("EntityRgnID ==> %d\n",InPckt->GetEntityRgnID()); printf("SurfaceCondID ==> %d\n",InPckt->GetSurfaceCondID()); printf("SurfaceCondEn ==> %d\n",InPckt->GetSurfaceCondEn()); printf("Scope ==> %d\n",InPckt->GetScope()); printf("Severity ==> %d\n",InPckt->GetSeverity()); printf("Coverage ==> %d\n",InPckt->GetCoverage()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XTerrestrialSurfaceCtrl.h000066400000000000000000000013241210750432300252570ustar00rootroot00000000000000// XTerrestrialSurfaceCtrl.h: interface for the XTerrestrialSurfaceCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTerrestrialSurfaceCtrl_INCLUDED_) #define _PROC_XTerrestrialSurfaceCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTerrestrialSurfaceCtrlV3.h" class XTerrestrialSurfaceCtrl : public CigiBaseEventProcessor { public: XTerrestrialSurfaceCtrl(); virtual ~XTerrestrialSurfaceCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTerrestrialSurfaceCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTerrestrialSurfaceCtrlV3 *TPckt; }; #endif // _PROC_XTerrestrialSurfaceCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XTrajectory.cpp000066400000000000000000000016071210750432300233060ustar00rootroot00000000000000// XTrajectory.cpp: Body of the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #include "XTrajectory.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XTrajectory::XTrajectory() { } XTrajectory::~XTrajectory() { } void XTrajectory::OnPacketReceived(CigiBasePacket *Packet) { CigiTrajectoryDefV3 *InPckt = (CigiTrajectoryDefV3 *)Packet; printf("===> Trajectory <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("AccelX ==> %f\n",InPckt->GetAccelX()); printf("AccelY ==> %f\n",InPckt->GetAccelY()); printf("AccelZ ==> %f\n",InPckt->GetAccelZ()); printf("RetardationRate ==> %f\n",InPckt->GetRetardationRate()); printf("TermVel ==> %f\n",InPckt->GetTermVel()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XTrajectory.h000066400000000000000000000011311210750432300227430ustar00rootroot00000000000000// XTrajectory.h: interface for the XTrajectory class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XTrajectory_INCLUDED_) #define _PROC_XTrajectory_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiTrajectoryDefV3.h" class XTrajectory : public CigiBaseEventProcessor { public: XTrajectory(); virtual ~XTrajectory(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiTrajectoryDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiTrajectoryDefV3 *TPckt; }; #endif // _PROC_XTrajectory_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XViewCtrl.cpp000066400000000000000000000023771210750432300227240ustar00rootroot00000000000000// XViewCtrl.cpp: Body of the XViewCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XViewCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewCtrl::XViewCtrl() { } XViewCtrl::~XViewCtrl() { } void XViewCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiViewCtrlV3 *InPckt = (CigiViewCtrlV3 *)Packet; printf("===> ViewCtrl <===\n"); printf("ViewID ==> %d\n",InPckt->GetViewID()); printf("GroupID ==> %d\n",InPckt->GetGroupID()); printf("XOffEn ==> %d\n",InPckt->GetXOffEn()); printf("YOffEn ==> %d\n",InPckt->GetYOffEn()); printf("ZOffEn ==> %d\n",InPckt->GetZOffEn()); printf("RollEn ==> %d\n",InPckt->GetRollEn()); printf("PitchEn ==> %d\n",InPckt->GetPitchEn()); printf("YawEn ==> %d\n",InPckt->GetYawEn()); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("XOff ==> %f\n",InPckt->GetXOff()); printf("YOff ==> %f\n",InPckt->GetYOff()); printf("ZOff ==> %f\n",InPckt->GetZOff()); printf("Roll ==> %f\n",InPckt->GetRoll()); printf("Pitch ==> %f\n",InPckt->GetPitch()); printf("Yaw ==> %f\n",InPckt->GetYaw()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XViewCtrl.h000066400000000000000000000010721210750432300223600ustar00rootroot00000000000000// XViewCtrl.h: interface for the XViewCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewCtrl_INCLUDED_) #define _PROC_XViewCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewCtrlV3.h" class XViewCtrl : public CigiBaseEventProcessor { public: XViewCtrl(); virtual ~XViewCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewCtrlV3 *TPckt; }; #endif // _PROC_XViewCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XViewDef.cpp000066400000000000000000000030761210750432300225130ustar00rootroot00000000000000// XViewDef.cpp: Body of the XViewDef class. // ////////////////////////////////////////////////////////////////////// #include "XViewDef.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XViewDef::XViewDef() { } XViewDef::~XViewDef() { } void XViewDef::OnPacketReceived(CigiBasePacket *Packet) { CigiViewDefV3 *InPckt = (CigiViewDefV3 *)Packet; printf("===> ViewDef <===\n"); printf("ViewID ==> %d\n",InPckt->GetViewID()); printf("GroupID ==> %d\n",InPckt->GetGroupID()); printf("FOVNearEn ==> %d\n",InPckt->GetFOVNearEn()); printf("FOVFarEn ==> %d\n",InPckt->GetFOVFarEn()); printf("FOVLeftEn ==> %d\n",InPckt->GetFOVLeftEn()); printf("FOVRightEn ==> %d\n",InPckt->GetFOVRightEn()); printf("FOVTopEn ==> %d\n",InPckt->GetFOVTopEn()); printf("FOVBottomEn ==> %d\n",InPckt->GetFOVBottomEn()); printf("MirrorMode ==> %d\n",InPckt->GetMirrorMode()); printf("PixelReplicateMode ==> %d\n",InPckt->GetPixelReplicateMode()); printf("ProjectionType ==> %d\n",InPckt->GetProjectionType()); printf("Reorder ==> %d\n",InPckt->GetReorder()); printf("ViewType ==> %d\n",InPckt->GetViewType()); printf("FOVNear ==> %f\n",InPckt->GetFOVNear()); printf("FOVFar ==> %f\n",InPckt->GetFOVFar()); printf("FOVLeft ==> %f\n",InPckt->GetFOVLeft()); printf("FOVRight ==> %f\n",InPckt->GetFOVRight()); printf("FOVTop ==> %f\n",InPckt->GetFOVTop()); printf("FOVBottom ==> %f\n",InPckt->GetFOVBottom()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XViewDef.h000066400000000000000000000010571210750432300221550ustar00rootroot00000000000000// XViewDef.h: interface for the XViewDef class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XViewDef_INCLUDED_) #define _PROC_XViewDef_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiViewDefV3.h" class XViewDef : public CigiBaseEventProcessor { public: XViewDef(); virtual ~XViewDef(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiViewDefV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiViewDefV3 *TPckt; }; #endif // _PROC_XViewDef_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XWaveCtrl.cpp000066400000000000000000000021451210750432300227050ustar00rootroot00000000000000// XWaveCtrl.cpp: Body of the XWaveCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XWaveCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWaveCtrl::XWaveCtrl() { } XWaveCtrl::~XWaveCtrl() { } void XWaveCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiWaveCtrlV3 *InPckt = (CigiWaveCtrlV3 *)Packet; printf("===> WaveCtrl <===\n"); printf("EntityRgnID ==> %d\n",InPckt->GetEntityRgnID()); printf("WaveID ==> %d\n",InPckt->GetWaveID()); printf("WaveEn ==> %d\n",InPckt->GetWaveEn()); printf("Scope ==> %d\n",InPckt->GetScope()); printf("Breaker ==> %d\n",InPckt->GetBreaker()); printf("WaveHt ==> %f\n",InPckt->GetWaveHt()); printf("WaveLen ==> %f\n",InPckt->GetWaveLen()); printf("Period ==> %f\n",InPckt->GetPeriod()); printf("Direction ==> %f\n",InPckt->GetDirection()); printf("PhaseOff ==> %f\n",InPckt->GetPhaseOff()); printf("Leading ==> %f\n",InPckt->GetLeading()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XWaveCtrl.h000066400000000000000000000010721210750432300223500ustar00rootroot00000000000000// XWaveCtrl.h: interface for the XWaveCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWaveCtrl_INCLUDED_) #define _PROC_XWaveCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWaveCtrlV3.h" class XWaveCtrl : public CigiBaseEventProcessor { public: XWaveCtrl(); virtual ~XWaveCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWaveCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWaveCtrlV3 *TPckt; }; #endif // _PROC_XWaveCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XWeatherCtrl.cpp000066400000000000000000000034301210750432300234000ustar00rootroot00000000000000// XWeatherCtrl.cpp: Body of the XWeatherCtrl class. // ////////////////////////////////////////////////////////////////////// #include "XWeatherCtrl.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// XWeatherCtrl::XWeatherCtrl() { } XWeatherCtrl::~XWeatherCtrl() { } void XWeatherCtrl::OnPacketReceived(CigiBasePacket *Packet) { CigiWeatherCtrlV3 *InPckt = (CigiWeatherCtrlV3 *)Packet; printf("===> WeatherCtrl.h <===\n"); printf("EntityID ==> %d\n",InPckt->GetEntityID()); printf("LayerID ==> %d\n",InPckt->GetLayerID()); printf("Humidity ==> %d\n",InPckt->GetHumidity()); printf("WeatherEn ==> %d\n",InPckt->GetWeatherEn()); printf("ScudEn ==> %d\n",InPckt->GetScudEn()); printf("RandomWindsEn ==> %d\n",InPckt->GetRandomWindsEn()); printf("RandomLightningEn ==> %d\n",InPckt->GetRandomLightningEn()); printf("CloudType ==> %d\n",InPckt->GetCloudType()); printf("Scope ==> %d\n",InPckt->GetScope()); printf("Severity ==> %d\n",InPckt->GetSeverity()); printf("AirTemp ==> %f\n",InPckt->GetAirTemp()); printf("VisibilityRng ==> %f\n",InPckt->GetVisibilityRng()); printf("ScudFreq ==> %f\n",InPckt->GetScudFreq()); printf("Coverage ==> %f\n",InPckt->GetCoverage()); printf("BaseElev ==> %f\n",InPckt->GetBaseElev()); printf("Thickness ==> %f\n",InPckt->GetThickness()); printf("Transition ==> %f\n",InPckt->GetTransition()); printf("HorizWindSp ==> %f\n",InPckt->GetHorizWindSp()); printf("VertWindSp ==> %f\n",InPckt->GetVertWindSp()); printf("WindDir ==> %f\n",InPckt->GetWindDir()); printf("BaroPress ==> %f\n",InPckt->GetBaroPress()); printf("Aerosol ==> %f\n",InPckt->GetAerosol()); } cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/XWeatherCtrl.h000066400000000000000000000011331210750432300230430ustar00rootroot00000000000000// XWeatherCtrl.h: interface for the XWeatherCtrl class. // ////////////////////////////////////////////////////////////////////// #if !defined(_PROC_XWeatherCtrl_INCLUDED_) #define _PROC_XWeatherCtrl_INCLUDED_ #include "CigiBaseEventProcessor.h" #include "CigiWeatherCtrlV3.h" class XWeatherCtrl : public CigiBaseEventProcessor { public: XWeatherCtrl(); virtual ~XWeatherCtrl(); virtual void OnPacketReceived(CigiBasePacket *Packet); void SetOrigPckt(CigiWeatherCtrlV3 *TPcktIn) { TPckt = TPcktIn; } protected: CigiWeatherCtrlV3 *TPckt; }; #endif // _PROC_XWeatherCtrl_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiDummyIG/makefile000066400000000000000000000052041210750432300220210ustar00rootroot00000000000000################################# # # This makefile is used to create the CigiDummyIG Executable # It depends on the variables CC, CPP, F77 and # the CFLAGS, CCFLAGS, FFLAGS being defined, along with # LIBDIR to indicate the current platform/option value. # ################################# CPP=g++ cc=gcc LIBDIR =LINUX_9 CCL_INC=`pkg-config --cflags cigicl` TINY_XML=../tinyxml INCLUDES=$(CCL_INC) -I$(TINY_XML) LIB_FILES = $(TINY_XML)/TinyXML.a CC_OPTS= -Wall -g -D__cplusplus C_OPTS= -g CFLAGS = $(C_OPTS) $(INCLUDES) CCFLAGS = $(CC_OPTS) $(INCLUDES) OBJ_FILES=DummyIG.o \ DefaultProc.o \ Network.o \ XArtPartCtrl.o \ XAtmosCtrl.o \ XCelestialCtrl.o \ XCollDetSegDef.o \ XCollDetVolDef.o \ XCompCtrl.o \ XConfClampEntityCtrl.o \ XEarthModelDef.o \ XEntityCtrl.o \ XEnvCondReq.o \ XEnvRgnCtrl.o \ XEventNotification.o \ XHatHotReq.o \ XIGCtrl.o \ XLosSegReq.o \ XLosVectReq.o \ XMaritimeSurfaceCtrl.o \ XMotionTrackCtrl.o \ XPostionReq.o \ XRateCtrl.o \ XSensorCtrl.o \ XShortArtPartCtrl.o \ XShortCompCtrl.o \ XShortSymbolCtrlV3_3.o \ XSymbolCircleDefV3_3.o \ XSymbolCloneV3_3.o \ XSymbolCtrlV3_3.o \ XSymbolLineDefV3_3.o \ XSymbolSurfaceDefV3_3.o \ XSymbolTextDefV3_3.o \ XTerrestrialSurfaceCtrl.o \ XTrajectory.o \ XViewCtrl.o \ XViewDef.o \ XWaveCtrl.o \ XWeatherCtrl.o \ .SUFFIXES: .cpp .c .cpp.o: $(CPP) $(CC_OPTS) $(INCLUDES) -c $< LDFLAGS = -lc LD = g++ all: CigiDummyIG clean: rm -f *.o rm -f *.so rm CigiDummyIG depend: makedepend -f makefile $(INCLUDES) \ ./DefaultProc.cpp \ ./Network.cpp \ ./XArtPartCtrl.cpp \ ./XAtmosCtrl.cpp \ ./XCelestialCtrl.cpp \ ./XCollDetSegDef.cpp \ ./XCollDetVolDef.cpp \ ./XCompCtrl.cpp \ ./XConfClampEntityCtrl.cpp \ ./XEarthModelDef.cpp \ ./XEntityCtrl.cpp \ ./XEnvCondReq.cpp \ ./XEnvRgnCtrl.cpp \ ./XEventNotification.cpp \ ./XHatHotReq.cpp \ ./XIGCtrl.cpp \ ./XLosSegReq.cpp \ ./XLosVectReq.cpp \ ./XMaritimeSurfaceCtrl.cpp \ ./XMotionTrackCtrl.cpp \ ./XPostionReq.cpp \ ./XRateCtrl.cpp \ ./XSensorCtrl.cpp \ ./XShortArtPartCtrl.cpp \ ./XShortCompCtrl.cpp \ ./XShortArtPartCtrl.cpp \ ./XShortCompCtrl.cpp \ ./XShortSymbolCtrlV3_3.cpp \ ./XSymbolCircleDefV3_3.cpp \ ./XSymbolCloneV3_3.cpp \ ./XSymbolCtrlV3_3.cpp \ ./XSymbolLineDefV3_3.cpp \ ./XSymbolSurfaceDefV3_3.cpp \ ./XSymbolTextDefV3_3.cpp \ ./XTerrestrialSurfaceCtrl.cpp \ ./XTrajectory.cpp \ ./XViewCtrl.cpp \ ./XViewDef.cpp \ ./XWaveCtrl.cpp \ ./XWeatherCtrl.cpp build_dependencies -f makefile -s ./DummyIG.cpp # # How to make MiniHost # CigiDummyIG: makefile $(OBJ_FILES) $(LIB_FILES) $(LD) \ -o CigiDummyIG \ $(OBJ_FILES) \ $(LIB_FILES) -lm -lpthread \ `pkg-config --libs cigicl` # # # DO NOT DELETE cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/000077500000000000000000000000001210750432300205375ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/AnimStop.cpp000066400000000000000000000026431210750432300230020ustar00rootroot00000000000000/**
 *  This Class will process the "Animation Stop Event Notification"
 *  
 *  FILENAME:   AnimStop.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  06/20/2005 Alex Storms                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "AnimStop.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // AnimStop // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv AnimStop::AnimStop() { StopID = 0; } // ================================================ // ~AnimStop // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv AnimStop::~AnimStop() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void AnimStop::OnPacketReceived(CigiBasePacket *Packet) { CigiAnimationStopV3 *stop = (CigiAnimationStopV3 *)(Packet); StopID = stop->GetEntityID(); } void AnimStop::clearStopID() { StopID = 0; } Cigi_uint16 AnimStop::getStopID() { return StopID; } cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/AnimStop.h000066400000000000000000000017171210750432300224500ustar00rootroot00000000000000#if !defined(_AnimStop_INCLUDED_) #define _AnimStop_INCLUDED_ #include //========================================================= //! The base class for the Animation Stop Event Packet Processing //! class AnimStop : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! AnimStop(); //========================================================= //! General Destructor //! virtual ~AnimStop(); //==> Incoming Packet Processing //========================================================= //! The callback handler for the CIGI Animation Stop packet //! \param Packet - The pointer to the Animation Stop packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); void clearStopID(); Cigi_uint16 getStopID(); private: Cigi_uint16 StopID; }; #endif // !defined(_AnimStop_INCLUDED_) cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/CigiMiniHost.sln000066400000000000000000000017011210750432300236020ustar00rootroot00000000000000Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CigiMiniHost", "CigiMiniHost.vcproj", "{EE86C953-9ADD-49E7-9575-A1A5B530F6FB}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {EE86C953-9ADD-49E7-9575-A1A5B530F6FB}.Debug.ActiveCfg = Debug|Win32 {EE86C953-9ADD-49E7-9575-A1A5B530F6FB}.Debug.Build.0 = Debug|Win32 {EE86C953-9ADD-49E7-9575-A1A5B530F6FB}.Release.ActiveCfg = Release|Win32 {EE86C953-9ADD-49E7-9575-A1A5B530F6FB}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/CigiMiniHost.vcproj000066400000000000000000000154701210750432300243210ustar00rootroot00000000000000 cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/DefaultProc.cpp000066400000000000000000000022721210750432300234560ustar00rootroot00000000000000/**
 *  This Class will process any packet not assigned
 *  
 *  FILENAME:   DefaultProc.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "DefaultProc.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::DefaultProc() { } // ================================================ // ~DefaultProc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DefaultProc::~DefaultProc() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void DefaultProc::OnPacketReceived(CigiBasePacket *Packet) { } cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/DefaultProc.h000066400000000000000000000026401210750432300231220ustar00rootroot00000000000000/**
 *  This Class will process any packet not assigned
 *  
 *  FILENAME:   DefaultProc.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) #define _DEFAULT_PACKET_PROCESSING_INCLUDED_ #include using namespace std; //========================================================= //! The base class for the SOF Event Packet Processing //! class DefaultProc : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! DefaultProc(); //========================================================= //! General Destructor //! virtual ~DefaultProc(); //==> Incoming Packet Processing //========================================================= //! The default callback handler for the CIGI //! \param Packet - The pointer to the default packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_DEFAULT_PACKET_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/MiniHost.cpp000066400000000000000000000224741210750432300230060ustar00rootroot00000000000000/**
 *  The CIGI MiniHost
 *  Copyright (c) 2004 The Boeing Company
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 *  FILENAME:   MiniHost.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *
 *  PROGRAM DESCRIPTION:
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 * 
* The Boeing Company * 1.0 */ #include "Network.h" // network includes winsock2.h which must be included before windows.h // Tiny XML includes #define TINYXML_USE_STL #define TIXML_USE_STL #include #include // CIGI related includes // From CCL #include #include #include #include #include #include // Handling routines #include "SOFP.h" #include "AnimStop.h" #include "DefaultProc.h" // System includes #include #include #include #ifdef WIN32 #include #include #endif #include // Special database information structure typedef struct Database_info { int id; double lat; double lon; double alt; } DbInfo; using namespace std; // ================================================ // Global variables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Networking class/object Network network; // CIGI specific static CigiHostSession *HostSn; static CigiOutgoingMsg *OmsgPtr; static CigiIncomingMsg *ImsgPtr; static SOFP *pSOFP; static AnimStop *pAnimStop; static DefaultProc DefaultPckt; static CigiEntityCtrlV3_3 COwn; static CigiIGCtrlV3_2 CIGC; // CIGI network message buffers and information int recvLen; static unsigned char *pCigiOutBuf; #define RECV_BUFFER_SIZE 32768 static unsigned char CInBuf[RECV_BUFFER_SIZE]; static int CigiInSz; static int CigiOutSz; static int Port_H2IG; static int Port_IG2H; static string IGAddr; // The database information int CurrentDB; std::list dblist; std::list::iterator idbl; // ================================================ // Pre-declaration of Local routines // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void); int init_cigi_if(void); // ================================================ // Main // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int main(int argc, char* argv[]) { CigiInSz = 0; ReadConfig(); if(dblist.empty()) { cout << "\n\nNo Database Information!\n\n"; return(0); } init_cigi_if(); /* CIGI messaging */ CigiOutgoingMsg &Omsg = *OmsgPtr; // Initialize ownship position idbl = dblist.begin(); COwn.SetLat((*idbl)->lat); COwn.SetLon((*idbl)->lon); COwn.SetAlt((*idbl)->alt); COwn.SetYaw(0.0); COwn.SetPitch(0.0); COwn.SetRoll(0.0); Omsg.BeginMsg(); while(1) { /* process incoming CIGI message - this should be short */ if( CigiInSz > 0 ) { try { ImsgPtr->ProcessIncomingMsg((unsigned char *)CInBuf,CigiInSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } } // load the IG Control Omsg << CIGC; /* Update ownship position */ double olat = COwn.GetLat(); COwn.SetLat(olat + 0.0000137); Omsg << COwn; // Do packaging here to // Package msg try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ){ std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // wait for Start Of Frame long HoldTime; bool RcvrProc = false; long CheckTime = time(&HoldTime); while(!RcvrProc) { if((CigiInSz = network.recv( CInBuf, RECV_BUFFER_SIZE )) > 0) RcvrProc = true; else { long TstTime = time(&HoldTime); if((TstTime - CheckTime) > 1) { cout << "Did not receive SOF\n"; RcvrProc = true; CigiInSz = 0; } } } if(pCigiOutBuf != NULL) { if(CigiInSz > 0) Omsg.UpdateIGCtrl(pCigiOutBuf,CInBuf); else Omsg.UpdateIGCtrl(pCigiOutBuf,NULL); // send CIGI message int sentBytes = network.send(pCigiOutBuf,CigiOutSz); } Omsg.FreeMsg(); // Frees the buffer containing the message that was just sent } // shut down the network network.closeSocket(); delete HostSn; delete pSOFP; delete pAnimStop; return 0; } // ================================================ // Read Configuration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void ReadConfig(void) { TiXmlNode *bnode = NULL; // base node TiXmlText *Port_To_Cigi = NULL; TiXmlText *Port_From_Cigi = NULL; TiXmlText *IG_Addr = NULL; TiXmlHandle *hConfig = NULL; // pointer to a Config handle TiXmlElement *Config = NULL; TiXmlText *DbDta = NULL; TiXmlDocument doc("MiniHost.def"); bool stat = doc.LoadFile(); //set default values Port_H2IG = 8000; Port_IG2H = 8001; IGAddr = "127.0.0.1"; if(stat) { bnode = doc.FirstChild("MiniHostInitialization"); if(bnode == NULL) stat = false; // The file is not a Mission Function Initialization file } if(stat) { // get base configuration Config = bnode->FirstChildElement("Config"); if(Config != NULL) { hConfig = new TiXmlHandle(Config); IG_Addr = hConfig->FirstChildElement("IG_Addr").Child(0).Text(); if(IG_Addr) IGAddr = IG_Addr->Value(); Port_To_Cigi = hConfig->FirstChildElement("Port_To_IG").Child(0).Text(); Port_H2IG = (Port_To_Cigi) ? atoi(Port_To_Cigi->Value()) : 8000; Port_From_Cigi = hConfig->FirstChildElement("Port_From_IG").Child(0).Text(); Port_IG2H = (Port_From_Cigi) ? atoi(Port_From_Cigi->Value()) : 8001; delete hConfig; } // get Database configuration Config = bnode->FirstChildElement("DBase"); while(Config != NULL) { hConfig = new TiXmlHandle(Config); DbInfo *pDbInfo = new DbInfo; DbDta = hConfig->FirstChildElement("ID").Child(0).Text(); pDbInfo->id = (DbDta) ? atoi(DbDta->Value()) : 5; DbDta = hConfig->FirstChildElement("Lat").Child(0).Text(); pDbInfo->lat = (DbDta) ? atof(DbDta->Value()) : 0.0; DbDta = hConfig->FirstChildElement("Lon").Child(0).Text(); pDbInfo->lon = (DbDta) ? atof(DbDta->Value()) : 0.0; DbDta = hConfig->FirstChildElement("Alt").Child(0).Text(); pDbInfo->alt = (DbDta) ? atof(DbDta->Value()) : 0.0; dblist.push_back(pDbInfo); Config = Config->NextSiblingElement("DBase"); } } } // ================================================ // Initialize interface to CIGI // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int init_cigi_if(void){ int err_status = 0; /* open sockets to CIGI */ // hostemu-ip-addr, hostemu-socket, local-socket printf("init_cigi_if: initializing ports to CIGI\n"); bool netstatus = network.openSocket( IGAddr.c_str(), Port_H2IG, Port_IG2H ); if( !netstatus ) { printf( "could not open socket for comm with CIGI IG server\n" ); exit( 1 ); } else { printf( "successfully open socket for comm with CIGI IG server\n" ); } HostSn = new CigiHostSession(1,32768,2,32768); pSOFP = new SOFP; pAnimStop = new AnimStop; CigiOutgoingMsg &Omsg = HostSn->GetOutgoingMsgMgr(); CigiIncomingMsg &Imsg = HostSn->GetIncomingMsgMgr(); OmsgPtr = &Omsg; ImsgPtr = &Imsg; HostSn->SetCigiVersion(3,3); HostSn->SetSynchronous(true); Imsg.SetReaderCigiVersion(3,3); Imsg.UsingIteration(false); // set up a default handler for unhandled packets Imsg.RegisterEventProcessor(0, (CigiBaseEventProcessor *) &DefaultPckt); // register SOF Imsg.RegisterEventProcessor( CIGI_SOF_PACKET_ID_V3_2, (CigiBaseEventProcessor *) pSOFP); //Register animation stop Imsg.RegisterEventProcessor(CIGI_ANIMATION_STOP_PACKET_ID_V3, (CigiBaseEventProcessor *) pAnimStop); // initialize the IG Control CIGC.SetIGMode(CigiBaseIGCtrl::Operate); // initialize the Ownship // the other parameters are set by CigiEntityCtrlV3_3 COwn.SetEntityID(0); COwn.SetEntityType(0); COwn.SetEntityState(CigiBaseEntityCtrl::Active); return err_status; } cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/MiniHost.def000066400000000000000000000004471210750432300227560ustar00rootroot00000000000000 127.0.0.1 8000 8001 1 38.0 -90.2 1000 cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/Network.cpp000066400000000000000000000174771210750432300227140ustar00rootroot00000000000000/**
 *  The Multi-Purpose Viewer
 *  Copyright (c) 2004 The Boeing Company
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 *  FILENAME:   Network.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *
 *  PROGRAM DESCRIPTION:
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 *
 *  07/10/2006 Greg Basler                       1.7.2
 *  Corrected a problem with the code that cause a stray
 *  pointer due to the "JUST_IP_ADDRESSES" declaration.
 * 
* The Boeing Company * 1.7.2 */ #include "Network.h" #include #include #include // ================================================ // Network // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Network::Network() { valid = false; #ifndef JUST_IP_ADDRESSES saddr = NULL; #endif } // ================================================ // ~Network // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Network::~Network() { closeSocket(); #ifndef JUST_IP_ADDRESSES freeaddrinfo(saddr); #endif } // ================================================ // openSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool Network::openSocket( const char * ip, const int port_send, const int port_rcv ) { // Initialize communications. InitializeComm(ip, port_send, port_rcv); return valid; } // ================================================ // openSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool Network::openSocket(const int port_rcv ) { // Initialize communications. InitializeComm(port_rcv); return valid; } // ================================================ // closeSocket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::closeSocket() { if( !valid ) return; #ifdef WIN32 // Clean up the sockets. closesocket(sndsock); closesocket(rcvsock); // Clean up WinSock. Again, this is not needed for non-Windows platforms. WSACleanup(); #else // Clean up the sockets. close(sndsock); close(rcvsock); #endif valid = false; } // ================================================ // send // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int Network::send( unsigned char * sendbuff, int sendsize ) { if( !valid) return -1; #ifdef JUST_IP_ADDRESSES if(!saddr.sin_family ) return -1; return sendto(sndsock, (const char *)sendbuff, sendsize, 0, (struct sockaddr *)&saddr, sizeof(struct sockaddr)); #else if(!saddr) return -1; return sendto(sndsock, (const char *)sendbuff, sendsize, 0, saddr->ai_addr, saddr->ai_addrlen); #endif // JUST_IP_ADDRESSES } // ================================================ // recv // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int Network::recv( unsigned char * rcvbuff, int recvsize ) { if( !valid ) return -1; return recvfrom(rcvsock, (char *)rcvbuff, recvsize, 0, NULL, 0); } // ================================================ // InitializeComm // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::InitializeComm(const char *ipaddr, const int sndport, const int rcvport) { int status; #ifdef WIN32 // Initialize winsock. If you are using Berkeley sockets on a // non-Win32 platform, you can leave out these first two lines. WSADATA wsainfo; WSAStartup(MAKEWORD(1, 1), &wsainfo); #endif // Open the connection for sending. #ifdef JUST_IP_ADDRESSES saddr.sin_family = AF_INET; saddr.sin_port = htons(sndport); // Use whatever port your host listens on saddr.sin_addr.s_addr = inet_addr(ipaddr); // IP address of host sndsock = socket(AF_INET, SOCK_DGRAM, 0); if( sndsock < 0 ) { // socket could not be created valid = false; return; } #else if(saddr) { freeaddrinfo(saddr); saddr = NULL; } char portstr[6]; snprintf(portstr, sizeof(portstr), "%u", sndport); struct addrinfo hint; hint.ai_flags = 0; //hint.ai_family = AF_INET | AF_INET6; hint.ai_family = AF_UNSPEC; hint.ai_socktype = SOCK_DGRAM; hint.ai_protocol = IPPROTO_UDP; hint.ai_addrlen = 0; hint.ai_addr = NULL; hint.ai_canonname = NULL; hint.ai_next = NULL; int result = getaddrinfo(ipaddr, portstr, &hint, &saddr); if(result) { if(saddr) { freeaddrinfo(saddr); saddr = NULL; } return; } sndsock = socket(saddr->ai_family, saddr->ai_socktype, saddr->ai_protocol); #endif // JUST_IP_ADDRESSES // Open the connection for receiving. memset(&raddr,0,sizeof(raddr)); raddr.sin_family = AF_INET; raddr.sin_port = htons(rcvport); // Use whatever port your host sends to raddr.sin_addr.s_addr = htonl(INADDR_ANY); rcvsock = socket(AF_INET, SOCK_DGRAM, 0); if( rcvsock < 0 ) { // socket could not be created valid = false; return; } // Make the address reusable. int sockparam = 1; /* TRUE; */ setsockopt(rcvsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&sockparam, sizeof(int)); // Make the socket non-blocking. #ifdef WIN32 // This is how sockets are put in non-blocking mode on Windows. unsigned long arg = 1L; ioctlsocket(rcvsock, FIONBIO, &arg); #else // This is how sockets are put in non-blocking mode on non-Windows operating systems (and Cygwin). fcntl( rcvsock, F_SETFL, O_NONBLOCK ); #endif // Bind the socket to the local address. status = bind(rcvsock, (struct sockaddr *)&raddr, sizeof(raddr)); if( status != 0 ) { // socket could not be bound valid = false; return; } // FIXME - more error checking valid = true; } // ================================================ // InitializeComm // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void Network::InitializeComm(const int rcvport) { int status; #ifdef WIN32 // Initialize winsock. If you are using Berkeley sockets on a // non-Win32 platform, you can leave out these first two lines. WSADATA wsainfo; WSAStartup(MAKEWORD(1, 1), &wsainfo); #endif sndsock = socket(AF_INET, SOCK_DGRAM, 0); if( sndsock < 0 ) { // socket could not be created valid = false; return; } // Disable sending. #ifdef JUST_IP_ADDRESSES saddr.sin_family = 0; #else if(saddr) { freeaddrinfo(saddr); saddr = NULL; } #endif // JUST_IP_ADDRESSES // Open the connection for receiving. memset(&raddr,0,sizeof(raddr)); raddr.sin_family = AF_INET; raddr.sin_port = htons(rcvport); // Use whatever port your host sends to raddr.sin_addr.s_addr = htonl(INADDR_ANY); rcvsock = socket(AF_INET, SOCK_DGRAM, 0); if( rcvsock < 0 ) { // socket could not be created valid = false; return; } // Make the address reusable. int sockparam = 1; /* TRUE; */ setsockopt(rcvsock, SOL_SOCKET, SO_REUSEADDR, (const char *)&sockparam, sizeof(int)); // Make the socket non-blocking. #ifdef WIN32 // This is how sockets are put in non-blocking mode on Windows. unsigned long arg = 1L; ioctlsocket(rcvsock, FIONBIO, &arg); #else // This is how sockets are put in non-blocking mode on non-Windows operating systems (and Cygwin). fcntl( rcvsock, F_SETFL, O_NONBLOCK ); #endif // Bind the socket to the local address. status = bind(rcvsock, (struct sockaddr *)&raddr, sizeof(raddr)); if( status != 0 ) { // socket could not be bound valid = false; return; } // FIXME - more error checking valid = true; } cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/Network.h000066400000000000000000000117701210750432300223470ustar00rootroot00000000000000/**
 *  The Multi-Purpose Viewer
 *  Copyright (c) 2004 The Boeing Company
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *  
 *  
 *  FILENAME:   Network.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Multi-Purpose Viewer
 *  
 *  PROGRAM DESCRIPTION: 
 *  This class contains the data and methods necessary to
 *   handle the network interface.
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/29/2004 Andrew Sampson                       MPV_CR_DR_1
 *  Initial Release.
 *
 *  07/10/2006 Greg Basler                       1.7.2
 *  Corrected a problem with the code that cause a stray
 *  pointer due to the "JUST_IP_ADDRESSES" declaration.
 * 
* The Boeing Company * 1.7.2 */ #ifndef _MPV_NETWORK_INTERFACE_INCLUDED_ #define _MPV_NETWORK_INTERFACE_INCLUDED_ #ifdef WIN32 #include #else #include #include #include #include #include #include #endif #ifdef WIN32 #define JUST_IP_ADDRESSES #endif //========================================================= //! The class encapsulating the network interface. //! class Network { public: //==> Management //========================================================= //! General Constructor //! Network(); //========================================================= //! General Destructor //! ~Network(); //==> Networking methods //========================================================= //! Opens a network communication socket //! \param ip - The "to" internet address //! \param port_send - The port on which the messages are being sent //! \param port_rcv - the port on which messages are being received //! //! \return Success or Failure //! bool openSocket( const char * ip, const int port_send, const int port_rcv ) ; //========================================================= //! Opens a receive only network communication socket. Only //! recv will work. //! \param port_rcv - the port on which messages are being received //! //! \return Success or Failure //! bool openSocket(const int port_rcv ) ; //========================================================= //! Closes the socket //! void closeSocket() ; //========================================================= //! Sends a message //! \param sendbuff - A pointer to the buffer containing the //! message to be sent. //! \param sendsize - The size of the message //! //! \return The number of bytes sent, or -1 on error. //! int send( unsigned char * sendbuff, int sendsize ) ; //========================================================= //! Receive a message //! \param rcvbuff - A pointer to the buffer to place the //! incoming message. //! \param recvsize - The maximum size of the received message. //! //! \return The number of bytes recieved, or -1 on error. //! int recv( unsigned char * rcvbuff, int recvsize ) ; private: //========================================================= //! Initializes the communication //! \param ipaddr - The "to" internet address //! \param sndport - The port on which the messages are being sent //! \param rcvport - the port on which messages are being received //! void InitializeComm(const char *ipaddr, const int sndport, const int rcvport); //========================================================= //! Initializes incoming communication only //! \param rcvport - the port on which messages are being received //! void InitializeComm(const int rcvport); // Berkeley Sockets stuff //========================================================= //! The send socket //! int sndsock; //========================================================= //! The receive socket //! int rcvsock; //========================================================= //! The sending socket address //! #ifdef JUST_IP_ADDRESSES struct sockaddr_in saddr; #else struct addrinfo *saddr; #endif // JUST_IP_ADDRESSES //========================================================= //! The receiving socket address //! struct sockaddr_in raddr; //========================================================= //! The Valid flag //! bool valid; }; #endif // _MPV_NETWORK_INTERFACE_INCLUDED_ cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/SOFP.cpp000066400000000000000000000023771210750432300220230ustar00rootroot00000000000000/**
 *  This Class will process the Start-Of-Frame
 *  
 *  FILENAME:   SOFP.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #include #include "SOFP.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// // ================================================ // SOFP // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOFP::SOFP() { } // ================================================ // ~SOFP // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOFP::~SOFP() { } // ================================================ // OnPacketReceived // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void SOFP::OnPacketReceived(CigiBasePacket *Packet) { CigiSOFV3_2 *sof = (CigiSOFV3_2 *)(Packet); // We are actually not processing any information in the SOF } cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/SOFP.h000066400000000000000000000024431210750432300214620ustar00rootroot00000000000000/**
 *  This Class will process the Start-Of-Frame
 *  
 *  FILENAME:   SOFP.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    CIGI
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/29/2005 Greg Basler                       INIT
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * Version: 0.1 */ #if !defined(_SOFP_INCLUDED_) #define _SOFP_INCLUDED_ #include //========================================================= //! The base class for the SOF Event Packet Processing //! class SOFP : public CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! SOFP(); //========================================================= //! General Destructor //! virtual ~SOFP(); //==> Incoming Packet Processing //========================================================= //! The callback handler for the CIGI SOF packet //! \param Packet - The pointer to the SOF packet object. //! virtual void OnPacketReceived(CigiBasePacket *Packet); }; #endif // !defined(_SOFP_INCLUDED_) cigi-ccl-3.3.3a+svn818/examples/CigiMiniHost/makefile000066400000000000000000000024031210750432300222360ustar00rootroot00000000000000################################# # # This makefile is used to create the CigiMiniHost Executable # It depends on the variables CC, CPP, F77 and # the CFLAGS, CCFLAGS, FFLAGS being defined, along with # LIBDIR to indicate the current platform/option value. # ################################# CPP=g++ cc=gcc LIBDIR =LINUX_9 CCL_INC=`pkg-config --cflags cigicl` TINY_XML=../tinyxml INCLUDES=$(CCL_INC) -I$(TINY_XML) LIB_FILES = $(TINY_XML)/TinyXML.a CC_OPTS= -Wall -g -D__cplusplus C_OPTS= -g CFLAGS = $(C_OPTS) $(INCLUDES) CCFLAGS = $(CC_OPTS) $(INCLUDES) OBJ_FILES=MiniHost.o \ DefaultProc.o \ SOFP.o \ AnimStop.o \ Network.o .SUFFIXES: .cpp .c .cpp.o: $(CPP) $(CC_OPTS) $(INCLUDES) -c $< LDFLAGS = -lc LD = g++ all: CigiMiniHost clean: rm -f *.o rm -f *.so rm CigiMiniHost depend: makedepend -f makefile $(INCLUDES) \ ./MiniHost.cpp \ ./DefaultProc.cpp \ ./SOFP.cpp \ ./AnimStop.cpp \ ./Network.cpp build_dependencies -f makefile -s ./MiniHost.cpp # # How to make MiniHost # CigiMiniHost: makefile $(OBJ_FILES) $(LIB_FILES) $(LD) \ -o CigiMiniHost \ $(OBJ_FILES) \ $(LIB_FILES) -lm -lpthread \ `pkg-config --libs cigicl` # # # DO NOT DELETE cigi-ccl-3.3.3a+svn818/examples/README.txt000066400000000000000000000062051210750432300177120ustar00rootroot00000000000000To build any of the examples: 1. Download Tinyxml from www.sourceforge.net/projects/tinyxml Note: The examples were tested using TinyXML 2.3.4 2. Expand the Tinyxml zip file 3. Copy the "tinyxml" directory to the ccl/examples directory 4. The resulting directory tree should look like the following: ccl |- ccl_dll |- ccl_lib |- examples | |- CigiDummyIG | |- CigiMiniHost | |- tinyxml |- include |- source For Windows: 1. Open Visual Studio 2. Select Open Solution 3. Go to the ccl_\ccl_lib directory. 4. Select ccl_lib.sln 5. Select Build->Set Active Configuration 6. Select one of the following: a. ccl_lib - Win32 libDebugMT_DLL b. ccl_lib - Win32 libReleaseMT_DLL 7. Build the CCL library. 8. Close the solution. 9. Open the tinyxml library 10. Select one of the following Configurations a. tinyxmlStl - Win32 Debug b. tinyxmlStl - Win32 Release 11. In the Project -> Setting -> C/C++ -> Code Generation, select one of the following: a. Debug Multithreaded DLL b. Multithreaded DLL 12. Build tinyxml. 13. Close the workspace or solution 14. Select Open Solution 15. Go to one of the example project directories. 16. Select the .sln file 17. Select Build->Set Active Configuration 18. Select one of the following: a. - Win32 Debug b. - Win32 Release 19. Build the example project. 20. Close the solution For Linux: 1. Go to the "ccl_" directory 2. make configure executable 3. Type the following: a. ./configure b. make 4. change to root user. 5. Type the following: a. make install 6. Exit root user. 7. Go to the "ccl_\examples\tinyxml" directory. 8. Edit "Makefile" 9. Change the following: a. From: # DEBUG can be set to YES to include debugging info, or NO otherwise DEBUG := NO b. To: # DEBUG can be set to YES to include debugging info, or NO otherwise DEBUG := YES c. From: # TINYXML_USE_STL can be used to turn on STL support. NO, then STL # will not be used. YES will include the STL files. TINYXML_USE_STL := NO d. To: # TINYXML_USE_STL can be used to turn on STL support. NO, then STL # will not be used. YES will include the STL files. TINYXML_USE_STL := YES e. From: #********************************************************** # Output #********************************************************** ${OUTPUT}: ${OBJS} ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} f. To: #********************************************************** # Output #********************************************************** ${OUTPUT}: ${OBJS} ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} ar rc TinyXML.a tinyxml.o tinystr.o tinyxmlerror.o tinyxmlparser.o ranlib TinyXML.a 10. Type the following: a. make 11. Go to the example project directory. 12. Type the following: a. make You can edit the configuration/definition file ".def". Make sure a copy of this file is in the same directory as the executable before starting the program. You can start the program by going to the directory containing the example executable and typing the name of the example for windows or "./" for Linux. cigi-ccl-3.3.3a+svn818/include/000077500000000000000000000000001210750432300160165ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/include/CigiAerosolRespV3.h000066400000000000000000000066121210750432300214370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAerosolRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_AEROSOL_RESP_V3_INCLUDED_) #define _CIGI_AEROSOL_RESP_V3_INCLUDED_ #include "CigiBaseAerosolResp.h" class CIGI_SPEC CigiAerosolRespV3 : public CigiBaseAerosolResp { public: //==> Management //========================================================= //! General Constructor //! CigiAerosolRespV3(); //========================================================= //! General Destructor //! virtual ~CigiAerosolRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_AEROSOL_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiAllPackets.h000066400000000000000000000145061210750432300210140ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAllPackets.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  11/27/2007 Greg Basler                       Version 2.0.0
 *  Created to contain all the Cigi packet classes
 *  
 *  04/03/2007 Greg Basler                       Version 2.1.0
 *  Added CigiSymbolCloneV3_3
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Added CigiIGCtrlV3_3 and CigiEntityCtrlV3_3
 *
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ALL_PACKETS_INCLUDED_) #define _CIGI_ALL_PACKETS_INCLUDED_ // IG control #include "CigiIGCtrlV1.h" #include "CigiIGCtrlV2.h" #include "CigiIGCtrlV3.h" #include "CigiIGCtrlV3_2.h" #include "CigiIGCtrlV3_3.h" // Entity control #include "CigiEntityCtrlV1.h" #include "CigiEntityCtrlV2.h" #include "CigiEntityCtrlV3.h" #include "CigiEntityCtrlV3_3.h" // View Definition #include "CigiViewDefV1.h" #include "CigiViewDefV2.h" #include "CigiViewDefV3.h" // View Control #include "CigiViewCtrlV1.h" #include "CigiViewCtrlV2.h" #include "CigiViewCtrlV3.h" // Rate Control #include "CigiRateCtrlV1.h" #include "CigiRateCtrlV2.h" #include "CigiRateCtrlV3.h" #include "CigiRateCtrlV3_2.h" // Sensor Control #include "CigiSensorCtrlV1.h" #include "CigiSensorCtrlV2.h" #include "CigiSensorCtrlV3.h" // Trajectory Definition #include "CigiTrajectoryDefV1.h" #include "CigiTrajectoryDefV2.h" #include "CigiTrajectoryDefV3.h" // Weather Control #include "CigiWeatherCtrlV1.h" #include "CigiWeatherCtrlV2.h" #include "CigiWeatherCtrlV3.h" // Collision Detection Segment Definition #include "CigiCollDetSegDefV1.h" #include "CigiCollDetSegDefV2.h" #include "CigiCollDetSegDefV3.h" // LOS Segment Request #include "CigiLosSegReqV1.h" #include "CigiLosSegReqV2.h" #include "CigiLosSegReqV3.h" #include "CigiLosSegReqV3_2.h" // LOS Vector Request #include "CigiLosVectReqV1.h" #include "CigiLosVectReqV2.h" #include "CigiLosVectReqV3.h" #include "CigiLosVectReqV3_2.h" // Hat Hot Request #include "CigiHatReqV1.h" #include "CigiHatReqV2.h" #include "CigiHotReqV2.h" #include "CigiHatHotReqV3.h" #include "CigiHatHotReqV3_2.h" // Environmental Control #include "CigiEnvCtrlV1.h" #include "CigiEnvCtrlV2.h" #include "CigiAtmosCtrl.h" #include "CigiCelestialCtrl.h" // Special Effect Definision #include "CigiSpecEffDefV1.h" #include "CigiSpecEffDefV2.h" // Articulated Part Control #include "CigiArtPartCtrlV1.h" #include "CigiArtPartCtrlV2.h" #include "CigiArtPartCtrlV3.h" // Collision Detection Volume Definition #include "CigiCollDetVolDefV2.h" #include "CigiCollDetVolDefV3.h" // Short Articulated Part Control #include "CigiShortArtPartCtrlV3.h" // Conformal Clamped Entity Control #include "CigiConfClampEntityCtrlV3.h" // Maritime Surface Conditions Control #include "CigiMaritimeSurfaceCtrlV3.h" // Environmental Region Control #include "CigiEnvRgnCtrlV3.h" // Terrestrial Surface Control #include "CigiTerrestrialSurfaceCtrlV3.h" // Motion Tracker control #include "CigiMotionTrackCtrlV3.h" // Earth Model Definition #include "CigiEarthModelDefV3.h" // Positon Request #include "CigiPositionReqV3.h" // Environmental Conditions Request #include "CigiEnvCondReqV3.h" // Wave Control #include "CigiWaveCtrlV3.h" // Start Of Frame #include "CigiSOFV1.h" #include "CigiSOFV2.h" #include "CigiSOFV3.h" #include "CigiSOFV3_2.h" // Collision Detection Segment Response #include "CigiCollDetSegRespV1.h" #include "CigiCollDetSegRespV2.h" #include "CigiCollDetSegRespV3.h" // Sensor Response #include "CigiSensorRespV1.h" #include "CigiSensorRespV2.h" #include "CigiSensorRespV3.h" // Sensor Extended Response #include "CigiSensorXRespV3.h" // Los Response #include "CigiLosRespV1.h" #include "CigiLosRespV2.h" #include "CigiLosRespV3.h" #include "CigiLosRespV3_2.h" // Los Extended Response #include "CigiLosXRespV3.h" #include "CigiLosXRespV3_2.h" // Hat Hot Response #include "CigiHatRespV1.h" #include "CigiHatRespV2.h" #include "CigiHotRespV2.h" #include "CigiHatHotRespV3.h" #include "CigiHatHotXRespV3.h" #include "CigiHatHotRespV3_2.h" #include "CigiHatHotXRespV3_2.h" // Collision Detection Volume Response #include "CigiCollDetVolRespV2.h" #include "CigiCollDetVolRespV3.h" // Position Response #include "CigiPositionRespV3.h" // Weather Condition Response #include "CigiWeatherCondRespV3.h" // Aerosol Resp #include "CigiAerosolRespV3.h" // Maritime Surface Response #include "CigiMaritimeSurfaceRespV3.h" // Terrestrial Surface Response #include "CigiTerrestrialSurfaceRespV3.h" // Animation Stop Notification #include "CigiAnimationStopV3.h" // Event Notification #include "CigiEventNotificationV3.h" // IG Message #include "CigiIGMsgV2.h" #include "CigiIGMsgV3.h" // Component Control #include "CigiCompCtrlV1.h" #include "CigiCompCtrlV2.h" #include "CigiCompCtrlV3.h" #include "CigiShortCompCtrlV3.h" #include "CigiCompCtrlV3_3.h" #include "CigiShortCompCtrlV3_3.h" // Symbol Surface Definition #include "CigiSymbolSurfaceDefV3_3.h" // Symbol Control #include "CigiSymbolCtrlV3_3.h" // Short Symbol Control #include "CigiShortSymbolCtrlV3_3.h" // Symbol Text Definition #include "CigiSymbolTextDefV3_3.h" // Symbol Circle Definition #include "CigiSymbolCircleDefV3_3.h" // Symbol Line Definition #include "CigiSymbolLineDefV3_3.h" // Symbol Clone #include "CigiSymbolCloneV3_3.h" #endif // _CIGI_ALL_PACKETS_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiAnimationStopV3.h000066400000000000000000000066331210750432300217710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAnimationStopV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ANIMATION_STOP_V3_INCLUDED_) #define _CIGI_ANIMATION_STOP_V3_INCLUDED_ #include "CigiBaseAnimationStop.h" class CIGI_SPEC CigiAnimationStopV3 : public CigiBaseAnimationStop { public: //==> Management //========================================================= //! General Constructor //! CigiAnimationStopV3(); //========================================================= //! General Destructor //! virtual ~CigiAnimationStopV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_ANIMATION_STOP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiAnimationTable.h000066400000000000000000000076751210750432300216710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAnimationTable.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ANIMATION_TABLE_INCLUDED_) #define _CIGI_ANIMATION_TABLE_INCLUDED_ #include "CigiTypes.h" //========================================================= //! The class to hold and work the Animation table
//! Because the Conversions between the Entity Control //! animation state Versions 1 and 3, we needed to create //! a table to determine the corrent state for each frame. //! class CIGI_SPEC CigiAnimationTable { public: //==> Management //========================================================= //! General Constructor //! CigiAnimationTable(); //========================================================= //! General Destructor //! virtual ~CigiAnimationTable(); //==> Accessing The Correct Table Values functions //========================================================= //! Gets the last frame's animation state for this Entity ID. //! \param EntityID - Uniquely identifies the specific entity //! 0 - The ownship //! All other values - An Application defined entity //! //! \return This returns the last frame's animation state for this Entity ID. //! Cigi_uint32 GetPastAnimation(const Cigi_uint16 EntityID); //========================================================= //! Sets the last frame's animation state for this Entity ID. //! \param EntityID - Uniquely identifies the specific entity //! 0 - The ownship //! All other values - An Application defined entity //! \param State - This frame's animation state for this Entity ID //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetPastAnimation(const Cigi_uint16 EntityID, const Cigi_uint32 State); protected: //==> Member variables //========================================================= //! AnimationTable[16384]
//! A table to store the last frame's animation state for //! each valid Entity ID
//! Each 2 bits holds an Entity's past animation state. //! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue
//! Cigi_uint8 AnimationTable[16384]; }; #endif // !defined(_CIGI_ANIMATION_TABLE_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiArtPartCtrlV1.h000066400000000000000000000101261210750432300213740ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiArtPartCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ART_PART_CTRL_V1_INCLUDED_) #define _CIGI_ART_PART_CTRL_V1_INCLUDED_ #include "CigiBaseArtPartCtrl.h" class CIGI_SPEC CigiArtPartCtrlV1 : public CigiBaseArtPartCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiArtPartCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiArtPartCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartID //========================================================= //! Sets the ArtPartID with bound checking control //! \param ArtPartIDIn - Identifies the specific articulated //! part of a specified entity to which this data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartID value. //! \return the current ArtPartID. Cigi_int8 GetArtPartIDV1(void) const { return(ArtPartIDV1); } }; #endif // #if !defined(_CIGI_ART_PART_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiArtPartCtrlV2.h000066400000000000000000000101251210750432300213740ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiArtPartCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ART_PART_CTRL_V2_INCLUDED_) #define _CIGI_ART_PART_CTRL_V2_INCLUDED_ #include "CigiBaseArtPartCtrl.h" class CIGI_SPEC CigiArtPartCtrlV2 : public CigiBaseArtPartCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiArtPartCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiArtPartCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartID //========================================================= //! Sets the ArtPartID with bound checking control //! \param ArtPartIDIn - Identifies the specific articulated //! part of a specified entity to which this data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartID value. //! \return the current ArtPartID. Cigi_int8 GetArtPartID(void) const { return(ArtPartIDV1); } }; #endif // #if !defined(_CIGI_ART_PART_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiArtPartCtrlV3.h000066400000000000000000000101261210750432300213760ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiArtPartCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ART_PART_CTRL_V3_INCLUDED_) #define _CIGI_ART_PART_CTRL_V3_INCLUDED_ #include "CigiBaseArtPartCtrl.h" class CIGI_SPEC CigiArtPartCtrlV3 : public CigiBaseArtPartCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiArtPartCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiArtPartCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartID //========================================================= //! Sets the ArtPartID with bound checking control //! \param ArtPartIDIn - Identifies the specific articulated //! part of a specified entity to which this data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartID value. //! \return the current ArtPartID. Cigi_uint8 GetArtPartID(void) const { return(ArtPartIDV3); } }; #endif // #if !defined(_CIGI_ART_PART_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiAtmosCtrl.h000066400000000000000000000215351210750432300207010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAtmosCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ATMOS_CTRL_V3_INCLUDED_) #define _CIGI_ATMOS_CTRL_V3_INCLUDED_ #include "CigiBaseEnvCtrl.h" class CIGI_SPEC CigiAtmosCtrlV3 : public CigiBaseEnvCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiAtmosCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiAtmosCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V3 and V1 or V2. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V3 and V1 or V2. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Hold Object Manipulation //========================================================= //! The virtual FillHold function. //! \param Hold - A pointer to the Hold object. (Downcast to CigiBaseEnvCtrl) //! virtual void FillHold(CigiBaseEnvCtrl * Hold) const; //==> Accessing Member Variable Values functions //+> AtmosEn //========================================================= //! Sets the AtmosEn with bound checking control //! \param AtmosEnIn - Atmospheric model enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAtmosEn(const bool AtmosEnIn, bool bndchk=true) { AtmosEn = AtmosEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AtmosEn value. //! \return the current AtmosEn. bool GetAtmosEn(void) const { return(AtmosEn); } //+> Humidity //========================================================= //! Sets the Humidity with bound checking control //! \param HumidityIn - Percentage humidity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk=true); //========================================================= //! Gets the Humidity value. //! \return the current Humidity. Cigi_uint8 GetHumidity(void) const { return(Humidity); } //+> AirTemp //========================================================= //! Sets the AirTemp with bound checking control //! \param AirTempIn - current ambient air temperature //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAirTemp(const float AirTempIn, bool bndchk=true) { AirTemp = AirTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AirTemp value. //! \return the current AirTemp. float GetAirTemp(void) const { return(AirTemp); } //+> Visibility //========================================================= //! Sets the Visibility with bound checking control //! \param VisibilityIn - Visibility range //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVisibility(const float VisibilityIn, bool bndchk=true); //========================================================= //! Gets the Visibility value. //! \return the current Visibility. float GetVisibility(void) const { return(Visibility); } //+> HorizWindSp //========================================================= //! Sets the HorizWindSp with bound checking control //! \param HorizWindSpIn - Horizontal wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHorizWindSp(const float HorizWindSpIn, bool bndchk=true); //========================================================= //! Gets the HorizWindSp value. //! \return the current HorizWindSp. float GetHorizWindSp(void) const { return(HorizWindSp); } //+> VertWindSp //========================================================= //! Sets the VertWindSp with bound checking control //! \param VertWindSpIn - Vertical wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVertWindSp(const float VertWindSpIn, bool bndchk=true) { VertWindSp = VertWindSpIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VertWindSp value. //! \return the current VertWindSp. float GetVertWindSp(void) const { return(VertWindSp); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDir value. //! \return the current WindDir. float GetWindDir(void) const { return(WindDir); } //+> BaroPress //========================================================= //! Sets the BaroPress with bound checking control //! \param BaroPressIn - Current barometric pressure. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBaroPress(const float BaroPressIn, bool bndchk=true); //========================================================= //! Gets the BaroPress value. //! \return the current BaroPress. float GetBaroPress(void) const { return(BaroPress); } }; #endif // #if !defined(_CIGI_ENV_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseAerosolResp.h000066400000000000000000000154151210750432300220220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseAerosolResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_AEROSOL_RESP_INCLUDED_) #define _CIGI_BASE_AEROSOL_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_AEROSOL_RESP_PACKET_ID_V3 110 #define CIGI_AEROSOL_RESP_PACKET_SIZE_V3 8 class CigiAerosolRespV3; class CIGI_SPEC CigiBaseAerosolResp : public CigiBasePacket { friend class CigiAerosolRespV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseAerosolResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseAerosolResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> RequestID //========================================================= //! Sets the RequestID with bound checking control //! \param RequestIDIn - Request ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRequestID(const Cigi_uint8 RequestIDIn, bool bndchk=true) { RequestID = RequestIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RequestID value. //! \return the current RequestID. Cigi_uint8 GetRequestID(void) const { return(RequestID); } //+> LayerID //========================================================= //! Sets the LayerID with bound checking control //! \param LayerIDIn - Layer ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLayerID(const Cigi_uint8 LayerIDIn, bool bndchk=true) { LayerID = LayerIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LayerID value. //! \return the current LayerID. Cigi_uint8 GetLayerID(void) const { return(LayerID); } //+> AerosolConcentration //========================================================= //! Sets the AerosolConcentration with bound checking control //! \param AerosolConcentrationIn - Aerosol Concentration //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAerosolConcentration(const float AerosolConcentrationIn, bool bndchk=true); //========================================================= //! Gets the AerosolConcentration value. //! \return the current AerosolConcentration. float GetAerosolConcentration(void) const { return(AerosolConcentration); } protected: //==> Member variables //========================================================= //! RequestID
//! Request ID //! Cigi_uint8 RequestID; //========================================================= //! LayerID
//! Layer ID //! Cigi_uint8 LayerID; //========================================================= //! AerosolConcentration
//! float AerosolConcentration; }; #endif // #if !defined(_CIGI_BASE_AEROSOL_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseAnimationStop.h000066400000000000000000000132131210750432300223430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseAnimationStop.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_ANIMATION_STOP_INCLUDED_) #define _CIGI_BASE_ANIMATION_STOP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_ANIMATION_STOP_PACKET_ID_V3 115 #define CIGI_ANIMATION_STOP_PACKET_SIZE_V3 8 class CigiAnimationStopV3; class CIGI_SPEC CigiBaseAnimationStop : public CigiBasePacket { friend class CigiAnimationStopV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseAnimationStop() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseAnimationStop() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_ANIMATION_STOP_PACKET_ID_V3; } return(CIGI_SUCCESS); } //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; }; #endif // #if !defined(_CIGI_BASE_ANIMATION_STOP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseArtPartCtrl.h000066400000000000000000000432321210750432300217640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseArtPartCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_ART_PART_CTRL_INCLUDED_) #define _CIGI_BASE_ART_PART_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_ART_PART_CTRL_PACKET_ID_V1 4 #define CIGI_ART_PART_CTRL_PACKET_SIZE_V1 20 #define CIGI_ART_PART_CTRL_PACKET_ID_V2 4 #define CIGI_ART_PART_CTRL_PACKET_SIZE_V2 32 #define CIGI_ART_PART_CTRL_PACKET_ID_V3 6 #define CIGI_ART_PART_CTRL_PACKET_SIZE_V3 32 class CigiArtPartCtrlV1; class CigiArtPartCtrlV2; class CigiArtPartCtrlV3; class CIGI_SPEC CigiBaseArtPartCtrl : public CigiBasePacket { friend class CigiArtPartCtrlV1; friend class CigiArtPartCtrlV2; friend class CigiArtPartCtrlV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseArtPartCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseArtPartCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Specifies the entity to which this //! packet's data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> ArtPartEn //========================================================= //! Sets the ArtPartEn with bound checking control //! \param ArtPartEnIn - Specified articulated part enabled or disabled //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartEn(const bool ArtPartEnIn, bool bndchk=true) { ArtPartEn = ArtPartEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPartEn value. //! \return the current ArtPartEn. bool GetArtPartEn(void) const { return(ArtPartEn); } //+> XOffEn //========================================================= //! Sets the XOffEn with bound checking control //! \param XOffEnIn - X offset value is valid for use.(true) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXOffEn(const bool XOffEnIn, bool bndchk=true) { XOffEn = XOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XOffEn value. //! \return the current XOffEn. bool GetXOffEn(void) const { return(XOffEn); } //+> YOffEn //========================================================= //! Sets the YOffEn with bound checking control //! \param YOffEnIn - Y offset value is valid for use.(true) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYOffEn(const bool YOffEnIn, bool bndchk=true) { YOffEn = YOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YOffEn value. //! \return the current YOffEn. bool GetYOffEn(void) const { return(YOffEn); } //+> ZOffEn //========================================================= //! Sets the ZOffEn with bound checking control //! \param ZOffEnIn - Z offset value is valid for use.(true) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZOffEn(const bool ZOffEnIn, bool bndchk=true) { ZOffEn = ZOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZOffEn value. //! \return the current ZOffEn. bool GetZOffEn(void) const { return(ZOffEn); } //+> RollEn //========================================================= //! Sets the RollEn with bound checking control //! \param RollEnIn - Roll value is valid for use.(true) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRollEn(const bool RollEnIn, bool bndchk=true) { RollEn = RollEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RollEn value. //! \return the current RollEn. bool GetRollEn(void) const { return(RollEn); } //+> PitchEn //========================================================= //! Sets the PitchEn with bound checking control //! \param PitchEnIn - Pitch value is valid for use.(true) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitchEn(const bool PitchEnIn, bool bndchk=true) { PitchEn = PitchEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the PitchEn value. //! \return the current PitchEn. bool GetPitchEn(void) const { return(PitchEn); } //+> YawEn //========================================================= //! Sets the YawEn with bound checking control //! \param YawEnIn - Yaw value is valid for use.(true) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYawEn(const bool YawEnIn, bool bndchk=true) { YawEn = YawEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YawEn value. //! \return the current YawEn. bool GetYawEn(void) const { return(YawEn); } //+> XOff //========================================================= //! Sets the XOff with bound checking control //! \param XOffIn - The Offset from the specified entity's origin //! along the entity's X axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXOff(const float XOffIn, bool bndchk=true) { XOff = XOffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XOff value. //! \return the current XOff. float GetXOff(void) const { return(XOff); } //+> YOff //========================================================= //! Sets the YOff with bound checking control //! \param YOffIn - The Offset from the specified entity's origin //! along the entity's Y axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYOff(const float YOffIn, bool bndchk=true) { YOff = YOffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YOff value. //! \return the current YOff. float GetYOff(void) const { return(YOff); } //+> ZOff //========================================================= //! Sets the ZOff with bound checking control //! \param ZOffIn - The Offset from the specified entity's origin //! along the entity's Z axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZOff(const float ZOffIn, bool bndchk=true) { ZOff = ZOffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZOff value. //! \return the current ZOff. float GetZOff(void) const { return(ZOff); } //+> Roll //========================================================= //! Sets the Roll with bound checking control //! \param RollIn - The roll about the specified articulated part's //! origin relative to the entity's body coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRoll(const float RollIn, bool bndchk=true); //========================================================= //! Gets the Roll value. //! \return the current Roll. float GetRoll(void) const { return(Roll); } //+> Pitch //========================================================= //! Sets the Pitch with bound checking control //! \param PitchIn - The pitch about the specified articulated part's //! origin relative to the entity's body coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitch(const float PitchIn, bool bndchk=true); //========================================================= //! Gets the Pitch value. //! \return the current Pitch. float GetPitch(void) const { return(Pitch); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - The yaw about the specified articulated part's //! origin relative to the entity's body coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value. //! \return the current Yaw. float GetYaw(void) const { return(Yaw); } protected: //==> Member variables //========================================================= //! EntityID
//! Uniquely identifies the specific entity. //! Cigi_uint16 EntityID; //========================================================= //! ArtPartIDV1
//! The Unique ID for an articulated part of a specific entity.
//! Cigi_int8 ArtPartIDV1; //========================================================= //! ArtPartIDV3
//! The Unique ID for an articulated part of a specific entity.
//! Cigi_uint8 ArtPartIDV3; //========================================================= //! ArtPartEn
//! Articulated part is enabled or disabled for use and display. //! true - valid - use and display.
//! false - not valid - do not use and display.
//! bool ArtPartEn; //========================================================= //! XOffEn
//! The X offset data is valid for use.
//! true - valid and should be used.
//! false - not valid and should not be used.
//! bool XOffEn; //========================================================= //! YOffEn
//! The X offset data is valid for use.
//! true - valid and should be used.
//! false - not valid and should not be used.
//! bool YOffEn; //========================================================= //! ZOffEn
//! The X offset data is valid for use.
//! true - valid and should be used.
//! false - not valid and should not be used.
//! bool ZOffEn; //========================================================= //! RollEn
//! The roll data is valid for use.
//! true - valid and should be used.
//! false - not valid and should not be used.
//! bool RollEn; //========================================================= //! PitchEn
//! The pitch data is valid for use.
//! true - valid and should be used.
//! false - not valid and should not be used.
//! bool PitchEn; //========================================================= //! YawEn
//! The yaw data is valid for use.
//! true - valid and should be used.
//! false - not valid and should not be used.
//! bool YawEn; //========================================================= //! XOff
//! The Offset from the specified entity's origin //! along the entity's Z axis in meters. //! float XOff; //========================================================= //! YOff
//! The Offset from the specified entity's origin //! along the entity's Z axis in meters. //! float YOff; //========================================================= //! ZOff
//! The Offset from the specified entity's origin //! along the entity's Z axis in meters. //! float ZOff; //========================================================= //! Roll
//! The roll about the specified articulated part's //! origin relative to the entity's body coordinate system //! in degrees. //! float Roll; //========================================================= //! Pitch
//! The pitch about the specified articulated part's //! origin relative to the entity's body coordinate system //! in degrees. //! float Pitch; //========================================================= //! Yaw
//! The yaw about the specified articulated part's //! origin relative to the entity's body coordinate system //! in degrees. //! float Yaw; }; #endif // #if !defined(_CIGI_BASE_ART_PART_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseCircleSymbolData.h000066400000000000000000000213251210750432300227420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCircleSymbolData.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_CIRCLE_SYMBOL_DATA_INCLUDED_) #define _CIGI_BASE_CIRCLE_SYMBOL_DATA_INCLUDED_ #include "CigiTypes.h" #include "CigiErrorCodes.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3 24 class CigiCircleSymbolDataV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseCircleSymbolData { friend class CigiCircleSymbolDataV3_3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseCircleSymbolData(void); //========================================================= //! General Destructor //! virtual ~CigiBaseCircleSymbolData(void); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the Circle //! Data to be packed. (Downcast to CigiBaseCircleSymbolData) //! \param Buff - A pointer to the current pack point. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBaseCircleSymbolData * Base, Cigi_uint8 * Buff) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap) =0; //==> Accessing Member Variable Values functions //+> CenterUPosition //========================================================= //! Sets the CenterUPosition with bound checking control //! \param CenterUPositionIn - Specifies the position of //! the center of the circle along the current U Axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCenterUPosition(const float CenterUPositionIn, bool bndchk=true) { CenterUPosition = CenterUPositionIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CenterUPosition with bound checking control //! \return CenterUPosition //! float GetCenterUPosition(void) const { return(CenterUPosition); } //+> CenterVPosition //========================================================= //! Sets the CenterVPosition with bound checking control //! \param CenterVPositionIn - Specifies the position of //! the center of the circle along the current V Axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCenterVPosition(const float CenterVPositionIn, bool bndchk=true) { CenterVPosition = CenterVPositionIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CenterVPosition with bound checking control //! \return CenterVPosition //! float GetCenterVPosition(void) const { return(CenterVPosition); } //+> Radius //========================================================= //! Sets the Radius with bound checking control //! \param RadiusIn - Specifies the radius of the circle //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRadius(const float RadiusIn, bool bndchk=true); //========================================================= //! Gets the Radius with bound checking control //! \return Radius //! float GetRadius(void) const { return(Radius); } //+> InnerRadius //========================================================= //! Sets the InnerRadius with bound checking control //! \param InnerRadiusIn - Specifies the inner radius of //! a filled or partially filled circle. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInnerRadius(const float InnerRadiusIn, bool bndchk=true); //========================================================= //! Gets the InnerRadius with bound checking control //! \return InnerRadius //! float GetInnerRadius(void) const { return(InnerRadius); } //+> StartAngle //========================================================= //! Sets the StartAngle with bound checking control //! \param StartAngleIn - Specifies the angle from the //! current X Axis that the circle starts. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStartAngle(const float StartAngleIn, bool bndchk=true); //========================================================= //! Gets the StartAngle with bound checking control //! \return StartAngle //! float GetStartAngle(void) const { return(StartAngle); } //+> EndAngle //========================================================= //! Sets the EndAngle with bound checking control //! \param EndAngleIn - Specifies the angle from the //! current X Axis that the circle ends. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEndAngle(const float EndAngleIn, bool bndchk=true); //========================================================= //! Gets the EndAngle with bound checking control //! \return EndAngle //! float GetEndAngle(void) const { return(EndAngle); } protected: //==> Member variables //========================================================= //! CenterUPosition
//! The position of the center of the circle along //! the current U Axis. //! float CenterUPosition; //========================================================= //! CenterVPosition
//! The position of the center of the circle along //! the current V Axis. //! float CenterVPosition; //========================================================= //! Radius
//! The radius of this circle //! float Radius; //========================================================= //! InnerRadius
//! The inner radius of a filled or partially filled circle //! float InnerRadius; //========================================================= //! StartAngle
//! The angle from the current X Axis where the circle //! or arc starts. //! float StartAngle; //========================================================= //! StartAngle
//! The angle from the current X Axis where the circle //! or arc ends. //! float EndAngle; }; #endif // #if !defined(_CIGI_BASE_CIRCLE_SYMBOL_DATA_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseCollDetSegDef.h000066400000000000000000000310751210750432300221700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetSegDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_COLL_DET_SEG_DEF_INCLUDED_) #define _CIGI_BASE_COLL_DET_SEG_DEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1 24 #define CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V1 24 #define CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2 24 #define CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V2 24 #define CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3 22 #define CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V3 40 class CigiCollDetSegDefV1; class CigiCollDetSegDefV2; class CigiCollDetSegDefV3; class CIGI_SPEC CigiBaseCollDetSegDef : public CigiBasePacket { friend class CigiCollDetSegDefV1; friend class CigiCollDetSegDefV2; friend class CigiCollDetSegDefV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseCollDetSegDef() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseCollDetSegDef() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: V1 & V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3; return(CIGI_SUCCESS); } //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> SegmentEn //========================================================= //! Sets the SegmentEn with bound checking control //! \param SegmentEnIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegmentEn(const bool SegmentEnIn, bool bndchk=true) { SegmentEn = SegmentEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SegmentEn value. //! \return the current SegmentEn. bool GetSegmentEn(void) const { return(SegmentEn); } //+> X1 //========================================================= //! Sets the X1 with bound checking control //! \param X1In - Segment starting position along the X axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetX1(const float X1In, bool bndchk=true) { X1 = X1In; return(CIGI_SUCCESS); } //========================================================= //! Gets the X1 value. //! \return the current X1. float GetX1(void) const { return(X1); } //+> Y1 //========================================================= //! Sets the Y1 with bound checking control //! \param Y1In - Segment starting position along the Y axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetY1(const float Y1In, bool bndchk=true) { Y1 = Y1In; return(CIGI_SUCCESS); } //========================================================= //! Gets the Y1 value. //! \return the current Y1. float GetY1(void) const { return(Y1); } //+> Z1 //========================================================= //! Sets the Z1 with bound checking control //! \param Z1In - Segment starting position along the Z axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZ1(const float Z1In, bool bndchk=true) { Z1 = Z1In; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z1 value. //! \return the current Z1. float GetZ1(void) const { return(Z1); } //+> X2 //========================================================= //! Sets the X2 with bound checking control //! \param X2In - Segment ending position along the X axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetX2(const float X2In, bool bndchk=true) { X2 = X2In; return(CIGI_SUCCESS); } //========================================================= //! Gets the X2 value. //! \return the current X2. float GetX2(void) const { return(X2); } //+> Y2 //========================================================= //! Sets the Y2 with bound checking control //! \param Y2In - Segment ending position along the Y axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetY2(const float Y2In, bool bndchk=true) { Y2 = Y2In; return(CIGI_SUCCESS); } //========================================================= //! Gets the Y2 value. //! \return the current Y2. float GetY2(void) const { return(Y2); } //+> Z2 //========================================================= //! Sets the Z2 with bound checking control //! \param Z2In - Segment ending position along the Z axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZ2(const float Z2In, bool bndchk=true) { Z2 = Z2In; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z2 value. //! \return the current Z2. float GetZ2(void) const { return(Z2); } //+> Mask //========================================================= //! Sets the Mask with bound checking control //! \param MaskIn - Mask specifying which materials will result //! in a report if collided with. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMask(const Cigi_uint32 MaskIn, bool bndchk=true) { Mask = MaskIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Mask value. //! \return the current Mask. Cigi_uint32 GetMask(void) const { return(Mask); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! SegmentID
//! Segment ID //! Cigi_uint8 SegmentID; //========================================================= //! SegmentEn
//! Segment Enable //! bool SegmentEn; //========================================================= //! X1
//! Segment Starting position along the X axis offset from //! the entity's origin. //! float X1; //========================================================= //! Y1
//! Segment starting position along the Y axis offset from //! the entity's origin. //! float Y1; //========================================================= //! Z1
//! Segment starting position along the Z axis offset from //! the entity's origin. //! float Z1; //========================================================= //! X2
//! Segment ending position along the X axis offset from //! the entity's origin. //! float X2; //========================================================= //! Y2
//! Segment ending position along the Y axis offset from //! the entity's origin. //! float Y2; //========================================================= //! Z2
//! Segment ending position along the Z axis offset from //! the entity's origin. //! float Z2; //========================================================= //! Mask
//! A mask specifying collisions with which materials //! will result in a response. //! Cigi_uint32 Mask; }; #endif // #if !defined(_CIGI_BASE_COLL_DET_SEG_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseCollDetSegResp.h000066400000000000000000000217111210750432300223770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetSegResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_COLL_DET_SEG_RESP_INCLUDED_) #define _CIGI_BASE_COLL_DET_SEG_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1 104 #define CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V1 24 #define CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2 104 #define CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V2 24 #define CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3 113 #define CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V3 16 class CigiCollDetSegRespV1; class CigiCollDetSegRespV2; class CigiCollDetSegRespV3; class CIGI_SPEC CigiBaseCollDetSegResp : public CigiBasePacket { friend class CigiCollDetSegRespV1; friend class CigiCollDetSegRespV2; friend class CigiCollDetSegRespV3; public: //========================================================= //! The enumeration for the CigiBaseCollDetSegResp Group //! enum CollTypeGrp { NonEntity=0, Entity=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseCollDetSegResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseCollDetSegResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - Material of the polygon collided with //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } //+> IsValidV1or2 //========================================================= //! Sets the IsValidV1or2 with bound checking control //! \param IsValidV1or2In - The data is valid with CIGI 1 and 2 //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetIsValidV1or2(const bool IsValidV1or2In, bool bndchk=true) { IsValidV1or2 = IsValidV1or2In; return(CIGI_SUCCESS); } //========================================================= //! Gets the IsValidV1or2 value. //! \return the current IsValidV1or2. bool GetIsValidV1or2(void) const { return(IsValidV1or2); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! SegID
//! Segment ID //! Cigi_uint8 SegID; //========================================================= //! CollType
//! Collision with a non-entity or an entity
//! 0-NonEntity
//! 1-Entity //! //! CollTypeGrp CollType; //========================================================= //! CollEntityID
//! The Entity ID of the entity collided with //! Cigi_uint16 CollEntityID; //========================================================= //! Material
//! The material code of the polygon collided with //! Cigi_uint32 Material; //========================================================= //! IntersectDist
//! The distance along the segment from the starting or //! source point where the collision occured. //! float IntersectDist; //========================================================= //! X
//! The position of the collision along the X axis of the //! defining entity's coordinate system. //! float X; //========================================================= //! Y
//! The position of the collision along the Y axis of the //! defining entity's coordinate system. //! float Y; //========================================================= //! Z
//! The position of the collision along the Z axis of the //! defining entity's coordinate system. //! float Z; //========================================================= //! IsValidV1or2
//! The data is Valid CIGI 1 or CIGI 2 data - true
//! OR the data is Valid CIGI 3 data - false. //! bool IsValidV1or2; }; #endif // #if !defined(_CIGI_BASE_COLL_DET_SEG_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseCollDetVolDef.h000066400000000000000000000313551210750432300222130ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetVolDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_COLL_DET_VOL_DEF_INCLUDED_) #define _CIGI_BASE_COLL_DET_VOL_DEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2 25 #define CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V2 20 #define CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3 23 #define CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V3 48 class CigiCollDetVolDefV2; class CigiCollDetVolDefV3; class CIGI_SPEC CigiBaseCollDetVolDef : public CigiBasePacket { friend class CigiCollDetVolDefV2; friend class CigiCollDetVolDefV3; public: //========================================================= //! The enumeration for the CigiBaseCollDetVolDef Group //! enum VolTypeGrp { Sphere=0, Cuboid=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseCollDetVolDef(); //========================================================= //! General Destructor //! virtual ~CigiBaseCollDetVolDef(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> VolID //========================================================= //! Sets the VolID with bound checking control //! \param VolIDIn - Volume ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVolID(const Cigi_uint8 VolIDIn, bool bndchk=true) { VolID = VolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VolID value. //! \return the current VolID. Cigi_uint8 GetVolID(void) const { return(VolID); } //+> VolEn //========================================================= //! Sets the VolEn with bound checking control //! \param VolEnIn - Volume enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVolEn(const bool VolEnIn, bool bndchk=true) { VolEn = VolEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VolEn value. //! \return the current VolEn. bool GetVolEn(void) const { return(VolEn); } //+> Xoff //========================================================= //! Sets the Xoff with bound checking control //! \param XoffIn - Offset along the X axis of the referance //! entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXoff(const float XoffIn, bool bndchk=true) { Xoff = XoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Xoff value. //! \return the current Xoff. float GetXoff(void) const { return(Xoff); } //+> Yoff //========================================================= //! Sets the Yoff with bound checking control //! \param YoffIn - Offset along the Y axis of the referance //! entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYoff(const float YoffIn, bool bndchk=true) { Yoff = YoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Yoff value. //! \return the current Yoff. float GetYoff(void) const { return(Yoff); } //+> Zoff //========================================================= //! Sets the Zoff with bound checking control //! \param ZoffIn - Offset along the Z axis of the referance //! entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZoff(const float ZoffIn, bool bndchk=true) { Zoff = ZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Zoff value. //! \return the current Zoff. float GetZoff(void) const { return(Zoff); } //+> HeightOrRadius //========================================================= //! Sets the HeightOrRadius with bound checking control //! \param HeightOrRadiusIn - The height or radius of the volume. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHeightOrRadius(const float HeightOrRadiusIn, bool bndchk=true) { HeightOrRadius = HeightOrRadiusIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the HeightOrRadius value. //! \return the current HeightOrRadius. float GetHeightOrRadius(void) const { return(HeightOrRadius); } //+> Width //========================================================= //! Sets the Width with bound checking control //! \param WidthIn - The width of the volume. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWidth(const float WidthIn, bool bndchk=true) { Width = WidthIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Width value. //! \return the current Width. float GetWidth(void) const { return(Width); } //+> Depth //========================================================= //! Sets the Depth with bound checking control //! \param DepthIn - The depth of the volume. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDepth(const float DepthIn, bool bndchk=true) { Depth = DepthIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Depth value. //! \return the current Depth. float GetDepth(void) const { return(Depth); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! VolID
//! Volume ID //! Cigi_uint8 VolID; //========================================================= //! VolEn
//! Volume enable //! bool VolEn; //========================================================= //! VolType
//! Volume type.
//! 0-Sphere
//! 1-Cuboid //! VolTypeGrp VolType; //========================================================= //! Xoff
//! Offset along the X axis of the referance entity from its origin. //! float Xoff; //========================================================= //! Yoff
//! Offset along the Y axis of the referance entity from its origin. //! float Yoff; //========================================================= //! Zoff
//! Offset along the Z axis of the referance entity from its origin. //! float Zoff; //========================================================= //! HeightOrRadius
//! The volume's height or radius //! float HeightOrRadius; //========================================================= //! Width
//! The volume's width //! float Width; //========================================================= //! Depth
//! The volume's depth //! float Depth; //========================================================= //! Roll
//! The volume's roll relative to the referance entity. //! float Roll; //========================================================= //! Pitch
//! The volume's pitch relative to the referance entity. //! float Pitch; //========================================================= //! Yaw
//! The volume's yaw relative to the referance entity. //! float Yaw; }; #endif // #if !defined(_CIGI_BASE_COLL_DET_VOL_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseCollDetVolResp.h000066400000000000000000000173111210750432300224220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetVolResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_COLL_DET_VOL_RESP_INCLUDED_) #define _CIGI_BASE_COLL_DET_VOL_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2 107 #define CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V2 8 #define CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3 114 #define CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V3 16 class CigiCollDetVolRespV2; class CigiCollDetVolRespV3; class CIGI_SPEC CigiBaseCollDetVolResp : public CigiBasePacket { friend class CigiCollDetVolRespV2; friend class CigiCollDetVolRespV3; public: //========================================================= //! The enumeration for the CigiBaseCollDetVolResp Group //! enum CollTypeGrp { NonEntity=0, Entity=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseCollDetVolResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseCollDetVolResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> CollType //========================================================= //! Sets the CollType with bound checking control //! \param CollTypeIn - Collision type
//! NonEntity=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollType(const CollTypeGrp CollTypeIn, bool bndchk=true); //========================================================= //! Gets the CollType value. //! \return the current CollType. CollTypeGrp GetCollType(void) const { return(CollType); } //+> CollEntityID //========================================================= //! Sets the CollEntityID with bound checking control //! \param CollEntityIDIn - Entity Collided with //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollEntityID(const Cigi_uint16 CollEntityIDIn, bool bndchk=true) { CollEntityID = CollEntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CollEntityID value. //! \return the current CollEntityID. Cigi_uint16 GetCollEntityID(void) const { return(CollEntityID); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! VolID
//! Volume ID //! Cigi_uint8 VolID; //========================================================= //! CollType
//! Collision Type
//! 0-NonEntity
//! 1-Entity //! //! CollTypeGrp CollType; //========================================================= //! CollEntityID
//! Entity with which the referance entity collided //! Cigi_uint16 CollEntityID; //========================================================= //! CollVolID
//! Volume ID with which the referance volume collided //! Cigi_uint8 CollVolID; }; #endif // #if !defined(_CIGI_BASE_COLL_DET_VOL_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseCompCtrl.h000066400000000000000000000227701210750432300213110ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCompCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the enumerated values in the BytePos and HalfWordPos enumeations.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_COMP_CTRL_INCLUDED_) #define _CIGI_BASE_COMP_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_COMP_CTRL_PACKET_ID_V1 3 #define CIGI_COMP_CTRL_PACKET_SIZE_V1 20 #define CIGI_COMP_CTRL_PACKET_ID_V2 3 #define CIGI_COMP_CTRL_PACKET_SIZE_V2 20 #define CIGI_COMP_CTRL_PACKET_ID_V3 4 #define CIGI_COMP_CTRL_PACKET_SIZE_V3 32 #define CIGI_SHORT_COMP_CTRL_PACKET_ID_V3 5 #define CIGI_SHORT_COMP_CTRL_PACKET_SIZE_V3 16 #define CIGI_COMP_CTRL_PACKET_ID_V3_3 4 #define CIGI_COMP_CTRL_PACKET_SIZE_V3_3 32 #define CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3 5 #define CIGI_SHORT_COMP_CTRL_PACKET_SIZE_V3_3 16 class CigiCompCtrlV1; class CigiCompCtrlV2; class CigiCompCtrlV3; class CigiShortCompCtrlV3; class CigiCompCtrlV3_3; class CigiShortCompCtrlV3_3; class CIGI_SPEC CigiBaseCompCtrl : public CigiBasePacket { friend class CigiCompCtrlV1; friend class CigiCompCtrlV2; friend class CigiCompCtrlV3; friend class CigiShortCompCtrlV3; friend class CigiCompCtrlV3_3; friend class CigiShortCompCtrlV3_3; public: //========================================================= //! The enumeration for the CigiBaseCompCtrl Group //! enum CompAssocGrp { NoCnvtV1=-1, Entity=0, Environment=1, View=2 }; //========================================================= //! The enumeration for the CigiBaseCompCtrl Group //! enum CompClassV2Grp { NoCnvtV2=-1, EntityV2=0, EnvironmentV2=1, ViewV2=2, ViewGrpV2=3, SensorV2=4, SystemV2=5 }; //========================================================= //! The enumeration for the CigiBaseCompCtrl Group //! enum CompClassV3Grp { NoCnvtV3=-1, EntityV3=0, ViewV3=1, ViewGrpV3=2, SensorV3=3, RegionalSeaSurfaceV3=4, RegionalTerrainSurfaceV3=5, RegionalLayeredWeatherV3=6, GlobalSeaSurfaceV3=7, GlobalTerrainSurfaceV3=8, GlobalLayeredWeatherV3=9, AtmosphereV3=10, CelestialSphereV3=11, EventV3=12, SystemV3=13, SymbolSurfaceV3_3=14, SymbolV3_3=15 }; //========================================================= //! The enumeration for the Byte Position //! enum BytePos { MSB=3, // Most significant byte Ord2=2, // 2nd order byte Ord3=1, // 3rd order byte LSB=0 // Least significant byte }; //========================================================= //! The enumeration for the Byte Position //! enum HalfWordPos { MSHW=1, // Most significant half word LSHW=0 // least significant half word }; //==> Management //========================================================= //! General Constructor //! CigiBaseCompCtrl() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseCompCtrl() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) =0; //==> Accessing Member Variable Values functions //+> CompID //========================================================= //! Sets the CompID with bound checking control //! \param CompIDIn - Component Control ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompID(const Cigi_uint16 CompIDIn, bool bndchk=true) { CompID = CompIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompID value. //! \return the current CompID. Cigi_uint16 GetCompID(void) const { return(CompID); } protected: //==> Member variables //========================================================= //! CompID
//! Component Control ID //! Cigi_uint16 CompID; //========================================================= //! InstanceID
//! Instance ID //! Cigi_uint16 InstanceID; //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! ViewID
//! View ID //! Cigi_uint8 ViewID; //========================================================= //! CompState
//! Component State Data //! Cigi_uint16 CompState; //========================================================= //! CompAssoc
//! Component Control Association
//! 0-Entity
//! 1-Environment
//! 2-View //! //! CompAssocGrp CompAssoc; //========================================================= //! CompClassV2
//! Component Control Class/Association for Cigi V2
//! 0-EntityV2
//! 1-EnvironmentV2
//! 2-ViewV2
//! 3-ViewGrpV2
//! 4-SensorV2
//! 5-SystemV2 //! //! CompClassV2Grp CompClassV2; //========================================================= //! CompClassV3
//! Component Control Class/Association for Cigi V3
//! 0-EntityV3
//! 1-ViewV3
//! 2-ViewGrpV3
//! 3-SensorV3
//! 4-RegionalSeaSurfaceV3
//! 5-RegionalTerrainSurfaceV3
//! 6-RegionalLayeredWeatherV3
//! 7-GlobalSeaSurfaceV3
//! 8-GlobalTerrainSurfaceV3
//! 9-GlobalLayeredWeatherV3
//! 10-AtmosphereV3
//! 11-CelestialSphereV3
//! 12-EventV3
//! 13-SystemV3 //! 14-SymbolSurfaceV3_3
//! 15-SymbolV3_3 //! CompClassV3Grp CompClassV3; //========================================================= //! CompData[6]
//! Component Data //! Cigi_uint32 CompData[6]; }; #endif // #if !defined(_CIGI_BASE_COMP_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseConfClampEntityCtrl.h000066400000000000000000000165371210750432300234560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseConfClampEntityCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_CONF_CLAMP_ENTITY_CTRL_INCLUDED_) #define _CIGI_BASE_CONF_CLAMP_ENTITY_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3 3 #define CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_SIZE_V3 24 class CigiConfClampEntityCtrlV3; class CIGI_SPEC CigiBaseConfClampEntityCtrl : public CigiBasePacket { friend class CigiConfClampEntityCtrlV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseConfClampEntityCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseConfClampEntityCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - Entity yaw //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value. //! \return the current Yaw. float GetYaw(void) const { return(Yaw); } //+> Lat //========================================================= //! Sets the Lat with bound checking control //! \param LatIn - Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLat(const double LatIn, bool bndchk=true); //========================================================= //! Gets the Lat value. //! \return the current Lat. double GetLat(void) const { return(Lat); } //+> Lon //========================================================= //! Sets the Lon with bound checking control //! \param LonIn - Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLon(const double LonIn, bool bndchk=true); //========================================================= //! Gets the Lon value. //! \return the current Lon. double GetLon(void) const { return(Lon); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! Yaw
//! Yaw //! float Yaw; //========================================================= //! Lat
//! Latitude //! double Lat; //========================================================= //! Lon
//! Longitude //! double Lon; }; #endif // #if !defined(_CIGI_BASE_CONF_CLAMP_ENTITY_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseEarthModelDef.h000066400000000000000000000165031210750432300222260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEarthModelDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_EARTH_MODEL_DEF_INCLUDED_) #define _CIGI_BASE_EARTH_MODEL_DEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_EARTH_MODEL_DEF_PACKET_ID_V3 19 #define CIGI_EARTH_MODEL_DEF_PACKET_SIZE_V3 24 class CigiEarthModelDefV3; class CIGI_SPEC CigiBaseEarthModelDef : public CigiBasePacket { friend class CigiEarthModelDefV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseEarthModelDef() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseEarthModelDef() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_EARTH_MODEL_DEF_PACKET_ID_V3; } return(CIGI_SUCCESS); } //==> Accessing Member Variable Values functions //+> CustomERMEn //========================================================= //! Sets the CustomERMEn with bound checking control //! \param CustomERMEnIn - Custom Earth Referance Model Enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCustomERMEn(const bool CustomERMEnIn, bool bndchk=true) { CustomERMEn = CustomERMEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CustomERMEn value. //! \return the current CustomERMEn. bool GetCustomERMEn(void) const { return(CustomERMEn); } //+> EquatorialRadius //========================================================= //! Sets the EquatorialRadius with bound checking control //! \param EquatorialRadiusIn - Equatorial Radius //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEquatorialRadius(const double EquatorialRadiusIn, bool bndchk=true) { EquatorialRadius = EquatorialRadiusIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EquatorialRadius value. //! \return the current EquatorialRadius. double GetEquatorialRadius(void) const { return(EquatorialRadius); } //+> Flattening //========================================================= //! Sets the Flattening with bound checking control //! \param FlatteningIn - Flattening //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlattening(const double FlatteningIn, bool bndchk=true) { Flattening = FlatteningIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Flattening value. //! \return the current Flattening. double GetFlattening(void) const { return(Flattening); } protected: //==> Member variables //========================================================= //! CustomERMEn
//! Custom Earth Referance Model Enable //! bool CustomERMEn; //========================================================= //! EquatorialRadius
//! Equatorial Radius //! double EquatorialRadius; //========================================================= //! Flattening
//! Adjustment parameter that specifies the ellipsiod shape. //! double Flattening; }; #endif // #if !defined(_CIGI_BASE_EARTH_MODEL_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseEntityCtrl.h000066400000000000000000000512121210750432300216600ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEntityCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag.
 *  Added the defines and declarations for V3_3.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_ENTITY_CTRL_INCLUDED_) #define _CIGI_BASE_ENTITY_CTRL_INCLUDED_ #include "CigiBasePacket.h" #include "CigiAnimationTable.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_ENTITY_CTRL_PACKET_ID_V1 2 #define CIGI_ENTITY_CTRL_PACKET_SIZE_V1 48 #define CIGI_ENTITY_CTRL_PACKET_ID_V2 2 #define CIGI_ENTITY_CTRL_PACKET_SIZE_V2 56 #define CIGI_ENTITY_CTRL_PACKET_ID_V3 2 #define CIGI_ENTITY_CTRL_PACKET_SIZE_V3 48 #define CIGI_ENTITY_CTRL_PACKET_ID_V3_3 2 #define CIGI_ENTITY_CTRL_PACKET_SIZE_V3_3 48 class CigiEntityCtrlV1; class CigiEntityCtrlV2; class CigiEntityCtrlV3; class CigiEntityCtrlV3_3; //========================================================= //! The base class for the Entity Control packet //! class CIGI_SPEC CigiBaseEntityCtrl : public CigiBasePacket { friend class CigiEntityCtrlV1; friend class CigiEntityCtrlV2; friend class CigiEntityCtrlV3; friend class CigiEntityCtrlV3_3; public: //========================================================= //! The enumeration for the Entity State flag //! enum EntityStateGrp { Standby=0, Active=1, Remove=2 }; //========================================================= //! The enumeration for the Attached/Not Attached flag //! enum AttachStateGrp { Detach=0, Attach=1 }; //========================================================= //! The enumeration for the Collision Detection Enable flag //! enum CollisionDetectGrp { Disable=0, Enable=1 }; //========================================================= //! The enumeration for the Inherit Alpha flag //! enum InheritAlphaGrp { NoInherit=0, Inherit=1 }; //========================================================= //! The enumeration for the Ground/Ocean Clamp flag //! enum GrndClampGrp { NoClamp=0, AltClamp=1, AltAttClamp=2 }; //========================================================= //! The enumeration for the Animation Direction flag //! enum AnimationDirGrp { Forward=0, Backward=1 }; //========================================================= //! The enumeration for the Animation Loop Mode flag //! enum AnimationLoopModeGrp { OneShot=0, Continuous=1 }; //========================================================= //! The enumeration for the Animation State flag
//! This uses both V1 & V3 states to allow conversion. //! enum AnimationStateGrp { Stop=0, Pause=1, Play=2, Continue=3, NoAction=4, Load=5, LoadActivate=6, Activate=7, Deactivate=8, DeactivateUnload=9 }; //==> Management //========================================================= //! General Constructor //! CigiBaseEntityCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseEntityCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Entity ID //========================================================= //! Sets the Entity ID with bound checking control //! \param EntityIDIn - Uniquely identifies the specific entity //! 0 - The ownship //! All other values - An Application defined entity //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Entity ID value //! \return EntityID uniquely identifies the specific entity //! 0 - The ownship //! All other values - An Application defined entity //! Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Entity Type //========================================================= //! Sets the Entity Type with bound checking control //! \param EntityTypeIn - Specifies the type of entity this is. //! The entity types are specified by the using systems //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEntityType(const Cigi_uint16 EntityTypeIn, bool bndchk=true) { EntityType = EntityTypeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Entity Type value //! \return EntityType specifies the type of entity this is //! The entity types are specified by the using systems //! Cigi_uint16 GetEntityType(void) const { return(EntityType); } //+> Attach State Flag //========================================================= //! Sets the Attach State Flag with bound checking control //! \param AttachStateIn - Specifies whether this entity is independant //! or attached to a parent entity. //! 0 Detach (independent) //! 1 Attach //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAttachState(const AttachStateGrp AttachStateIn, bool bndchk=true); //========================================================= //! Gets the Attach State Flag value //! \return AttachState specifies whether this entity is independant //! or attached to a parent entity. //! 0 Detach //! 1 Attach //! AttachStateGrp GetAttachState(void) const { return(AttachState); } //+> Collision Detection Enable Flag //========================================================= //! Sets the Collision Detection Enable Flag //! with bound checking control //! \param CollisionDetectEnIn - Specifies whether Collision //! Detection is enabled or not. //! 0 Disable //! 1 Enable //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetCollisionDetectEn(const CollisionDetectGrp CollisionDetectEnIn, bool bndchk=true); //========================================================= //! Getting the Collision Detection Enable Flag value //! \return CollisionDetectEn specifies whether Collision Detection is enabled or not. //! 0 Disable //! 1 Enable //! CollisionDetectGrp GetCollisionDetectEn(void) const { return(CollisionDetectEn); } //+> Parent ID //========================================================= //! Sets the Parent ID with bound checking control //! \param ParentIDIn - If this is an attached entity, //! this specifies to which entity this entity is attached. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetParentID(const Cigi_uint16 ParentIDIn, bool bndchk=true) { ParentID = ParentIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Parent ID value //! \return ParentID specifies to which entity this entity is attached, //! if this is an attached entity. //! Cigi_uint16 GetParentID(void) const { return(ParentID); } //+> Pitch //========================================================= //! Sets the Pitch with bound checking control //! \param PitchIn - Specifies the pitch of the entity //! (-90.0 to +90.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetPitch(const float PitchIn, bool bndchk=true); //========================================================= //! Gets the Pitch value //! \return Pitch specifies the pitch of the entity //! (-90.0 to +90.0) //! float GetPitch(void) const { return(Pitch); } //+> Roll //========================================================= //! Sets the Roll with bound checking control //! \param RollIn - Specifies the roll of the entity //! (-180.0 to +180.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetRoll(const float RollIn, bool bndchk=true); //========================================================= //! Gets the Roll value //! \return Roll specifies the roll of the entity //! (-180.0 to +180.0) //! float GetRoll(void) const { return(Roll); } //+> Latitude //========================================================= //! Sets the Latitude with bound checking control //! \param Lat - Specifies the Latitude of the entity //! (-90.0 to +90.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetLat(const double Lat, bool bndchk=true); //========================================================= //! Gets the Latitude value //! \return LatOrXoff specifies the Latitude of the entity //! (-90.0 to +90.0) //! double GetLat(void) const { return(LatOrXoff); } //+> X Offset //========================================================= //! Sets the X Offset with bound checking control //! \param Xoff - Specifies the X axis Offset from //! the Parent entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetXoff(const double Xoff,bool bndchk=true) { LatOrXoff = Xoff; return(CIGI_SUCCESS); } //========================================================= //! Gets the X Offset value //! \return LatOrXoff specifies the X axis Offset from //! the Parent entity's origin. //! double GetXoff(void) const { return(LatOrXoff); } //+> Longitude //========================================================= //! Sets the Longitude with bound checking control //! \param Lon - Specifies the Longitude of the entity //! (-180.0 to +180.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetLon(const double Lon, bool bndchk=true); //========================================================= //! Getting the Longitude value //! \return LonOrYoff specifies the Longitude of the entity //! (-180.0 to +180.0) //! double GetLon(void) const { return(LonOrYoff); } //+> Y Offset //========================================================= //! Sets the Y Offset with bound checking control //! \param Yoff - Specifies the Y axis Offset from //! the Parent entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetYoff(const double Yoff, bool bndchk=true) { LonOrYoff = Yoff; return(CIGI_SUCCESS); } //========================================================= //! Gets the Y Offset value //! \return LonOrYoff specifies the Y axis Offset from //! the Parent entity's origin. //! double GetYoff(void) const { return(LonOrYoff); } protected: //==> Member variables //========================================================= //! Entity ID
//! Uniquely identifies the specific entity
//! 0 - The ownship
//! All other values - An Application defined entity //! Cigi_uint16 EntityID; //========================================================= //! Entity Type
//! Specifies the type of entity this is
//! The entity types are specified by the using systems //! Cigi_uint16 EntityType; //========================================================= //! Parent ID
//! If this is an attached entity, //! this specifies to which entity this entity is attached. //! Cigi_uint16 ParentID; //========================================================= //! Alpha
//! Specifies the visibility/transparency of the entity.
//! 0 - transparent : 255 - Fully visible Cigi_uint8 Alpha; //========================================================= //! Opacity
//! Specifies the visibility/transparency of the entity.
//! Percent visible: 0 - transparent : 100.0 - Fully visible float Opacity; //========================================================= //! Temperature
//! Specifies the internal temperature of the entity //! in degrees Celsius. //! float Temperature; //========================================================= //! Roll //! Specifies the roll of the entity
//! (-180.0 to +180.0) //! float Roll; //========================================================= //! Pitch //! Specifies the pitch of the entity
//! (-90.0 to +90.0) //! float Pitch; //========================================================= //! Yaw //! Specifies the Yaw or Heading of the entity
//! (0.0 to 360.0) float Yaw; //========================================================= //! Latitude or X Offset from parent entity origin
//! Specifies the latitude or X Offset from parent entity origin
//! (-90.0 to +90.0 if latitude)
//! no bounds if X Offset //! double LatOrXoff; //========================================================= //! Longitude or Y Offset from parent entity origin
//! Specifies the longitude or Y Offset from parent entity origin
//! (-180.0 to +180.0 if longitude)
//! no bounds if Y Offset //! double LonOrYoff; //========================================================= //! Altitude or Z Offset from parent entity origin.
//! Specifies the longitude or Z Offset from parent entity origin
//! (no bounds) //! double AltOrZoff; //==> Conversion Tables static const AnimationStateGrp ToV1[10]; static const AnimationStateGrp ToV3[10]; //==> Member flags //========================================================= //! Entity State
//! 0 Inactive/Standby
//! 1 Active
//! 2 Destroy
//! EntityStateGrp EntityState; //========================================================= //! Attach State
//! 0 Detach
//! 1 Attach
//! AttachStateGrp AttachState; //========================================================= //! Collision Detection Enable
//! 0 Disable
//! 1 Enable
//! CollisionDetectGrp CollisionDetectEn; //========================================================= //! Inherit Alpha
//! 0 No Inheritance
//! 1 Inherit //! InheritAlphaGrp InheritAlpha; //========================================================= //! Ground/Ocean Clamp
//! 0 Clamp
//! 1 Altitude clamp
//! 2 Altitude and Orientation clamp //! GrndClampGrp GrndClamp; //========================================================= //! Animation Direction
//! 0 Forward
//! 1 Backward
//! AnimationDirGrp AnimationDir; //========================================================= //! Animation Loop Mode
//! 0 One-Shot
//! 1 Continuous
//! AnimationLoopModeGrp AnimationLoopMode; //========================================================= //! Animation State
//! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue //! 4 NoAction
//! 5 Load
//! 6 LoadActivate
//! 7 Activate
//! 8 Deactivate
//! 9 DeactivateUnload
//! AnimationStateGrp AnimationState; //========================================================= //! Past Animation State
//! This is for V1 compatibility
//! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue
//! 4 NoAction
//! 5 Load
//! 6 LoadActivate
//! 7 Activate
//! 8 Deactivate
//! 9 DeactivateUnload
//! AnimationStateGrp PastAnimationState; //========================================================= //! Smoothing Enabled
//! Enable or Disable Extrapolation or Interpolation //! motion smoothing. //! true - Smoothing is Enabled
//! false - Smoothing is Disabled. //! bool SmoothingEn; }; #endif //#if !defined(_CIGI_BASE_ENTITY_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseEnvCondReq.h000066400000000000000000000206711210750432300215700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEnvCondReq.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  12/14/2007 Greg Basler                       Version 2.0.0
 *  Added the Request ID parameter.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_ENV_COND_REQ_INCLUDED_) #define _CIGI_BASE_ENV_COND_REQ_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_ENV_COND_REQ_PACKET_ID_V3 28 #define CIGI_ENV_COND_REQ_PACKET_SIZE_V3 32 class CigiEnvCondReqV3; class CIGI_SPEC CigiBaseEnvCondReq : public CigiBasePacket { friend class CigiEnvCondReqV3; public: //========================================================= //! The enumeration for the CigiBaseEnvCondReq Group //! enum ReqTypeGrp { Maritime=1, Terrestrial=2, Weather=4, Aerosol=8 }; //==> Management //========================================================= //! General Constructor //! CigiBaseEnvCondReq(); //========================================================= //! General Destructor //! virtual ~CigiBaseEnvCondReq(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Request Type //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Request Type group //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const Cigi_uint8 ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the Lat value. //! \return the current Lat. Cigi_uint8 GetReqType(void) const { return(ReqType); } //+> Request ID //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Request Type group //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqID(const Cigi_uint8 ReqIdIn, bool bndchk=true) { ReqID = ReqIdIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Lat value. //! \return the current Lat. Cigi_uint8 GetReqID(void) const { return(ReqID); } //+> Lat //========================================================= //! Sets the Lat with bound checking control //! \param LatIn - Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLat(const double LatIn, bool bndchk=true); //========================================================= //! Gets the Lat value. //! \return the current Lat. double GetLat(void) const { return(Lat); } //+> Lon //========================================================= //! Sets the Lon with bound checking control //! \param LonIn - Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLon(const double LonIn, bool bndchk=true); //========================================================= //! Gets the Lon value. //! \return the current Lon. double GetLon(void) const { return(Lon); } //+> Alt //========================================================= //! Sets the Alt with bound checking control //! \param AltIn - Altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlt(const double AltIn, bool bndchk=true) { Alt = AltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alt value. //! \return the current Alt. double GetAlt(void) const { return(Alt); } protected: //==> Member variables //========================================================= //! ReqType
//! Type of conditions or concentrations for which data //! is requested.
//! These can be OR'ed together to request more than 1 type //! of data. //! 1-Maritime
//! 2-Terrestrial
//! 4-Weather
//! 8-Aerosol //! Cigi_uint8 ReqType; //========================================================= //! Request ID
//! The Request ID //! Cigi_uint8 ReqID; //========================================================= //! Lat
//! Latitude //! double Lat; //========================================================= //! Lon
//! Longitude //! double Lon; //========================================================= //! Alt
//! Altitude //! double Alt; }; #endif // #if !defined(_CIGI_BASE_ENV_COND_REQ_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseEnvCtrl.h000066400000000000000000000200601210750432300211310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEnvCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_ENV_CTRL_INCLUDED_) #define _CIGI_BASE_ENV_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_ENV_CTRL_PACKET_ID_V1 6 #define CIGI_ENV_CTRL_PACKET_SIZE_V1 28 #define CIGI_ENV_CTRL_PACKET_ID_V2 6 #define CIGI_ENV_CTRL_PACKET_SIZE_V2 36 #define CIGI_ATMOS_CTRL_PACKET_ID_V3 10 #define CIGI_ATMOS_CTRL_PACKET_SIZE_V3 32 #define CIGI_CELESTIAL_CTRL_PACKET_ID_V3 9 #define CIGI_CELESTIAL_CTRL_PACKET_SIZE_V3 16 class CigiEnvCtrlV1; class CigiEnvCtrlV2; class CigiAtmosCtrlV3; class CigiCelestialCtrlV3; class CigiHoldEnvCtrl; class CIGI_SPEC CigiBaseEnvCtrl : public CigiBasePacket { friend class CigiEnvCtrlV1; friend class CigiEnvCtrlV2; friend class CigiAtmosCtrlV3; friend class CigiCelestialCtrlV3; friend class CigiHoldEnvCtrl; protected: // This class can only be instanciated by friend classes // and should be only instanced by the session manager. //==> Management //========================================================= //! General Constructor //! CigiBaseEnvCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseEnvCtrl(); public: //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Hold Object Manipulation //========================================================= //! A pure virtual FillHold function. //! This function is not implemented in this class. //! virtual void FillHold(CigiBaseEnvCtrl * Hold) const=0; //==> Accessing Member Variable Values functions protected: //==> Member variables //========================================================= //! Hour
//! The current hour. //! Cigi_uint8 Hour; //========================================================= //! Minute
//! The current minute. //! Cigi_uint8 Minute; //========================================================= //! Month
//! The current month. //! Cigi_uint8 Month; //========================================================= //! Day
//! The current day of the month. //! Cigi_uint8 Day; //========================================================= //! Year
//! The current year. //! Cigi_uint16 Year; //========================================================= //! StarInt
//! The Star field intensity. //! float StarInt; //========================================================= //! EphemerisEn
//! The ephemeris model enable //! bool EphemerisEn; //========================================================= //! SunEn
//! The Sun enable //! bool SunEn; //========================================================= //! MoonEn
//! The Moon enable //! bool MoonEn; //========================================================= //! StarEn
//! The star field enable. //! bool StarEn; //========================================================= //! DateVld
//! Date is valid flag. //! bool DateVld; //========================================================= //! AtmosEn
//! The atmospheric model enable. //! bool AtmosEn; //========================================================= //! Aerosol
//! The current aerosol density //! float Aerosol; //========================================================= //! Humidity
//! The current humidity. //! Cigi_uint8 Humidity; //========================================================= //! AirTemp
//! The current ambient air temperature //! float AirTemp; //========================================================= //! Visibility
//! Global visibility //! float Visibility; //========================================================= //! HorizWindSp
//! The horizontal wind speed or more commonly just wind speed. //! float HorizWindSp; //========================================================= //! VertWindSp
//! The vertical wind speed. //! float VertWindSp; //========================================================= //! WindDir
//! The wind direction. //! float WindDir; //========================================================= //! BaroPress
//! global barometric pressure //! float BaroPress; }; #endif // #if !defined(_CIGI_BASE_ENV_CTRL_INCLUDED_)CL cigi-ccl-3.3.3a+svn818/include/CigiBaseEnvRgnCtrl.h000066400000000000000000000362061210750432300216110ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEnvRgnCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_ENV_RGN_CTRL_INCLUDED_) #define _CIGI_BASE_ENV_RGN_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_ENV_RGN_CTRL_PACKET_ID_V3 11 #define CIGI_ENV_RGN_CTRL_PACKET_SIZE_V3 48 class CigiEnvRgnCtrlV3; class CIGI_SPEC CigiBaseEnvRgnCtrl : public CigiBasePacket { friend class CigiEnvRgnCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseEnvRgnCtrl Group //! enum RgnStateGrp { Inactive=0, Active=1, Destroyed=2 }; //========================================================= //! The enumeration for the CigiBaseEnvRgnCtrl Group //! enum MergeCtrlGrp { UseLast=0, Merge=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseEnvRgnCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseEnvRgnCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> RegionID //========================================================= //! Sets the RegionID with bound checking control //! \param RegionIDIn - Region ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRegionID(const Cigi_uint16 RegionIDIn, bool bndchk=true) { RegionID = RegionIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RegionID value. //! \return the current RegionID. Cigi_uint16 GetRegionID(void) const { return(RegionID); } //+> RgnState //========================================================= //! Sets the RgnState with bound checking control //! \param RgnStateIn - Region state control
//! Inactive=0
//! Active=1
//! Destroyed=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRgnState(const RgnStateGrp RgnStateIn, bool bndchk=true); //========================================================= //! Gets the RgnState value. //! \return the current RgnState. RgnStateGrp GetRgnState(void) const { return(RgnState); } //+> WeatherProp //========================================================= //! Sets the WeatherProp with bound checking control //! \param WeatherPropIn - Weather property //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWeatherProp(const MergeCtrlGrp WeatherPropIn, bool bndchk=true); //========================================================= //! Gets the WeatherProp value. //! \return the current WeatherProp. MergeCtrlGrp GetWeatherProp(void) const { return(WeatherProp); } //+> Aerosol //========================================================= //! Sets the Aerosol with bound checking control //! \param AerosolIn - Aerosol concentration //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAerosol(const MergeCtrlGrp AerosolIn, bool bndchk=true); //========================================================= //! Gets the Aerosol value. //! \return the current Aerosol. MergeCtrlGrp GetAerosol(void) const { return(Aerosol); } //+> MaritimeSurface //========================================================= //! Sets the MaritimeSurface with bound checking control //! \param MaritimeSurfaceIn - Maritime surface conditions //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaritimeSurface(const MergeCtrlGrp MaritimeSurfaceIn, bool bndchk=true); //========================================================= //! Gets the MaritimeSurface value. //! \return the current MaritimeSurface. MergeCtrlGrp GetMaritimeSurface(void) const { return(MaritimeSurface); } //+> TerrestrialSurface //========================================================= //! Sets the TerrestrialSurface with bound checking control //! \param TerrestrialSurfaceIn - Terrestrial surface conditions //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTerrestrialSurface(const MergeCtrlGrp TerrestrialSurfaceIn, bool bndchk=true); //========================================================= //! Gets the TerrestrialSurface value. //! \return the current TerrestrialSurface. MergeCtrlGrp GetTerrestrialSurface(void) const { return(TerrestrialSurface); } //+> Lat //========================================================= //! Sets the Lat with bound checking control //! \param LatIn - Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLat(const double LatIn, bool bndchk=true); //========================================================= //! Gets the Lat value. //! \return the current Lat. double GetLat(void) const { return(Lat); } //+> Lon //========================================================= //! Sets the Lon with bound checking control //! \param LonIn - Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLon(const double LonIn, bool bndchk=true); //========================================================= //! Gets the Lon value. //! \return the current Lon. double GetLon(void) const { return(Lon); } //+> XSize //========================================================= //! Sets the XSize with bound checking control //! \param XSizeIn - X size of the region //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXSize(const float XSizeIn, bool bndchk=true) { XSize = XSizeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XSize value. //! \return the current XSize. float GetXSize(void) const { return(XSize); } //+> YSize //========================================================= //! Sets the YSize with bound checking control //! \param YSizeIn - Y size of the region //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYSize(const float YSizeIn, bool bndchk=true) { YSize = YSizeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YSize value. //! \return the current YSize. float GetYSize(void) const { return(YSize); } //+> CornerRadius //========================================================= //! Sets the CornerRadius with bound checking control //! \param CornerRadiusIn - Corner Radius //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCornerRadius(const float CornerRadiusIn, bool bndchk=true) { CornerRadius = CornerRadiusIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CornerRadius value. //! \return the current CornerRadius. float GetCornerRadius(void) const { return(CornerRadius); } //+> Rotation //========================================================= //! Sets the Rotation with bound checking control //! \param RotationIn - The rotation of the region from true north //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRotation(const float RotationIn, bool bndchk=true); //========================================================= //! Gets the Rotation value. //! \return the current Rotation. float GetRotation(void) const { return(Rotation); } //+> Transition //========================================================= //! Sets the Transition with bound checking control //! \param TransitionIn - Width of the trasition band //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTransition(const float TransitionIn, bool bndchk=true) { Transition = TransitionIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Transition value. //! \return the current Transition. float GetTransition(void) const { return(Transition); } protected: //==> Member variables //========================================================= //! RegionID
//! Region ID //! Cigi_uint16 RegionID; //========================================================= //! RgnState
//! Region state control
//! 0-Inactive
//! 1-Active
//! 2-Destroyed //! RgnStateGrp RgnState; //========================================================= //! WeatherProp
//! Weather property merge control //! MergeCtrlGrp WeatherProp; //========================================================= //! Aerosol
//! Aerosol Concentration merge control //! MergeCtrlGrp Aerosol; //========================================================= //! MaritimeSurface
//! Maritime surface conditions merge control //! MergeCtrlGrp MaritimeSurface; //========================================================= //! TerrestrialSurface
//! Terrestrial surface conditions merge control //! MergeCtrlGrp TerrestrialSurface; //========================================================= //! Lat
//! Latitude //! double Lat; //========================================================= //! Lon
//! Longitude //! double Lon; //========================================================= //! XSize
//! X size of the region //! float XSize; //========================================================= //! YSize
//! Y size of the region //! float YSize; //========================================================= //! CornerRadius
//! Radius of the corners //! float CornerRadius; //========================================================= //! Rotation
//! Rotation of the region from true north //! float Rotation; //========================================================= //! Transition
//! Width of the transition band. //! float Transition; }; #endif // #if !defined(_CIGI_BASE_ENV_RGN_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseEventNotification.h000066400000000000000000000176751210750432300232260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEventNotification.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function and type declarations to CCL-defined 
 *  types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_EVENT_NOTIFICATION_INCLUDED_) #define _CIGI_BASE_EVENT_NOTIFICATION_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_EVENT_NOTIFICATION_PACKET_ID_V3 116 #define CIGI_EVENT_NOTIFICATION_PACKET_SIZE_V3 16 class CigiEventNotificationV3; class CIGI_SPEC CigiBaseEventNotification : public CigiBasePacket { friend class CigiEventNotificationV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseEventNotification(); //========================================================= //! General Destructor //! virtual ~CigiBaseEventNotification(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EventID //========================================================= //! Sets the EventID with bound checking control //! \param EventIDIn - Event ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEventID(const Cigi_uint16 EventIDIn, bool bndchk=true) { EventID = EventIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EventID value. //! \return the current EventID. Cigi_uint16 GetEventID(void) const { return(EventID); } //+> EventData //========================================================= //! Sets the EventData with bound checking control //! \param EventDataIn - Event Data //! \param ndx - Which of the 3 data words to access. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEventData(const Cigi_uint32 EventDataIn, int ndx, bool bndchk=true); //========================================================= //! Sets the EventData with bound checking control //! \param EventDataIn - Event Data //! \param ndx - Which of the 3 data words to access. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEventData(const Cigi_int32 EventDataIn, int ndx, bool bndchk=true); //========================================================= //! Sets the EventData with bound checking control //! \param EventDataIn - Event Data //! \param ndx - Which of the 3 data words to access. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEventData(const float EventDataIn, int ndx, bool bndchk=true); //========================================================= //! Gets the EventData value. //! \param ndx - Which of the 3 data words to access. //! //! \return the current EventData.
//! If the index is incorrect, it will return the nearest //! correct word of the Event data. Cigi_uint32 GetULEventData(int ndx); //========================================================= //! Gets the EventData value. //! \param ndx - Which of the 3 data words to access. //! //! \return the current EventData.
//! If the index is incorrect, it will return the nearest //! correct word of the Event data. Cigi_int32 GetLEventData(int ndx); //========================================================= //! Gets the EventData value. //! \param ndx - Which of the 3 data words to access. //! //! \return the current EventData.
//! If the index is incorrect, it will return the nearest //! correct word of the Event data. float GetFEventData(int ndx); protected: //==> Member variables //========================================================= //! EventID
//! //! Cigi_uint16 EventID; //========================================================= //! EventData
//! //! union EventDataGrp { Cigi_uint32 ul[3]; Cigi_int32 l[3]; float f[3]; } EventData; }; #endif // #if !defined(_CIGI_BASE_EVENT_NOTIFICATION_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseEventProcessor.h000066400000000000000000000046221210750432300225430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEventProcessor.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_EVENT_PROCESSOR_INCLUDED_) #define _CIGI_BASE_EVENT_PROCESSOR_INCLUDED_ #include "CigiBasePacket.h" //========================================================= //! The base class for the Event Packet Processing //! class CIGI_SPEC CigiBaseEventProcessor { public: //==> Management //========================================================= //! General Constructor //! CigiBaseEventProcessor() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseEventProcessor() { }; //==> Incoming Packet Processing //========================================================= //! A pure virtual Incoming Packet Processing function. //! This function is not implemented in this class. //! virtual void OnPacketReceived(CigiBasePacket *Packet) = 0; }; #endif // !defined(_CIGI_BASE_EVENT_PROCESSOR_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseHatHotReq.h000066400000000000000000000213361210750432300214220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseHatHotReq.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a forward reference and granted friend access to the 
 *  CigiHatHotReqV3_2 class.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the UpdatePeriod variable to set the number of frames between each 
 *  hat/hot update from the IG.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_HAT_HOT_REQ_INCLUDED_) #define _CIGI_BASE_HAT_HOT_REQ_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_HAT_REQ_PACKET_ID_V1 41 #define CIGI_HAT_REQ_PACKET_SIZE_V1 24 #define CIGI_HAT_REQ_PACKET_ID_V2 41 #define CIGI_HAT_REQ_PACKET_SIZE_V2 32 #define CIGI_HOT_REQ_PACKET_ID_V2 44 #define CIGI_HOT_REQ_PACKET_SIZE_V2 24 #define CIGI_HAT_HOT_REQ_PACKET_ID_V3 24 #define CIGI_HAT_HOT_REQ_PACKET_SIZE_V3 32 #define CIGI_HAT_HOT_REQ_PACKET_ID_V3_2 24 #define CIGI_HAT_HOT_REQ_PACKET_SIZE_V3_2 32 class CigiHatReqV1; class CigiHatReqV2; class CigiHotReqV2; class CigiHatHotReqV3; class CigiHatHotReqV3_2; class CIGI_SPEC CigiBaseHatHotReq : public CigiBasePacket { friend class CigiHatReqV1; friend class CigiHatReqV2; friend class CigiHotReqV2; friend class CigiHatHotReqV3; friend class CigiHatHotReqV3_2; public: //========================================================= //! The enumeration for the CigiBaseHatHotReq Group //! enum ReqTypeGrp { HAT=0, HOT=1, Extended=2 }; //========================================================= //! The enumeration for the CigiBaseHatHotReq Group //! enum CoordSysGrp { Geodetic=0, Entity=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseHatHotReq(); //========================================================= //! General Destructor //! virtual ~CigiBaseHatHotReq(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //==> Accessing Member Variable Values functions //+> HatHotID //========================================================= //! Sets the HatHotID with bound checking control //! \param HatHotIDIn - HAT/HOT Request ID. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHatHotID(const Cigi_uint16 HatHotIDIn, bool bndchk=true) { HatHotID = HatHotIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the HatHotID value. //! \return the current HatHotID. Cigi_uint16 GetHatHotID(void) const { return(HatHotID); } //+> Lat //========================================================= //! Sets the Lat with bound checking control //! \param LatIn - The Latitude of the location to check. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLat(const double LatIn, bool bndchk=true); //========================================================= //! Gets the Lat value. //! \return the current Lat. double GetLat(void) const { return(LatOrXoff); } //+> Lon //========================================================= //! Sets the Lon with bound checking control //! \param LonIn - The Longitude of the location to check. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLon(const double LonIn, bool bndchk=true); //========================================================= //! Gets the Lon value. //! \return the current Lon. double GetLon(void) const { return(LonOrYoff); } protected: //==> Member variables //========================================================= //! HatHotID
//! HAT/HOT Request ID. //! Cigi_uint16 HatHotID; //========================================================= //! ReqType
//! The type of request and response desired
//! 0-HAT
//! 1-HOT
//! 2-Extended //! ReqTypeGrp ReqType; //========================================================= //! SrcCoordSys
//! The Coordinate system of the point data. //! 0-Geodetic
//! 1-Entity //! //! CoordSysGrp SrcCoordSys; //========================================================= //! UpdatePeriod
//! The number of frames between each hat/hot update from //! the IG. If 0 - single shot //! Cigi_uint8 UpdatePeriod; //========================================================= //! EntityID
//! The ID of the Origin Entity //! Cigi_uint16 EntityID; //========================================================= //! LatOrXoff
//! The position of the request point specified as latitude or //! an offset along the X axis of the origin entity //! measured from the origin of that entity. //! double LatOrXoff; //========================================================= //! LonOrYoff
//! The position of the request point specified as longitude or //! an offset along the Y axis of the origin entity //! measured from the origin of that entity. //! double LonOrYoff; //========================================================= //! AltOrZoff
//! The position of the request point specified as altitude or //! an offset along the Z axis of the origin entity //! measured from the origin of that entity. //! double AltOrZoff; //========================================================= //! IsValidV1or2
//! Whether the data is valid for CIGI 1 and/or 2 //! bool IsValidV1or2; }; #endif // #if !defined(_CIGI_BASE_HAT_HOT_REQ_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseHatHotResp.h000066400000000000000000000206511210750432300216030ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseHatHotResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added forward references and granted friend access to the 
 *  CigiHatHotRespV3_2 and CigiHatHotXRespV3_2 classes.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a HostFrame member variable to track when the hat/hot was calculated.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_HAT_HOT_RESP_INCLUDED_) #define _CIGI_BASE_HAT_HOT_RESP_INCLUDED_ #include "CigiBasePacket.h" // Note: // When converting from a HOT Response of Version 2 or greater to a // HAT Response of Version 1, the conversion is not a good value. // The value ends up being a HOT not a HAT. At this time there // is no way of actually providing a HAT. // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_HAT_RESP_PACKET_ID_V1 102 #define CIGI_HAT_RESP_PACKET_SIZE_V1 16 #define CIGI_HAT_RESP_PACKET_ID_V2 102 #define CIGI_HAT_RESP_PACKET_SIZE_V2 24 #define CIGI_HOT_RESP_PACKET_ID_V2 106 #define CIGI_HOT_RESP_PACKET_SIZE_V2 24 #define CIGI_HAT_HOT_RESP_PACKET_ID_V3 102 #define CIGI_HAT_HOT_RESP_PACKET_SIZE_V3 16 #define CIGI_HAT_HOT_XRESP_PACKET_ID_V3 103 #define CIGI_HAT_HOT_XRESP_PACKET_SIZE_V3 40 #define CIGI_HAT_HOT_RESP_PACKET_ID_V3_2 102 #define CIGI_HAT_HOT_RESP_PACKET_SIZE_V3_2 16 #define CIGI_HAT_HOT_XRESP_PACKET_ID_V3_2 103 #define CIGI_HAT_HOT_XRESP_PACKET_SIZE_V3_2 40 class CigiHatRespV1; class CigiHatRespV2; class CigiHotRespV2; class CigiHatHotRespV3; class CigiHatHotXRespV3; class CigiHatHotRespV3_2; class CigiHatHotXRespV3_2; class CIGI_SPEC CigiBaseHatHotResp : public CigiBasePacket { friend class CigiHatRespV1; friend class CigiHatRespV2; friend class CigiHotRespV2; friend class CigiHatHotRespV3; friend class CigiHatHotXRespV3; friend class CigiHatHotRespV3_2; friend class CigiHatHotXRespV3_2; public: //========================================================= //! The enumeration for the CigiBaseHatHotResp Group //! enum ReqTypeGrp { HAT=0, HOT=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseHatHotResp() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseHatHotResp() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //==> Accessing Member Variable Values functions //+> HatHotID //========================================================= //! Sets the HatHotID with bound checking control //! \param HatHotIDIn - Hat/Hot Request/Response ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHatHotID(const Cigi_uint16 HatHotIDIn, bool bndchk=true) { HatHotID = HatHotIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the HatHotID value. //! \return the current HatHotID. Cigi_uint16 GetHatHotID(void) const { return(HatHotID); } //+> Valid //========================================================= //! Sets the Valid with bound checking control //! \param ValidIn - Data is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetValid(const bool ValidIn, bool bndchk=true) { Valid = ValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Valid value. //! \return the current Valid. bool GetValid(void) const { return(Valid); } protected: //==> Member variables //========================================================= //! HatHotID
//! Hat/Hot Request/Response ID. //! Cigi_uint16 HatHotID; //========================================================= //! Valid
//! Data is valid. //! bool Valid; //========================================================= //! HostFrame
//! The least significant nibble of the Host frame number //! when the hat/hot was calculated. //! Cigi_uint8 HostFrame; //========================================================= //! ReqType
//! The type of response data. //! 0-HAT
//! 1-HOT //! //! ReqTypeGrp ReqType; //========================================================= //! Hat
//! The Height Above Terrain result data. //! double Hat; //========================================================= //! Hot
//! The Height Of Terrain result data //! double Hot; //========================================================= //! Material
//! The material code of the specified location. //! Cigi_uint32 Material; //========================================================= //! NormAz
//! The Azimuth from true north of the normal vector of the //! polygon which contains the test point. //! float NormAz; //========================================================= //! NormEl
//! The Elevation of the normal vector of the polygon //! which contains the test point. //! //! float NormEl; //========================================================= //! VldHat
//! The Hat data is valid. //! bool VldHat; //========================================================= //! VldHot
//! The Hot data is valid //! bool VldHot; }; #endif // #if !defined(_CIGI_BASE_HAT_HOT_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseIGCtrl.h000066400000000000000000000254771210750432300207210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseIGCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Implemented the SetDatabaseID function as inline.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Removed the SetFrameCntr function, to be implemented in child classes.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the LastRcvdIGFrame member variable to track the last frame received.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag.
 *  Added the defines and declarations for V3_3.
 *
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_IG_CTRL_INCLUDED_) #define _CIGI_BASE_IG_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_IG_CTRL_PACKET_ID_V1 1 #define CIGI_IG_CTRL_PACKET_SIZE_V1 16 #define CIGI_IG_CTRL_PACKET_ID_V2 1 #define CIGI_IG_CTRL_PACKET_SIZE_V2 16 #define CIGI_IG_CTRL_PACKET_ID_V3 1 #define CIGI_IG_CTRL_PACKET_SIZE_V3 16 #define CIGI_IG_CTRL_PACKET_ID_V3_2 1 #define CIGI_IG_CTRL_PACKET_SIZE_V3_2 24 #define CIGI_IG_CTRL_PACKET_ID_V3_3 1 #define CIGI_IG_CTRL_PACKET_SIZE_V3_3 24 class CigiIGCtrlV1; class CigiIGCtrlV2; class CigiIGCtrlV3; class CigiIGCtrlV3_2; class CigiIGCtrlV3_3; //========================================================= //! The class for the IG Control packet for CIGI //! class CIGI_SPEC CigiBaseIGCtrl : public CigiBasePacket { friend class CigiIGCtrlV1; friend class CigiIGCtrlV2; friend class CigiIGCtrlV3; friend class CigiIGCtrlV3_2; friend class CigiIGCtrlV3_3; public: //========================================================= //! The enumeration for the IG Mode //! enum IGModeGrp { Reset=0, Standby=0, Operate=1, debug=2 }; //========================================================= //! The enumeration for the Tracking Device Enable Flag //! enum TrackDeviceEnGrp { Disable=0, Enable=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseIGCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseIGCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Swap //========================================================= //! Gets the Swap required flag
//! This is used for V3 to determine if automated swapping //! is required. //! \return This returns the Swap flag
//! If true, this signals that byte swapping is required //! for V3 packets. //! bool GetSwap(void) const { return(BSwapEn); } //+> Database ID //========================================================= //! Gets the Database ID value //! \return DatabaseID - uniquely identifies the specific database //! Cigi_int8 GetDatabaseID(void) const { return(DatabaseID); } //========================================================= //! Sets the Database ID with bound checking control //! \param DataBaseIDIn - Specifies a new database to load.
//! 0 - No Action //! All Other Values - Load the specified database //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetDatabaseID(const Cigi_int8 DataBaseIDIn, bool bndchk=true); //+> IG Mode //========================================================= //! Gets the IG Mode value //! \return IGMode specifying the commanded IG mode.
//! 0 - Reset or Standby
//! 1 - Operate
//! 2 - debug
//! IGModeGrp GetIGMode(void) const { return(IGMode); } //========================================================= //! Sets the IG Mode with bound checking control //! \param IGModeIn - Specifies the commanded IG mode.
//! 0 - Reset or Standby
//! 1 - Operate
//! 2 - debug
//! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetIGMode(IGModeGrp IGModeIn, bool bndchk=true); //+> Frame Counter //========================================================= //! Gets the Frame Counter value //! \return Current frame this data represents //! Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } protected: //==> Member variables //========================================================= //! Swap
//! Specifies whether the V3 packets must be byte swapped
//! bool BSwapEn; //========================================================= //! DatabaseID
//! The current Database command
//! 0 - No Action.
//! 1 - 127 - Command to load the specified Database //! Cigi_int8 DatabaseID; //========================================================= //! Frame Counter
//! Specifies current frame being processed
//! Cigi_uint32 FrameCntr; //========================================================= //! Last Received IG Frame
//! Specifies IG frame received last
//! Cigi_uint32 LastRcvdIGFrame; //========================================================= //! Time Stamp - V1 format
//! Specifies the time from the beginning of the exercise
//! Cigi_uint32 TimeStampV1; //========================================================= //! Time Stamp - V2 format
//! Specifies the time from the beginning of the exercise
//! float TimeStampV2; //========================================================= //! Time Stamp - V3 format
//! Specifies the time from the beginning of the exercise
//! Cigi_uint32 TimeStampV3; //========================================================= //! Byte Swap Constant for V3
//! Constant used to determine if byteswapping is needed //! in V3. //! Cigi_uint16 ByteSwap; //========================================================= //! IG Mode
//! 0 - Reset or Standby
//! 1 - Operate
//! 2 - debug
//! IGModeGrp IGMode; //========================================================= //! Tracking Device Enable
//! true - Enables the tracking device
//! false - Disables the tracking device
//! TrackDeviceEnGrp TrackDeviceEn; //========================================================= //! Boresight The Tracking Device
//! true - Boresight the tracking device
//! false - No Action
//! bool BoresightTrackDevice; //========================================================= //! Timestame Valid
//! true - The timestamp is valid and usable
//! false - The timestamp is not valid. //! bool TimestampValid; //========================================================= //! Smoothing Enabled
//! Enable or Disable Extrapolation or Interpolation //! motion smoothing. //! true - Smoothing is Enabled
//! false - Smoothing is Disabled. //! bool SmoothingEn; }; #endif // !defined(_CIGI_BASE_IG_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseIGMsg.h000066400000000000000000000155461210750432300205370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseIGMsg.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  Added Variable length packet processing
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_IG_MSG_INCLUDED_) #define _CIGI_BASE_IG_MSG_INCLUDED_ #include "CigiBaseVariableSizePckt.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_IG_MSG_PACKET_ID_V2 108 #define CIGI_IG_MSG_PACKET_ID_V3 117 class CigiIGMsgV2; class CigiIGMsgV3; class CIGI_SPEC CigiBaseIGMsg : public CigiBaseVariableSizePckt { friend class CigiIGMsgV2; friend class CigiIGMsgV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseIGMsg() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseIGMsg() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; if(CnvtVersion.CigiMajorVersion < 2) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcVarSize; if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_IG_MSG_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_IG_MSG_PACKET_ID_V3; } return(CIGI_SUCCESS); } //========================================================= //! A pure virtual function to determine the size that the //! packet will take up when packed. //! This function is not implemented in this class. //! \param refPacket - A pointer to the current pack point. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) =0; //==> Accessing Member Variable Values functions //+> MsgID //========================================================= //! Sets the MsgID with bound checking control //! \param MsgIDIn - Message ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMsgID(const Cigi_uint16 MsgIDIn, bool bndchk=true) { MsgID = MsgIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the MsgID value. //! \return the current MsgID. Cigi_uint16 GetMsgID(void) const { return(MsgID); } //+> Msg //========================================================= //! Gets the Msg value. //! \return the current Msg. Cigi_int8 *GetMsg(void) { return(Msg); } //+> MsgLen //========================================================= //! Gets the Msg Length. //! \return the current MsgLen. int GetMsgLen(void) const { return(MsgLen); } protected: //==> Member variables //========================================================= //! MsgID
//! The message ID //! Cigi_uint16 MsgID; //========================================================= //! Msg
//! The message string //! Cigi_int8 Msg[100]; //========================================================= //! MsgLen
//! The message string length //! int MsgLen; }; #endif // #if !defined(_CIGI_BASE_IG_MSG_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseLosResp.h000066400000000000000000000327521210750432300211560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseLosResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added forward references and granted friend access to the 
 *  CigiLosRespV3_2 and CigiLosXRespV3_2 classes.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a HostFrame member variable to track when the los was calculated.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* The Boeing Company * */ #if !defined(_CIGI_BASE_LOS_RESP_INCLUDED_) #define _CIGI_BASE_LOS_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_LOS_RESP_PACKET_ID_V1 103 #define CIGI_LOS_RESP_PACKET_SIZE_V1 40 #define CIGI_LOS_RESP_PACKET_ID_V2 103 #define CIGI_LOS_RESP_PACKET_SIZE_V2 40 #define CIGI_LOS_RESP_PACKET_ID_V3 104 #define CIGI_LOS_RESP_PACKET_SIZE_V3 16 #define CIGI_LOS_XRESP_PACKET_ID_V3 105 #define CIGI_LOS_XRESP_PACKET_SIZE_V3 56 #define CIGI_LOS_RESP_PACKET_ID_V3_2 104 #define CIGI_LOS_RESP_PACKET_SIZE_V3_2 16 #define CIGI_LOS_XRESP_PACKET_ID_V3_2 105 #define CIGI_LOS_XRESP_PACKET_SIZE_V3_2 56 class CigiLosRespV1; class CigiLosRespV2; class CigiLosRespV3; class CigiLosXRespV3; class CigiLosRespV3_2; class CigiLosXRespV3_2; class CIGI_SPEC CigiBaseLosResp : public CigiBasePacket { friend class CigiLosRespV1; friend class CigiLosRespV2; friend class CigiLosRespV3; friend class CigiLosXRespV3; friend class CigiLosRespV3_2; friend class CigiLosXRespV3_2; public: //========================================================= //! The enumeration for the CigiBaseLosResp Group //! enum LOSCoordGrp { Geodetic=0, Entity=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseLosResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseLosResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //==> Accessing Member Variable Values functions //+> LosID //========================================================= //! Sets the LosID with bound checking control //! \param LosIDIn - Line of Sight ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLosID(const Cigi_uint16 LosIDIn, bool bndchk=true) { LosID = LosIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LosID value. //! \return the current LosID. Cigi_uint16 GetLosID(void) const { return(LosID); } //+> Valid //========================================================= //! Sets the Valid with bound checking control //! \param ValidIn - An intersection occurred and the data //! is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetValid(const bool ValidIn, bool bndchk=true) { Valid = ValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Valid value. //! \return the current Valid. bool GetValid(void) const { return(Valid); } //+> Visible //========================================================= //! Sets the Visible with bound checking control //! \param VisibleIn - The LOS Segment Destination or End Point //! is visible From the Source or Start Point. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVisible(const bool VisibleIn, bool bndchk=true) { Visible = VisibleIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Visible value. //! \return the current Visible. bool GetVisible(void) const { return(Visible); } //+> Range //========================================================= //! Sets the Range with bound checking control //! \param RangeIn - Range to the intersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRange(const double RangeIn, bool bndchk=true) { Range = RangeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Range value. //! \return the current Range. double GetRange(void) const { return(Range); } //+> Latitude //========================================================= //! Sets the Latitude with bound checking control //! \param LatitudeIn - Latitude of the intersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLatitude(const double LatitudeIn, bool bndchk=true); //========================================================= //! Gets the Latitude value. //! \return the current Latitude. double GetLatitude(void) const { return(LatOrXoff); } //+> Longitude //========================================================= //! Sets the Longitude with bound checking control //! \param LongitudeIn - Longitude of the intersection //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLongitude(const double LongitudeIn, bool bndchk=true); //========================================================= //! Gets the Longitude value. //! \return the current Longitude. double GetLongitude(void) const { return(LonOrYoff); } //+> Altitude //========================================================= //! Sets the Altitude with bound checking control //! \param AltitudeIn - Altitude of the intersection //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAltitude(const double AltitudeIn, bool bndchk=true) { AltOrZoff = AltitudeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Altitude value. //! \return the current Altitude. double GetAltitude(void) const { return(AltOrZoff); } //+> ValidV1or2 //========================================================= //! Gets the ValidV1or2 value. //! \return the current ValidV1or2. bool GetValidV1or2(void) const { return(ValidV1or2); } protected: //==> Member variables //========================================================= //! LosID
//! The Line Of Sight ID //! Cigi_uint16 LosID; //========================================================= //! Valid
//! An intersection occurred and the data is valid. //! bool Valid; //========================================================= //! EntityIDValid
//! The LOS intersected an Entity and a valid Entity ID is //! provided. //! bool EntityIDValid; //========================================================= //! RangeValid
//! An intersection occurred and the Range data is valid. //! bool RangeValid; //========================================================= //! Visible
//! The Destination or End Point is visible from the Source //! or Start Point. //! bool Visible; //========================================================= //! HostFrame
//! The least significant nibble of the Host frame number //! when the los was calculated. //! Cigi_uint8 HostFrame; //========================================================= //! IntersectionCoordSys
//! 0-Geodetic
//! 1-Entity //! What coordinate system the Intersection Point position //! is presented. //! LOSCoordGrp IntersectionCoordSys; //========================================================= //! RespCount
//! The number of responses for this request. //! Cigi_uint8 RespCount; //========================================================= //! EntityID
//! The Entity ID of the entity with which the LOS intersected. //! Cigi_uint16 EntityID; //========================================================= //! Range
//! The range from the Source or Start Point to the intersection. //! double Range; //========================================================= //! Latitude
//! The latitude of the intersection. //! double LatOrXoff; //========================================================= //! Longitude
//! The longitude of the intersection. //! double LonOrYoff; //========================================================= //! Altitude
//! The altitude of the intersection //! double AltOrZoff; //========================================================= //! Red
//! The red color component of the surface at the point of //! intersection. //! Cigi_uint8 Red; //========================================================= //! Green
//! The green color component of the surface at the point of //! intersection. //! Cigi_uint8 Green; //========================================================= //! Blue
//! The blue color component of the surface at the point of //! intersection. //! Cigi_uint8 Blue; //========================================================= //! Alpha
//! The alpha color component of the surface at the point of //! intersection. //! Cigi_uint8 Alpha; //========================================================= //! Material
//! The material code of the surface at the point of intersection. //! Cigi_uint32 Material; //========================================================= //! NormalAz
//! The azimuth of the surface normal at the point of intersection. //! float NormalAz; //========================================================= //! NormalEl
//! The elevation of the surface normal at the point of intersection. //! float NormalEl; //========================================================= //! ValidV1or2
//! Data is valid for Cigi Version 1 and 2 //! bool ValidV1or2; }; #endif // #if !defined(_CIGI_BASE_LOS_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseLosSegReq.h000066400000000000000000000352121210750432300214250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseLosSegReq.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a forward reference and granted friend access to the 
 *  CigiLosSegReqV3_2 class.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the DestEntityIDValid member variable to determine if a 
 *  detination entity's ID is valid or not.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the UpdatePeriod member variable to specify the number of frames 
 *  between each LOS update from the IG.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the DestEntityID member variable to specify the ID of the destination 
 *  entity, if there is one.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* The Boeing Company * */ #if !defined(_CIGI_BASE_LOS_SEG_REQ_INCLUDED_) #define _CIGI_BASE_LOS_SEG_REQ_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_LOS_SEG_REQ_PACKET_ID_V1 42 #define CIGI_LOS_SEG_REQ_PACKET_SIZE_V1 48 #define CIGI_LOS_SEG_REQ_PACKET_ID_V2 42 #define CIGI_LOS_SEG_REQ_PACKET_SIZE_V2 56 #define CIGI_LOS_SEG_REQ_PACKET_ID_V3 25 #define CIGI_LOS_SEG_REQ_PACKET_SIZE_V3 64 #define CIGI_LOS_SEG_REQ_PACKET_ID_V3_2 25 #define CIGI_LOS_SEG_REQ_PACKET_SIZE_V3_2 64 class CigiLosSegReqV1; class CigiLosSegReqV2; class CigiLosSegReqV3; class CigiLosSegReqV3_2; class CIGI_SPEC CigiBaseLosSegReq : public CigiBasePacket { friend class CigiLosSegReqV1; friend class CigiLosSegReqV2; friend class CigiLosSegReqV3; friend class CigiLosSegReqV3_2; public: //========================================================= //! The enumeration for the CigiBaseLosSegReq Group //! enum ReqTypeGrp { Basic=0, Extended=1 }; //========================================================= //! The enumeration for the CigiBaseLosSegReq Group //! enum CoordSysGrp { Geodetic=0, Entity=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseLosSegReq(); //========================================================= //! General Destructor //! virtual ~CigiBaseLosSegReq(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> LosID //========================================================= //! Sets the LosID with bound checking control //! \param LosIDIn - Line Of Sight ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLosID(const Cigi_uint16 LosIDIn, bool bndchk=true) { LosID = LosIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LosID value. //! \return the current LosID. Cigi_uint16 GetLosID(void) const { return(LosID); } //+> SrcLat //========================================================= //! Sets the SrcLat with bound checking control //! \param SrcLatIn - Source Point Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcLat(const double SrcLatIn, bool bndchk=true); //========================================================= //! Gets the SrcLat value. //! \return the current SrcLat. double GetSrcLat(void) const { return(SrcXLat); } //+> SrcLon //========================================================= //! Sets the SrcLon with bound checking control //! \param SrcLonIn - Source Point Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcLon(const double SrcLonIn, bool bndchk=true); //========================================================= //! Gets the SrcLon value. //! \return the current SrcLon. double GetSrcLon(void) const { return(SrcYLon); } //+> SrcAlt //========================================================= //! Sets the SrcAlt with bound checking control //! \param SrcAltIn - Source Point Altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcAlt(const double SrcAltIn, bool bndchk=true) { SrcZAlt = SrcAltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcAlt value. //! \return the current SrcAlt. double GetSrcAlt(void) const { return(SrcZAlt); } //+> DstLat //========================================================= //! Sets the DstLat with bound checking control //! \param DstLatIn - Destination point Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstLat(const double DstLatIn, bool bndchk=true); //========================================================= //! Gets the DstLat value. //! \return the current DstLat. double GetDstLat(void) const { return(DstXLat); } //+> DstLon //========================================================= //! Sets the DstLon with bound checking control //! \param DstLonIn - Destination point Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstLon(const double DstLonIn, bool bndchk=true); //========================================================= //! Gets the DstLon value. //! \return the current DstLon. double GetDstLon(void) const { return(DstYLon); } //+> DstAlt //========================================================= //! Sets the DstAlt with bound checking control //! \param DstAltIn - Destination point Altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstAlt(const double DstAltIn, bool bndchk=true) { DstZAlt = DstAltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstAlt value. //! \return the current DstAlt. double GetDstAlt(void) const { return(DstZAlt); } //+> Valid Data for Cigi version 1 or 2 //========================================================= //! Specifies whether the currently stored data is valid for //! CIGI version 1 or version 2. //! \return the current DstAlt. bool IsValidV1or2(void) const { return(ValidV1or2); } protected: //==> Member variables //========================================================= //! LosID
//! Line Of Sight request ID //! Cigi_uint16 LosID; //========================================================= //! ReqType
//! Specifies which type (Basic or Extended) of response //! is wanted.
//! 0-Basic
//! 1-Extended //! //! ReqTypeGrp ReqType; //========================================================= //! SrcCoordSys
//! Specifies in which coordinate system the source //! point is presented.
//! 0-Geodetic
//! 1-Entity //! //! CoordSysGrp SrcCoordSys; //========================================================= //! DstCoordSys
//! Specifies in which coordinate system the destination //! point is presented.
//! 0-Geodetic
//! 1-Entity //! //! CoordSysGrp DstCoordSys; //========================================================= //! ResponseCoordSys
//! Requests in which coordinate system the response //! point should be presented.
//! 0-Geodetic
//! 1-Entity //! //! CoordSysGrp ResponseCoordSys; //========================================================= //! DestEntityIDValid
//! Specifies the destination entity's ID is valid or not. //! bool DestEntityIDValid; //========================================================= //! AlphaThresh
//! The lowest alpha value of a polygon that will result //! in an intersection response. //! Cigi_uint8 AlphaThresh; //========================================================= //! EntityID
//! The ID of the entity from whose origin the offsets are //! measured. //! Cigi_uint16 EntityID; //========================================================= //! SrcXLat
//! The Latitude of the source or starting point OR
//! The X axis offset of the source or starting point //! from a specified entity's origin. //! double SrcXLat; //========================================================= //! SrcYLon
//! The Longitude of the source or starting point OR
//! The Y axis offset of the source or starting point //! from a specified entity's origin. //! double SrcYLon; //========================================================= //! SrcZAlt
//! The Altitude of the source or starting point OR
//! The Z axis offset of the source or starting point //! from a specified entity's origin. //! double SrcZAlt; //========================================================= //! DstXLat
//! The Latitude of the destination or ending point OR
//! The X axis offset of the destination or ending point //! from a specified entity's origin. //! double DstXLat; //========================================================= //! DstYLon
//! The Longitude of the destination or ending point OR
//! The Y axis offset of the destination or ending point //! from a specified entity's origin. //! double DstYLon; //========================================================= //! DstZAlt
//! The Altitude of the destination or ending point OR
//! The Z axis offset of the destination or ending point //! from a specified entity's origin. //! double DstZAlt; //========================================================= //! Mask
//! The material mask. //! Cigi_uint32 Mask; //========================================================= //! UpdatePeriod
//! The number of frames between each LOS update from //! the IG. If 0 - single shot //! Cigi_uint8 UpdatePeriod; //========================================================= //! DestEntityID
//! If there is a destination entity, this specifies the ID //! of the destination entity. //! Cigi_uint16 DestEntityID; //========================================================= //! ValidV1or2
//! Specifies whether the contained data is in a valid //! format for CIGI 1 or CIGI 2. //! bool ValidV1or2; }; #endif // #if !defined(_CIGI_BASE_LOS_SEG_REQ_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseLosVectReq.h000066400000000000000000000302221210750432300216040ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseLosVectReq.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_LOS_VECT_REQ_INCLUDED_) #define _CIGI_BASE_LOS_VECT_REQ_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_LOS_VECT_REQ_PACKET_ID_V1 43 #define CIGI_LOS_VECT_REQ_PACKET_SIZE_V1 40 #define CIGI_LOS_VECT_REQ_PACKET_ID_V2 43 #define CIGI_LOS_VECT_REQ_PACKET_SIZE_V2 48 #define CIGI_LOS_VECT_REQ_PACKET_ID_V3 26 #define CIGI_LOS_VECT_REQ_PACKET_SIZE_V3 56 #define CIGI_LOS_VECT_REQ_PACKET_ID_V3_2 26 #define CIGI_LOS_VECT_REQ_PACKET_SIZE_V3_2 56 class CigiLosVectReqV1; class CigiLosVectReqV2; class CigiLosVectReqV3; class CigiLosVectReqV3_2; class CIGI_SPEC CigiBaseLosVectReq : public CigiBasePacket { friend class CigiLosVectReqV1; friend class CigiLosVectReqV2; friend class CigiLosVectReqV3; friend class CigiLosVectReqV3_2; public: //========================================================= //! The enumeration for the CigiBaseLosVectReq Group //! enum ReqTypeGrp { Basic=0, Extended=1 }; //========================================================= //! The enumeration for the CigiBaseLosVectReq Group //! enum CoordSysGrp { Geodetic=0, Entity=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseLosVectReq(); //========================================================= //! General Destructor //! virtual ~CigiBaseLosVectReq(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> LosID //========================================================= //! Sets the LosID with bound checking control //! \param LosIDIn - Line Of Sight ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLosID(const Cigi_uint16 LosIDIn, bool bndchk=true) { LosID = LosIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LosID value. //! \return the current LosID. Cigi_uint16 GetLosID(void) const { return(LosID); } //+> VectEl //========================================================= //! Sets the VectEl with bound checking control //! \param VectElIn - Vector Elevation //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVectEl(const float VectElIn, bool bndchk=true); //========================================================= //! Gets the VectEl value. //! \return the current VectEl. float GetVectEl(void) const { return(VectEl); } //+> MaxRange //========================================================= //! Sets the MaxRange with bound checking control //! \param MaxRangeIn - Maximum range of the vector //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaxRange(const float MaxRangeIn, bool bndchk=true) { MaxRange = MaxRangeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the MaxRange value. //! \return the current MaxRange. float GetMaxRange(void) const { return(MaxRange); } //+> SrcLat //========================================================= //! Sets the SrcLat with bound checking control //! \param SrcLatIn - Source or Starting Point Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcLat(const double SrcLatIn, bool bndchk=true); //========================================================= //! Gets the SrcLat value. //! \return the current SrcLat. double GetSrcLat(void) const { return(SrcXLat); } //+> SrcLon //========================================================= //! Sets the SrcLon with bound checking control //! \param SrcLonIn - Source or Starting Point Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcLon(const double SrcLonIn, bool bndchk=true); //========================================================= //! Gets the SrcLon value. //! \return the current SrcLon. double GetSrcLon(void) const { return(SrcYLon); } //+> SrcAlt //========================================================= //! Sets the SrcAlt with bound checking control //! \param SrcAltIn - Source or Starting Point Altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcAlt(const double SrcAltIn, bool bndchk=true) { SrcZAlt = SrcAltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcAlt value. //! \return the current SrcAlt. double GetSrcAlt(void) const { return(SrcZAlt); } protected: //==> Member variables //========================================================= //! LosID
//! Line Of Sight ID //! Cigi_uint16 LosID; //========================================================= //! ReqType
//! 0-Basic
//! 1-Extended //! Requests a specific type of result //! ReqTypeGrp ReqType; //========================================================= //! SrcCoordSys
//! 0-Geodetic
//! 1-Entity //! The Coordinate system of the source or starting point. //! CoordSysGrp SrcCoordSys; //========================================================= //! ResponseCoordSys
//! 0-Geodetic
//! 1-Entity //! The Coordinate system of the response intersection point. //! CoordSysGrp ResponseCoordSys; //========================================================= //! AlphaThresh
//! The Lowest Alpha level that will cause a response //! Cigi_uint8 AlphaThresh; //========================================================= //! EntityID
//! The ID of the originating entity. //! Cigi_uint16 EntityID; //========================================================= //! VectAz
//! The Azimuth angle of the LOS vector //! float VectAz; //========================================================= //! VectEl
//! The Elevation angle of the LOS vector //! float VectEl; //========================================================= //! MinRange
//! The Minimum range of the LOS vector that will cause //! an intersection response. //! float MinRange; //========================================================= //! MaxRange
//! The Maximum range of the LOS vector. //! float MaxRange; //========================================================= //! SrcLat
//! The latitude of the starting or source point. //! OR //! The offset of the starting or source point //! along the X axis of the originating entity. //! double SrcXLat; //========================================================= //! SrcLon
//! The longitude of the starting or source point. //! OR //! The offset of the starting or source point //! along the Y axis of the originating entity. //! double SrcYLon; //========================================================= //! SrcAlt
//! The altitude of the starting or source point //! OR //! The offset of the starting or source point //! along the Z axis of the originating entity. //! double SrcZAlt; //========================================================= //! Mask
//! The mask to specify which materials cause a response to //! be generated when intersected. //! Cigi_uint32 Mask; //========================================================= //! UpdatePeriod
//! The number of frames between each LOS update from //! the IG. If 0 - single shot //! Cigi_uint8 UpdatePeriod; //========================================================= //! ValidV1or2
//! Flag specifying the data is valid for CIGI version 1 or 2 //! bool ValidV1or2; }; #endif // #if !defined(_CIGI_BASE_LOS_VECT_REQ_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseMaritimeSurfaceCtrl.h000066400000000000000000000251111210750432300234630ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseMaritimeSurfaceCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_MARITIME_SURFACE_CTRL_INCLUDED_) #define _CIGI_BASE_MARITIME_SURFACE_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3 13 #define CIGI_MARITIME_SURFACE_CTRL_PACKET_SIZE_V3 24 class CigiMaritimeSurfaceCtrlV3; class CIGI_SPEC CigiBaseMaritimeSurfaceCtrl : public CigiBasePacket { friend class CigiMaritimeSurfaceCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseMaritimeSurfaceCtrl Group //! enum ScopeGrp { Global=0, Regional=1, Entity=2 }; //==> Management //========================================================= //! General Constructor //! CigiBaseMaritimeSurfaceCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseMaritimeSurfaceCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityRgnID //========================================================= //! Sets the EntityRgnID with bound checking control //! \param EntityRgnIDIn - Entity or Region ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityRgnID(const Cigi_uint16 EntityRgnIDIn, bool bndchk=true) { EntityRgnID = EntityRgnIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityRgnID value. //! \return the current EntityRgnID. Cigi_uint16 GetEntityRgnID(void) const { return(EntityRgnID); } //+> SurfaceCondEn //========================================================= //! Sets the SurfaceCondEn with bound checking control //! \param SurfaceCondEnIn - Surface conditions enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceCondEn(const bool SurfaceCondEnIn, bool bndchk=true) { SurfaceCondEn = SurfaceCondEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceCondEn value. //! \return the current SurfaceCondEn. bool GetSurfaceCondEn(void) const { return(SurfaceCondEn); } //+> WhitecapEn //========================================================= //! Sets the WhitecapEn with bound checking control //! \param WhitecapEnIn - Whitecap enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWhitecapEn(const bool WhitecapEnIn, bool bndchk=true) { WhitecapEn = WhitecapEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WhitecapEn value. //! \return the current WhitecapEn. bool GetWhitecapEn(void) const { return(WhitecapEn); } //+> Scope //========================================================= //! Sets the Scope with bound checking control //! \param ScopeIn - Scope of effect
//! Global=0
//! Regional=1
//! Entity=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScope(const ScopeGrp ScopeIn, bool bndchk=true); //========================================================= //! Gets the Scope value. //! \return the current Scope. ScopeGrp GetScope(void) const { return(Scope); } //+> SurfaceHeight //========================================================= //! Sets the SurfaceHeight with bound checking control //! \param SurfaceHeightIn - Sea surface height //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceHeight(const float SurfaceHeightIn, bool bndchk=true) { SurfaceHeight = SurfaceHeightIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceHeight value. //! \return the current SurfaceHeight. float GetSurfaceHeight(void) const { return(SurfaceHeight); } //+> WaterTemp //========================================================= //! Sets the WaterTemp with bound checking control //! \param WaterTempIn - Sea surface water temperature //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWaterTemp(const float WaterTempIn, bool bndchk=true) { WaterTemp = WaterTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WaterTemp value. //! \return the current WaterTemp. float GetWaterTemp(void) const { return(WaterTemp); } //+> Clarity //========================================================= //! Sets the Clarity with bound checking control //! \param ClarityIn - Sea surface clarity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetClarity(const float ClarityIn, bool bndchk=true); //========================================================= //! Gets the Clarity value. //! \return the current Clarity. float GetClarity(void) const { return(Clarity); } protected: //==> Member variables //========================================================= //! EntityRgnID
//! Entity or Region ID //! Cigi_uint16 EntityRgnID; //========================================================= //! SurfaceCondEn
//! Sea Surface Conditions enable //! bool SurfaceCondEn; //========================================================= //! WhitecapEn
//! Whitecaps enable //! bool WhitecapEn; //========================================================= //! Scope
//! Scope of effect //! 0-Global
//! 1-Regional
//! 2-Entity //! //! ScopeGrp Scope; //========================================================= //! SurfaceHeight
//! Sea surface height //! float SurfaceHeight; //========================================================= //! WaterTemp
//! Sea surface water temperature //! float WaterTemp; //========================================================= //! Clarity
//! Sea surface water percentage clarity //! float Clarity; }; #endif // #if !defined(_CIGI_BASE_MARITIME_SURFACE_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseMaritimeSurfaceResp.h000066400000000000000000000172071210750432300234770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseMaritimeSurfaceResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_MARITIME_SURFACE_RESP_INCLUDED_) #define _CIGI_BASE_MARITIME_SURFACE_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3 111 #define CIGI_MARITIME_SURFACE_RESP_PACKET_SIZE_V3 16 class CigiMaritimeSurfaceRespV3; class CIGI_SPEC CigiBaseMaritimeSurfaceResp : public CigiBasePacket { friend class CigiMaritimeSurfaceRespV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseMaritimeSurfaceResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseMaritimeSurfaceResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> RequestID //========================================================= //! Sets the RequestID with bound checking control //! \param RequestIDIn - Request ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRequestID(const Cigi_uint8 RequestIDIn, bool bndchk=true) { RequestID = RequestIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RequestID value. //! \return the current RequestID. Cigi_uint8 GetRequestID(void) const { return(RequestID); } //+> SurfaceHeight //========================================================= //! Sets the SurfaceHeight with bound checking control //! \param SurfaceHeightIn - Sea Surface Height //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceHeight(const float SurfaceHeightIn, bool bndchk=true) { SurfaceHeight = SurfaceHeightIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceHeight value. //! \return the current SurfaceHeight. float GetSurfaceHeight(void) const { return(SurfaceHeight); } //+> WaterTemp //========================================================= //! Sets the WaterTemp with bound checking control //! \param WaterTempIn - Surface Water Termperature //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWaterTemp(const float WaterTempIn, bool bndchk=true) { WaterTemp = WaterTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WaterTemp value. //! \return the current WaterTemp. float GetWaterTemp(void) const { return(WaterTemp); } //+> Clarity //========================================================= //! Sets the Clarity with bound checking control //! \param ClarityIn - Surface Clarity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetClarity(const float ClarityIn, bool bndchk=true); //========================================================= //! Gets the Clarity value. //! \return the current Clarity. float GetClarity(void) const { return(Clarity); } protected: //==> Member variables //========================================================= //! RequestID
//! Request ID //! Cigi_uint8 RequestID; //========================================================= //! SurfaceHeight
//! Sea Surface Height //! float SurfaceHeight; //========================================================= //! WaterTemp
//! Surface Water Termperature //! float WaterTemp; //========================================================= //! Clarity
//! Surface Clarity //! float Clarity; }; #endif // #if !defined(_CIGI_BASE_MARITIME_SURFACE_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseMotionTrackCtrl.h000066400000000000000000000326101210750432300226370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseMotionTrackCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_MOTION_TRACK_CTRL_INCLUDED_) #define _CIGI_BASE_MOTION_TRACK_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3 18 #define CIGI_MOTION_TRACK_CTRL_PACKET_SIZE_V3 8 class CigiMotionTrackCtrlV1; class CigiMotionTrackCtrlV2; class CigiMotionTrackCtrlV3; class CIGI_SPEC CigiBaseMotionTrackCtrl : public CigiBasePacket { friend class CigiMotionTrackCtrlV1; friend class CigiMotionTrackCtrlV2; friend class CigiMotionTrackCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseMotionTrackCtrl Group //! enum ScopeGrp { View=0, ViewGrp=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseMotionTrackCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseMotionTrackCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - View or View Group ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { ViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> TrackerID //========================================================= //! Sets the TrackerID with bound checking control //! \param TrackerIDIn - Tracker ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackerID(const Cigi_uint8 TrackerIDIn, bool bndchk=true) { TrackerID = TrackerIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the TrackerID value. //! \return the current TrackerID. Cigi_uint8 GetTrackerID(void) const { return(TrackerID); } //+> TrackEn //========================================================= //! Sets the TrackEn with bound checking control //! \param TrackerEnIn - Tracker enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackerEn(const bool TrackerEnIn, bool bndchk=true) { TrackerEn = TrackerEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the TrackEn value. //! \return the current TrackEn. bool GetTrackerEn(void) const { return(TrackerEn); } //+> BoresightEn //========================================================= //! Sets the BoresightEn with bound checking control //! \param BoresightEnIn - Boresight enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBoresightEn(const bool BoresightEnIn, bool bndchk=true) { BoresightEn = BoresightEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the BoresightEn value. //! \return the current BoresightEn. bool GetBoresightEn(void) const { return(BoresightEn); } //+> XEn //========================================================= //! Sets the XEn with bound checking control //! \param XEnIn - X axis measurement enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXEn(const bool XEnIn, bool bndchk=true) { XEn = XEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XEn value. //! \return the current XEn. bool GetXEn(void) const { return(XEn); } //+> YEn //========================================================= //! Sets the YEn with bound checking control //! \param YEnIn - Y axis measurement enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYEn(const bool YEnIn, bool bndchk=true) { YEn = YEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YEn value. //! \return the current YEn. bool GetYEn(void) const { return(YEn); } //+> ZEn //========================================================= //! Sets the ZEn with bound checking control //! \param ZEnIn - Z axis measurement enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZEn(const bool ZEnIn, bool bndchk=true) { ZEn = ZEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZEn value. //! \return the current ZEn. bool GetZEn(void) const { return(ZEn); } //+> RollEn //========================================================= //! Sets the RollEn with bound checking control //! \param RollEnIn - Roll measurement enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRollEn(const bool RollEnIn, bool bndchk=true) { RollEn = RollEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RollEn value. //! \return the current RollEn. bool GetRollEn(void) const { return(RollEn); } //+> PitchEn //========================================================= //! Sets the PitchEn with bound checking control //! \param PitchEnIn - Pitch measurement enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitchEn(const bool PitchEnIn, bool bndchk=true) { PitchEn = PitchEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the PitchEn value. //! \return the current PitchEn. bool GetPitchEn(void) const { return(PitchEn); } //+> YawEn //========================================================= //! Sets the YawEn with bound checking control //! \param YawEnIn - Yaw measurement enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYawEn(const bool YawEnIn, bool bndchk=true) { YawEn = YawEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YawEn value. //! \return the current YawEn. bool GetYawEn(void) const { return(YawEn); } //+> Scope //========================================================= //! Sets the Scope with bound checking control //! \param ScopeIn - Scope of effect
//! View=0
//! ViewGrp=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScope(const ScopeGrp ScopeIn, bool bndchk=true); //========================================================= //! Gets the Scope value. //! \return the current Scope. ScopeGrp GetScope(void) const { return(Scope); } protected: //==> Member variables //========================================================= //! ViewID
//! View or View Group ID //! Cigi_uint16 ViewID; //========================================================= //! TrackerID
//! Tracker ID //! Cigi_uint8 TrackerID; //========================================================= //! TrackerEn
//! Tracker enable //! bool TrackerEn; //========================================================= //! BoresightEn
//! Boresight enable //! bool BoresightEn; //========================================================= //! XEn
//! X axis measurement enable //! bool XEn; //========================================================= //! YEn
//! Y axis measurement enable //! bool YEn; //========================================================= //! ZEn
//! Z axis measurement enable //! bool ZEn; //========================================================= //! RollEn
//! Roll measurement enable //! bool RollEn; //========================================================= //! PitchEn
//! Pitch measurement enable //! bool PitchEn; //========================================================= //! YawEn
//! Yaw measurement enable //! bool YawEn; //========================================================= //! Scope
//! Scope of effect
//! 0-View
//! 1-ViewGrp //! //! ScopeGrp Scope; }; #endif // #if !defined(_CIGI_BASE_MOTION_TRACK_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBasePacket.h000066400000000000000000000136571210750432300210010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBasePacket.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the type of the Version member variable from int to Cigi_uint8.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the MinorVersion member variable.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the GetMinorVersion method for accessing the minor version.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_PACKET_INCLUDED_) #define _CIGI_BASE_PACKET_INCLUDED_ #include "CigiTypes.h" #include "CigiErrorCodes.h" #include "CigiCnvtInfoType.h" #include "CigiVersionID.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBasePacket { public: //========================================================= //! General Destructor //! virtual ~CigiBasePacket() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. Most packets will have there own GetCnvt member //! function. User Defined packets usually do not need their //! own GetCnvt member function and can use this general one. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = PacketID; return(CIGI_SUCCESS); } //========================================================= //! Gets the packet id. //! \return The packet id. //! Cigi_uint8 GetPacketID(void) const { return(PacketID); } //========================================================= //! Gets the size of the packet. //! \return The size in bytes of the packet. //! Cigi_uint8 GetPacketSize(void) const { return(PacketSize); } //========================================================= //! Gets the CIGI version of this packet. //! \return The CIGI version of this packet. //! Cigi_uint8 GetVersion(void) const { return(Version); } //========================================================= //! Gets the CIGI minor version of this packet. //! \return The CIGI minor version of this packet. //! Cigi_uint8 GetMinorVersion(void) const { return(MinorVersion); } protected: //========================================================= //! Packet ID or Opcode //! Cigi_uint8 PacketID; //========================================================= //! Packet size in bytes //! Cigi_uint8 PacketSize; //========================================================= //! CIGI version of this packet //! Cigi_uint8 Version; //========================================================= //! CIGI minor version of this packet //! Cigi_uint8 MinorVersion; }; #endif // !defined(_CIGI_BASE_PACKET_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBasePositionReq.h000066400000000000000000000232221210750432300220330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBasePositionReq.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_POSITION_REQ_INCLUDED_) #define _CIGI_BASE_POSITION_REQ_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_POSITION_REQ_PACKET_ID_V3 27 #define CIGI_POSITION_REQ_PACKET_SIZE_V3 8 class CigiPositionReqV1; class CigiPositionReqV2; class CigiPositionReqV3; class CIGI_SPEC CigiBasePositionReq : public CigiBasePacket { friend class CigiPositionReqV1; friend class CigiPositionReqV2; friend class CigiPositionReqV3; public: //========================================================= //! The enumeration for the CigiBasePositionReq Group //! enum UpdateModeGrp { OneShot=0, Continuous=1 }; //========================================================= //! The enumeration for the CigiBasePositionReq Group //! enum ObjectClassGrp { Entity=0, ArtPart=1, View=2, ViewGrp=3, MotionTracker=4 }; //========================================================= //! The enumeration for the CigiBasePositionReq Group //! enum CoordSysGrp { Geodetic=0, ParentEntity=1, Submodel=2 }; //==> Management //========================================================= //! General Constructor //! CigiBasePositionReq(); //========================================================= //! General Destructor //! virtual ~CigiBasePositionReq(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ObjectID //========================================================= //! Sets the ObjectID with bound checking control //! \param ObjectIDIn - Object ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetObjectID(const Cigi_uint16 ObjectIDIn, bool bndchk=true) { ObjectID = ObjectIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ObjectID value. //! \return the current ObjectID. Cigi_uint16 GetObjectID(void) const { return(ObjectID); } //+> ArtPartID //========================================================= //! Sets the ArtPartID with bound checking control //! \param ArtPartIDIn - Articulated Part ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk=true) { ArtPartID = ArtPartIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPartID value. //! \return the current ArtPartID. Cigi_uint8 GetArtPartID(void) const { return(ArtPartID); } //+> UpdateMode //========================================================= //! Sets the UpdateMode with bound checking control //! \param UpdateModeIn - Update mode
//! OneShot=0
//! Continuous=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetUpdateMode(const UpdateModeGrp UpdateModeIn, bool bndchk=true); //========================================================= //! Gets the UpdateMode value. //! \return the current UpdateMode. UpdateModeGrp GetUpdateMode(void) const { return(UpdateMode); } //+> ObjectClass //========================================================= //! Sets the ObjectClass with bound checking control //! \param ObjectClassIn - Type of Object
//! Entity=0
//! ArtPart=1
//! View=3
//! ViewGrp=4
//! MotionTracker=5
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetObjectClass(const ObjectClassGrp ObjectClassIn, bool bndchk=true); //========================================================= //! Gets the ObjectClass value. //! \return the current ObjectClass. ObjectClassGrp GetObjectClass(void) const { return(ObjectClass); } //+> CoordSys //========================================================= //! Sets the CoordSys with bound checking control //! \param CoordSysIn - Coordinate system used
//! Geodetic=0
//! ParentEntity=1
//! Submodel=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk=true); //========================================================= //! Gets the CoordSys value. //! \return the current CoordSys. CoordSysGrp GetCoordSys(void) const { return(CoordSys); } protected: //==> Member variables //========================================================= //! ObjectID
//! Object ID //! Cigi_uint16 ObjectID; //========================================================= //! ArtPartID
//! Articulated Part ID //! Cigi_uint8 ArtPartID; //========================================================= //! UpdateMode
//! Update mode
//! 0-OneShot
//! 1-Continuous //! //! UpdateModeGrp UpdateMode; //========================================================= //! ObjectClass
//! Type of object
//! 0-Entity
//! 1-ArtPart
//! 3-View
//! 4-ViewGrp
//! 5-MotionTracker //! //! ObjectClassGrp ObjectClass; //========================================================= //! CoordSys
//! Coordinate System used. //! 0-Geodetic
//! 1-ParentEntity
//! 2-Submodel //! //! CoordSysGrp CoordSys; }; #endif // #if !defined(_CIGI_BASE_POSITION_REQ_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBasePositionResp.h000066400000000000000000000321301210750432300222130ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBasePositionResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_POSITION_RESP_INCLUDED_) #define _CIGI_BASE_POSITION_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_POSITION_RESP_PACKET_ID_V3 108 #define CIGI_POSITION_RESP_PACKET_SIZE_V3 48 class CigiPositionRespV1; class CigiPositionRespV2; class CigiPositionRespV3; class CIGI_SPEC CigiBasePositionResp : public CigiBasePacket { friend class CigiPositionRespV1; friend class CigiPositionRespV2; friend class CigiPositionRespV3; public: //========================================================= //! The enumeration for the CigiBasePositionResp Group //! enum ObjectClassGrp { Entity=0, ArtPart=1, View=2, ViewGrp=3, MotionTracker=4 }; //========================================================= //! The enumeration for the CigiBasePositionResp Group //! enum CoordSysGrp { Geodetic=0, ParentEntity=1, Submodel=2 }; //==> Management //========================================================= //! General Constructor //! CigiBasePositionResp(); //========================================================= //! General Destructor //! virtual ~CigiBasePositionResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ObjectID //========================================================= //! Sets the ObjectID with bound checking control //! \param ObjectIDIn - Object ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetObjectID(const Cigi_uint16 ObjectIDIn, bool bndchk=true) { ObjectID = ObjectIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ObjectID value. //! \return the current ObjectID. Cigi_uint16 GetObjectID(void) const { return(ObjectID); } //+> ArtPartID //========================================================= //! Sets the ArtPartID with bound checking control //! \param ArtPartIDIn - Articulated Part ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk=true) { ArtPartID = ArtPartIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPartID value. //! \return the current ArtPartID. Cigi_uint8 GetArtPartID(void) const { return(ArtPartID); } //+> ObjectClass //========================================================= //! Sets the ObjectClass with bound checking control //! \param ObjectClassIn - Type of referance object
//! Entity=0
//! ArtPart=1
//! View=2
//! ViewGrp=3
//! MotionTracker=4
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetObjectClass(const ObjectClassGrp ObjectClassIn, bool bndchk=true); //========================================================= //! Gets the ObjectClass value. //! \return the current ObjectClass. ObjectClassGrp GetObjectClass(void) const { return(ObjectClass); } //+> CoordSys //========================================================= //! Sets the CoordSys with bound checking control //! \param CoordSysIn - The coordinate system in which the //! result data is presented.
//! Geodetic=0
//! ParentEntity=1
//! Submodel=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk=true); //========================================================= //! Gets the CoordSys value. //! \return the current CoordSys. CoordSysGrp GetCoordSys(void) const { return(CoordSys); } //+> LatOrXoff //========================================================= //! Sets the LatOrXoff with bound checking control //! \param LatOrXoffIn - Latitude or X offset //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLatOrXoff(const double LatOrXoffIn, bool bndchk=true) { LatOrXoff = LatOrXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LatOrXoff value. //! \return the current LatOrXoff. double GetLatOrXoff(void) const { return(LatOrXoff); } //+> LonOrYoff //========================================================= //! Sets the LonOrYoff with bound checking control //! \param LonOrYoffIn - Longitude or Y offset //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLonOrYoff(const double LonOrYoffIn, bool bndchk=true) { LonOrYoff = LonOrYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LonOrYoff value. //! \return the current LonOrYoff. double GetLonOrYoff(void) const { return(LonOrYoff); } //+> AltOrZoff //========================================================= //! Sets the AltOrZoff with bound checking control //! \param AltOrZoffIn - Altitude or Z offset //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAltOrZoff(const double AltOrZoffIn, bool bndchk=true) { AltOrZoff = AltOrZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AltOrZoff value. //! \return the current AltOrZoff. double GetAltOrZoff(void) const { return(AltOrZoff); } //+> Roll //========================================================= //! Sets the Roll with bound checking control //! \param RollIn - Roll //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRoll(const float RollIn, bool bndchk=true); //========================================================= //! Gets the Roll value. //! \return the current Roll. float GetRoll(void) const { return(Roll); } //+> Pitch //========================================================= //! Sets the Pitch with bound checking control //! \param PitchIn - Pitch //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitch(const float PitchIn, bool bndchk=true); //========================================================= //! Gets the Pitch value. //! \return the current Pitch. float GetPitch(void) const { return(Pitch); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - Yaw //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value. //! \return the current Yaw. float GetYaw(void) const { return(Yaw); } protected: //==> Member variables //========================================================= //! ObjectID
//! Object ID //! Cigi_uint16 ObjectID; //========================================================= //! ArtPartID
//! Articulated Part ID //! Cigi_uint8 ArtPartID; //========================================================= //! ObjectClass
//! Type of referance object
//! 0-Entity
//! 1-ArtPart
//! 2-View
//! 3-ViewGrp
//! 4-MotionTracker //! //! ObjectClassGrp ObjectClass; //========================================================= //! CoordSys
//! The coordinate system in which the result data is presented.
//! 0-Geodetic
//! 1-ParentEntity
//! 2-Submodel //! //! CoordSysGrp CoordSys; //========================================================= //! LatOrXoff
//! Latitude or X offset //! double LatOrXoff; //========================================================= //! LonOrYoff
//! Longitude or Y offset //! double LonOrYoff; //========================================================= //! AltOrZoff
//! Altitude or Z offset //! double AltOrZoff; //========================================================= //! Roll
//! float Roll; //========================================================= //! Pitch
//! float Pitch; //========================================================= //! Yaw
//! float Yaw; }; #endif // #if !defined(_CIGI_BASE_POSITION_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseRateCtrl.h000066400000000000000000000326341210750432300213060ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseRateCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a forward reference and granted friend access to the 
 *  CigiRateCtrlV3_2 class.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the CoordSys member variable to indicate which coordinate system 
 *  rates are applied to.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the CoordSysGrp enumeration for the CigiBaseLosSegReq group.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_RATE_CTRL_INCLUDED_) #define _CIGI_BASE_RATE_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_RATE_CTRL_PACKET_ID_V1 5 #define CIGI_RATE_CTRL_PACKET_SIZE_V1 32 #define CIGI_RATE_CTRL_PACKET_ID_V2 5 #define CIGI_RATE_CTRL_PACKET_SIZE_V2 32 #define CIGI_RATE_CTRL_PACKET_ID_V3 8 #define CIGI_RATE_CTRL_PACKET_SIZE_V3 32 #define CIGI_RATE_CTRL_PACKET_ID_V3_2 8 #define CIGI_RATE_CTRL_PACKET_SIZE_V3_2 32 class CigiRateCtrlV1; class CigiRateCtrlV2; class CigiRateCtrlV3; class CigiRateCtrlV3_2; class CIGI_SPEC CigiBaseRateCtrl : public CigiBasePacket { friend class CigiRateCtrlV1; friend class CigiRateCtrlV2; friend class CigiRateCtrlV3; friend class CigiRateCtrlV3_2; public: //========================================================= //! The enumeration for the CigiBaseLosSegReq Group //! enum CoordSysGrp { World=0, Parent=0, Local=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseRateCtrl() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseRateCtrl() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // V1 & V2 use the same packet id number if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_RATE_CTRL_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_RATE_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Specifies the entity to which this //! packet's data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> XRate //========================================================= //! Sets the XRate with bound checking control //! \param XRateIn - The entity's or art part's X velocity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXRate(const float XRateIn, bool bndchk=true) { XRate = XRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XRate value. //! \return the current XRate. float GetXRate(void) const { return(XRate); } //+> YRate //========================================================= //! Sets the YRate with bound checking control //! \param YRateIn - The entity's or art part's Y velocity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYRate(const float YRateIn, bool bndchk=true) { YRate = YRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YRate value. //! \return the current YRate. float GetYRate(void) const { return(YRate); } //+> ZRate //========================================================= //! Sets the ZRate with bound checking control //! \param ZRateIn - The entity's or art part's Z velocity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZRate(const float ZRateIn, bool bndchk=true) { ZRate = ZRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZRate value. //! \return the current ZRate. float GetZRate(void) const { return(ZRate); } //+> RollRate //========================================================= //! Sets the RollRate with bound checking control //! \param RollRateIn - The entity's or art part's roll rate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRollRate(const float RollRateIn, bool bndchk=true) { RollRate = RollRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RollRate value. //! \return the current RollRate. float GetRollRate(void) const { return(RollRate); } //+> PitchRate //========================================================= //! Sets the PitchRate with bound checking control //! \param PitchRateIn - The entity's or art part's pitch rate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitchRate(const float PitchRateIn, bool bndchk=true) { PitchRate = PitchRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the PitchRate value. //! \return the current PitchRate. float GetPitchRate(void) const { return(PitchRate); } //+> YawRate //========================================================= //! Sets the YawRate with bound checking control //! \param YawRateIn - The entity's or art part's yaw rate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYawRate(const float YawRateIn, bool bndchk=true) { YawRate = YawRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YawRate value. //! \return the current YawRate. float GetYawRate(void) const { return(YawRate); } protected: //==> Member variables //========================================================= //! EntityID
//! Uniquely identifies the specific entity. //! Cigi_uint16 EntityID; //========================================================= //! ArtPartIDV1
//! The Unique ID for an articulated part of a specific entity.
//! If -1 - This data is applied to the Entity.
//! If any other value - This data is applied to the articulated part. //! Cigi_int8 ArtPartIDV1; //========================================================= //! ArtPartIDV3
//! The Unique ID for an articulated part of a specific entity.
//! Cigi_uint8 ArtPartIDV3; //========================================================= //! ApplyToArtPart
//! Flag specifying whether this is applied to an entity //! or an articulated part.
//! true - Applied to the articulated part. //! false - Applied to the entity. //! bool ApplyToArtPart; //========================================================= //! ArtPartIDV3
//! The Coordinate system in which the rates are applied.
//! 0-World/Parent
//! 1-Local //! CoordSysGrp CoordSys; //========================================================= //! XRate
//! The meters per second velocity along the X axis.
//! For an entity - The Geodetic surface NED X axis.
//! For an art part - The host entity's body X axis. //! float XRate; //========================================================= //! YRate
//! The meters per second velocity along the Y axis.
//! For an entity - The Geodetic surface NED Y axis.
//! For an art part - The host entity's body Y axis. //! float YRate; //========================================================= //! ZRate
//! The meters per second velocity along the Z axis.
//! For an entity - The Geodetic surface NED Z axis.
//! For an art part - The host entity's body Z axis. //! float ZRate; //========================================================= //! RollRate
//! The degrees per second velocity about the X axis.
//! For an entity - The Geodetic surface NED pitch and //! yaw rotated X axis.
//! For an art part - The host entity's body X axis. //! float RollRate; //========================================================= //! PitchRate
//! The degrees per second velocity about the Y axis.
//! For an entity - The Geodetic surface NED yaw rotated Y axis.
//! For an art part - The host entity's body Y axis. //! float PitchRate; //========================================================= //! YawRate
//! The degrees per second velocity about the Z axis.
//! For an entity - The Geodetic surface NED Z axis.
//! For an art part - The host entity's body Z axis. //! float YawRate; }; #endif // #if !defined(_CIGI_BASE_RATE_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSOF.h000066400000000000000000000276461210750432300202240ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiBaseSOF.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the
 *  class in a Windows DLL.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the return type from unsigned char to char for the GetDatabaseID
 *  method. Changed the DataBaseIDIn parameter type from const unsigned char to
 *  const char in the SetDatabaseID method. Changed the DatabaseID member
 *  variable type from unsigned char to char.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a forward reference and granted friend access to the
 *  CigiSOFV3_2 class.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the LastRcvdHostFrame member variable to specify the last host frame
 *  received.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SOF_INCLUDED_) #define _CIGI_BASE_SOF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SOF_PACKET_ID_V1 101 #define CIGI_SOF_PACKET_SIZE_V1 12 #define CIGI_SOF_PACKET_ID_V2 101 #define CIGI_SOF_PACKET_SIZE_V2 16 #define CIGI_SOF_PACKET_ID_V3 101 #define CIGI_SOF_PACKET_SIZE_V3 16 #define CIGI_SOF_PACKET_ID_V3_2 101 #define CIGI_SOF_PACKET_SIZE_V3_2 24 class CigiSOFV1; class CigiSOFV2; class CigiSOFV3; class CigiSOFV3_2; //========================================================= //! The class for the Start Of Frame packet for CIGI //! class CIGI_SPEC CigiBaseSOF : public CigiBasePacket { friend class CigiSOFV1; friend class CigiSOFV2; friend class CigiSOFV3; friend class CigiSOFV3_2; public: //========================================================= //! The enumeration for the IG Mode flag //! enum IGModeGrp { Reset=0, Standby=0, Operate=1, debug=2, OfflineMaint=3 }; //========================================================= //! The enumeration for the Earth Referance Model flag //! enum EarthRefModelGrp { WGS84=0, HostDefined=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSOF(); //========================================================= //! General Destructor //! virtual ~CigiBaseSOF(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Swap //========================================================= //! Gets the Swap required flag
//! This is used for V3 to determine if automated swapping //! is required. //! \return This returns the Swap flag
//! If true, this signals that byte swapping is required //! for V3 packets. //! bool GetSwap(void) const { return(BSwapEn); } //+> Database ID //========================================================= //! Gets the Database ID value //! \return DatabaseID - uniquely identifies the specific database //! Cigi_int8 GetDatabaseID(void) const { return(DatabaseID); } //========================================================= //! Sets the Database ID with bound checking control //! \param DataBaseIDIn - Specifies a new database to load.
//! 0 - No Action //! All Other Values - Load the specified database //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetDatabaseID(const Cigi_int8 DataBaseIDIn, bool bndchk=true) { DatabaseID = DataBaseIDIn; return(CIGI_SUCCESS); } //+> Frame Counter //========================================================= //! Gets the Frame Counter value //! \return Current frame this data represents //! Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; return(CIGI_SUCCESS); } //+> IG Mode //========================================================= //! Gets the IG Mode value //! \return IGMode specifying the commanded IG mode.
//! 0 - Reset or Standby
//! 1 - Operate
//! 2 - debug
//! 3 - Offline Maintenance //! IGModeGrp GetIGMode(void) const { return(IGMode); } //========================================================= //! Sets the IG Mode with bound checking control //! \param IGModeIn - Specifies the commanded IG mode.
//! 0 - Reset or Standby
//! 1 - Operate
//! 2 - debug
//! 3 - Offline Maintenance
//! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetIGMode(IGModeGrp IGModeIn, bool bndchk=true); //+> IG Status //========================================================= //! Gets the IG Mode value //! \return IGStatus specifying the IG status.
//! 0 - Normal Operation
//! All Other Values - IG System defined
//! Cigi_uint8 GetIGStatus(void) const { return(IGStatus); } //========================================================= //! Sets the IG Mode with bound checking control //! \param IGStatusIn - Specifies the IG status.
//! 0 - Normal Operation
//! All Other Values - IG System defined
//! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetIGStatus(Cigi_uint8 IGStatusIn, bool bndchk=true) { IGStatus = IGStatusIn; return(CIGI_SUCCESS); } protected: //==> Member variables //========================================================= //! Swap
//! Specifies whether the V3 packets must be byte swapped
//! bool BSwapEn; //========================================================= //! DatabaseID
//! The current Database command
//! -128 - Indicates database is not available.
//! -127 - -1 - Identifies database being loaded.
//! 1 - 127 - Identifies database that is loaded.
//! 0 - Indicates IG controls database loading.
//! All other values - Command to load the specified Database //! Cigi_int8 DatabaseID; //========================================================= //! Swap
//! The current IG Status
//! 0 - Normal Operation
//! All Other Values - IG System defined
//! Cigi_uint8 IGStatus; //========================================================= //! Frame Counter
//! Specifies current frame being processed
//! Cigi_uint32 FrameCntr; //========================================================= //! Last Received Host Frame
//! Specifies the host frame received last
//! Cigi_uint32 LastRcvdHostFrame; //========================================================= //! Time Stamp - V2 format
//! Specifies the time from the beginning of the exercise
//! float TimeStampV2; //========================================================= //! Time Stamp - V3 format
//! Specifies the time from the beginning of the exercise
//! Cigi_uint32 TimeStampV3; //========================================================= //! Byte Swap Constant for V3
//! Constant used to determine if byteswapping is needed //! in V3. //! Cigi_uint16 ByteSwap; //========================================================= //! IG Mode
//! 0 - Reset or Standby
//! 1 - Operate
//! 2 - debug
//! 3 - Offline Maintenance
//! IGModeGrp IGMode; //========================================================= //! Earth Referance Model
//! 0 - WGS84
//! 1 - System Defined
//! EarthRefModelGrp EarthRefModel; //========================================================= //! Timestame Valid
//! true - The timestamp is valid and usable
//! false - The timestamp is not valid. //! bool TimestampValid; }; #endif // !defined(_CIGI_BASE_SOF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSensorCtrl.h000066400000000000000000000370261210750432300216640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSensorCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SENSOR_CTRL_INCLUDED_) #define _CIGI_BASE_SENSOR_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SENSOR_CTRL_PACKET_ID_V1 9 #define CIGI_SENSOR_CTRL_PACKET_SIZE_V1 24 #define CIGI_SENSOR_CTRL_PACKET_ID_V2 9 #define CIGI_SENSOR_CTRL_PACKET_SIZE_V2 24 #define CIGI_SENSOR_CTRL_PACKET_ID_V3 17 #define CIGI_SENSOR_CTRL_PACKET_SIZE_V3 24 class CigiSensorCtrlV1; class CigiSensorCtrlV2; class CigiSensorCtrlV3; class CIGI_SPEC CigiBaseSensorCtrl : public CigiBasePacket { friend class CigiSensorCtrlV1; friend class CigiSensorCtrlV2; friend class CigiSensorCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseSensorCtrl Group //! enum PolarityGrp { WhiteHot=0, BlackHot=1 }; //========================================================= //! The enumeration for the CigiBaseSensorCtrl Group //! enum TrackModeGrp { TrackOff=0, ForceCorrelate=1, Scene=2, Target=3, Ship=4, TMDefA=5, TMDefB=6, TMDefC=7 }; //========================================================= //! The enumeration for the CigiBaseSensorCtrl Group //! enum TrackPolarityGrp { TrackWhite=0, TrackBlack=1 }; //========================================================= //! The enumeration for the CigiBaseSensorCtrl Group //! enum ResponseTypeGrp { GatePos=0, GateAndTargetPos=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSensorCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseSensorCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SensorID //========================================================= //! Sets the SensorID with bound checking control //! \param SensorIDIn - The unique id identifying the specific //! sensor that this packet is being applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSensorID(const Cigi_uint8 SensorIDIn, bool bndchk=true) { SensorID = SensorIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SensorID value. //! \return the current SensorID. Cigi_uint8 GetSensorID(void) const { return(SensorID); } //+> SensorOn //========================================================= //! Sets the SensorOn with bound checking control //! \param SensorOnIn - Specifies whether the sensor is on(true) or off(false). //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSensorOn(const bool SensorOnIn, bool bndchk=true) { SensorOn = SensorOnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SensorOn value. //! \return the current SensorOn. bool GetSensorOn(void) const { return(SensorOn); } //+> Polarity //========================================================= //! Sets the Polarity with bound checking control //! \param PolarityIn - Specifies what intesity pole by which //! hot and cold are represented.
//! WhiteHot=0
//! BlackHot=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPolarity(const PolarityGrp PolarityIn, bool bndchk=true); //========================================================= //! Gets the Polarity value. //! \return the current Polarity. PolarityGrp GetPolarity(void) const { return(Polarity); } //+> LineDropEn //========================================================= //! Sets the LineDropEn with bound checking control //! \param LineDropEnIn - Specifies whether the line-by-line //! dropout feature is enabled (true) or disabled (false). //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLineDropEn(const bool LineDropEnIn, bool bndchk=true) { LineDropEn = LineDropEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the LineDropEn value. //! \return the current LineDropEn. bool GetLineDropEn(void) const { return(LineDropEn); } //+> TrackMode //========================================================= //! Sets the TrackMode with bound checking control //! \param TrackModeIn - Specifies in which mode the tracker //! should be currently operating.
//! TrackOff=0
//! ForceCorrelate=1
//! Scene=2
//! Target=3
//! Ship=4
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackMode(const TrackModeGrp TrackModeIn, bool bndchk=true); //========================================================= //! Gets the TrackMode value. //! \return the current TrackMode. TrackModeGrp GetTrackMode(void) const { return(TrackMode); } //+> AutoGainEn //========================================================= //! Sets the AutoGainEn with bound checking control //! \param AutoGainEnIn - Specifies whether the auto gain feature //! is enabled (true) or disabled (false). //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAutoGainEn(const bool AutoGainEnIn, bool bndchk=true) { AutoGainEn = AutoGainEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AutoGainEn value. //! \return the current AutoGainEn. bool GetAutoGainEn(void) const { return(AutoGainEn); } //+> TrackPolarity //========================================================= //! Sets the TrackPolarity with bound checking control //! \param TrackPolarityIn - Specifies whether the sensor should //! track a white or black area.
//! TrackWhite=0
//! TrackBlack=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackPolarity(const TrackPolarityGrp TrackPolarityIn, bool bndchk=true); //========================================================= //! Gets the TrackPolarity value. //! \return the current TrackPolarity. TrackPolarityGrp GetTrackPolarity(void) const { return(TrackPolarity); } //+> Level //========================================================= //! Sets the Level with bound checking control //! \param LevelIn - This specifies the level control of the seeker. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLevel(const float LevelIn, bool bndchk=true); //========================================================= //! Gets the Level value. //! \return the current Level. float GetLevel(void) const { return(Level); } //+> ACCoupling //========================================================= //! Sets the ACCoupling with bound checking control //! \param ACCouplingIn - This specifies the AC Coupling control //! of the seeker. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetACCoupling(const float ACCouplingIn, bool bndchk=true); //========================================================= //! Gets the ACCoupling value. //! \return the current ACCoupling. float GetACCoupling(void) const { return(ACCoupling); } //+> Noise //========================================================= //! Sets the Noise with bound checking control //! \param NoiseIn - This specifies the noise to show in the //! sensor display. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNoise(const float NoiseIn, bool bndchk=true); //========================================================= //! Gets the Noise value. //! \return the current Noise. float GetNoise(void) const { return(Noise); } protected: //==> Member variables //========================================================= //! ViewID
//! Uniquely identifies the view to which this packet is applied. //! Cigi_uint16 ViewID; //========================================================= //! SensorID
//! Uniquely identifies the sensor to which this packet is applied. //! Cigi_uint8 SensorID; //========================================================= //! SensorOn
//! Specifies whether the Sensor is on (true) or off (false). //! bool SensorOn; //========================================================= //! Polarity
//! Specifies what intesity pole by which hot and cold //! are represented.
//! 0-WhiteHot
//! 1-BlackHot //! PolarityGrp Polarity; //========================================================= //! LineDropEn
//! Specifies whether the Line-by-line dropout feature is //! enabled (true) or disabled (false) in the sensor. //! bool LineDropEn; //========================================================= //! TrackMode
//! Specifies the operating mode of the sensor. //! 0-TrackOff
//! 1-ForceCorrelate
//! 2-Scene
//! 3-Target
//! 4-Ship //! TrackModeGrp TrackMode; //========================================================= //! AutoGainEn
//! Specifies whether the autogain feature of the sensor is //! enabled (true) or disabled (false). //! bool AutoGainEn; //========================================================= //! TrackPolarity
//! Specifies whether the sensor is to track a white or black area. //! 0-TrackWhite
//! 1-TrackBlack //! TrackPolarityGrp TrackPolarity; //========================================================= //! ResponseType
//! Specifies the type of response that the IG should send //! back to the host in CIGI 3. //! 0-GatePos
//! 1-GateAndTargetPos //! ResponseTypeGrp ResponseType; //========================================================= //! Gain
//! Specifies the gain control for the sensor. //! (0.0 - 1.0) //! (Note: CIGI 1 values are 0.0 - 100.0: this is converted //! to 0.0 - 1.0 before storing in Gain.) //! float Gain; //========================================================= //! Level
//! Specifies the level control for the sensor. //! (0.0 - 1.0) //! float Level; //========================================================= //! ACCoupling
//! Specifies the AC Coupling control for the sensor. //! (0.0 - 1.0) //! float ACCoupling; //========================================================= //! Noise
//! Specifies the amount of noise that the sensor is receiving. //! (0.0 - 1.0) //! float Noise; }; #endif // #if !defined(_CIGI_BASE_SENSOR_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSensorResp.h000066400000000000000000000267201210750432300216700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSensorResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SENSOR_RESP_INCLUDED_) #define _CIGI_BASE_SENSOR_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SENSOR_RESP_PACKET_ID_V1 105 #define CIGI_SENSOR_RESP_PACKET_SIZE_V1 12 #define CIGI_SENSOR_RESP_PACKET_ID_V2 105 #define CIGI_SENSOR_RESP_PACKET_SIZE_V2 12 #define CIGI_SENSOR_RESP_PACKET_ID_V3 106 #define CIGI_SENSOR_RESP_PACKET_SIZE_V3 24 #define CIGI_SENSOR_XRESP_PACKET_ID_V3 107 #define CIGI_SENSOR_XRESP_PACKET_SIZE_V3 48 class CigiSensorRespV1; class CigiSensorRespV2; class CigiSensorRespV3; class CigiSensorXRespV3; class CIGI_SPEC CigiBaseSensorResp : public CigiBasePacket { friend class CigiSensorRespV1; friend class CigiSensorRespV2; friend class CigiSensorRespV3; friend class CigiSensorXRespV3; public: //========================================================= //! The enumeration for the CigiBaseSensorResp Group //! enum SensorStatGrp { Searching=0, Tracking=1, NearBrakeLock=2, BrakeLock=3 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSensorResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseSensorResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SensorID //========================================================= //! Sets the SensorID with bound checking control //! \param SensorIDIn - Sensor ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSensorID(const Cigi_uint8 SensorIDIn, bool bndchk=true) { SensorID = SensorIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SensorID value. //! \return the current SensorID. Cigi_uint8 GetSensorID(void) const { return(SensorID); } //+> SensorStat //========================================================= //! Sets the SensorStat with bound checking control //! \param SensorStatIn - Sensor State/Status
//! Searching=0
//! Tracking=1
//! NearBrakeLock=2
//! BrakeLock=3
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSensorStat(const SensorStatGrp SensorStatIn, bool bndchk=true); //========================================================= //! Gets the SensorStat value. //! \return the current SensorStat. SensorStatGrp GetSensorStat(void) const { return(SensorStat); } //+> GateSzX //========================================================= //! Sets the GateSzX with bound checking control //! \param GateSzXIn - Gate Size along the X axis //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGateSzX(const Cigi_uint16 GateSzXIn, bool bndchk=true) { GateSzX = GateSzXIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the GateSzX value. //! \return the current GateSzX. Cigi_uint16 GetGateSzX(void) const { return(GateSzX); } //+> GateSzY //========================================================= //! Sets the GateSzY with bound checking control //! \param GateSzYIn - Gate Size along the Y axis //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGateSzY(const Cigi_uint16 GateSzYIn, bool bndchk=true) { GateSzY = GateSzYIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the GateSzY value. //! \return the current GateSzY. Cigi_uint16 GetGateSzY(void) const { return(GateSzY); } //+> GateXoff //========================================================= //! Sets the GateXoff with bound checking control //! \param GateXoffIn - The Gate offset angle along the X axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGateXoff(const float GateXoffIn, bool bndchk=true); //========================================================= //! Gets the GateXoff value. //! \return the current GateXoff. float GetGateXoff(void) const { return(GateXoff); } //+> GateYoff //========================================================= //! Sets the GateYoff with bound checking control //! \param GateYoffIn - The Gate offset angle along the Y axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGateYoff(const float GateYoffIn, bool bndchk=true); //========================================================= //! Gets the GateYoff value. //! \return the current GateYoff. float GetGateYoff(void) const { return(GateYoff); } protected: //==> Member variables //========================================================= //! ViewID
//! The ID of the view currently displaying the sensor scene. //! Cigi_uint16 ViewID; //========================================================= //! SensorID
//! The ID of the sensor being reported. //! Cigi_uint8 SensorID; //========================================================= //! SensorStat
//! Sensor State or Status
//! 0-Searching
//! 1-Tracking
//! 2-NearBrakeLock
//! 3-BrakeLock //! //! SensorStatGrp SensorStat; //========================================================= //! EntityTgt
//! True if an entity is being tracked //! bool EntityTgt; //========================================================= //! EntityID
//! The ID of the entity being tracked //! Cigi_uint16 EntityID; //========================================================= //! GateSzX
//! The size of the gate in pixels along the horizontal //! display axis. //! Cigi_uint16 GateSzX; //========================================================= //! GateSzY
//! The size of the gate in pixels along the vertical //! display axis. //! Cigi_uint16 GateSzY; //========================================================= //! GateXoff
//! The horizontal angle between the view normal and the line //! from the view projection center and the center of the //! gate position. //! float GateXoff; //========================================================= //! GateYoff
//! The horizontal angle between the view normal and the line //! from the view projection center and the center of the //! gate position. //! float GateYoff; //========================================================= //! FrameCntr
//! Frame count //! Cigi_uint32 FrameCntr; //========================================================= //! TrackPntLat
//! The tracked point's Latitude. //! double TrackPntLat; //========================================================= //! TrackPntLon
//! The tracked point's Longitude. //! double TrackPntLon; //========================================================= //! TrackPntAlt
//! The tracked point's altitude. //! double TrackPntAlt; }; #endif // #if !defined(_CIGI_BASE_SENSOR_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseShortArtPartCtrl.h000066400000000000000000000325711210750432300230100ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseShortArtPartCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SHORT_ART_PART_CTRL_INCLUDED_) #define _CIGI_BASE_SHORT_ART_PART_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3 7 #define CIGI_SHORT_ART_PART_CTRL_PACKET_SIZE_V3 16 class CigiShortArtPartCtrlV3; class CigiArtPartCtrlV3; class CIGI_SPEC CigiBaseShortArtPartCtrl : public CigiBasePacket { friend class CigiShortArtPartCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseShortArtPartCtrl Group //! enum DofSelectGrp { NotUsed=0, Xoff=1, Yoff=2, Zoff=3, Yaw=4, Pitch=5, Roll=6 }; //==> Management //========================================================= //! General Constructor //! CigiBaseShortArtPartCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseShortArtPartCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param ArtPartID - The ID of the Articulated Part to //! process. //! \param ArtPart - The Articulated Part Control Packet //! object to fill. //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SpecialConversion(CigiVersionID &CnvtVersion, Cigi_uint8 ArtPartID, CigiArtPartCtrlV3 *ArtPart); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Enitity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> ArtPart1 //========================================================= //! Sets the ArtPart1 with bound checking control //! \param ArtPart1In - Articulated Part 1 ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPart1(const Cigi_uint8 ArtPart1In, bool bndchk=true) { ArtPart1 = ArtPart1In; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPart1 value. //! \return the current ArtPart1. Cigi_uint8 GetArtPart1(void) const { return(ArtPart1); } //+> ArtPart2 //========================================================= //! Sets the ArtPart2 with bound checking control //! \param ArtPart2In - Articulated Part 2 ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPart2(const Cigi_uint8 ArtPart2In, bool bndchk=true) { ArtPart2 = ArtPart2In; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPart2 value. //! \return the current ArtPart2. Cigi_uint8 GetArtPart2(void) const { return(ArtPart2); } //+> DofSelect1 //========================================================= //! Sets the DofSelect1 with bound checking control //! \param DofSelect1In - Dof selection for articulated part 1
//! NotUsed=0
//! Xoff=1
//! Yoff=2
//! Zoff=3
//! Yaw=4
//! Pitch=5
//! Roll=6
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDofSelect1(const DofSelectGrp DofSelect1In, bool bndchk=true); //========================================================= //! Gets the DofSelect1 value. //! \return the current DofSelect1. DofSelectGrp GetDofSelect1(void) const { return(DofSelect1); } //+> DofSelect2 //========================================================= //! Sets the DofSelect2 with bound checking control //! \param DofSelect2In - Dof selection for articulated part 2
//! NotUsed=0
//! Xoff=1
//! Yoff=2
//! Zoff=3
//! Yaw=4
//! Pitch=5
//! Roll=6
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDofSelect2(const DofSelectGrp DofSelect2In, bool bndchk=true); //========================================================= //! Gets the DofSelect2 value. //! \return the current DofSelect2. DofSelectGrp GetDofSelect2(void) const { return(DofSelect2); } //+> ArtPart1En //========================================================= //! Sets the ArtPart1En with bound checking control //! \param ArtPart1EnIn - Articulated part 1 //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPart1En(const bool ArtPart1EnIn, bool bndchk=true) { ArtPart1En = ArtPart1EnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPart1En value. //! \return the current ArtPart1En. bool GetArtPart1En(void) const { return(ArtPart1En); } //+> ArtPart2En //========================================================= //! Sets the ArtPart2En with bound checking control //! \param ArtPart2EnIn - Articulated part 2 //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPart2En(const bool ArtPart2EnIn, bool bndchk=true) { ArtPart2En = ArtPart2EnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ArtPart2En value. //! \return the current ArtPart2En. bool GetArtPart2En(void) const { return(ArtPart2En); } //+> Dof1 //========================================================= //! Sets the Dof1 with bound checking control //! \param Dof1In - Dof value for Articulated part 1 //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDof1(const float Dof1In, bool bndchk=true) { Dof1 = Dof1In; return(CIGI_SUCCESS); } //========================================================= //! Gets the Dof1 value. //! \return the current Dof1. float GetDof1(void) const { return(Dof1); } //+> Dof2 //========================================================= //! Sets the Dof2 with bound checking control //! \param Dof2In - Dof value for Articulated part 2 //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDof2(const float Dof2In, bool bndchk=true) { Dof2 = Dof2In; return(CIGI_SUCCESS); } //========================================================= //! Gets the Dof2 value. //! \return the current Dof2. float GetDof2(void) const { return(Dof2); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! ArtPart1
//! Articulated part 1 ID //! Cigi_uint8 ArtPart1; //========================================================= //! ArtPart2
//! Articulated part 2 ID //! Cigi_uint8 ArtPart2; //========================================================= //! DofSelect1
//! Dof selection for articulated part 1
//! 0-NotUsed
//! 1-Xoff
//! 2-Yoff
//! 3-Zoff
//! 4-Yaw
//! 5-Pitch
//! 6-Roll //! //! DofSelectGrp DofSelect1; //========================================================= //! DofSelect2
//! Dof selection for articulated part 2
//! 0-NotUsed
//! 1-Xoff
//! 2-Yoff
//! 3-Zoff
//! 4-Yaw
//! 5-Pitch
//! 6-Roll //! //! DofSelectGrp DofSelect2; //========================================================= //! ArtPart1En
//! Articulated part 1 enable //! bool ArtPart1En; //========================================================= //! ArtPart2En
//! Articulated part 2 enable //! bool ArtPart2En; //========================================================= //! Dof1
//! Position value for the selected DOF of articulated part 1 //! float Dof1; //========================================================= //! Dof2
//! Position value for the selected DOF of articulated part 2 //! float Dof2; }; #endif // #if !defined(_CIGI_BASE_SHORT_ART_PART_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseShortSymbolCtrl.h000066400000000000000000000457501210750432300227030ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseShortSymbolCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 *  04/03/2008 Greg Basler                       2.1.0
 *  Updated packet id to reflect the ICD.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SHORT_SYMBOL_CTRL_INCLUDED_) #define _CIGI_BASE_SHORT_SYMBOL_CTRL_INCLUDED_ #include "CigiBaseSymbolCtrl.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3 35 #define CIGI_SHORT_SYMBOL_CONTROL_PACKET_SIZE_V3_3 16 class CigiShortSymbolCtrlV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseShortSymbolCtrl : public CigiBasePacket { friend class CigiShortSymbolCtrlV3_3; public: //========================================================= //! The enumeration for the CigiBaseShortSymbolCtrl //! Datum type Group //! enum DatumTypeGrp { None=0, SurfaceIdDatumType=1, ParentIdDatumType=2, LayerDatumType=3, FlashDutyCycleDatumType=4, FlashPeriodDatumType=5, UPositionDatumType=6, VPositionDatumType=7, RotationDatumType=8, ColorDatumType=9, ScaleUDatumType=10, ScaleVDatumType=11 }; //========================================================= //! The union of the types of values that can be used in //! datum parameter //! typedef union DatumUnion { Cigi_uint32 UIntValue; float FloatValue; } DatumUnionType; //==> Management //========================================================= //! General Constructor //! CigiBaseShortSymbolCtrl(void); //========================================================= //! General Destructor //! virtual ~CigiBaseShortSymbolCtrl(void); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SymbolID //========================================================= //! Sets the SymbolID with bound checking control //! \param SymbolIDIn - Specifies the ID number of this symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true) { SymbolID = SymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SymbolID with bound checking control //! \return The ID number of this symbol. //! Cigi_uint16 GetSymbolID(void) const { return(SymbolID); } //+> SymbolState //========================================================= //! Sets the SymbolState with bound checking control //! \param SymbolStateIn - Specifies the commanded state of //! this symbol. (Hidden, Visible, Destroyed) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolState(const CigiBaseSymbolCtrl::SymbolStateGrp SymbolStateIn, bool bndchk=true); //========================================================= //! Gets the SymbolState with bound checking control //! \return The State of this symbol. //! CigiBaseSymbolCtrl::SymbolStateGrp GetSymbolState(void) const { return(SymbolState); } //+> AttachState //========================================================= //! Sets the AttachState with bound checking control //! \param AttachStateIn - Specifies whether this symbol //! is attached to another symbol or is detached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAttachState(const CigiBaseSymbolCtrl::AttachStateGrp AttachStateIn, bool bndchk=true); //========================================================= //! Gets the AttachState with bound checking control //! \return The Attach State of this symbol. //! CigiBaseSymbolCtrl::AttachStateGrp GetAttachState(void) const { return(AttachState); } //+> FlashCtrl //========================================================= //! Sets the FlashCtrl with bound checking control //! \param FlashCtrlIn - Specifies whether the flashing pattern //! of this symbol is continued or is reset. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlashCtrl(const CigiBaseSymbolCtrl::FlashCtrlGrp FlashCtrlIn, bool bndchk=true); //========================================================= //! Gets the FlashCtrl with bound checking control //! \return The Flash Ctrl of this symbol. //! CigiBaseSymbolCtrl::FlashCtrlGrp GetFlashCtrl(void) const { return(FlashCtrl); } //+> InheritColor //========================================================= //! Sets the InheritColor with bound checking control //! \param InheritColorIn - Specifies whether this symbol //! inherits its color from its parent or uses its own color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInheritColor(const CigiBaseSymbolCtrl::InheritColorGrp InheritColorIn, bool bndchk=true); //========================================================= //! Gets the InheritColor with bound checking control //! \return Whether this symbol inherits its color //! from its parent or uses its own color. //! CigiBaseSymbolCtrl::InheritColorGrp GetInheritColor(void) const { return(InheritColor); } //+> Getting Datum Type //========================================================= //! Gets the ID specifying the datum contained in Datum 0 //! \param DatumId - The ID of the Datum being checked (0 or 1) //! //! \return ParentSymbolID DatumTypeGrp GetDatumType(int DatumId) const; //+> Getting Datum //========================================================= //! Gets the unsigned integer value of the specified datum. //! \param DatumId - The ID of the Datum to read (0 or 1) //! //! \return ParentSymbolID Cigi_uint32 GetUIntDatum(int DatumId) const; //========================================================= //! Gets the color value of the specified datum //! \param DatumId - The ID of the Datum to read (0 or 1) //! \param RedValue - The reference to the variable in which //! the value of the red component will be placed //! \param GreenValue - The reference to the variable in which //! the value of the Green component will be placed //! \param BlueValue - The reference to the variable in which //! the value of the Blue component will be placed //! \param AlphaValue - The reference to the variable in which //! the value of the Alpha component will be placed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int GetColorDatum(int DatumId, Cigi_uint8 &RedValue, Cigi_uint8 &GreenValue, Cigi_uint8 &BlueValue, Cigi_uint8 &AlphaValue, bool bndchk=true); //========================================================= //! Gets thefloating point value of the specified datum. //! \param DatumId - The ID or the Datum to read (0 or 1) //! //! \return ParentSymbolID float GetFloatDatum(int DatumId) const; //+> Datum Entries //========================================================= //! Sets the Datum type to "NONE" and zeros the Datum //! with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDatumNone(int DatumId, bool bndchk=true); //========================================================= //! Sets the SurfaceID with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param SurfaceIDIn - The ID number of the surface to which //! this symbol should be attached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceID(int DatumId, const Cigi_uint16 SurfaceIDIn, bool bndchk=true); //========================================================= //! Sets the ParentSymbolID with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param ParentSymbolIDIn - Specifies the ID number of //! this symbol's parent symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetParentSymbolID(int DatumId, const Cigi_uint16 ParentSymbolIDIn, bool bndchk=true); //========================================================= //! Sets the Layer with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param LayerIn - Specifies the ID number of the layer that //! this symbol occupies. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLayer(int DatumId, const Cigi_uint8 LayerIn, bool bndchk=true); //========================================================= //! Sets the FlashDutyCycle with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param FlashDutyCycleIn - Specifies the percentage of time //! that the symbol is visible. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlashDutyCycle(int DatumId, const Cigi_uint8 FlashDutyCycleIn, bool bndchk=true); //========================================================= //! Sets the FlashPeriod with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param FlashPeriodIn - Specifies the amount of time in //! seconds of a full flash cycle. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlashPeriod(int DatumId, const float FlashPeriodIn, bool bndchk=true); //========================================================= //! Sets the UPosition with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param UPositionIn - Specifies the position of the symbol along //! the U axis of the surface's or symbol parent's coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetUPosition(int DatumId, const float UPositionIn, bool bndchk=true); //========================================================= //! Sets the VPosition with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param VPositionIn - Specifies the position of the symbol along //! the V axis of the surface's or symbol parent's coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVPosition(int DatumId, const float VPositionIn, bool bndchk=true); //========================================================= //! Sets the Rotation with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param RotationIn - Specifies how much in degrees that the //! symbol is rotated. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRotation(int DatumId, const float RotationIn, bool bndchk=true); //========================================================= //! Sets the ScaleU with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param ScaleUIn - Specifies the scale to apply to the symbol's //! local coordinate system's U axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScaleU(int DatumId, const float ScaleUIn, bool bndchk=true); //========================================================= //! Sets the ScaleV with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param ScaleVIn - Specifies the scale to apply to the symbol's //! local coordinate system's V axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScaleV(int DatumId, const float ScaleVIn, bool bndchk=true); //+> Color //========================================================= //! Sets the color with bound checking control //! \param DatumId - The ID number of the datum to be set. //! \param RedValue - The reference to the variable in which //! the value of the red component will be placed //! \param GreenValue - The reference to the variable in which //! the value of the Green component will be placed //! \param BlueValue - The reference to the variable in which //! the value of the Blue component will be placed //! \param AlphaValue - The reference to the variable in which //! the value of the Alpha component will be placed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetColor(int DatumId, const Cigi_uint8 RedIn, const Cigi_uint8 GreenIn, const Cigi_uint8 BlueIn, const Cigi_uint8 AlphaIn, bool bndchk=true); protected: //==> Member variables //========================================================= //! SymbolID
//! The ID number of this symbol //! Cigi_uint16 SymbolID; //========================================================= //! SymbolState
//! The commanded state of this symbol.
//! Hidden
//! Visible
//! Destroyed //! CigiBaseSymbolCtrl::SymbolStateGrp SymbolState; //========================================================= //! AttachState
//! Whether this symbol is attached to another symbol. //! CigiBaseSymbolCtrl::AttachStateGrp AttachState; //========================================================= //! FlashCtrl
//! Whether the current flash pattern is continued or restarted. //! CigiBaseSymbolCtrl::FlashCtrlGrp FlashCtrl; //========================================================= //! InheritColor
//! Whether this symbol inherits its color from its parent or //! uses its own color. //! CigiBaseSymbolCtrl::InheritColorGrp InheritColor; //========================================================= //! Datum1Type
//! The type of data in each of the Datum slots //! DatumTypeGrp DatumType[2]; //========================================================= //! ParentSymbolID
//! The variables containing the specific data to be used. //! DatumUnionType Datum[2]; }; #endif // #if !defined(_CIGI_BASE_SHORT_SYMBOL_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSignalProcessing.h000066400000000000000000000614351210750432300230410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSignalProcessing.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/03/2008 Greg Basler                       Version 2.1.0
 *  Fixed the signals and added symbol signals
 *
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SIGNAL_PROCESSING_INCLUDED_) #define _CIGI_BASE_SIGNAL_PROCESSING_INCLUDED_ #include "CigiBasePacket.h" //========================================================= //! The base class for processing incoming packets using a //! signal processing class. //! class CIGI_SPEC CigiBaseSignalProcessing { public: //==> Management //========================================================= //! General Constructor //! CigiBaseSignalProcessing() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseSignalProcessing() { }; //==> Incoming Packet Processing Functions //==+> Host to IG //========================================================= //! OnIGCtrl
//! A base function to process incoming IG control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnIGCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnArtPartCtrl
//! A base function to process incoming Articulated Part Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnArtPartCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnAtmosCtrl
//! A base function to process incoming Atmosphere Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnAtmosCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnCelestialCtrl
//! A base function to process incoming Celestial Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnCelestialCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnCollDetSegDef
//! A base function to process incoming Collision Detection Segment Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnCollDetSegDef(CigiBasePacket *Packet) { }; //========================================================= //! OnCollDetVolDef
//! A base function to process incoming Collision Detection Volume Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnCollDetVolDef(CigiBasePacket *Packet) { }; //========================================================= //! OnCompCtrl
//! A base function to process incoming Component Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnCompCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnConfClampEntityCtrl
//! A base function to process incoming Conformal Clamped Entity Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnConfClampEntityCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnEarthModelDef
//! A base function to process incoming Earth Model Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnEarthModelDef(CigiBasePacket *Packet) { }; //========================================================= //! OnEntityCtrl
//! A base function to process incoming Entity control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnEntityCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnEnvCondReq
//! A base function to process incoming Environmental Conditions Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnEnvCondReq(CigiBasePacket *Packet) { }; //========================================================= //! OnEnvCtrl
//! A base function to process incoming Environmental Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnEnvCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnEnvRgnCtrl
//! A base function to process incoming Environmental Region Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnEnvRgnCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnHatReq
//! A base function to process incoming Hat only Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHatReq(CigiBasePacket *Packet) { }; //========================================================= //! OnHatHotReq
//! A base function to process incoming Hat Hot Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHatHotReq(CigiBasePacket *Packet) { }; //========================================================= //! OnHatHotXReq
//! A base function to process incoming Hat Hot Extended Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHatHotXReq(CigiBasePacket *Packet) { }; //========================================================= //! OnHotReq
//! A base function to process incoming Hot only Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHotReq(CigiBasePacket *Packet) { }; //========================================================= //! OnLosSegReq
//! A base function to process incoming LOS Segment Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnLosSegReq(CigiBasePacket *Packet) { }; //========================================================= //! OnLosVectReq
//! A base function to process incoming LOS Vector Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnLosVectReq(CigiBasePacket *Packet) { }; //========================================================= //! OnMaritimeSurfaceCtrl
//! A base function to process incoming Maritime Surface Conditions Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnMaritimeSurfaceCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnMotionTrackCtrl
//! A base function to process incoming Motion Tracker control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnMotionTrackCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnPostionReq
//! A base function to process incoming Positon Request packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnPostionReq(CigiBasePacket *Packet) { }; //========================================================= //! OnRateCtrl
//! A base function to process incoming Rate Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnRateCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnSensorCtrl
//! A base function to process incoming Sensor Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSensorCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnShortArtPartCtrl
//! A base function to process incoming Short Articulated Part Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnShortArtPartCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnIGMsg
//! A base function to process incoming Short Component Control packets.
//! Segment Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnShortCompCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnShortSymbolCtrl
//! A base function to process incoming Short Symbol Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnShortSymbolCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnSpecEffDef
//! A base function to process incoming Special Effect Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSpecEffDef(CigiBasePacket *Packet) { }; //========================================================= //! OnSymbolCircleDef
//! A base function to process incoming Symbol Circle Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSymbolCircleDef(CigiBasePacket *Packet) { }; //========================================================= //! OnSymbolClone
//! A base function to process incoming Symbol Clone packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSymbolClone(CigiBasePacket *Packet) { }; //========================================================= //! OnSymbolCtrl
//! A base function to process incoming Symbol Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSymbolCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnSymbolLineDef
//! A base function to process incoming Symbol Line Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSymbolLineDef(CigiBasePacket *Packet) { }; //========================================================= //! OnSymbolTextDef
//! A base function to process incoming Symbol Text Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSymbolTextDef(CigiBasePacket *Packet) { }; //========================================================= //! OnSymbolSurfaceDef
//! A base function to process incoming Symbol Surface Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSymbolSurfaceDef(CigiBasePacket *Packet) { }; //========================================================= //! OnTerrestrialSurfaceCtrl
//! A base function to process incoming Terrestrial Surface Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnTerrestrialSurfaceCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnTrajectory
//! A base function to process incoming Trajectory Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnTrajectory(CigiBasePacket *Packet) { }; //========================================================= //! OnViewCtrl
//! A base function to process incoming View Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnViewCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnViewDef
//! A base function to process incoming View Definition packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnViewDef(CigiBasePacket *Packet) { }; //========================================================= //! OnWaveCtrl
//! A base function to process incoming Wave Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnWaveCtrl(CigiBasePacket *Packet) { }; //========================================================= //! OnWeatherCtrl
//! A base function to process incoming Weather Control packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnWeatherCtrl(CigiBasePacket *Packet) { }; //==+> IG to Host //========================================================= //! OnSOF
//! A base function to process incoming Start Of Frame packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSOF(CigiBasePacket *Packet) { }; //========================================================= //! OnAerosolResp
//! A base function to process incoming Aerosol Resp packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnAerosolResp(CigiBasePacket *Packet) { }; //========================================================= //! OnAnimationStop
//! A base function to process incoming Animation Stop Notification packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnAnimationStop(CigiBasePacket *Packet) { }; //========================================================= //! OnCollDetSegResp
//! A base function to process incoming Collision Detection Segment Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnCollDetSegResp(CigiBasePacket *Packet) { }; //========================================================= //! OnCollDetVolResp
//! A base function to process incoming Collision Detection Volume Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnCollDetVolResp(CigiBasePacket *Packet) { }; //========================================================= //! OnEventNotification
//! A base function to process incoming Event Notification packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnEventNotification(CigiBasePacket *Packet) { }; //========================================================= //! OnHatResp
//! A base function to process incoming Hat only Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHatResp(CigiBasePacket *Packet) { }; //========================================================= //! OnHatHotResp
//! A base function to process incoming Hat Hot Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHatHotResp(CigiBasePacket *Packet) { }; //========================================================= //! OnHatHotXResp
//! A base function to process incoming Hat Hot Extended Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHatHotXResp(CigiBasePacket *Packet) { }; //========================================================= //! OnHotResp
//! A base function to process incoming Hot only Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnHotResp(CigiBasePacket *Packet) { }; //========================================================= //! OnIGMsg
//! A base function to process incoming IG Message packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnIGMsg(CigiBasePacket *Packet) { }; //========================================================= //! OnLosResp
//! A base function to process incoming Los Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnLosResp(CigiBasePacket *Packet) { }; //========================================================= //! OnLosXResp
//! A base function to process incoming Los Extended Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnLosXResp(CigiBasePacket *Packet) { }; //========================================================= //! OnMaritimeSurfaceResp
//! A base function to process incoming Maritime Surface Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnMaritimeSurfaceResp(CigiBasePacket *Packet) { }; //========================================================= //! OnPositionResp
//! A base function to process incoming Position Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnPositionResp(CigiBasePacket *Packet) { }; //========================================================= //! OnSensorResp
//! A base function to process incoming Sensor Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSensorResp(CigiBasePacket *Packet) { }; //========================================================= //! OnSensorXResp
//! A base function to process incoming Sensor Extended Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnSensorXResp(CigiBasePacket *Packet) { }; //========================================================= //! OnTerrestrialSurfaceResp
//! A base function to process incoming Terrestrial Surface Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnTerrestrialSurfaceResp(CigiBasePacket *Packet) { }; //========================================================= //! OnWeatherCondResp
//! A base function to process incoming Weather Condition Response packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnWeatherCondResp(CigiBasePacket *Packet) { }; //==+> Unrecognized //========================================================= //! OnUnrecognized
//! A base function to process any incoming unrecognized packets.
//! This function does nothing in this base class.
//! If processing is required, the inheriting class must //! implement this call. //! virtual void OnUnrecognized(CigiBasePacket *Packet) { }; }; #endif // !defined(_CIGI_BASE_SIGNAL_PROCESSING_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSpecEffDef.h000066400000000000000000000376041210750432300215220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSpecEffDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SPEC_EFF_DEF_INCLUDED_) #define _CIGI_BASE_SPEC_EFF_DEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SPEC_EFF_DEF_PACKET_ID_V1 22 #define CIGI_SPEC_EFF_DEF_PACKET_SIZE_V1 32 #define CIGI_SPEC_EFF_DEF_PACKET_ID_V2 22 #define CIGI_SPEC_EFF_DEF_PACKET_SIZE_V2 32 class CigiSpecEffDefV1; class CigiSpecEffDefV2; class CIGI_SPEC CigiBaseSpecEffDef : public CigiBasePacket { friend class CigiSpecEffDefV1; friend class CigiSpecEffDefV2; public: //========================================================= //! The enumeration for the CigiBaseSpecEffDef Group //! enum SeqDirGrp { Forward=0, Backward=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSpecEffDef(); //========================================================= //! General Destructor //! virtual ~CigiBaseSpecEffDef(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> SeqDir //========================================================= //! Sets the SeqDir with bound checking control //! \param SeqDirIn - Special Effect Sequence direction
//! Forward=0
//! Backward=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSeqDir(const SeqDirGrp SeqDirIn, bool bndchk=true); //========================================================= //! Gets the SeqDir value. //! \return the current SeqDir. SeqDirGrp GetSeqDir(void) const { return(SeqDir); } //+> ColorEn //========================================================= //! Sets the ColorEn with bound checking control //! \param ColorEnIn - Color enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetColorEn(const bool ColorEnIn, bool bndchk=true) { ColorEn = ColorEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ColorEn value. //! \return the current ColorEn. bool GetColorEn(void) const { return(ColorEn); } //+> Red //========================================================= //! Sets the Red with bound checking control //! \param RedIn - Red color component //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRed(const Cigi_uint8 RedIn, bool bndchk=true) { Red = RedIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Red value. //! \return the current Red. Cigi_uint8 GetRed(void) const { return(Red); } //+> Green //========================================================= //! Sets the Green with bound checking control //! \param GreenIn - Green color component //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGreen(const Cigi_uint8 GreenIn, bool bndchk=true) { Green = GreenIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Green value. //! \return the current Green. Cigi_uint8 GetGreen(void) const { return(Green); } //+> Blue //========================================================= //! Sets the Blue with bound checking control //! \param BlueIn - Blue color component //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBlue(const Cigi_uint8 BlueIn, bool bndchk=true) { Blue = BlueIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Blue value. //! \return the current Blue. Cigi_uint8 GetBlue(void) const { return(Blue); } //+> XScale //========================================================= //! Sets the XScale with bound checking control //! \param XScaleIn - Scaling factor along the X axis for the effect. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXScale(const float XScaleIn, bool bndchk=true); //========================================================= //! Gets the XScale value. //! \return the current XScale. float GetXScale(void) const { return(XScale); } //+> YScale //========================================================= //! Sets the YScale with bound checking control //! \param YScaleIn - Scaling factor along the Y axis for the effect. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYScale(const float YScaleIn, bool bndchk=true); //========================================================= //! Gets the YScale value. //! \return the current YScale. float GetYScale(void) const { return(YScale); } //+> ZScale //========================================================= //! Sets the ZScale with bound checking control //! \param ZScaleIn - Scaling factor along the Z axis for the effect. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZScale(const float ZScaleIn, bool bndchk=true); //========================================================= //! Gets the ZScale value. //! \return the current ZScale. float GetZScale(void) const { return(ZScale); } //+> TimeScale //========================================================= //! Sets the TimeScale with bound checking control //! \param TimeScaleIn - Scaling factor for the effect's time of play. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTimeScale(const float TimeScaleIn, bool bndchk=true); //========================================================= //! Gets the TimeScale value. //! \return the current TimeScale. float GetTimeScale(void) const { return(TimeScale); } //+> EffectCnt //========================================================= //! Sets the EffectCnt with bound checking control //! \param EffectCntIn - Number of effects to control //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEffectCnt(const Cigi_uint16 EffectCntIn, bool bndchk=true) { EffectCnt = EffectCntIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EffectCnt value. //! \return the current EffectCnt. Cigi_uint16 GetEffectCnt(void) const { return(EffectCnt); } //+> Separation //========================================================= //! Sets the Separation with bound checking control //! \param SeparationIn - Distance between effects //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSeparation(const float SeparationIn, bool bndchk=true) { Separation = SeparationIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Separation value. //! \return the current Separation. float GetSeparation(void) const { return(Separation); } //+> BurstRate //========================================================= //! Sets the BurstRate with bound checking control //! \param BurstRateIn - The Rate at which the effects occur //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBurstRate(const float BurstRateIn, bool bndchk=true) { BurstRate = BurstRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the BurstRate value. //! \return the current BurstRate. float GetBurstRate(void) const { return(BurstRate); } //+> Duration //========================================================= //! Sets the Duration with bound checking control //! \param DurationIn - Duration of the effect //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDuration(const float DurationIn, bool bndchk=true) { Duration = DurationIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Duration value. //! \return the current Duration. float GetDuration(void) const { return(Duration); } protected: //==> Member variables //========================================================= //! EntityID
//! Entity ID //! Cigi_uint16 EntityID; //========================================================= //! SeqDir
//! Special Effect Sequence direction of play. //! 0-Forward
//! 1-Backward //! SeqDirGrp SeqDir; //========================================================= //! ColorEn
//! Color enable //! bool ColorEn; //========================================================= //! Red
//! Red color component //! Cigi_uint8 Red; //========================================================= //! Green
//! Green color component //! Cigi_uint8 Green; //========================================================= //! Blue
//! Blue color component //! Cigi_uint8 Blue; //========================================================= //! XScale
//! Scaling factor along the X axis for the effect. //! float XScale; //========================================================= //! YScale
//! Scaling factor along the Y axis for the effect. //! float YScale; //========================================================= //! ZScale
//! Scaling factor along the Z axis for the effect. //! float ZScale; //========================================================= //! TimeScale
//! Scaling factor for the effect's time of play. //! float TimeScale; //========================================================= //! EffectCnt
//! Number of effects to control //! Cigi_uint16 EffectCnt; //========================================================= //! Separation
//! Distance between effects //! float Separation; //========================================================= //! BurstRate
//! The Rate at which the effects occur //! float BurstRate; //========================================================= //! Duration
//! Duration of the effect //! float Duration; }; #endif // #if !defined(_CIGI_BASE_SPEC_EFF_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSymbolCircleDef.h000066400000000000000000000302121210750432300225620ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolCircleDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SYMBOL_CIRCLE_DEF_INCLUDED_) #define _CIGI_BASE_SYMBOL_CIRCLE_DEF_INCLUDED_ #include "CigiBaseVariableSizePckt.h" #include "CigiBaseCircleSymbolData.h" #include // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3 31 #define CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_SIZE_V3_3 16 class CigiSymbolCircleDefV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseSymbolCircleDef : public CigiBaseVariableSizePckt { friend class CigiSymbolCircleDefV3_3; public: //========================================================= //! The enumeration for the CigiBaseSymbolCircleDef //! Datum type Group //! enum DrawingStyleGrp { Line=0, Fill=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSymbolCircleDef(void); //========================================================= //! General Destructor //! virtual ~CigiBaseSymbolCircleDef(void); //========================================================= //! Copy Constructor //! CigiBaseSymbolCircleDef(const CigiBaseSymbolCircleDef &BaseIn); //========================================================= //! Assignment operator //! CigiBaseSymbolCircleDef & operator=(const CigiBaseSymbolCircleDef &BaseIn); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A pure virtual function to determine the size that the //! packet will take up when packed. //! This function is not implemented in this class. //! \param refPacket - A pointer to the current pack point. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) { return(PacketSize + refPacket.GetVariableDataSize()); } //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SymbolID //========================================================= //! Sets the SymbolID with bound checking control //! \param SymbolIDIn - Specifies the ID number for this symbol //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true) { SymbolID = SymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SymbolID with bound checking control //! \return SymbolID //! Cigi_uint16 GetSymbolID(void) const { return(SymbolID); } //+> DrawingStyle //========================================================= //! Sets the DrawingStyle with bound checking control //! \param DrawingStyleIn - Specifies the drawing style for this //! symbol (Line, Fill) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDrawingStyle(const DrawingStyleGrp DrawingStyleIn, bool bndchk=true); //========================================================= //! Gets the DrawingStyle with bound checking control //! \return DrawingStyle (Line, Fill) //! DrawingStyleGrp GetDrawingStyle(void) const { return(DrawingStyle); } //+> StipplePattern //========================================================= //! Sets the StipplePattern with bound checking control //! \param StipplePatternIn - Specifies the stipple pattern to be //! used with this symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStipplePattern(const Cigi_uint16 StipplePatternIn, bool bndchk=true) { StipplePattern = StipplePatternIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the StipplePattern with bound checking control //! \return The StipplePattern to be used with this symbol. //! Cigi_uint16 GetStipplePattern(void) const { return(StipplePattern); } //+> LineWidth //========================================================= //! Sets the LineWidth with bound checking control //! \param LineWidthIn - Specifies the line width for this symbol //! in Symbol Surface units. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLineWidth(const float LineWidthIn, bool bndchk=true); //========================================================= //! Gets the LineWidth with bound checking control //! \return LineWidth of this symbol in Symbol //! Surface units. //! float GetLineWidth(void) const { return(LineWidth); } //+> StipplePatternLen //========================================================= //! Sets the StipplePatternLen with bound checking control //! \param StipplePatternLenIn - Specifies the length in symbol //! surface units of the line that a single copy //! of the stipple pattern occupies. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStipplePatternLen(const float StipplePatternLenIn, bool bndchk=true); //========================================================= //! Gets the StipplePatternLen with bound checking control //! \return The length in symbol surface units of the line //! that a single copy of the stipple pattern //! occupies. (StipplePatternLen) //! float GetStipplePatternLen(void) const { return(StipplePatternLen); } //+> Circles //========================================================= //! Gets the StipplePatternLen with bound checking control //! \return Gets the number of circles contained in this symbol. //! int GetCircleCount(void); //========================================================= //! A pure virtual Create Circle function. //! This function is not implemented in this class. //! The implemented function will create a circle object and //! insert a pointer into the Circle Vector. //! //! \return The pointer to the new circle object. //! If the circle exceeds the maximum number of circles //! or the circle object cannot be created, this will //! return a NULL pointer. virtual CigiBaseCircleSymbolData * AddCircle(void) =0; //========================================================= //! A pure virtual Remove Circle function. //! This function is not implemented in this class. //! The implemented function will remove a Circle object //! from the Circle Vector. //! \param CircleIndex - The index of the circle to delete from this //! symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h virtual int RemoveCircle(int CircleIndex, bool bndchk=true) =0; //========================================================= //! Gets a pointer to a circle object. //! \param CircleIndex - The index of the desired circle. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return The pointer to the desired circle object. //! If the circle does not exist, the return is a NULL pointer. CigiBaseCircleSymbolData * GetCircle(int CircleIndex, bool bndchk=true); //========================================================= //! Removes all the circles in this symbol. //! void ClearCircles(void); protected: //==> Member variables //========================================================= //! SymbolID
//! The ID number of this symbol. //! Cigi_uint16 SymbolID; //========================================================= //! DrawingStyle
//! The drawing style of this symbol.
//! Line
//! Fill //! DrawingStyleGrp DrawingStyle; //========================================================= //! StipplePattern
//! The binary Stipple Pattern to use on this symbol. //! Cigi_uint16 StipplePattern; //========================================================= //! LineWidth
//! The width of the line used in this symbol in symbol surface units. //! float LineWidth; //========================================================= //! StipplePatternLen
//! The length in symbol surface units along the line that a single //! copy of the stipple pattern will occupy. //! float StipplePatternLen; //========================================================= //! Circles
//! A dynamic array of circles in this symbol //! std::vector Circles; }; #endif // #if !defined(_CIGI_BASE_SYMBOL_CIRCLE_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSymbolClone.h000066400000000000000000000161431210750432300220110ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolClone.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/03/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SYMBOL_CLONE_INCLUDED_) #define _CIGI_BASE_SYMBOL_CLONE_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SYMBOL_CLONE_PACKET_ID_V3_3 33 #define CIGI_SYMBOL_CLONE_PACKET_SIZE_V3_3 8 class CigiSymbolCloneV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseSymbolClone : public CigiBasePacket { friend class CigiSymbolCloneV3_3; public: //========================================================= //! The enumeration for the CigiBaseSymbolClone //! Symbol Source Group //! enum SymbolSourceGrp { SymbolSrc=0, SymbolTemplateSrc=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSymbolClone(void); //========================================================= //! General Destructor //! virtual ~CigiBaseSymbolClone(void); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SymbolID //========================================================= //! Sets the SymbolID with bound checking control //! \param SymbolIDIn - Specifies the ID number of this symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true) { SymbolID = SymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SymbolID //! \return The ID number of this symbol. //! Cigi_uint16 GetSymbolID(void) const { return(SymbolID); } //+> SourceType //========================================================= //! Sets the SourceType with bound checking control //! \param SourceTypeIn - Specifies the type of object //! from which this symbol is being cloned. //! (SymbolSrc, SymbolTemplateSrc) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSourceType(const SymbolSourceGrp SourceTypeIn, bool bndchk=true); //========================================================= //! Gets the SourceType with bound checking control //! \return The State of this symbol. //! SymbolSourceGrp GetSourceType(void) const { return(SourceType); } //+> SourceID //========================================================= //! Sets the SourceID with bound checking control //! \param SourceIDIn - Specifies the ID number of the source //! to be cloned. Either another symbol or a symbol template. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSourceID(const Cigi_uint16 SourceIDIn, bool bndchk=true) { SourceID = SourceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SourceID with bound checking control //! \return The ID number of the source symbol //! or symbol template. //! Cigi_uint16 GetSourceID(void) const { return(SourceID); } protected: //==> Member variables //========================================================= //! SymbolID
//! The ID number of this symbol //! Cigi_uint16 SymbolID; //========================================================= //! SymbolState
//! Specifies the type of object from which this symbol //! is being cloned.
//! SymbolSrc
//! SymbolTemplateSrc
//! SymbolSourceGrp SourceType; //========================================================= //! SourceID
//! The ID number of the Source symbol or symbol template. //! Cigi_uint16 SourceID; }; #endif // #if !defined(_CIGI_BASE_SYMBOL_CLONE_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSymbolCtrl.h000066400000000000000000000616051210750432300216600ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 *  04/03/2008 Greg Basler                       2.1.0
 *  Updated packet id to reflect the ICD.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SYMBOL_CTRL_INCLUDED_) #define _CIGI_BASE_SYMBOL_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3 34 #define CIGI_SYMBOL_CONTROL_PACKET_SIZE_V3_3 40 class CigiSymbolCtrlV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseSymbolCtrl : public CigiBasePacket { friend class CigiSymbolCtrlV3_3; public: //========================================================= //! The enumeration for the Symbol State Group //! enum SymbolStateGrp { Hidden=0, Visible=1, Destroyed=2 }; //========================================================= //! The enumeration for the Attach State Group //! enum AttachStateGrp { Detach=0, Attach=1 }; //========================================================= //! The enumeration for the Flash Control flag //! enum FlashCtrlGrp { Continue=0, Reset=1 }; //========================================================= //! The enumeration for the Inherit Color flag //! enum InheritColorGrp { NotInherit=0, Inherit=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSymbolCtrl(void); //========================================================= //! General Destructor //! virtual ~CigiBaseSymbolCtrl(void); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SymbolID //========================================================= //! Sets the SymbolID with bound checking control //! \param SymbolIDIn - The ID number of this symbol //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true) { SymbolID = SymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SymbolID with bound checking control //! \return The ID number of this symbol. //! Cigi_uint16 GetSymbolID(void) const { return(SymbolID); } //+> SymbolState //========================================================= //! Sets the SymbolState with bound checking control //! \param SymbolStateIn - Specifies the commanded state of this //! symbol. (Hidden, Visible, Destroyed) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolState(const SymbolStateGrp SymbolStateIn, bool bndchk=true); //========================================================= //! Gets the SymbolState with bound checking control //! \return The commanded state of this symbol. //! (Hidden, Visible, Destroyed) //! SymbolStateGrp GetSymbolState(void) const { return(SymbolState); } //+> AttachState //========================================================= //! Sets the AttachState with bound checking control //! \param AttachStateIn - Specifies whether the symbol is //! attached or detached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAttachState(const AttachStateGrp AttachStateIn, bool bndchk=true); //========================================================= //! Gets the AttachState with bound checking control //! \return The attach state of this symbol //! AttachStateGrp GetAttachState(void) const { return(AttachState); } //+> FlashCtrl //========================================================= //! Sets the FlashCtrl with bound checking control //! \param FlashCtrlIn - Specifies whether the flashing pattern //! of this symbol is continued or is reset. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlashCtrl(const FlashCtrlGrp FlashCtrlIn, bool bndchk=true); //========================================================= //! Gets the FlashCtrl with bound checking control //! \return The commanded flash control of this symbol. //! FlashCtrlGrp GetFlashCtrl(void) const { return(FlashCtrl); } //+> InheritColor //========================================================= //! Sets the InheritColor with bound checking control //! \param InheritColorIn - Specifies whether this symbol //! inherits its color from its parent or uses its own color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInheritColor(const InheritColorGrp InheritColorIn, bool bndchk=true); //========================================================= //! Gets the InheritColor with bound checking control //! \return Whether this symbol inherits its color //! from its parent or uses its own color. //! InheritColorGrp GetInheritColor(void) const { return(InheritColor); } //+> ParentSymbolID //========================================================= //! Sets the ParentSymbolID with bound checking control //! \param ParentSymbolIDIn - Specifies the ID number of //! this symbol's parent symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetParentSymbolID(const Cigi_uint16 ParentSymbolIDIn, bool bndchk=true) { ParentSymbolID = ParentSymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ParentSymbolID with bound checking control //! \return The ParentSymbol ID //! Cigi_uint16 GetParentSymbolID(void) const { return(ParentSymbolID); } //+> SurfaceID //========================================================= //! Sets the SurfaceID with bound checking control //! \param SurfaceIDIn - Specifies the ID number of the //! surface to which this symbol is attached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceID(const Cigi_uint16 SurfaceIDIn, bool bndchk=true) { SurfaceID = SurfaceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceID with bound checking control //! \return The Surface ID to which this symbol is attached. //! Cigi_uint16 GetSurfaceID(void) const { return(SurfaceID); } //+> Layer //========================================================= //! Sets the Layer with bound checking control //! \param LayerIn - Specifies the ID number of the layer that //! this symbol occupies. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLayer(const Cigi_uint8 LayerIn, bool bndchk=true) { Layer = LayerIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Layer with bound checking control //! \return The ID number of the layer that //! this symbol occupies. //! Cigi_uint8 GetLayer(void) const { return(Layer); } //+> FlashDutyCycle //========================================================= //! Sets the FlashDutyCycle with bound checking control //! \param FlashDutyCycleIn - Specifies the percentage of time //! that the symbol is visible. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlashDutyCycle(const Cigi_uint8 FlashDutyCycleIn, bool bndchk=true); //========================================================= //! Gets the FlashDutyCycle with bound checking control //! \return The percentage of time that the symbol //! is visible. //! Cigi_uint8 GetFlashDutyCycle(void) const { return(FlashDutyCycle); } //+> FlashPeriod //========================================================= //! Sets the FlashPeriod with bound checking control //! \param FlashPeriodIn - Specifies the amount of time in //! seconds of a full flash cycle. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFlashPeriod(const float FlashPeriodIn, bool bndchk=true) { FlashPeriod = FlashPeriodIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FlashPeriod with bound checking control //! \return The amount of time in seconds of a //! full flash cycle. //! float GetFlashPeriod(void) const { return(FlashPeriod); } //+> UPosition //========================================================= //! Sets the UPosition with bound checking control //! \param UPositionIn - Specifies the position of the symbol along //! the U axis of the surface's or symbol parent's coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetUPosition(const float UPositionIn, bool bndchk=true) { UPosition = UPositionIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the UPosition with bound checking control //! \return The position of the symbol along the U axis //! of the surface's or symbol parent's coordinate system. //! float GetUPosition(void) const { return(UPosition); } //+> VPosition //========================================================= //! Sets the VPosition with bound checking control //! \param VPositionIn - Specifies the position of the symbol along //! theV axis of the surface's or symbol parent's coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVPosition(const float VPositionIn, bool bndchk=true) { VPosition = VPositionIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VPosition with bound checking control //! \return The position of the symbol along theV axis //! of the surface's or symbol parent's coordinate system. //! float GetVPosition(void) const { return(VPosition); } //+> Rotation //========================================================= //! Sets the Rotation with bound checking control //! \param RotationIn - Specifies how much in degrees that the //! symbol is rotated. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRotation(const float RotationIn, bool bndchk=true) { Rotation = RotationIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Rotation with bound checking control //! \return How much in degrees that the symbol is rotated. //! float GetRotation(void) const { return(Rotation); } //+> Color //========================================================= //! Sets the color with bound checking control //! \param RedIn - The red component of the symbol's color. //! \param GreenIn - The green component of the symbol's color. //! \param BlueIn - The blue component of the symbol's color. //! \param AlphaIn - The alpha component of the symbol's color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetColor(const Cigi_uint8 RedIn, const Cigi_uint8 GreenIn, const Cigi_uint8 BlueIn, const Cigi_uint8 AlphaIn, bool bndchk=true) { Red = RedIn; Green = GreenIn; Blue = BlueIn; Alpha = AlphaIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ParentSymbolID with bound checking control //! \param RedValue - The reference to the variable in which //! the value of the red component will be placed //! \param GreenValue - The reference to the variable in which //! the value of the Green component will be placed //! \param BlueValue - The reference to the variable in which //! the value of the Blue component will be placed //! \param AlphaValue - The reference to the variable in which //! the value of the Alpha component will be placed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int GetColorDatum(Cigi_uint8 &RedValue, Cigi_uint8 &GreenValue, Cigi_uint8 &BlueValue, Cigi_uint8 &AlphaValue, bool bndchk=true) { RedValue = Red; GreenValue = Green; BlueValue = Blue; AlphaValue = Alpha; return(CIGI_SUCCESS); } //+> Red //========================================================= //! Sets the Red with bound checking control //! \param RedIn - The red component of the symbol's color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRed(const Cigi_uint8 RedIn, bool bndchk=true) { Red = RedIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Red with bound checking control //! \return The red component of the symbol's color. //! Cigi_uint8 GetRed(void) const { return(Red); } //+> Green //========================================================= //! Sets the Green with bound checking control //! \param GreenIn - The green component of the symbol's color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGreen(const Cigi_uint8 GreenIn, bool bndchk=true) { Green = GreenIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Green with bound checking control //! \return The green component of the symbol's color. //! Cigi_uint8 GetGreen(void) const { return(Green); } //+> Blue //========================================================= //! Sets the Blue with bound checking control //! \param BlueIn - The blue component of the symbol's color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBlue(const Cigi_uint8 BlueIn, bool bndchk=true) { Blue = BlueIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Blue with bound checking control //! \return The blue component of the symbol's color. //! Cigi_uint8 GetBlue(void) const { return(Blue); } //+> Alpha //========================================================= //! Sets the Alpha with bound checking control //! \param AlphaIn - The alpha component of the symbol's color. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlpha(const Cigi_uint8 AlphaIn, bool bndchk=true) { Alpha = AlphaIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alpha with bound checking control //! \return The alpha component of the symbol's color. //! Cigi_uint8 GetAlpha(void) const { return(Alpha); } //+> ScaleU //========================================================= //! Sets the ScaleU with bound checking control //! \param ScaleUIn - Specifies the scale to apply to the symbol's //! local coordinate system's U axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScaleU(const float ScaleUIn, bool bndchk=true) { ScaleU = ScaleUIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ScaleU with bound checking control //! \return The scale to apply to the symbol's local //! coordinate system's U axis. //! float GetScaleU(void) const { return(ScaleU); } //+> ScaleV //========================================================= //! Sets the ScaleV with bound checking control //! \param ScaleVIn - Specifies the scale to apply to the symbol's //! local coordinate system'sV axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScaleV(const float ScaleVIn, bool bndchk=true) { ScaleV = ScaleVIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ScaleV with bound checking control //! \return The scale to apply to the symbol's local //! coordinate system'sV axis. //! float GetScaleV(void) const { return(ScaleV); } protected: //==> Member variables //========================================================= //! SymbolID
//! The ID number of this symbol //! Cigi_uint16 SymbolID; //========================================================= //! SymbolState
//! The commanded state of this symbol.
//! Hidden
//! Visible
//! Destroyed //! SymbolStateGrp SymbolState; //========================================================= //! AttachState
//! Whether this symbol is attached to another symbol. //! AttachStateGrp AttachState; //========================================================= //! FlashCtrl
//! Whether the current flash pattern is continued or restarted. //! FlashCtrlGrp FlashCtrl; //========================================================= //! InheritColor
//! Whether this symbol inherits its color from its parent or //! uses its own color. //! InheritColorGrp InheritColor; //========================================================= //! ParentSymbolID
//! The ID number of this symbol's parent symbol. //! Cigi_uint16 ParentSymbolID; //========================================================= //! SurfaceID
//! The ID number of the surface to which this symbol is attached. //! Cigi_uint16 SurfaceID; //========================================================= //! Layer
//! The ID number of the layer that this symbol occupies. //! Cigi_uint8 Layer; //========================================================= //! FlashDutyCycle
//! The percentage of time that this symbol is visible. //! Cigi_uint8 FlashDutyCycle; //========================================================= //! FlashPeriod
//! The amount of time that a flash cycle takes. //! float FlashPeriod; //========================================================= //! UPosition
//! The position of the symbol along the U axis //! of the surface's or symbol parent's coordinate system. //! float UPosition; //========================================================= //! VPosition
//! The position of the symbol along theV axis //! of the surface's or symbol parent's coordinate system. //! float VPosition; //========================================================= //! Rotation
//! How much in degrees that the symbol is rotated. //! float Rotation; //========================================================= //! Red
//! The red component of the symbol's color. //! Cigi_uint8 Red; //========================================================= //! Green
//! The green component of the symbol's color. //! Cigi_uint8 Green; //========================================================= //! Blue
//! The blue component of the symbol's color. //! Cigi_uint8 Blue; //========================================================= //! Alpha
//! The alpha component of the symbol's color. //! Cigi_uint8 Alpha; //========================================================= //! ScaleU
//! The scale to apply to the symbol's local //! coordinate system's U axis. //! float ScaleU; //========================================================= //! ScaleV
//! The scale to apply to the symbol's local //! coordinate system's U axis. //! float ScaleV; }; #endif // #if !defined(_CIGI_BASE_SYMBOL_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSymbolLineDef.h000066400000000000000000000306141210750432300222560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolLineDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SYMBOL_LINE_DEF_INCLUDED_) #define _CIGI_BASE_SYMBOL_LINE_DEF_INCLUDED_ #include "CigiBaseVariableSizePckt.h" #include "CigiBaseVertexSymbolData.h" #include // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3 32 #define CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3 16 class CigiSymbolLineDefV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseSymbolLineDef : public CigiBaseVariableSizePckt { friend class CigiSymbolLineDefV3_3; public: //========================================================= //! The enumeration for the CigiBaseSymbolLineDef //! Datum type Group //! enum PrimitiveGrp { Points=0, Lines=1, LineStrip=2, LineLoop=3, Triangles=4, TriangleStrip=5, TriangleFan=6 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSymbolLineDef(void); //========================================================= //! General Destructor //! virtual ~CigiBaseSymbolLineDef(void); //========================================================= //! Copy Constructor //! CigiBaseSymbolLineDef(const CigiBaseSymbolLineDef &BaseIn); //========================================================= //! Assignment operator //! CigiBaseSymbolLineDef & operator=(const CigiBaseSymbolLineDef &BaseIn); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A pure virtual function to determine the size that the //! packet will take up when packed. //! This function is not implemented in this class. //! \param refPacket - A pointer to the current pack point. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) { return(PacketSize + refPacket.GetVariableDataSize()); } //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SymbolID //========================================================= //! Sets the SymbolID with bound checking control //! \param SymbolIDIn - The ID number of this symbol. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true) { SymbolID = SymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SymbolID with bound checking control //! \return The ID number of this Symbol. //! Cigi_uint16 GetSymbolID(void) const { return(SymbolID); } //+> Primitive //========================================================= //! Sets the Primitive with bound checking control //! \param PrimitiveIn - Specifies the primatives used in this symbol. //! (Points, Lines, LineStrip, LineLoop, Triangles, //! TriangleStrip, TriangleFan) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPrimitive(const PrimitiveGrp PrimitiveIn, bool bndchk=true); //========================================================= //! Gets the Primitive with bound checking control //! \return The Primitive used in this symbol //! (Points, Lines, LineStrip, LineLoop, Triangles, //! TriangleStrip, TriangleFan) //! PrimitiveGrp GetPrimitive(void) const { return(Primitive); } //+> StipplePattern //========================================================= //! Sets the StipplePattern with bound checking control //! \param StipplePatternIn - Specifies the binary stipple pattern //! to be applied to the lines. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStipplePattern(const Cigi_uint16 StipplePatternIn, bool bndchk=true) { StipplePattern = StipplePatternIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the StipplePattern with bound checking control //! \return The binary Stipple Pattern to be applied to the lines. //! Cigi_uint16 GetStipplePattern(void) const { return(StipplePattern); } //+> LineWidth //========================================================= //! Sets the LineWidth with bound checking control //! \param LineWidthIn - The width in symbol surface units of //! the lines. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLineWidth(const float LineWidthIn, bool bndchk=true); //========================================================= //! Gets the LineWidth with bound checking control //! \return The width in symbol surface units of //! the lines. //! float GetLineWidth(void) const { return(LineWidth); } //+> StipplePatternLen //========================================================= //! Sets the StipplePatternLen with bound checking control //! \param StipplePatternLenIn - Specifies the length in symbol //! surface units that a single copy of the stipple pattern occupies //! in a line. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStipplePatternLen(const float StipplePatternLenIn, bool bndchk=true); //========================================================= //! Gets the StipplePatternLen with bound checking control //! \return The length in symbol surface units that a single //! copy of the stipple pattern occupies in a line. //! float GetStipplePatternLen(void) const { return(StipplePatternLen); } //+> Vertices //========================================================= //! Gets the number of vertices contained in this symbol //! with bound checking control. //! \return The vertex count. //! int GetVertexCount(void); //========================================================= //! A pure virtual Create Vertex function. //! This function is not implemented in this class. //! The implemented function will create a Vertex object and //! insert a pointer into the Vertex Vector. //! //! \return The pointer to the new Vertex object. //! If the Vertex exceeds the maximum number of Vertices //! or the Vertex object cannot be created, this will //! return a NULL pointer. virtual CigiBaseVertexSymbolData * AddVertex(void) =0; //========================================================= //! A pure virtual Remove Vertex function. //! This function is not implemented in this class. //! The implemented function will remove a Vertex object //! from the Vertex Vector. //! \param VertexIndex - The index of the vertex to be removed. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h virtual int RemoveVertex(int VertexIndex, bool bndchk=true) =0; //========================================================= //! Gets a pointer to a Vertex object. //! \param VertexIndex - The index of the desired vertex. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return The pointer to the desired Vertex object. //! If the Vertex does not exist, the return is a NULL pointer. CigiBaseVertexSymbolData * GetVertex(int VertexIndex, bool bndchk=true); //========================================================= //! Removes all vertices from the symbol. //! void ClearVertices(void); protected: //==> Member variables //========================================================= //! SymbolID
//! The ID number of the symbol. //! Cigi_uint16 SymbolID; //========================================================= //! Primitive
//! The drawing primitive used in this symbol.
//! Points
//! Lines
//! LineStrip
//! LineLoop
//! Triangles
//! TriangleStrip
//! TriangleFan //! PrimitiveGrp Primitive; //========================================================= //! StipplePattern
//! The binary stipple pattern to be applied to the lines //! Cigi_uint16 StipplePattern; //========================================================= //! LineWidth
//! The width of the lines in symbol surface units //! float LineWidth; //========================================================= //! StipplePatternLen
//! The length in symbol surface units that a single copy of the //! stipple pattern will occupy in the lines. //! float StipplePatternLen; //========================================================= //! Vertices
//! A dynamic array of vertices. //! std::vector Vertices; }; #endif // #if !defined(_CIGI_BASE_SYMBOL_LINE_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSymbolSurfaceDef.h000066400000000000000000000736301210750432300227640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiBaseSymbolSurfaceDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SYMBOL_SURFACE_DEF_INCLUDED_) #define _CIGI_BASE_SYMBOL_SURFACE_DEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3 29 #define CIGI_SYMBOL_SURFACE_DEF_PACKET_SIZE_V3_3 56 class CigiSymbolSurfaceDefV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseSymbolSurfaceDef : public CigiBasePacket { friend class CigiSymbolSurfaceDefV3_3; public: //========================================================= //! The enumeration for the CigiBaseSymbolSurfaceDef State Group //! enum StateGrp { Active=0, Destroyed=1 }; //========================================================= //! The enumeration for the Enitity/View Attached flag //! enum AttachStateGrp { EntityAttached=0, ViewAttached=1 }; //========================================================= //! The enumeration for the Billboard State flag //! enum BillboardStateGrp { NotBillboard=0, Billboard=1 }; //========================================================= //! The enumeration for the Perspective Growth flag //! enum PerspectiveGrowthStateGrp { Disable=0, Enable=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseSymbolSurfaceDef(void); //========================================================= //! General Destructor //! virtual ~CigiBaseSymbolSurfaceDef(void); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! including convertion type and packet id. //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SurfaceID //========================================================= //! Sets the Surface ID with bound checking control //! \param SurfaceIDIn - The ID of this surface //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceID(const Cigi_uint16 SurfaceIDIn, bool bndchk=true) { SurfaceID = SurfaceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Surface ID value //! \return The Surface ID uniquely identifying the specific surface //! Cigi_uint16 GetSurfaceID(void) const { return(SurfaceID); } //+> SurfaceState //========================================================= //! Sets the Surface State with bound checking control //! \param SurfaceStateIn - The commanded state of this //! surface (Active/Destroyed) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceState(const StateGrp SurfaceStateIn, bool bndchk=true); //========================================================= //! Gets the Surface State value //! \return The current state (Active/Destroyed) of the this //! surface. //! StateGrp GetSurfaceState(void) const { return(SurfaceState); } //+> Attached //========================================================= //! Sets the Attached State with bound checking control //! \param AttachedIn - The commanded Attachment or independance //! of this surface (Entity Attached/View Attached) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAttached(const AttachStateGrp AttachedIn, bool bndchk=true); //========================================================= //! Gets the Attached State value //! \return The current state (Active/Destroyed) of the this //! surface. //! AttachStateGrp GetAttached(void) const { return(Attached); } //+> BillBoardState //========================================================= //! Sets the Billboard State with bound checking control //! \param BillboardStateIn - The commanded "Billboard" or //! "NotBillboard" state of this surface //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBillboardState(const BillboardStateGrp BillboardStateIn, bool bndchk=true); //========================================================= //! Gets the Surface State value //! \return The whether this surface is a billboard or not. //! BillboardStateGrp GetBillboardState(void) const { return(BillboardState); } //+> PerspectiveGrowth //========================================================= //! Sets the Perspective Growth with bound checking control //! \param PerspectiveGrowthIn - Enables or Disables the //! Perspective Growth of this surface, if the surface //! is a Billboard. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPerspectiveGrowth(const PerspectiveGrowthStateGrp PerspectiveGrowthIn, bool bndchk=true); //========================================================= //! Gets the Perspective Growth value //! \return The whether this surface has Perspective Growth //! Enabled or Disabled. //! PerspectiveGrowthStateGrp GetPerspectiveGrowth(void) const { return(PerspectiveGrowth); } //+> Attach //========================================================= //! Sets the Entity ID with bound checking control //! \param EntityIDIn - The ID of the Entity to which this //! surface is attached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityViewID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Entity ID value to which this surface is attached. //! \return The Attached Entity ID. //! Cigi_uint16 GetEntityID(void) const { return(EntityViewID); } //========================================================= //! Sets the View ID with bound checking control //! \param ViewIDIn - The ID of the View to which this //! surface is attached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { EntityViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the View ID value to which this surface is attached. //! \return The Attached View ID. //! Cigi_uint16 GetViewID(void) const { return(EntityViewID); } //+> Offsets //========================================================= //! Sets the Offset along the Entity's body X axis from the //! Entity to the attached surface with bound checking control //! \param XOffsetIn - The X Offset. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXOffset(const float XOffsetIn, bool bndchk=true) { XLeft = XOffsetIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Offset along the Entity's body X axis from the //! Entity to the attached surface. //! //! \return This returns the X Offset. float GetXOffset(void) const { return(XLeft); } //========================================================= //! Sets the Offset along the Entity's body Y axis from the //! Entity to the attached surface with bound checking control //! \param YOffsetIn - The Y Offset. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYOffset(const float YOffsetIn, bool bndchk=true) { YRight = YOffsetIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Offset along the Entity's body Y axis from the //! Entity to the attached surface. //! //! \return This returns the Y Offset. float GetYOffset(void) const { return(YRight); } //========================================================= //! Sets the Offset along the Entity's body Z axis from the //! Entity to the attached surface with bound checking control //! \param XOffsetIn - The Z Offset. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZOffset(const float ZOffsetIn, bool bndchk=true) { ZTop = ZOffsetIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Offset along the Entity's body Z axis from the //! Entity to the attached surface. //! //! \return This returns the Z Offset. float GetZOffset(void) const { return(ZTop); } //+> Attitude //========================================================= //! Sets the Yaw of the surface with respect to the Entity's //! body coordinate system with bound checking control //! \param YawIn - The Yaw of the surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw of the surface with respect to the Entity's //! body coordinate system. //! //! \return This returns the Yaw. float GetYaw(void) const { return(YawBottom); } //========================================================= //! Sets the Pitch of the surface with respect to the Entity's //! body coordinate system with bound checking control //! \param PitchIn - The Pitch of the surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitch(const float PitchIn, bool bndchk=true); //========================================================= //! Gets the Pitch of the surface with respect to the Entity's //! body coordinate system. //! //! \return This returns the Pitch. float GetPitch(void) const { return(Pitch); } //========================================================= //! Sets the Roll of the surface with respect to the Entity's //! body coordinate system with bound checking control //! \param RollIn - The Roll of the surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRoll(const float RollIn, bool bndchk=true); //========================================================= //! Gets the Roll of the surface with respect to the Entity's //! body coordinate system. //! //! \return This returns the Roll. float GetRoll(void) const { return(Roll); } //+> Size //========================================================= //! Sets the Width of the entity attached surface. //! \param WidthIn - The width of the surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWidth(const float WidthIn, bool bndchk=true) { Width = WidthIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Width of the entity attached surface. //! //! \return This returns the Width. float GetWidth(void) const { return(Width); } //========================================================= //! Sets the Height of the entity attached surface. //! \param HeightIn - The Height of the surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHeight(const float HeightIn, bool bndchk=true) { Height = HeightIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Height of the entity attached surface. //! //! \return This returns the Height. float GetHeight(void) const { return(Height); } //+> Symbol Surface Edge Positions //========================================================= //! Sets the Left Edge Position of the surface. //! \param LeftEdgePosition - The position of the Left //! Edge using a linear scale from the left edge of the //! view (0.0) to the right edge of the view (1.0) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLeftEdgePosition(const float LeftEdgePosition, bool bndchk=true); //========================================================= //! Gets The position of the Left Edge using a linear scale //! from the left edge of the view (0.0) to the //! right edge of the view (1.0) //! //! \return The Left Edge Position of the surface. float GetLeftEdgePosition(void) const { return(XLeft); } //========================================================= //! Sets the Right Edge Position of the surface. //! \param RightEdgePosition - The position of the Right //! Edge using a linear scale from the left edge of the //! view (0.0) to the right edge of the view (1.0) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRightEdgePosition(const float RightEdgePosition, bool bndchk=true); //========================================================= //! Gets The position of the Right Edge using a linear scale //! from the left edge of the view (0.0) to the //! right edge of the view (1.0) //! //! \return The Right Edge Position of the surface. float GetRightEdgePosition(void) const { return(YRight); } //========================================================= //! Sets the Top Edge Position of the surface. //! \param TopEdgePosition - The position of the Top //! Edge using a linear scale from the bottom edge of the //! view (0.0) to the top edge of the view (1.0) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTopEdgePosition(const float TopEdgePosition, bool bndchk=true); //========================================================= //! Gets The position of the Top Edge using a linear scale //! from the bottom edge of the view (0.0) to the //! top edge of the view (1.0) //! //! \return The Top Edge Position of the surface. float GetTopEdgePosition(void) const { return(ZTop); } //========================================================= //! Sets the Bottom Edge Position of the surface. //! \param BottomEdgePosition - The position of the Bottom //! Edge using a linear scale from the bottom edge of the //! view (0.0) to the top edge of the view (1.0) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBottomEdgePosition(const float BottomEdgePosition, bool bndchk=true); //========================================================= //! Gets The position of the Bottom Edge using a linear scale //! from the bottom edge of the view (0.0) to the //! top edge of the view (1.0) //! //! \return The Top Edge Position of the surface. float GetBottomEdgePosition(void) const { return(YawBottom); } //+> Edge Coordinates //========================================================= //! Sets the Left Edge U Coordinate of the surface. //! This specifies the left most U coordinate contained //! within the surface boundaries. //! \param MinUIn - The Left Edge U Coordinate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinU(const float MinUIn, bool bndchk=true) { MinU = MinUIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Left Edge Coordinate of the surface. //! This is the left most U coordinate contained //! within the surface boundaries. //! float GetMinU(void) const { return(MinU); } //========================================================= //! Sets the Right Edge U Coordinate of the surface. //! This specifies the Right most U coordinate contained //! within the surface boundaries. //! \param MaxUIn - The Right Edge U Coordinate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaxU(const float MaxUIn, bool bndchk=true) { MaxU = MaxUIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Right Edge U Coordinate of the surface. //! This is the Right most U coordinate contained //! within the surface boundaries. //! float GetMaxU(void) const { return(MaxU); } //========================================================= //! Sets the Bottom Edge V Coordinate of the surface. //! This specifies the Bottom most V coordinate contained //! within the surface boundaries. //! \param MinVIn - The Bottom Edge V Coordinate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinV(const float MinVIn, bool bndchk=true) { MinV = MinVIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Bottom Edge V Coordinate of the surface. //! This is the Bottom most V coordinate contained //! within the surface boundaries. //! float GetMinV(void) const { return(MinV); } //========================================================= //! Sets the Top Edge V Coordinate of the surface. //! This specifies the Top most V coordinate contained //! within the surface boundaries. //! \param MaxVIn - The Top Edge V Coordinate. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaxV(const float MaxVIn, bool bndchk=true) { MaxV = MaxVIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Top Edge V Coordinate of the surface. //! This is the Top most V coordinate contained //! within the surface boundaries. //! float GetMaxV(void) const { return(MaxV); } protected: //==> Member variables //========================================================= //! SurfaceID
//! This parameter specifies the symbol surface to which //! this packet is applied. //! Cigi_uint16 SurfaceID; //========================================================= //! SurfaceState
//! This parameter specifies whether the symbol surface //! should be active or destroyed. //! Active - The surface is active and symbols may be drawn //! on it. It can be positioned, oriented, and sized. //! It can also be attached to an entity or a view. //! Destroyed - The surface is removed from the system. //! Any symbols drawn to it are also destroyed. All other //! parameters in this packet are ignored. //! StateGrp SurfaceState; //========================================================= //! Attached
//! This parameter specifies whether the surface should be //! attached to an entity or a view. //! AttachStateGrp Attached; //========================================================= //! BillBoardState
//! This parameter specifies whether the surface should be //! oriented toward the eyepoint (BillBoard). If the surface //! is a billboard and is attached to a entity, a normal from //! the center of the surface will intersect the eyepoint. //! BillboardStateGrp BillboardState; //========================================================= //! Attached
//! If the surface is an Entity attached billboarded surface, //! This parameter specifies the Perspective Growth state. //! PerspectiveGrowthStateGrp PerspectiveGrowth; //========================================================= //! EntityViewID
//! This parameter specifies the entity or view to which //! this surface is attached. //! Cigi_uint16 EntityViewID; //========================================================= //! XLeft
//! For a surface attached to an entity, this parameter //! specifies an X offset position from the entity’s //! reference point to the center of the surface. //! For a surface attached to a view, this parameter //! specifies the position of the surface’s leftmost boundary //! on the view frustum near clipping plane as a linear distance //! from the left edge of the view. Where (0.0) is the left edge //! of the view and (1.0) is the right edge of the view. //! float XLeft; //========================================================= //! YRight
//! For a surface attached to an entity, this parameter //! specifies an Y offset position from the entity’s //! reference point to the center of the surface. //! For a surface attached to a view, this parameter //! specifies the position of the surface’s rightmost boundary //! on the view frustum near clipping plane as a linear distance //! from the left edge of the view. Where (0.0) is the left edge //! of the view and (1.0) is the right edge of the view. //! float YRight; //========================================================= //! ZTop
//! For a surface attached to an entity, this parameter //! specifies an Z offset position from the entity’s //! reference point to the center of the surface. //! For a surface attached to a view, this parameter //! specifies the position of the surface’s topmost boundary //! on the view frustum near clipping plane as a linear distance //! from the bottom edge of the view. Where (0.0) is the bottom edge //! of the view and (1.0) is the top edge of the view. //! float ZTop; //========================================================= //! YawBottom
//! For a surface attached to an entity, this parameter //! specifies the yaw orientation or a rotation about the //! surface’s Z axis when the surface’s X axis is parallel //! to the entity’s X axis. //! For a surface attached to a view, this parameter //! specifies the position of the surface’s bottommost boundary //! on the view frustum near clipping plane as a linear distance //! from the bottom edge of the view. Where (0.0) is the bottom edge //! of the view and (1.0) is the top edge of the view. //! float YawBottom; //========================================================= //! Pitch
//! For a surface attached to an entity, this parameter //! specifies the surface’s pitch with respect to the //! surface’s reference plane after the yaw rotation has //! been applied. //! float Pitch; //========================================================= //! Roll
//! For a surface attached to an entity, this parameter //! specifies the surface’s roll with respect to the //! surface’s reference plane after yaw and pitch rotations //! have been applied. //! float Roll; //========================================================= //! Width
//! If the surface is attached to an entity, this parameter //! specifies the width of the surface. //! If the surface is not a billboard or a billboard with //! perspective growth as determined by the Billboard and //! Perspective Growth Enable parameters of this data packet, //! this parameter specifies the width of the surface in //! meters and the occupied view space is affected by perspective. //! If the surface is a billboard with perspective growth disabled, //! this parameter specifies the width as a view arc and the //! occupied view space remains constant and unaffected by //! perspective. //! float Width; //========================================================= //! Height
//! If the surface is attached to an entity, this parameter //! specifies the height of the surface. //! If the surface is not a billboard or a billboard with //! perspective growth as determined by the Billboard and //! Perspective Growth Enable parameters of this data packet, //! this parameter specifies the height of the surface in //! meters and the occupied view space is affected by perspective. //! If the surface is a billboard with perspective growth disabled, //! this parameter specifies the height as a view arc and the //! occupied view space remains constant and unaffected by //! perspective. //! float Height; //========================================================= //! MinU
//! This parameter specifies the left most U coordinate //! contained within the surface boundaries. //! float MinU; //========================================================= //! MaxU
//! This parameter specifies the right most U coordinate //! contained within the surface boundaries. //! float MaxU; //========================================================= //! MinV
//! This parameter specifies the bottom most V coordinate //! contained within the surface boundaries. //! float MinV; //========================================================= //! MaxV
//! This parameter specifies the top most V coordinate //! contained within the surface boundaries. //! float MaxV; }; #endif // #if !defined(_CIGI_BASE_SYMBOL_SURFACE_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseSymbolTextDef.h000066400000000000000000000273071210750432300223200ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolTextDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_SYMBOL_TEXT_DEF_INCLUDED_) #define _CIGI_BASE_SYMBOL_TEXT_DEF_INCLUDED_ #include "CigiBaseVariableSizePckt.h" #include // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3 30 #define CIGI_SYMBOL_TEXT_DEFINITION_PACKET_SIZE_V3_3 12 class CigiSymbolTextDefV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseSymbolTextDef : public CigiBaseVariableSizePckt { friend class CigiSymbolTextDefV3_3; public: //========================================================= //! The enumeration for the CigiBaseSymbolTextDef //! Datum type Group //! enum AlignmentGrp { TopLeft=0, TopCenter=1, TopRight=2, CenterLeft=3, Center=4, CenterRight=5, BottomLeft=6, BottomCenter=7, BottomRight=8, }; //========================================================= //! The enumeration for the CigiBaseSymbolTextDef //! Datum type Group //! enum OrientationGrp { LeftToRight=0, TopToBottom=1, RightToLeft=2, BottomToTop=3, }; //==> Management //========================================================= //! General Constructor //! CigiBaseSymbolTextDef(void); //========================================================= //! General Destructor //! virtual ~CigiBaseSymbolTextDef(void); //========================================================= //! Copy Constructor //! CigiBaseSymbolTextDef(const CigiBaseSymbolTextDef &BaseIn); //========================================================= //! Assignment operator //! CigiBaseSymbolTextDef & operator=(const CigiBaseSymbolTextDef &BaseIn); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual function to determine the size that the //! packet will take up when packed. //! \param refPacket - A pointer to the packet being checked. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) { return(PacketSize + refPacket.GetVariableDataSize()); } //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! including the type of conversion and the packet id. //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> SymbolID //========================================================= //! Sets the SymbolID with bound checking control //! \param SymbolIDIn - The user assigned Symbol ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true) { SymbolID = SymbolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SymbolID with bound checking control //! \return The ID of this Symbol. //! Cigi_uint16 GetSymbolID(void) const { return(SymbolID); } //+> Alignment //========================================================= //! Sets the Alignment with bound checking control //! \param AlignmentIn - Specifies the type of text alignment //! to be used for this text. (TopLeft, TopCenter, TopRight, //! CenterLeft, Center, CenterRight, BottomLeft, BottomCenter, //! BottomRight) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlignment(const AlignmentGrp AlignmentIn, bool bndchk=true); //========================================================= //! Gets the Alignment with bound checking control //! \return The text alignment to be used for this text. //! (TopLeft, TopCenter, TopRight, CenterLeft, Center, //! CenterRight, BottomLeft, BottomCenter, BottomRight) //! AlignmentGrp GetAlignment(void) const { return(Alignment); } //+> Orientation //========================================================= //! Sets the Orientation with bound checking control //! \param OrientationIn - Specifies the text orientation //! to be used for this text. (LeftToRight, TopToBottom, //! RightToLeft, BottomToTop) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetOrientation(const OrientationGrp OrientationIn, bool bndchk=true); //========================================================= //! Gets the Orientation with bound checking control //! \return The text orientation to be used for this text. //! (LeftToRight, TopToBottom, RightToLeft, BottomToTop) //! OrientationGrp GetOrientation(void) const { return(Orientation); } //+> FontID //========================================================= //! Sets the FontID with bound checking control //! \param FontIDIn - Specifies the font (by ID number) to //! be used for this text. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFontID(const Cigi_uint8 FontIDIn, bool bndchk=true) { FontID = FontIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FontID with bound checking control //! \return The ID of the font to be used for this text. //! Cigi_uint8 GetFontID(void) const { return(FontID); } //+> FontSize //========================================================= //! Sets the FontSize with bound checking control //! \param FontSizeIn - Specifies the size of the font //! in UV units to be used for this text. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFontSize(const float FontSizeIn, bool bndchk=true); //========================================================= //! Gets the FontSize with bound checking control //! \return The size of the font to be used in //! float GetFontSize(void) const { return(FontSize); } //+> Text //========================================================= //! Sets the Text with bound checking control //! \param TextIn - A standard string of text. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetText(const std::string &TextIn, bool bndchk=true); //========================================================= //! Gets the TextSize with bound checking control //! \return The current size of the text. //! int GetTextSize(void) const { return(VariableDataSize); } //========================================================= //! Gets the Text //! \return The current symbology text const std::string & GetText(void) { return(Text); } protected: //==> Member variables //========================================================= //! SymbolID
//! The Id for this symbol //! Cigi_uint16 SymbolID; //========================================================= //! SymbolState
//! The alignment of this symbol.
//! This is the position of the anchor or reference point.
//! TopLeft
//! TopCenter
//! TopRight
//! CenterLeft
//! Center
//! CenterRight
//! BottomLeft
//! BottomCenter
//! BottomRight
//! AlignmentGrp Alignment; //========================================================= //! Orientation
//! The orientation of the text.
//! LeftToRight
//! TopToBottom
//! RightToLeft
//! BottomToTop
//! OrientationGrp Orientation; //========================================================= //! FontID
//! The font id number. //! Cigi_uint8 FontID; //========================================================= //! FontSize
//! The size of the font in UV coordinates //! float FontSize; //========================================================= //! Text
//! The symbol text //! std::string Text; //========================================================= //! MaxCharCnt
//! The maximum number of bytes not including NULLs //! static const int MaxCharCnt = 235; }; #endif // #if !defined(_CIGI_BASE_SYMBOL_TEXT_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseTerrestrialSurfaceCtrl.h000066400000000000000000000233441210750432300242220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseTerrestrialSurfaceCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_TERRESTRIAL_SURFACE_CTRL_INCLUDED_) #define _CIGI_BASE_TERRESTRIAL_SURFACE_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3 15 #define CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_SIZE_V3 8 class CigiTerrestrialSurfaceCtrlV3; class CIGI_SPEC CigiBaseTerrestrialSurfaceCtrl : public CigiBasePacket { friend class CigiTerrestrialSurfaceCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseTerrestrialSurfaceCtrl Group //! enum ScopeGrp { Global=0, Regional=1, Entity=2 }; //==> Management //========================================================= //! General Constructor //! CigiBaseTerrestrialSurfaceCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseTerrestrialSurfaceCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityRgnID //========================================================= //! Sets the EntityRgnID with bound checking control //! \param EntityRgnIDIn - Entity or Region ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityRgnID(const Cigi_uint16 EntityRgnIDIn, bool bndchk=true) { EntityRgnID = EntityRgnIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityRgnID value. //! \return the current EntityRgnID. Cigi_uint16 GetEntityRgnID(void) const { return(EntityRgnID); } //+> SurfaceCondID //========================================================= //! Sets the SurfaceCondID with bound checking control //! \param SurfaceCondIDIn - Surface Conditions ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceCondID(const Cigi_uint16 SurfaceCondIDIn, bool bndchk=true) { SurfaceCondID = SurfaceCondIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceCondID value. //! \return the current SurfaceCondID. Cigi_uint16 GetSurfaceCondID(void) const { return(SurfaceCondID); } //+> SurfaceCondEn //========================================================= //! Sets the SurfaceCondEn with bound checking control //! \param SurfaceCondEnIn - Surface conditions enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceCondEn(const bool SurfaceCondEnIn, bool bndchk=true) { SurfaceCondEn = SurfaceCondEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceCondEn value. //! \return the current SurfaceCondEn. bool GetSurfaceCondEn(void) const { return(SurfaceCondEn); } //+> Scope //========================================================= //! Sets the Scope with bound checking control //! \param ScopeIn - Scope of effect
//! Global=0
//! Regional=1
//! Entity=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScope(const ScopeGrp ScopeIn, bool bndchk=true); //========================================================= //! Gets the Scope value. //! \return the current Scope. ScopeGrp GetScope(void) const { return(Scope); } //+> Severity //========================================================= //! Sets the Severity with bound checking control //! \param SeverityIn - Severity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSeverity(const Cigi_uint8 SeverityIn, bool bndchk=true); //========================================================= //! Gets the Severity value. //! \return the current Severity. Cigi_uint8 GetSeverity(void) const { return(Severity); } //+> Coverage //========================================================= //! Sets the Coverage with bound checking control //! \param CoverageIn - Coverage //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCoverage(const Cigi_uint8 CoverageIn, bool bndchk=true); //========================================================= //! Gets the Coverage value. //! \return the current Coverage. Cigi_uint8 GetCoverage(void) const { return(Coverage); } protected: //==> Member variables //========================================================= //! EntityRgnID
//! Entity or Region ID //! Cigi_uint16 EntityRgnID; //========================================================= //! SurfaceCondID
//! Surface conditions ID //! Cigi_uint16 SurfaceCondID; //========================================================= //! SurfaceCondEn
//! Surface conditions enable //! bool SurfaceCondEn; //========================================================= //! Scope
//! Scope of effect
//! 0-Global
//! 1-Regional
//! 2-Entity //! //! ScopeGrp Scope; //========================================================= //! Severity
//! Cigi_uint8 Severity; //========================================================= //! Coverage
//! Percentage coverage over the specified area. //! Cigi_uint8 Coverage; }; #endif // #if !defined(_CIGI_BASE_TERRESTRIAL_SURFACE_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseTerrestrialSurfaceResp.h000066400000000000000000000154661210750432300242350ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseTerrestrialSurfaceResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_TERRESTRIAL_SURFACE_RESP_INCLUDED_) #define _CIGI_BASE_TERRESTRIAL_SURFACE_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3 112 #define CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_SIZE_V3 8 class CigiTerrestrialSurfaceRespV3; class CIGI_SPEC CigiBaseTerrestrialSurfaceResp : public CigiBasePacket { friend class CigiTerrestrialSurfaceRespV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseTerrestrialSurfaceResp() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseTerrestrialSurfaceResp() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { // V1 & V2 use the same packet id number if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3; } return(CIGI_SUCCESS); } //==> Accessing Member Variable Values functions //+> RequestID //========================================================= //! Sets the RequestID with bound checking control //! \param RequestIDIn - Request ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRequestID(const Cigi_uint8 RequestIDIn, bool bndchk=true) { RequestID = RequestIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RequestID value. //! \return the current RequestID. Cigi_uint8 GetRequestID(void) const { return(RequestID); } //+> SurfaceConditionID //========================================================= //! Sets the SurfaceConditionID with bound checking control //! \param SurfaceConditionIDIn - Surface Condition ID code //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSurfaceConditionID(const Cigi_uint32 SurfaceConditionIDIn, bool bndchk=true) { SurfaceConditionID = SurfaceConditionIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SurfaceConditionID value. //! \return the current SurfaceConditionID. Cigi_uint32 GetSurfaceConditionID(void) const { return(SurfaceConditionID); } protected: //==> Member variables //========================================================= //! RequestID
//! Request ID //! Cigi_uint8 RequestID; //========================================================= //! SurfaceConditionID
//! Surface Condition ID code //! Cigi_uint32 SurfaceConditionID; }; #endif // #if !defined(_CIGI_BASE_TERRESTRIAL_SURFACE_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseTrajectoryDef.h000066400000000000000000000212631210750432300223270ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseTrajectoryDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_TRAJECTORY_DEF_INCLUDED_) #define _CIGI_BASE_TRAJECTORY_DEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_TRAJECTORY_DEF_PACKET_ID_V1 21 #define CIGI_TRAJECTORY_DEF_PACKET_SIZE_V1 28 #define CIGI_TRAJECTORY_DEF_PACKET_ID_V2 21 #define CIGI_TRAJECTORY_DEF_PACKET_SIZE_V2 16 #define CIGI_TRAJECTORY_DEF_PACKET_ID_V3 20 #define CIGI_TRAJECTORY_DEF_PACKET_SIZE_V3 24 class CigiTrajectoryDefV1; class CigiTrajectoryDefV2; class CigiTrajectoryDefV3; class CIGI_SPEC CigiBaseTrajectoryDef : public CigiBasePacket { friend class CigiTrajectoryDefV1; friend class CigiTrajectoryDefV2; friend class CigiTrajectoryDefV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseTrajectoryDef(); //========================================================= //! General Destructor //! virtual ~CigiBaseTrajectoryDef(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The Entity ID. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityIDIn value. //! \return the current EntityIDIn. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> RetardationRate //========================================================= //! Sets the RetardationRate with bound checking control //! \param RetardationRateIn - Deceleration usually due to drag. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRetardationRate(const float RetardationRateIn, bool bndchk=true) { RetardationRate = RetardationRateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RetardationRate value. //! \return the current RetardationRate. float GetRetardationRate(void) const { return(RetardationRate); } //+> TermVel //========================================================= //! Sets the TermVel with bound checking control //! \param TermVelIn - The terminal velocity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTermVel(const float TermVelIn, bool bndchk=true) { TermVel = TermVelIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the TermVel value. //! \return the current TermVel. float GetTermVel(void) const { return(TermVel); } protected: //==> Member variables //========================================================= //! EntityID
//! Uniquely identifies the entity to which this packet //! is applied. //! Cigi_uint16 EntityID; //========================================================= //! Accel
//! Acceleration (usually due to gravity) //! float Accel; //========================================================= //! RetardationRate
//! Deceleration (usually due to drag) //! float RetardationRate; //========================================================= //! TermVel
//! Terminal Velocity //! float TermVel; //========================================================= //! Xoff
//! The offset along the entity's X axis from the entity's reference //! point from which the trajectory is started. //! float Xoff; //========================================================= //! Yoff
//! The offset along the entity's Y axis from the entity's reference //! point from which the trajectory is started. //! float Yoff; //========================================================= //! Zoff
//! The offset along the entity's Z axis from the entity's reference //! point from which the trajectory is started. //! float Zoff; //========================================================= //! AccelX
//! The acceleration along the X (North) axis //! float AccelX; //========================================================= //! AccelY
//! The acceleration along the Y (East) axis //! float AccelY; //========================================================= //! AccelZ
//! The acceleration along the Z (Down) axis //! float AccelZ; }; #endif // #if !defined(_CIGI_BASE_TRAJECTORY_DEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseVariableSizePckt.h000066400000000000000000000075231210750432300227670ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseVariableSizePckt.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_VARIABLE_SIZE_PACKET_INCLUDED_) #define _CIGI_BASE_VARIABLE_SIZE_PACKET_INCLUDED_ #include "CigiBasePacket.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseVariableSizePckt : public CigiBasePacket { public: //========================================================= //! General Constructor //! CigiBaseVariableSizePckt() { }; //========================================================= //! General Destructor //! virtual ~CigiBaseVariableSizePckt() { }; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A pure virtual function to determine the size that the //! packet will take up when packed. //! This function is not implemented in this class. //! \param refPacket - A pointer to the current pack point. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) =0; //========================================================= //! An accessor to the size of the variable data. //! //! \return The size of the variable data //! int GetVariableDataSize(void) { return(VariableDataSize); } protected: //========================================================= //! The current size of the variable data //! int VariableDataSize; }; #endif // !defined(_CIGI_BASE_VARIABLE_SIZE_PACKET_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseVertexSymbolData.h000066400000000000000000000140541210750432300230170ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseVertexSymbolData.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_VERTEX_SYMBOL_DATA_INCLUDED_) #define _CIGI_BASE_VERTEX_SYMBOL_DATA_INCLUDED_ #include "CigiTypes.h" #include "CigiErrorCodes.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3 8 class CigiVertexSymbolDataV3_3; //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiBaseVertexSymbolData { friend class CigiVertexSymbolDataV3_3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseVertexSymbolData(void) {}; //========================================================= //! General Destructor //! virtual ~CigiBaseVertexSymbolData(void) {}; //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the Circle //! Data to be packed. (Downcast to CigiBaseVertexSymbolData) //! \param Buff - A pointer to the current pack point. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBaseVertexSymbolData * Base, Cigi_uint8 * Buff) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap) =0; //==> Accessing Member Variable Values functions //+> Vertices //========================================================= //! Sets both elements of the Vertex with bound checking control //! \param VertexUIn - The Vertex's U position //! \param VertexVIn - The Vertex's V position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVertex(const float VertexUIn, const float VertexVIn, bool bndchk=true) { VertexU = VertexUIn; VertexV = VertexVIn; return(CIGI_SUCCESS); } //========================================================= //! Gets both elements of the Vertex //! \param VertexUIn - A reference to receive the //! Vertex's U position //! \param VertexVIn - A reference to receive the //! Vertex's V position //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int GetVertex(float &VertexUIn, float &VertexVIn) { VertexUIn = VertexU; VertexVIn = VertexV; return(CIGI_SUCCESS); } //+> VertexU //========================================================= //! Sets the VertexU with bound checking control //! \param VertexUIn - The Vertex's U position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVertexU(const float VertexUIn, bool bndchk=true) { VertexU = VertexUIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VertexU with bound checking control //! \return VertexU //! float GetVertexU(void) const { return(VertexU); } //+> VertexV //========================================================= //! Sets the VertexV with bound checking control //! \param VertexVIn - The Vertex's V position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVertexV(const float VertexVIn, bool bndchk=true) { VertexV = VertexVIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VertexV with bound checking control //! \return VertexV //! float GetVertexV(void) const { return(VertexV); } protected: //==> Member variables //========================================================= //! VertexU
//! The Vertex's U position //! float VertexU; //========================================================= //! VertexV
//! The Vertex's V position //! float VertexV; }; #endif // #if !defined(_CIGI_BASE_VERTEX_SYMBOL_DATA_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseViewCtrl.h000066400000000000000000000274271210750432300213310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseViewCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_VIEW_CTRL_INCLUDED_) #define _CIGI_BASE_VIEW_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_VIEW_CTRL_PACKET_ID_V1 8 #define CIGI_VIEW_CTRL_PACKET_SIZE_V1 32 #define CIGI_VIEW_CTRL_PACKET_ID_V2 8 #define CIGI_VIEW_CTRL_PACKET_SIZE_V2 32 #define CIGI_VIEW_CTRL_PACKET_ID_V3 16 #define CIGI_VIEW_CTRL_PACKET_SIZE_V3 32 class CigiViewCtrlV1; class CigiViewCtrlV2; class CigiViewCtrlV3; class CIGI_SPEC CigiBaseViewCtrl : public CigiBasePacket { friend class CigiViewCtrlV1; friend class CigiViewCtrlV2; friend class CigiViewCtrlV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseViewCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseViewCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Identifies the entity which the view //! or view group should be attached. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> XOff //========================================================= //! Sets the XOff with bound checking control //! \param XOffIn - The Offset from the specified entity's origin //! along the entity's X axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXOff(const float XOffIn, bool bndchk=true) { XOff = XOffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XOff value. //! \return the current XOff. float GetXOff(void) const { return(XOff); } //+> YOff //========================================================= //! Sets the YOff with bound checking control //! \param YOffIn - The Offset from the specified entity's origin //! along the entity's Y axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYOff(const float YOffIn, bool bndchk=true) { YOff = YOffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YOff value. //! \return the current YOff. float GetYOff(void) const { return(YOff); } //+> ZOff //========================================================= //! Sets the ZOff with bound checking control //! \param ZOffIn - The Offset from the specified entity's origin //! along the entity's Z axis. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZOff(const float ZOffIn, bool bndchk=true) { ZOff = ZOffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZOff value. //! \return the current ZOff. float GetZOff(void) const { return(ZOff); } //+> Roll //========================================================= //! Sets the Roll with bound checking control //! \param RollIn - The roll about the specified entity's //! body coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRoll(const float RollIn, bool bndchk=true); //========================================================= //! Gets the Roll value. //! \return the current Roll. float GetRoll(void) const { return(Roll); } //+> Pitch //========================================================= //! Sets the Pitch with bound checking control //! \param PitchIn - The pitch about the specified entity's //! body coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitch(const float PitchIn, bool bndchk=true); //========================================================= //! Gets the Pitch value. //! \return the current Pitch. float GetPitch(void) const { return(Pitch); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - The yaw about the specified entity's //! body coordinate system. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value. //! \return the current Yaw. float GetYaw(void) const { return(Yaw); } protected: //==> Member variables //========================================================= //! EntityID
//! Uniquely identifies the specific entity
//! Cigi_uint16 EntityID; //========================================================= //! ViewID
//! Specifies the view that this packet controls.
//! If The Group ID is not 0, ViewID is ignored. //! Cigi_uint16 ViewID; //========================================================= //! GroupID
//! Specifies the view group that this packet controls. //! Cigi_uint8 GroupID; //========================================================= //! XOffEn
//! X Offset data valid and to be used. //! bool XOffEn; //========================================================= //! YOffEn
//! Y Offset data valid and to be used. //! bool YOffEn; //========================================================= //! ZOffEn
//! Z Offset data valid and to be used. //! bool ZOffEn; //========================================================= //! RollEn
//! Roll data valid and to be used. //! bool RollEn; //========================================================= //! PitchEn
//! Pitch data valid and to be used. //! bool PitchEn; //========================================================= //! YawEn
//! Yaw data valid and to be used. //! bool YawEn; //========================================================= //! XOff
//! The Offset from the specified entity's origin //! along the entity's X axis. //! float XOff; //========================================================= //! YOff
//! The Offset from the specified entity's origin //! along the entity's Y axis. //! float YOff; //========================================================= //! ZOff
//! The Offset from the specified entity's origin //! along the entity's Z axis. //! float ZOff; //========================================================= //! Roll
//! The roll about the specified entity's body coordinate system. //! float Roll; //========================================================= //! Pitch
//! The pitch about the specified entity's body coordinate system. //! float Pitch; //========================================================= //! Yaw
//! The yaw about the specified entity's body coordinate system. //! float Yaw; }; #endif // #if !defined(_CIGI_BASE_VIEW_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseViewDef.h000066400000000000000000000403211210750432300211070ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseViewDef.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_VIEWDEF_INCLUDED_) #define _CIGI_BASE_VIEWDEF_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_VIEW_DEF_PACKET_ID_V1 23 #define CIGI_VIEW_DEF_PACKET_SIZE_V1 32 #define CIGI_VIEW_DEF_PACKET_ID_V2 23 #define CIGI_VIEW_DEF_PACKET_SIZE_V2 32 #define CIGI_VIEW_DEF_PACKET_ID_V3 21 #define CIGI_VIEW_DEF_PACKET_SIZE_V3 32 class CigiViewDefV1; class CigiViewDefV2; class CigiViewDefV3; class CIGI_SPEC CigiBaseViewDef : public CigiBasePacket { friend class CigiViewDefV1; friend class CigiViewDefV2; friend class CigiViewDefV3; public: //========================================================= //! The enumeration for the CigiBaseViewDef Group //! enum MirrorModeGrp { MirrorNone=0, Horizontal=1, Vertical=2, Horiz_Vert=3 }; //========================================================= //! The enumeration for the CigiBaseViewDef Group //! enum PixelReplicateModeGrp { ReplicateNone=0, Replicate1x2=1, Replicate2x1=2, Replicate2x2=3, ReplicateDefA=4, ReplicateDefB=5, ReplicateDefC=6, ReplicateDefD=7 }; //========================================================= //! The enumeration for the CigiBaseViewDef Group //! enum ProjectionTypeGrp { Perspective=0, Orthographic=1 }; //==> Management //========================================================= //! General Constructor //! CigiBaseViewDef(); //========================================================= //! General Destructor //! virtual ~CigiBaseViewDef(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> MirrorMode //========================================================= //! Sets the MirrorMode with bound checking control //! \param MirrorModeIn - Specifies if the image is mirrored
//! MirrorNone=0
//! Horizontal=1
//! Vertical=2
//! Horiz_Vert=3
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMirrorMode(const MirrorModeGrp MirrorModeIn, bool bndchk=true); //========================================================= //! Gets the MirrorMode value. //! \return the current MirrorMode. MirrorModeGrp GetMirrorMode(void) const { return(MirrorMode); } //+> PixelReplicateMode //========================================================= //! Sets the PixelReplicateMode with bound checking control //! \param PixelReplicateModeIn - Specifies what kind of //! pixel replication (zoom) is currently being used.
//! ReplicateNone=0
//! Replicate1x2=1
//! Replicate2x1=2
//! Replicate2x2=3
//! ReplicateDefA=4
//! ReplicateDefB=5
//! ReplicateDefC=6
//! ReplicateDefD=7
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPixelReplicateMode(const PixelReplicateModeGrp PixelReplicateModeIn, bool bndchk=true); //========================================================= //! Gets the PixelReplicateMode value. //! \return the current PixelReplicateMode. PixelReplicateModeGrp GetPixelReplicateMode(void) const { return(PixelReplicateMode); } //+> ViewType //========================================================= //! Sets the ViewType with bound checking control //! \param ViewTypeIn - Specifies view type (IG defined values) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewType(const Cigi_uint8 ViewTypeIn, bool bndchk=true); //========================================================= //! Gets the ViewType value. //! \return the current ViewType. Cigi_uint8 GetViewType(void) const { return(ViewType); } //+> FOVNear //========================================================= //! Sets the FOVNear with bound checking control //! \param FOVNearIn - The position of the near clipping plane. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVNear(const float FOVNearIn, bool bndchk=true) { FOVNear = FOVNearIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVNear value. //! \return the current FOVNear. float GetFOVNear(void) const { return(FOVNear); } //+> FOVFar //========================================================= //! Sets the FOVFar with bound checking control //! \param FOVFarIn - The position of the far clipping plane. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVFar(const float FOVFarIn, bool bndchk=true) { FOVFar = FOVFarIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVFar value. //! \return the current FOVFar. float GetFOVFar(void) const { return(FOVFar); } //+> FOVLeft //========================================================= //! Sets the FOVLeft with bound checking control //! \param FOVLeftIn - The position in degrees of the left clipping plane. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVLeft(const float FOVLeftIn, bool bndchk=true) { FOVLeft = FOVLeftIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVLeft value. //! \return the current FOVLeft. float GetFOVLeft(void) const { return(FOVLeft); } //+> FOVRight //========================================================= //! Sets the FOVRight with bound checking control //! \param FOVRightIn - The position in degrees of the right clipping plane. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVRight(const float FOVRightIn, bool bndchk=true) { FOVRight = FOVRightIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVRight value. //! \return the current FOVRight. float GetFOVRight(void) const { return(FOVRight); } //+> FOVTop //========================================================= //! Sets the FOVTop with bound checking control //! \param FOVTopIn - The position in degrees of the top clipping plane. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVTop(const float FOVTopIn, bool bndchk=true) { FOVTop = FOVTopIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVTop value. //! \return the current FOVTop. float GetFOVTop(void) const { return(FOVTop); } //+> FOVBottom //========================================================= //! Sets the FOVBottom with bound checking control //! \param FOVBottomIn - The position in degrees of the bottom clipping plane. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVBottom(const float FOVBottomIn, bool bndchk=true) { FOVBottom = FOVBottomIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVBottom value. //! \return the current FOVBottom. float GetFOVBottom(void) const { return(FOVBottom); } protected: //==> Member variables //========================================================= //! ViewID
//! Specifies the view that this packet defines. //! Cigi_uint16 ViewID; //========================================================= //! GroupID
//! Specifies which group the view is to be attached. //! Cigi_uint8 GroupID; //========================================================= //! FOVNearEn
//! Specifies the validity of the FOVNear parameter
//! true - valid data : false - data is not valid //! bool FOVNearEn; //========================================================= //! FOVFarEn
//! Specifies the validity of the FOVFar parameter
//! true - valid data : false - data is not valid //! bool FOVFarEn; //========================================================= //! FOVLeftEn
//! Specifies the validity of the FOVLeft parameter
//! true - valid data : false - data is not valid //! bool FOVLeftEn; //========================================================= //! FOVRightEn
//! Specifies the validity of the FOVRight parameter
//! true - valid data : false - data is not valid //! bool FOVRightEn; //========================================================= //! FOVTopEn
//! Specifies the validity of the FOVTop parameter
//! true - valid data : false - data is not valid //! bool FOVTopEn; //========================================================= //! FOVBottomEn
//! Specifies the validity of the FOVBottom parameter
//! true - valid data : false - data is not valid //! bool FOVBottomEn; //========================================================= //! MirrorMode
//! Specifies the mirror mode applied to this view.
//! This is typically used to replicate a view on a //! mirrored surface.
//! 0-MirrorNone
//! 1-Horizontal
//! 2-Vertical
//! 3-Horiz_Vert //! //! MirrorModeGrp MirrorMode; //========================================================= //! PixelReplicateMode
//! Specifies the pixel replication (zoom) method.
//! 0-ReplicateNone
//! 1-Replicate1x2
//! 2-Replicate2x1
//! 3-Replicate2x2
//! 4-ReplicateDefA
//! 5-ReplicateDefB
//! 6-ReplicateDefC
//! 7-ReplicateDefD //! //! PixelReplicateModeGrp PixelReplicateMode; //========================================================= //! ProjectionType
//! Specifies the projection used for this view. //! 0-Perspective
//! 1-Orthographic //! //! ProjectionTypeGrp ProjectionType; //========================================================= //! Reorder
//! Specifies if the views should be reordered.
//! false - Do not reorder. //! true - Bring the view to the front. //! bool Reorder; //========================================================= //! ViewType
//! Specifies the view type.
//! The values are defined by the IG. //! Cigi_uint8 ViewType; //========================================================= //! TrackerAssigned
//! Specifies if a tracker is assigned to this view //! bool TrackerAssigned; //========================================================= //! FOVNear
//! Specifies the position of the near clipping plane. //! float FOVNear; //========================================================= //! FOVFar
//! Specifies the position of the far clipping plane. //! float FOVFar; //========================================================= //! FOVLeft
//! Specifies the position of the left clipping plane in degrees. //! float FOVLeft; //========================================================= //! FOVRight
//! Specifies the position of the right clipping plane in degrees. //! float FOVRight; //========================================================= //! FOVTop
//! Specifies the position of the top clipping plane in degrees. //! float FOVTop; //========================================================= //! FOVBottom
//! Specifies the position of the bottom clipping plane in degrees. //! float FOVBottom; }; #endif // #if !defined(_CIGI_BASE_VIEWDEF_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseWaveCtrl.h000066400000000000000000000323021210750432300213050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseWaveCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_WAVE_CTRL_INCLUDED_) #define _CIGI_BASE_WAVE_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_WAVE_CTRL_PACKET_ID_V3 14 #define CIGI_WAVE_CTRL_PACKET_SIZE_V3 32 class CigiWaveCtrlV3; class CIGI_SPEC CigiBaseWaveCtrl : public CigiBasePacket { friend class CigiWaveCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseWaveCtrl Group //! enum ScopeGrp { Global=0, Regional=1, Entity=2 }; //========================================================= //! The enumeration for the CigiBaseWaveCtrl Group //! enum BreakerGrp { Plunging=0, Spilling=1, Surging=2 }; //==> Management //========================================================= //! General Constructor //! CigiBaseWaveCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseWaveCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityRgnID //========================================================= //! Sets the EntityRgnID with bound checking control //! \param EntityRgnIDIn - Entity or Region ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityRgnID(const Cigi_uint16 EntityRgnIDIn, bool bndchk=true) { EntityRgnID = EntityRgnIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityRgnID value. //! \return the current EntityRgnID. Cigi_uint16 GetEntityRgnID(void) const { return(EntityRgnID); } //+> WaveID //========================================================= //! Sets the WaveID with bound checking control //! \param WaveIDIn - Wave ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWaveID(const Cigi_uint8 WaveIDIn, bool bndchk=true) { WaveID = WaveIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WaveID value. //! \return the current WaveID. Cigi_uint8 GetWaveID(void) const { return(WaveID); } //+> WaveEn //========================================================= //! Sets the WaveEn with bound checking control //! \param WaveEnIn - Wave enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWaveEn(const bool WaveEnIn, bool bndchk=true) { WaveEn = WaveEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WaveEn value. //! \return the current WaveEn. bool GetWaveEn(void) const { return(WaveEn); } //+> Scope //========================================================= //! Sets the Scope with bound checking control //! \param ScopeIn - Scope of Effect
//! Global=0
//! Regional=1
//! Entity=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScope(const ScopeGrp ScopeIn, bool bndchk=true); //========================================================= //! Gets the Scope value. //! \return the current Scope. ScopeGrp GetScope(void) const { return(Scope); } //+> Breaker //========================================================= //! Sets the Breaker with bound checking control //! \param BreakerIn - Breaker type
//! Plunging=0
//! Spilling=1
//! Surging=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBreaker(const BreakerGrp BreakerIn, bool bndchk=true); //========================================================= //! Gets the Breaker value. //! \return the current Breaker. BreakerGrp GetBreaker(void) const { return(Breaker); } //+> WaveHt //========================================================= //! Sets the WaveHt with bound checking control //! \param WaveHtIn - Wave height //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWaveHt(const float WaveHtIn, bool bndchk=true); //========================================================= //! Gets the WaveHt value. //! \return the current WaveHt. float GetWaveHt(void) const { return(WaveHt); } //+> WaveLen //========================================================= //! Sets the WaveLen with bound checking control //! \param WaveLenIn - Wave length //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWaveLen(const float WaveLenIn, bool bndchk=true); //========================================================= //! Gets the WaveLen value. //! \return the current WaveLen. float GetWaveLen(void) const { return(WaveLen); } //+> Period //========================================================= //! Sets the Period with bound checking control //! \param PeriodIn - Wave period //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPeriod(const float PeriodIn, bool bndchk=true); //========================================================= //! Gets the Period value. //! \return the current Period. float GetPeriod(void) const { return(Period); } //+> Direction //========================================================= //! Sets the Direction with bound checking control //! \param DirectionIn - Direction the wave is propagating //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDirection(const float DirectionIn, bool bndchk=true); //========================================================= //! Gets the Direction value. //! \return the current Direction. float GetDirection(void) const { return(Direction); } //+> PhaseOff //========================================================= //! Sets the PhaseOff with bound checking control //! \param PhaseOffIn - Phase offset //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPhaseOff(const float PhaseOffIn, bool bndchk=true); //========================================================= //! Gets the PhaseOff value. //! \return the current PhaseOff. float GetPhaseOff(void) const { return(PhaseOff); } //+> Leading //========================================================= //! Sets the Leading with bound checking control //! \param LeadingIn - Leading //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLeading(const float LeadingIn, bool bndchk=true); //========================================================= //! Gets the Leading value. //! \return the current Leading. float GetLeading(void) const { return(Leading); } protected: //==> Member variables //========================================================= //! EntityRgnID
//! Entity or Region ID //! Cigi_uint16 EntityRgnID; //========================================================= //! WaveID
//! Wave ID //! Cigi_uint8 WaveID; //========================================================= //! WaveEn
//! Wave enable //! bool WaveEn; //========================================================= //! Scope
//! Scope of Effect
//! 0-Global
//! 1-Regional
//! 2-Entity //! //! ScopeGrp Scope; //========================================================= //! Breaker
//! Breaker type
//! 0-Plunging
//! 1-Spilling
//! 2-Surging //! //! BreakerGrp Breaker; //========================================================= //! WaveHt
//! Wave height //! float WaveHt; //========================================================= //! WaveLen
//! Wave length //! float WaveLen; //========================================================= //! Period
//! Wave period //! float Period; //========================================================= //! Direction
//! Direction the wave is propagating //! float Direction; //========================================================= //! PhaseOff
//! Phase offset //! float PhaseOff; //========================================================= //! Leading
//! Leading //! float Leading; }; #endif // #if !defined(_CIGI_BASE_WAVE_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseWeatherCondResp.h000066400000000000000000000247311210750432300226220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseWeatherCondResp.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_WEATHER_COND_RESP_INCLUDED_) #define _CIGI_BASE_WEATHER_COND_RESP_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_WEATHER_COND_RESP_PACKET_ID_V3 109 #define CIGI_WEATHER_COND_RESP_PACKET_SIZE_V3 32 class CigiWeatherCondRespV3; class CIGI_SPEC CigiBaseWeatherCondResp : public CigiBasePacket { friend class CigiWeatherCondRespV3; public: //==> Management //========================================================= //! General Constructor //! CigiBaseWeatherCondResp(); //========================================================= //! General Destructor //! virtual ~CigiBaseWeatherCondResp(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> RequestID //========================================================= //! Sets the RequestID with bound checking control //! \param RequestIDIn - Request ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRequestID(const Cigi_uint8 RequestIDIn, bool bndchk=true) { RequestID = RequestIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RequestID value. //! \return the current RequestID. Cigi_uint8 GetRequestID(void) const { return(RequestID); } //+> Humidity //========================================================= //! Sets the Humidity with bound checking control //! \param HumidityIn - Humidity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk=true); //========================================================= //! Gets the Humidity value. //! \return the current Humidity. Cigi_uint8 GetHumidity(void) const { return(Humidity); } //+> AirTemp //========================================================= //! Sets the AirTemp with bound checking control //! \param AirTempIn - air temperature //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAirTemp(const float AirTempIn, bool bndchk=true) { AirTemp = AirTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AirTemp value. //! \return the current AirTemp. float GetAirTemp(void) const { return(AirTemp); } //+> Visibility //========================================================= //! Sets the Visibility with bound checking control //! \param VisibilityIn - Visibility range //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVisibility(const float VisibilityIn, bool bndchk=true); //========================================================= //! Gets the Visibility value. //! \return the current Visibility. float GetVisibility(void) const { return(Visibility); } //+> HorizWindSp //========================================================= //! Sets the HorizWindSp with bound checking control //! \param HorizWindSpIn - Horizontal wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHorizWindSp(const float HorizWindSpIn, bool bndchk=true); //========================================================= //! Gets the HorizWindSp value. //! \return the current HorizWindSp. float GetHorizWindSp(void) const { return(HorizWindSp); } //+> VertWindSp //========================================================= //! Sets the VertWindSp with bound checking control //! \param VertWindSpIn - Vertical wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVertWindSp(const float VertWindSpIn, bool bndchk=true) { VertWindSp = VertWindSpIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VertWindSp value. //! \return the current VertWindSp. float GetVertWindSp(void) const { return(VertWindSp); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDir value. //! \return the current WindDir. float GetWindDir(void) const { return(WindDir); } //+> BaroPress //========================================================= //! Sets the BaroPress with bound checking control //! \param BaroPressIn - Barometric pressure //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBaroPress(const float BaroPressIn, bool bndchk=true); //========================================================= //! Gets the BaroPress value. //! \return the current BaroPress. float GetBaroPress(void) const { return(BaroPress); } protected: //==> Member variables //========================================================= //! RequestID
//! Request ID //! Cigi_uint8 RequestID; //========================================================= //! Humidity
//! Cigi_uint8 Humidity; //========================================================= //! AirTemp
//! Air temperature //! float AirTemp; //========================================================= //! Visibility
//! Visibility range //! float Visibility; //========================================================= //! HorizWindSp
//! Horizontal wind speed //! float HorizWindSp; //========================================================= //! VertWindSp
//! Vertical wind speed //! float VertWindSp; //========================================================= //! WindDir
//! Wind direction //! float WindDir; //========================================================= //! BaroPress
//! Barometric pressure //! float BaroPress; }; #endif // #if !defined(_CIGI_BASE_WEATHER_COND_RESP_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiBaseWeatherCtrl.h000066400000000000000000000445041210750432300220110ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseWeatherCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_BASE_WEATHER_CTRL_INCLUDED_) #define _CIGI_BASE_WEATHER_CTRL_INCLUDED_ #include "CigiBasePacket.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_WEATHER_CTRL_PACKET_ID_V1 7 #define CIGI_WEATHER_CTRL_PACKET_SIZE_V1 44 #define CIGI_WEATHER_CTRL_PACKET_ID_V2 7 #define CIGI_WEATHER_CTRL_PACKET_SIZE_V2 44 #define CIGI_WEATHER_CTRL_PACKET_ID_V3 12 #define CIGI_WEATHER_CTRL_PACKET_SIZE_V3 56 class CigiWeatherCtrlV1; class CigiWeatherCtrlV2; class CigiWeatherCtrlV3; class CIGI_SPEC CigiBaseWeatherCtrl : public CigiBasePacket { friend class CigiWeatherCtrlV1; friend class CigiWeatherCtrlV2; friend class CigiWeatherCtrlV3; public: //========================================================= //! The enumeration for the CigiBaseWeatherCtrl Group //! enum CloudTypeGrp { None=0, Altocumulus=1, Altostratus=2, Cirrocumulus=3, Cirrostratus=4, Cirrus=5, Cumulonimbus=6, Cumulus=7, Nimbostratus=8, Stratocumulus=9, Stratus=10, DefA=11, DefB=12, DefC=13, DefD=14, DefE=15 }; //========================================================= //! The enumeration for the CigiBaseWeatherCtrl Group //! enum ScopeGrp { Global=0, Regional=1, Entity=2 }; //==> Management //========================================================= //! General Constructor //! CigiBaseWeatherCtrl(); //========================================================= //! General Destructor //! virtual ~CigiBaseWeatherCtrl(); //==> Buffer Packing/Unpacking //========================================================= //! A pure virtual Pack function. //! This function is not implemented in this class. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; //========================================================= //! A pure virtual Unpack function. //! This function is not implemented in this class. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The entity to which this weather is attached //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> WeatherEn //========================================================= //! Sets the WeatherEn with bound checking control //! \param WeatherEnIn - Weather enable(true)/disable(false) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWeatherEn(const bool WeatherEnIn, bool bndchk=true) { WeatherEn = WeatherEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WeatherEn value. //! \return the current WeatherEn. bool GetWeatherEn(void) const { return(WeatherEn); } //+> ScudEn //========================================================= //! Sets the ScudEn with bound checking control //! \param ScudEnIn - Scud enable(true)/disable(false) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScudEn(const bool ScudEnIn, bool bndchk=true) { ScudEn = ScudEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ScudEn value. //! \return the current ScudEn. bool GetScudEn(void) const { return(ScudEn); } //+> RandomWindsEn //========================================================= //! Sets the RandomWindsEn with bound checking control //! \param RandomWindsEnIn - Random winds enable(true)/disable(false) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRandomWindsEn(const bool RandomWindsEnIn, bool bndchk=true) { RandomWindsEn = RandomWindsEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RandomWindsEn value. //! \return the current RandomWindsEn. bool GetRandomWindsEn(void) const { return(RandomWindsEn); } //+> Severity //========================================================= //! Sets the Severity with bound checking control //! \param SeverityIn - Severity 0(least) to 5(most severe) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSeverity(const Cigi_uint8 SeverityIn, bool bndchk=true); //========================================================= //! Gets the Severity value. //! \return the current Severity. Cigi_uint8 GetSeverity(void) const { return(Severity); } //+> AirTemp //========================================================= //! Sets the AirTemp with bound checking control //! \param AirTempIn - Air Temperature //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAirTemp(const float AirTempIn, bool bndchk=true) { AirTemp = AirTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AirTemp value. //! \return the current AirTemp. float GetAirTemp(void) const { return(AirTemp); } //+> VisibilityRng //========================================================= //! Sets the VisibilityRng with bound checking control //! \param VisibilityRngIn - Visibility range //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVisibilityRng(const float VisibilityRngIn, bool bndchk=true); //========================================================= //! Gets the VisibilityRng value. //! \return the current VisibilityRng. float GetVisibilityRng(void) const { return(VisibilityRng); } //+> ScudFreq //========================================================= //! Sets the ScudFreq with bound checking control //! \param ScudFreqIn - Scud coverage percentage //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScudFreq(const float ScudFreqIn, bool bndchk=true); //========================================================= //! Gets the ScudFreq value. //! \return the current ScudFreq. float GetScudFreq(void) const { return(ScudFreq); } //+> Coverage //========================================================= //! Sets the Coverage with bound checking control //! \param CoverageIn - Weather coverage percentage //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCoverage(const float CoverageIn, bool bndchk=true); //========================================================= //! Gets the Coverage value. //! \return the current Coverage. float GetCoverage(void) const { return(Coverage); } //+> BaseElev //========================================================= //! Sets the BaseElev with bound checking control //! \param BaseElevIn - Elevation of the cloud base (bottom) //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBaseElev(const float BaseElevIn, bool bndchk=true) { BaseElev = BaseElevIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the BaseElev value. //! \return the current BaseElev. float GetBaseElev(void) const { return(BaseElev); } //+> Thickness //========================================================= //! Sets the Thickness with bound checking control //! \param ThicknessIn - Thickness or height(bottom to top) of the cloud //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetThickness(const float ThicknessIn, bool bndchk=true) { Thickness = ThicknessIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Thickness value. //! \return the current Thickness. float GetThickness(void) const { return(Thickness); } //+> Transition //========================================================= //! Sets the Transition with bound checking control //! \param TransitionIn - Thickness of the transition band //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTransition(const float TransitionIn, bool bndchk=true) { Transition = TransitionIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Transition value. //! \return the current Transition. float GetTransition(void) const { return(Transition); } //+> HorizWindSp //========================================================= //! Sets the HorizWindSp with bound checking control //! \param HorizWindSpIn - Horizontal Wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHorizWindSp(const float HorizWindSpIn, bool bndchk=true) { HorizWindSp = HorizWindSpIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the HorizWindSp value. //! \return the current HorizWindSp. float GetHorizWindSp(void) const { return(HorizWindSp); } protected: //==> Member variables //========================================================= //! EntityID
//! The Entity ID to which this weather is attached //! Cigi_uint16 EntityID; //========================================================= //! RegionID
//! The Region ID to which this weather is attached //! Cigi_uint16 RegionID; //========================================================= //! LayerID
//! The Layer ID that this packet controls //! Cigi_uint8 LayerID; //========================================================= //! Humidity
//! The humidity in this weather zone //! Cigi_uint8 Humidity; //========================================================= //! PhenomenonType
//! The type of weather being controlled //! Cigi_uint16 PhenomenonType; //========================================================= //! WeatherEn
//! Enables weather //! bool WeatherEn; //========================================================= //! ScudEn
//! Enables Scud //! bool ScudEn; //========================================================= //! RandomWindsEn
//! Enables random winds //! bool RandomWindsEn; //========================================================= //! RandomLightningEn
//! Enables random lightning //! bool RandomLightningEn; //========================================================= //! CloudType
//! Type of clouds being controlled.
//! 0-None
//! 1-Altocumulus
//! 2-Altostratus
//! 3-Cirrocumulus
//! 4-Cirrostratus
//! 5-Cirrus
//! 6-Cumulonimbus
//! 7-Cumulus
//! 8-Nimbostratus
//! 9-Stratocumulus
//! 10-Stratus
//! 11-DefA
//! 12-DefB
//! 13-DefC
//! 14-DefD
//! 15-DefE //! //! CloudTypeGrp CloudType; //========================================================= //! Scope
//! Specifies whether the weather being controlled is to be
//! global, attached to a region, or attached to an entity.
//! 0-Global
//! 1-Regional
//! 2-Entity //! //! ScopeGrp Scope; //========================================================= //! Severity
//! Weather severity
//! 0-Least severe //! 5-Most severe //! Cigi_uint8 Severity; //========================================================= //! AirTemp
//! Temperature of the air. //! float AirTemp; //========================================================= //! VisibilityRng
//! Visibility range //! float VisibilityRng; //========================================================= //! Opacity
//! The percentage opacity of the weather //! float Opacity; //========================================================= //! ScudFreq
//! Scud frequency (i.e. percentage coverage.) //! float ScudFreq; //========================================================= //! Coverage
//! Percentage of coverage. //! float Coverage; //========================================================= //! BaseElev
//! Altitude of the base of the cloud //! float BaseElev; //========================================================= //! Thickness
//! Thickness of the cloud from bottom to top. //! float Thickness; //========================================================= //! Transition
//! Thickness of the transition band //! float Transition; //========================================================= //! HorizWindSp
//! Horizontal Wind Speed //! float HorizWindSp; //========================================================= //! VertWindSp
//! Verticle Wind Speed //! float VertWindSp; //========================================================= //! WindDir
//! Wind direction //! float WindDir; //========================================================= //! BaroPress
//! Barometric pressure //! float BaroPress; //========================================================= //! Aeorsol
//! Amount of aerosol //! float Aerosol; }; #endif // #if !defined(_CIGI_BASE_WEATHER_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCelestialCtrl.h000066400000000000000000000253631210750432300215260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCelestialCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_CELESTIAL_CTRL_V3_INCLUDED_) #define _CIGI_CELESTIAL_CTRL_V3_INCLUDED_ #include "CigiBaseEnvCtrl.h" class CIGI_SPEC CigiCelestialCtrlV3 : public CigiBaseEnvCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiCelestialCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiCelestialCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to the Hold object //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V3 and V1 or V2. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V3 and V1 or V2. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Hold Object Manipulation //========================================================= //! The virtual FillHold function. //! \param Hold - A pointer to the Hold object. (Downcast to CigiBaseEnvCtrl) //! virtual void FillHold(CigiBaseEnvCtrl * Hold) const; //==> Accessing Member Variable Values functions //+> Hour //========================================================= //! Sets the Hour with bound checking control //! \param HourIn - Current Hour //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHour(const Cigi_uint8 HourIn, bool bndchk=true); //========================================================= //! Gets the Hour value. //! \return the current Hour. Cigi_uint8 GetHour(void) const { return(Hour); } //+> Minute //========================================================= //! Sets the Minute with bound checking control //! \param MinuteIn - Current minute //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinute(const Cigi_uint8 MinuteIn, bool bndchk=true); //========================================================= //! Gets the Minute value. //! \return the current Minute. Cigi_uint8 GetMinute(void) const { return(Minute); } //+> Month //========================================================= //! Sets the Month with bound checking control //! \param MonthIn - Current month //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMonth(const Cigi_uint8 MonthIn, bool bndchk=true); //========================================================= //! Gets the Month value. //! \return the current Month. Cigi_uint8 GetMonth(void) const { return(Month); } //+> Day //========================================================= //! Sets the Day with bound checking control //! \param DayIn - Current day of the month //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDay(const Cigi_uint8 DayIn, bool bndchk=true); //========================================================= //! Gets the Day value. //! \return the current Day. Cigi_uint8 GetDay(void) const { return(Day); } //+> Year //========================================================= //! Sets the Year with bound checking control //! \param YearIn - Current year //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYear(const Cigi_uint16 YearIn, bool bndchk=true) { Year = YearIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Year value. //! \return the current Year. Cigi_uint16 GetYear(void) const { return(Year); } //+> StarInt //========================================================= //! Sets the StarInt with bound checking control //! \param StarIntIn - Star field Intensity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStarInt(const float StarIntIn, bool bndchk=true); //========================================================= //! Gets the StarInt value. //! \return the current StarInt. float GetStarInt(void) const { return(StarInt); } //+> EphemerisEn //========================================================= //! Sets the EphemerisEn with bound checking control //! \param EphemerisEnIn - Ephereris model enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEphemerisEn(const bool EphemerisEnIn, bool bndchk=true) { EphemerisEn = EphemerisEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EphemerisEn value. //! \return the current EphemerisEn. bool GetEphemerisEn(void) const { return(EphemerisEn); } //+> SunEn //========================================================= //! Sets the SunEn with bound checking control //! \param SunEnIn - Sun enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSunEn(const bool SunEnIn, bool bndchk=true) { SunEn = SunEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SunEn value. //! \return the current SunEn. bool GetSunEn(void) const { return(SunEn); } //+> MoonEn //========================================================= //! Sets the MoonEn with bound checking control //! \param MoonEnIn - Moon enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMoonEn(const bool MoonEnIn, bool bndchk=true) { MoonEn = MoonEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the MoonEn value. //! \return the current MoonEn. bool GetMoonEn(void) const { return(MoonEn); } //+> StarEn //========================================================= //! Sets the StarEn with bound checking control //! \param StarEnIn - Star field enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetStarEn(const bool StarEnIn, bool bndchk=true) { StarEn = StarEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the StarEn value. //! \return the current StarEn. bool GetStarEn(void) const { return(StarEn); } //+> DateVld //========================================================= //! Sets the DateVld with bound checking control //! \param DateVldIn - Date valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDateVld(const bool DateVldIn, bool bndchk=true) { DateVld = DateVldIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DateVld value. //! \return the current DateVld. bool GetDateVld(void) const { return(DateVld); } }; #endif // #if !defined(_CIGI_CELESTIAL_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCircleSymbolDataV3_3.h000066400000000000000000000061151210750432300226020ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCircleSymbolDataV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_CIRCLE_SYMBOL_DATA_V3_3_INCLUDED_) #define _CIGI_CIRCLE_SYMBOL_DATA_V3_3_INCLUDED_ #include "CigiBaseCircleSymbolData.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3 24 //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiCircleSymbolDataV3_3 : public CigiBaseCircleSymbolData { public: //==> Management //========================================================= //! General Constructor //! CigiCircleSymbolDataV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiCircleSymbolDataV3_3(void); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the Circle //! Data to be packed. (Downcast to CigiBaseCircleSymbolData) //! \param Buff - A pointer to the current pack point. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBaseCircleSymbolData * Base, Cigi_uint8 * Buff) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap); }; #endif // #if !defined(_CIGI_CIRCLE_SYMBOL_DATA_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCnvtInfoType.h000066400000000000000000000040221210750432300213510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiCnvtInfoType.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) Class Library
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                Project version
 *  DESCRIPTION OF CHANGE........................
 *
 *  03/11/2008 Greg Basler                       2.0.0
 *  Initial Release.
 *
 *  Author: The Boeing Company
 *
 * 
*/ #if !defined(_CIGI_CONVERTION_INFORMATION_TYPE_INCLUDED_) #define _CIGI_CONVERTION_INFORMATION_TYPE_INCLUDED_ #include "CigiProcessType.h" //========================================================= //! The information needed to convert between the versions //! of CIGI. //! namespace CigiCnvtInfoType { typedef struct CigiCnvtInfoStruct { //============================ //! The ID of the processing //! method that this packet uses CigiProcessType::Type ProcID; //============================ //! The packet ID of the packet //! to which this packet will //! be converted. Cigi_uint8 CnvtPacketID; } Type; } #endif // _CIGI_CONVERTION_INFORMATION_TYPE_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiCollDetSegDefV1.h000066400000000000000000000100151210750432300215730ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegDefV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_SEG_DEF_V1_INCLUDED_) #define _CIGI_COLL_DET_SEG_DEF_V1_INCLUDED_ #include "CigiBaseCollDetSegDef.h" class CIGI_SPEC CigiCollDetSegDefV1 : public CigiBaseCollDetSegDef { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetSegDefV1(); //========================================================= //! General Destructor //! virtual ~CigiCollDetSegDefV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> SegmentID //========================================================= //! Sets the SegmentID with bound checking control //! \param SegmentIDIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegmentID(const Cigi_uint8 SegmentIDIn, bool bndchk=true); //========================================================= //! Gets the SegmentID value. //! \return the current SegmentID. Cigi_uint8 GetSegmentID(void) const { return(SegmentID); } }; #endif // #if !defined(_CIGI_COLL_DET_SEG_DEF_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetSegDefV2.h000066400000000000000000000100161210750432300215750ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegDefV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_SEG_DEF_V2_INCLUDED_) #define _CIGI_COLL_DET_SEG_DEF_V2_INCLUDED_ #include "CigiBaseCollDetSegDef.h" class CIGI_SPEC CigiCollDetSegDefV2 : public CigiBaseCollDetSegDef { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetSegDefV2(); //========================================================= //! General Destructor //! virtual ~CigiCollDetSegDefV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> SegmentID //========================================================= //! Sets the SegmentID with bound checking control //! \param SegmentIDIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegmentID(const Cigi_uint8 SegmentIDIn, bool bndchk=true); //========================================================= //! Gets the SegmentID value. //! \return the current SegmentID. Cigi_uint8 GetSegmentID(void) const { return(SegmentID); } }; #endif // #if !defined(_CIGI_COLL_DET_SEG_DEF_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetSegDefV3.h000066400000000000000000000101221210750432300215740ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegDefV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_SEG_DEF_V3_INCLUDED_) #define _CIGI_COLL_DET_SEG_DEF_V3_INCLUDED_ #include "CigiBaseCollDetSegDef.h" class CIGI_SPEC CigiCollDetSegDefV3 : public CigiBaseCollDetSegDef { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetSegDefV3(); //========================================================= //! General Destructor //! virtual ~CigiCollDetSegDefV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> SegmentID //========================================================= //! Sets the SegmentID with bound checking control //! \param SegmentIDIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegmentID(const Cigi_uint8 SegmentIDIn, bool bndchk=true) { SegmentID = SegmentIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SegmentID value. //! \return the current SegmentID. Cigi_uint8 GetSegmentID(void) const { return(SegmentID); } }; #endif // #if !defined(_CIGI_COLL_DET_SEG_DEF_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetSegRespV1.h000066400000000000000000000136311210750432300220150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegRespV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_SEG_RESP_V1_INCLUDED_) #define _CIGI_COLL_DET_SEG_RESP_V1_INCLUDED_ #include "CigiBaseCollDetSegResp.h" class CIGI_SPEC CigiCollDetSegRespV1 : public CigiBaseCollDetSegResp { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetSegRespV1(); //========================================================= //! General Destructor //! virtual ~CigiCollDetSegRespV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> SegID //========================================================= //! Sets the SegID with bound checking control //! \param SegIDIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegID(const Cigi_uint8 SegIDIn, bool bndchk=true); //========================================================= //! Gets the SegID value. //! \return the current SegID. Cigi_uint8 GetSegID(void) const { return(SegID); } //+> X //========================================================= //! Sets the X with bound checking control //! \param XIn - The collision point along the X axis of the //! originating entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetX(const float XIn, bool bndchk=true) { X = XIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the X value. //! \return the current X. float GetX(void) const { return(X); } //+> Y //========================================================= //! Sets the Y with bound checking control //! \param YIn - The collision point along the Y axis of the //! originating entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetY(const float YIn, bool bndchk=true) { Y = YIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Y value. //! \return the current Y. float GetY(void) const { return(Y); } //+> Z //========================================================= //! Sets the Z with bound checking control //! \param ZIn - The collision point along the Z axis of the //! originating entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZ(const float ZIn, bool bndchk=true) { Z = ZIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z value. //! \return the current Z. float GetZ(void) const { return(Z); } }; #endif // #if !defined(_CIGI_COLL_DET_SEG_RESP_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetSegRespV2.h000066400000000000000000000166631210750432300220260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegRespV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_SEG_RESP_V2_INCLUDED_) #define _CIGI_COLL_DET_SEG_RESP_V2_INCLUDED_ #include "CigiBaseCollDetSegResp.h" class CIGI_SPEC CigiCollDetSegRespV2 : public CigiBaseCollDetSegResp { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetSegRespV2(); //========================================================= //! General Destructor //! virtual ~CigiCollDetSegRespV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> SegID //========================================================= //! Sets the SegID with bound checking control //! \param SegIDIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegID(const Cigi_uint8 SegIDIn, bool bndchk=true); //========================================================= //! Gets the SegID value. //! \return the current SegID. Cigi_uint8 GetSegID(void) const { return(SegID); } //+> CollType //========================================================= //! Sets the CollType with bound checking control //! \param CollTypeIn - Collision type
//! NonEntity=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollType(const CollTypeGrp CollTypeIn, bool bndchk=true); //========================================================= //! Gets the CollType value. //! \return the current CollType. CollTypeGrp GetCollType(void) const { return(CollType); } //+> CollEntityID //========================================================= //! Sets the CollEntityID with bound checking control //! \param CollEntityIDIn - Entity ID of the entity collided with. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollEntityID(const Cigi_uint16 CollEntityIDIn, bool bndchk=true) { CollEntityID = CollEntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CollEntityID value. //! \return the current CollEntityID. Cigi_uint16 GetCollEntityID(void) const { return(CollEntityID); } //+> X //========================================================= //! Sets the X with bound checking control //! \param XIn - The collision point along the X axis of the //! originating entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetX(const float XIn, bool bndchk=true) { X = XIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the X value. //! \return the current X. float GetX(void) const { return(X); } //+> Y //========================================================= //! Sets the Y with bound checking control //! \param YIn - The collision point along the Y axis of the //! originating entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetY(const float YIn, bool bndchk=true) { Y = YIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Y value. //! \return the current Y. float GetY(void) const { return(Y); } //+> Z //========================================================= //! Sets the Z with bound checking control //! \param ZIn - The collision point along the Z axis of the //! originating entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZ(const float ZIn, bool bndchk=true) { Z = ZIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z value. //! \return the current Z. float GetZ(void) const { return(Z); } }; #endif // #if !defined(_CIGI_COLL_DET_SEG_RESP_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetSegRespV3.h000066400000000000000000000145331210750432300220210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_SEG_RESP_V3_INCLUDED_) #define _CIGI_COLL_DET_SEG_RESP_V3_INCLUDED_ #include "CigiBaseCollDetSegResp.h" class CIGI_SPEC CigiCollDetSegRespV3 : public CigiBaseCollDetSegResp { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetSegRespV3(); //========================================================= //! General Destructor //! virtual ~CigiCollDetSegRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> SegID //========================================================= //! Sets the SegID with bound checking control //! \param SegIDIn - Segment ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSegID(const Cigi_uint8 SegIDIn, bool bndchk=true) { SegID = SegIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SegID value. //! \return the current SegID. Cigi_uint8 GetSegID(void) const { return(SegID); } //+> CollType //========================================================= //! Sets the CollType with bound checking control //! \param CollTypeIn - Collision Type
//! NonEntity=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollType(const CollTypeGrp CollTypeIn, bool bndchk=true); //========================================================= //! Gets the CollType value. //! \return the current CollType. CollTypeGrp GetCollType(void) const { return(CollType); } //+> CollEntityID //========================================================= //! Sets the CollEntityID with bound checking control //! \param CollEntityIDIn - ID of entity collided with. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollEntityID(const Cigi_uint16 CollEntityIDIn, bool bndchk=true) { CollEntityID = CollEntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CollEntityID value. //! \return the current CollEntityID. Cigi_uint16 GetCollEntityID(void) const { return(CollEntityID); } //+> IntersectDist //========================================================= //! Sets the IntersectDist with bound checking control //! \param IntersectDistIn - Distance from the source or //! starting point of the segment along the segment. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetIntersectDist(const float IntersectDistIn, bool bndchk=true) { IntersectDist = IntersectDistIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the IntersectDist value. //! \return the current IntersectDist. float GetIntersectDist(void) const { return(IntersectDist); } }; #endif // #if !defined(_CIGI_COLL_DET_SEG_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetVolDefV2.h000066400000000000000000000066411210750432300216300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolDefV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_VOL_DEF_V2_INCLUDED_) #define _CIGI_COLL_DET_VOL_DEF_V2_INCLUDED_ #include "CigiBaseCollDetVolDef.h" class CIGI_SPEC CigiCollDetVolDefV2 : public CigiBaseCollDetVolDef { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetVolDefV2(); //========================================================= //! General Destructor //! virtual ~CigiCollDetVolDefV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_COLL_DET_VOL_DEF_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetVolDefV3.h000066400000000000000000000135001210750432300216210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolDefV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_VOL_DEF_V3_INCLUDED_) #define _CIGI_COLL_DET_VOL_DEF_V3_INCLUDED_ #include "CigiBaseCollDetVolDef.h" class CIGI_SPEC CigiCollDetVolDefV3 : public CigiBaseCollDetVolDef { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetVolDefV3(); //========================================================= //! General Destructor //! virtual ~CigiCollDetVolDefV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> VolType //========================================================= //! Sets the VolType with bound checking control //! \param VolTypeIn - Volume type or shape
//! Sphere=0
//! Cuboid=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVolType(const VolTypeGrp VolTypeIn, bool bndchk=true); //========================================================= //! Gets the VolType value. //! \return the current VolType. VolTypeGrp GetVolType(void) const { return(VolType); } //+> Roll //========================================================= //! Sets the Roll with bound checking control //! \param RollIn - Volume's roll relative to the referance entity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRoll(const float RollIn, bool bndchk=true); //========================================================= //! Gets the Roll value. //! \return the current Roll. float GetRoll(void) const { return(Roll); } //+> Pitch //========================================================= //! Sets the Pitch with bound checking control //! \param PitchIn - Volume's pitch relative to the referance entity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitch(const float PitchIn, bool bndchk=true); //========================================================= //! Gets the Pitch value. //! \return the current Pitch. float GetPitch(void) const { return(Pitch); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - Volume's yaw relative to the referance entity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value. //! \return the current Yaw. float GetYaw(void) const { return(Yaw); } }; #endif // #if !defined(_CIGI_COLL_DET_VOL_DEF_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetVolRespV2.h000066400000000000000000000077501210750432300220450ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolRespV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_VOL_RESP_V2_INCLUDED_) #define _CIGI_COLL_DET_VOL_RESP_V2_INCLUDED_ #include "CigiBaseCollDetVolResp.h" class CIGI_SPEC CigiCollDetVolRespV2 : public CigiBaseCollDetVolResp { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetVolRespV2(); //========================================================= //! General Destructor //! virtual ~CigiCollDetVolRespV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> VolID //========================================================= //! Sets the VolID with bound checking control //! \param VolIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVolID(const Cigi_uint8 VolIDIn, bool bndchk=true); //========================================================= //! Gets the VolID value. //! \return the current VolID. Cigi_uint8 GetVolID(void) const { return(VolID); } }; #endif // #if !defined(_CIGI_COLL_DET_VOL_RESP_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCollDetVolRespV3.h000066400000000000000000000113131210750432300220340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COLL_DET_VOL_RESP_V3_INCLUDED_) #define _CIGI_COLL_DET_VOL_RESP_V3_INCLUDED_ #include "CigiBaseCollDetVolResp.h" class CIGI_SPEC CigiCollDetVolRespV3 : public CigiBaseCollDetVolResp { public: //==> Management //========================================================= //! General Constructor //! CigiCollDetVolRespV3(); //========================================================= //! General Destructor //! virtual ~CigiCollDetVolRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> VolID //========================================================= //! Sets the VolID with bound checking control //! \param VolIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVolID(const Cigi_uint8 VolIDIn, bool bndchk=true) { VolID = VolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the VolID value. //! \return the current VolID. Cigi_uint8 GetVolID(void) const { return(VolID); } //+> CollVolID //========================================================= //! Sets the CollVolID with bound checking control //! \param CollVolIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCollVolID(const Cigi_uint8 CollVolIDIn, bool bndchk=true) { CollVolID = CollVolIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CollVolID value. //! \return the current CollVolID. Cigi_uint8 GetCollVolID(void) const { return(CollVolID); } }; #endif // #if !defined(_CIGI_COLL_DET_VOL_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCompCtrlV1.h000066400000000000000000000352071210750432300207240ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COMP_CTRL_V1_INCLUDED_) #define _CIGI_COMP_CTRL_V1_INCLUDED_ #include "CigiBaseCompCtrl.h" class CIGI_SPEC CigiCompCtrlV1 : public CigiBaseCompCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiCompCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiCompCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; if(CompAssoc == CigiBaseCompCtrl::Entity) InstanceID = EntityID; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - View ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint8 GetViewID(void) const { return(ViewID); } //+> CompState //========================================================= //! Sets the CompState with bound checking control //! \param CompStateIn - Component State Data //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompState(const Cigi_uint16 CompStateIn, bool bndchk=true) { CompState = CompStateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompState value. //! \return the current CompState. Cigi_uint16 GetCompState(void) const { return(CompState); } //+> CompAssoc //========================================================= //! Sets the CompAssoc with bound checking control //! \param CompAssocIn - Component association
//! Entity=0
//! Environment=1
//! View=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompAssoc(const CompAssocGrp CompAssocIn, bool bndchk=true); //========================================================= //! Gets the CompAssoc value. //! \return the current CompAssoc. CompAssocGrp GetCompAssoc(void) const { return(CompAssoc); } //+> CompData //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_uint8 value. Cigi_uint8 GetUCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_int8 value. Cigi_int8 GetCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_uint16 value. Cigi_uint16 GetUShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_int16 value. Cigi_int16 GetShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified unsigned Long value. Cigi_uint32 GetULongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified Long value. Cigi_int32 GetLongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified float value. float GetFloatCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified Int64 value. Cigi_uint64 GetI64CompData(const unsigned int Pos); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified double value. double GetDoubleCompData(const unsigned int Pos); protected: //==> Conversion Tables static const int CompClassCnvtSz = 3; static const CompClassV3Grp CompClassV1xV3[CompClassCnvtSz]; }; #endif // #if !defined(_CIGI_COMP_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCompCtrlV2.h000066400000000000000000000343301210750432300207210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Changed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COMP_CTRL_V2_INCLUDED_) #define _CIGI_COMP_CTRL_V2_INCLUDED_ #include "CigiBaseCompCtrl.h" class CIGI_SPEC CigiCompCtrlV2 : public CigiBaseCompCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiCompCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiCompCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> InstanceID //========================================================= //! Sets the InstanceID with bound checking control //! \param InstanceIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInstanceID(const Cigi_uint16 InstanceIDIn, bool bndchk=true) { InstanceID = InstanceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the InstanceID value. //! \return the current InstanceID. Cigi_uint16 GetInstanceID(void) const { return(InstanceID); } //+> CompState //========================================================= //! Sets the CompState with bound checking control //! \param CompStateIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompState(const Cigi_uint16 CompStateIn, bool bndchk=true) { CompState = CompStateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompState value. //! \return the current CompState. Cigi_uint16 GetCompState(void) const { return(CompState); } //+> CompClassV2 //========================================================= //! Sets the CompClassV2 with bound checking control //! \param CompClassV2In -
//! EntityV2=0
//! EnvironmentV2=1
//! ViewV2=2
//! ViewGrpV2=3
//! SensorV2=4
//! SystemV2=5
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompClassV2(const CompClassV2Grp CompClassV2In, bool bndchk=true); //========================================================= //! Gets the CompClassV2 value. //! \return the current CompClassV2. CompClassV2Grp GetCompClassV2(void) const { return(CompClassV2); } //+> CompData //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_uint8 value. Cigi_uint8 GetUCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_int8 value. Cigi_int8 GetCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_uint16 value. Cigi_uint16 GetUShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_int16 value. Cigi_int16 GetShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified unsigned Long value. Cigi_uint32 GetULongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified Long value. Cigi_int32 GetLongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified float value. float GetFloatCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified Int64 value. Cigi_uint64 GetI64CompData(const unsigned int Pos); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified double value. double GetDoubleCompData(const unsigned int Pos); protected: //==> Conversion Tables static const int CompClassCnvtSz = 6; static const CompAssocGrp CompClassV2xV1[CompClassCnvtSz]; static const CompClassV3Grp CompClassV2xV3[CompClassCnvtSz]; }; #endif // #if !defined(_CIGI_COMP_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCompCtrlV3.h000066400000000000000000000356301210750432300207260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 *  04/22/2009 Greg Basler                       Version 3.3.1
 *  Corrected a problem with component state.  In CIGI V1 and V2
 *  the component state is Cigi_uint16.  In Cigi V3.0 and above
 *  the component state is Cigi_uint8.  Converting between these
 *  can and probably will cause problems.  In addition, the
 *  accessors should reflect the correct size of the value per
 *  the ICD
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COMP_CTRL_V3_INCLUDED_) #define _CIGI_COMP_CTRL_V3_INCLUDED_ #include "CigiBaseCompCtrl.h" class CIGI_SPEC CigiCompCtrlV3 : public CigiBaseCompCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiCompCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiCompCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> InstanceID //========================================================= //! Sets the InstanceID with bound checking control //! \param InstanceIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInstanceID(const Cigi_uint16 InstanceIDIn, bool bndchk=true) { InstanceID = InstanceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the InstanceID value. //! \return the current InstanceID. Cigi_uint16 GetInstanceID(void) const { return(InstanceID); } //+> CompState //========================================================= //! Sets the CompState with bound checking control //! \param CompStateIn - Component state value //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompState(const Cigi_uint8 CompStateIn, bool bndchk=true) { CompState = (Cigi_uint16) CompStateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompState value. //! \return the current CompState. Cigi_uint8 GetCompState(void) const { Cigi_uint8 V3State = (Cigi_uint8)((CompState > 0x00ff) ? 0xff : CompState); return(V3State); } //+> CompClassV3 //========================================================= //! Sets the CompClassV3 with bound checking control //! \param CompClassV3In -
//! EntityV3=0
//! ViewV3=1
//! ViewGrpV3=2
//! SensorV3=3
//! RegionalSeaSurfaceV3=4
//! RegionalTerrainSurfaceV3=5
//! RegionalLayeredWeatherV3=6
//! GlobalSeaSurfaceV3=7
//! GlobalTerrainSurfaceV3=8
//! GlobalLayeredWeatherV3=9
//! AtmosphereV3=10
//! CelestialSphereV3=11
//! EventV3=12
//! SystemV3=13
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk=true); //========================================================= //! Gets the CompClassV3 value. //! \return the current CompClassV3. CompClassV3Grp GetCompClassV3(void) const { return(CompClassV3); } //+> CompData //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_uint8 value. Cigi_uint8 GetUCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_int8 value. Cigi_int8 GetCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_uint16 value. Cigi_uint16 GetUShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_int16 value. Cigi_int16 GetShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified unsigned Long value. Cigi_uint32 GetULongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified Long value. Cigi_int32 GetLongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified float value. float GetFloatCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified Int64 value. Cigi_uint64 GetI64CompData(const unsigned int Pos); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified double value. double GetDoubleCompData(const unsigned int Pos); protected: //==> Conversion Tables static const int CompClassCnvtSz = 14; static const CompAssocGrp CompClassV3xV1[CompClassCnvtSz]; static const CompClassV2Grp CompClassV3xV2[CompClassCnvtSz]; }; #endif // #if !defined(_CIGI_COMP_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiCompCtrlV3_3.h000066400000000000000000000360761210750432300211550ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Converted from CigiCompCtrlV3.h.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected problem with conversion from V3_3 to V2 & V1
 *   involving Component Classes of SymbolSurfaceV3_3 &
 *   SymbolV3_3.
 *  
 *  04/22/2009 Greg Basler                       Version 3.3.1
 *  Corrected a problem with component state.  In CIGI V1 and V2
 *  the component state is Cigi_uint16.  In Cigi V3.0 and above
 *  the component state is Cigi_uint8.  Converting between these
 *  can and probably will cause problems.  In addition, the
 *  accessors should reflect the correct size of the value per
 *  the ICD
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_COMP_CTRL_V3_3_INCLUDED_) #define _CIGI_COMP_CTRL_V3_3_INCLUDED_ #include "CigiBaseCompCtrl.h" class CIGI_SPEC CigiCompCtrlV3_3 : public CigiBaseCompCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiCompCtrlV3_3(); //========================================================= //! General Destructor //! virtual ~CigiCompCtrlV3_3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> InstanceID //========================================================= //! Sets the InstanceID with bound checking control //! \param InstanceIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInstanceID(const Cigi_uint16 InstanceIDIn, bool bndchk=true) { InstanceID = InstanceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the InstanceID value. //! \return the current InstanceID. Cigi_uint16 GetInstanceID(void) const { return(InstanceID); } //+> CompState //========================================================= //! Sets the CompState with bound checking control //! \param CompStateIn - Component state value //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompState(const Cigi_uint8 CompStateIn, bool bndchk=true) { CompState = (Cigi_uint16) CompStateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompState value. //! \return the current CompState. Cigi_uint8 GetCompState(void) const { Cigi_uint8 V3State = (Cigi_uint8)((CompState > 0x00ff) ? 0xff : CompState); return(V3State); } //+> CompClassV3 //========================================================= //! Sets the CompClassV3 with bound checking control //! \param CompClassV3In -
//! EntityV3=0
//! ViewV3=1
//! ViewGrpV3=2
//! SensorV3=3
//! RegionalSeaSurfaceV3=4
//! RegionalTerrainSurfaceV3=5
//! RegionalLayeredWeatherV3=6
//! GlobalSeaSurfaceV3=7
//! GlobalTerrainSurfaceV3=8
//! GlobalLayeredWeatherV3=9
//! AtmosphereV3=10
//! CelestialSphereV3=11
//! EventV3=12
//! SystemV3=13
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk=true); //========================================================= //! Gets the CompClassV3 value. //! \return the current CompClassV3. CompClassV3Grp GetCompClassV3(void) const { return(CompClassV3); } //+> CompData //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_uint8 value. Cigi_uint8 GetUCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_int8 value. Cigi_int8 GetCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_uint16 value. Cigi_uint16 GetUShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_int16 value. Cigi_int16 GetShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified unsigned Long value. Cigi_uint32 GetULongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified Long value. Cigi_int32 GetLongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified float value. float GetFloatCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified Int64 value. Cigi_uint64 GetI64CompData(const unsigned int Pos); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified double value. double GetDoubleCompData(const unsigned int Pos); protected: //==> Conversion Tables static const int CompClassCnvtSz = 16; static const CompAssocGrp CompClassV3xV1[CompClassCnvtSz]; static const CompClassV2Grp CompClassV3xV2[CompClassCnvtSz]; }; #endif // #if !defined(_CIGI_COMP_CTRL_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiConfClampEntityCtrlV3.h000066400000000000000000000067271210750432300230740ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiConfClampEntityCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_CONF_CLAMP_ENTITY_CTRL_V3_INCLUDED_) #define _CIGI_CONF_CLAMP_ENTITY_CTRL_V3_INCLUDED_ #include "CigiBaseConfClampEntityCtrl.h" class CIGI_SPEC CigiConfClampEntityCtrlV3 : public CigiBaseConfClampEntityCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiConfClampEntityCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiConfClampEntityCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_CONF_CLAMP_ENTITY_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiDefaultPacket.h000066400000000000000000000075451210750432300215120ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiDefaultPacket.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_DEFAULT_PACKET_INCLUDED_) #define _CIGI_DEFAULT_PACKET_INCLUDED_ #include "CigiBasePacket.h" //========================================================= //! The basic class for a default or unimplemented packet //! class CIGI_SPEC CigiDefaultPacket : public CigiBasePacket { public: //==> Management //========================================================= //! General Constructor //! CigiDefaultPacket(); //========================================================= //! General Destructor //! virtual ~CigiDefaultPacket(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Data Pointer //========================================================= //! Gets a pointer to the packet data. //! \return A pointer to the beginning of the packet's data. //! Cigi_uint8 * GetDataPtr(void) { return(DataPtr); } protected: //==> Member variables //========================================================= //! Data Pointer
//! A Pointer to the beginning of the packet's data in the //! message buffer. //! Cigi_uint8 * DataPtr; }; #endif // !defined(_CIGI_DEFAULT_PACKET_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEarthModelDefV3.h000066400000000000000000000066351210750432300216510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEarthModelDefV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_EARTH_MODEL_DEF_V3_INCLUDED_) #define _CIGI_EARTH_MODEL_DEF_V3_INCLUDED_ #include "CigiBaseEarthModelDef.h" class CIGI_SPEC CigiEarthModelDefV3 : public CigiBaseEarthModelDef { public: //==> Management //========================================================= //! General Constructor //! CigiEarthModelDefV3(); //========================================================= //! General Destructor //! virtual ~CigiEarthModelDefV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_EARTH_MODEL_DEF_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEntityCtrlV1.h000066400000000000000000000211571210750432300213010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENTITY_CONTROL_V1_INCLUDED_) #define _CIGI_ENTITY_CONTROL_V1_INCLUDED_ #include "CigiBaseEntityCtrl.h" //========================================================= //! The class for the Entity Control packet for CIGI version 1 //! class CIGI_SPEC CigiEntityCtrlV1 : public CigiBaseEntityCtrl { public: //========================================================= //! The enumeration for the Entity State flag for CIGI 1 //! enum EntityStV1Grp { DestructV1=0, ConstructV1=1 }; //========================================================= //! The enumeration for the Effect State flag for CIGI 1 //! enum EffectStateGrp { NoActionV1=0, LoadV1=1, LoadActivateV1=2, ActivateV1=3, DeactivateV1=4, DeactivateUnloadV1=5 }; //==> Management //========================================================= //! General Constructor //! CigiEntityCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiEntityCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Internal Temperature //========================================================= //! Sets the Temperature with bound checking control //! \param Temp - The internal temperature of the entity //! in degrees C. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTemp(const float Temp, bool bndchk=true) { Temperature = Temp; return(CIGI_SUCCESS); } //========================================================= //! Gets the Temperature value //! \return The internal temperature of the entity //! in degrees C. //! float GetTemp(void) const { return(Temperature); } //+> Heading //========================================================= //! Sets the heading with bound checking control //! \param Heading - The heading of the entity in degrees.
//! (0 - 360.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetHeading(const float Heading, bool bndchk=true); //========================================================= //! Gets the heading value //! \return The heading of the entity in degrees.
//! (0 to 360.0) //! float GetHeading(void) const { return(Yaw); } //+> Altitude //========================================================= //! Sets the altitude with bound checking control //! \param Alt - The altitude above MSL of the entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAlt(const float Alt, bool bndchk=true) { AltOrZoff = (double)Alt; return(CIGI_SUCCESS); } //========================================================= //! Gets the altitude value //! \return The altitude above MSL of the entity in meters. //! float GetAlt(void) const { return((float)AltOrZoff); } //+> Z Offset //========================================================= //! Sets the Z Offset with bound checking control //! \param Zoff - The Z offset from the origin of the parent //! entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetZoff(const float Zoff, bool bndchk=true) { AltOrZoff = (double)Zoff; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z Offset value //! \return The Z offset from the origin of the parent //! entity in meters. //! float GetZoff(void) const { return((float)AltOrZoff); } //+> Entity State //========================================================= //! Sets the Entity State with bound checking control //! \param EntityStateIn - The current state of this entity.
//! Destruct=0,
//! Construct=1 //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEntityState(const EntityStV1Grp EntityStateIn, bool bndchk=true); //========================================================= //! Gets the Entity State value //! \return The current state of this entity.
//! Destruct=0,
//! Construct=1 //! EntityStV1Grp GetEntityState(void) const; //+> Effect State //========================================================= //! Sets the Effect State with bound checking control //! \param EffectStateIn - The current state of this entity's //! special effect.
//! NoAction=0, //! Load=1, //! LoadActivate=2, //! Activate=3, //! Deactivate=4, //! DeactivateUnload=5 //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEffectState(const EffectStateGrp EffectStateIn, bool bndchk=true); //========================================================= //! Gets the Effect State value //! \return The current state of this entity's //! special effect.
//! NoAction=0, //! Load=1, //! LoadActivate=2, //! Activate=3, //! Deactivate=4, //! DeactivateUnload=5 //! EffectStateGrp GetEffectState(void) const; }; #endif // #if !defined(_CIGI_ENTITY_CONTROL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEntityCtrlV2.h000066400000000000000000000227101210750432300212760ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed Input altitude to a double as required in the CIGI
 *  version 2.1 ICD.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENTITY_CONTROL_V2_INCLUDED_) #define _CIGI_ENTITY_CONTROL_V2_INCLUDED_ #include "CigiBaseEntityCtrl.h" //========================================================= //! The class for the Entity Control packet for CIGI version 2 //! class CIGI_SPEC CigiEntityCtrlV2 : public CigiBaseEntityCtrl { public: //========================================================= //! The enumeration for the Entity State flag for CIGI 2 //! enum EntityStV2Grp { LoadHideV2=0, LoadShowV2=1, UnloadV2=2 }; //========================================================= //! The enumeration for the Effect State flag for CIGI 2 //! enum EffectStV2Grp { StopV2=0, PlayV2=1, RestartV2=2, }; //==> Management //========================================================= //! General Constructor //! CigiEntityCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiEntityCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Internal Temperature //========================================================= //! Sets the Opacity with bound checking control //! \param OpacityIn - The percent opacity of the entity
//! 0.0 - transparent //! 100.0 - fully visible //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetOpacity(const float OpacityIn, bool bndchk=true); //========================================================= //! Gets the Opacity value. //! \return The percent opacity of the entity
//! 0.0 - transparent //! 100.0 - fully visible //! float GetOpacity(void) const { return(Opacity); } //========================================================= //! Sets the Temperature with bound checking control //! \param Temp - The internal temperature of the entity //! in degrees C. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTemp(const float Temp, bool bndchk=true) { Temperature = Temp; return(CIGI_SUCCESS); } //========================================================= //! Gets the Temperature value //! \return The internal temperature of the entity //! in degrees C. //! float GetTemp(void) const { return(Temperature); } //+> Heading //========================================================= //! Sets the heading with bound checking control //! \param Heading - The heading of the entity in degrees.
//! (0 - 360.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetHeading(const float Heading, bool bndchk=true); //========================================================= //! Gets the heading value //! \return The heading of the entity in degrees.
//! (0 to 360.0) //! float GetHeading(void) const { return(Yaw); } //+> Altitude //========================================================= //! Sets the altitude with bound checking control //! \param Alt - The altitude above MSL of the entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAlt(const double Alt, bool bndchk=true) { AltOrZoff = Alt; return(CIGI_SUCCESS); } //========================================================= //! Gets the altitude value //! \return The altitude above MSL of the entity in meters. //! double GetAlt(void) const { return(AltOrZoff); } //+> Z Offset //========================================================= //! Sets the Z Offset with bound checking control //! \param Zoff - The Z offset from the origin of the parent //! entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetZoff(const double Zoff, bool bndchk=true) { AltOrZoff = Zoff; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z Offset value //! \return The Z offset from the origin of the parent //! entity in meters. //! double GetZoff(void) const { return(AltOrZoff); } //+> Entity State //========================================================= //! Sets the Entity State with bound checking control //! \param EntityStateIn - The current state of this entity.
//! LoadHide=0,
//! LoadShow=1,
//! Unload=2 //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEntityState(const EntityStV2Grp EntityStateIn, bool bndchk=true); //========================================================= //! Gets the Entity State value //! \return The current state of this entity.
//! LoadHide=0,
//! LoadShow=1,
//! Unload=2 //! EntityStV2Grp GetEntityState(void) const { return((EntityStV2Grp)EntityState); } //+> Effect State //========================================================= //! Sets the Effect State with bound checking control //! \param EffectStateIn - The current state of this entity's //! special effect.
//! Stop=0,
//! Play=1,
//! Restart=2, //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEffectState(const EffectStV2Grp EffectStateIn, bool bndchk=true); //========================================================= //! Gets the Effect State value //! \return The current state of this entity's //! special effect.
//! Stop=0,
//! Play=1,
//! Restart=2, //! EffectStV2Grp GetEffectState(void) const; protected: static const EffectStV2Grp V3toV2[4]; static const AnimationStateGrp V2toV3[3]; }; #endif // #if !defined(_CIGI_ENTITY_CONTROL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEntityCtrlV3.h000066400000000000000000000272301210750432300213010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the Zoff parameter type from float to double in the SsetZoff 
 *  function.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENTITY_CONTROL_V3_INCLUDED_) #define _CIGI_ENTITY_CONTROL_V3_INCLUDED_ #include "CigiBaseEntityCtrl.h" //========================================================= //! The class for the Entity Control packet for CIGI version 3 //! class CIGI_SPEC CigiEntityCtrlV3 : public CigiBaseEntityCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiEntityCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiEntityCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Internal Temperature //========================================================= //! Sets the Alpha with bound checking control //! \param AlphaIn - The alpha of the entity
//! 0 - transparent.
//! 255 - fully visible //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAlpha(const Cigi_uint8 AlphaIn, bool bndchk=true) { Alpha = AlphaIn; Opacity = ((float)Alpha)/2.55f; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alpha value. //! \return The alpha of the entity
//! 0 - transparent.
//! 255 - fully visible //! Cigi_uint8 GetAlpha(void) const { return(Alpha); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - The Yaw of the entity in degrees.
//! (0 - 360.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value //! \return The Yaw of the entity in degrees.
//! (0 to 360.0) //! float GetYaw(void) const { return(Yaw); } //+> Altitude //========================================================= //! Sets the altitude with bound checking control //! \param Alt - The altitude above MSL of the entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAlt(const double Alt, bool bndchk=true) { AltOrZoff = Alt; return(CIGI_SUCCESS); } //========================================================= //! Gets the altitude value //! \return The altitude above MSL of the entity in meters. //! double GetAlt(void) const { return(AltOrZoff); } //+> Z Offset //========================================================= //! Sets the Z Offset with bound checking control //! \param Zoff - The Z offset from the origin of the parent //! entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetZoff(const double Zoff, bool bndchk=true) { AltOrZoff = (double)Zoff; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z Offset value //! \return The Z offset from the origin of the parent //! entity in meters. //! double GetZoff(void) const { return(AltOrZoff); } //+> Entity State //========================================================= //! Sets the Entity State with bound checking control //! \param EntityStateIn - The current state of this entity.
//! 0 Inactive/Standby
//! 1 Active
//! 2 Destroy //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEntityState(const EntityStateGrp EntityStateIn, bool bndchk=true); //========================================================= //! Gets the Entity State value //! \return The current state of this entity.
//! 0 Inactive/Standby
//! 1 Active
//! 2 Destroy //! EntityStateGrp GetEntityState(void) const { return(EntityState); } //+> Ground/Ocean Clamp //========================================================= //! Sets the Ground/Ocean Clamp with bound checking control //! \param GrndClampIn - Ground/Ocean Clamp enable.
//! 0 Clamp
//! 1 Altitude clamp
//! 2 Altitude and Orientation clamp //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetGrndClamp(const GrndClampGrp GrndClampIn, bool bndchk=true); //========================================================= //! Gets the Ground/Ocean Clamp value //! \return The Ground/Ocean Clamp enable.
//! 0 Clamp
//! 1 Altitude clamp
//! 2 Altitude and Orientation clamp //! GrndClampGrp GetGrndClamp(void) const { return(GrndClamp); } //+> Inherit Alpha //========================================================= //! Sets the Inherit Alpha with bound checking control //! \param InheritAlphaIn - Flag for this entity inheriting alpha //! from the parent entity.
//! 0 No Inheritance
//! 1 Inherit //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetInheritAlpha(const InheritAlphaGrp InheritAlphaIn, bool bndchk=true); //========================================================= //! Gets the Inherit Alpha value //! \return The flag for this entity inheriting alpha //! from the parent entity.
//! 0 No Inheritance
//! 1 Inherit //! InheritAlphaGrp GetInheritAlpha(void) const { return(InheritAlpha); } //+> Animation Direction //========================================================= //! Sets the Animation Direction with bound checking control //! \param AnimationDirIn - Specifies the animation sequence direction.
//! 0 Forward
//! 1 Backward //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAnimationDir(const AnimationDirGrp AnimationDirIn, bool bndchk=true); //========================================================= //! Gets the Animation Direction value //! \return The animation sequence direction.
//! 0 Forward
//! 1 Backward //! AnimationDirGrp GetAnimationDir(void) const { return(AnimationDir); } //+> Animation Loop Mode //========================================================= //! Sets the Animation Loop Mode with bound checking control //! \param AnimationLoopModeIn - The mode in which to run the animation.
//! 0 One-Shot
//! 1 Continuous //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAnimationLoopMode(const AnimationLoopModeGrp AnimationLoopModeIn, bool bndchk=true); //========================================================= //! Gets the Animation Loop Mode value //! \return The mode in which to run the animation.
//! 0 One-Shot
//! 1 Continuous //! AnimationLoopModeGrp GetAnimationLoopMode(void) const { return(AnimationLoopMode); } //+> Animation State //========================================================= //! Sets the Animation State with bound checking control //! \param AnimationStateIn - The play state of the animation.
//! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAnimationState(const AnimationStateGrp AnimationStateIn, bool bndchk=true); //========================================================= //! Gets the Animation State value //! \return The play state of the animation.
//! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue //! AnimationStateGrp GetAnimationState(void) const; }; #endif // #if !defined(_CIGI_ENTITY_CONTROL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEntityCtrlV3_3.h000066400000000000000000000302021210750432300215140ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Initial Release for CIGI 3.3 compatibility.
 *  Based on CigiEntityCtrlV3.h"
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENTITY_CONTROL_V3_3_INCLUDED_) #define _CIGI_ENTITY_CONTROL_V3_3_INCLUDED_ #include "CigiBaseEntityCtrl.h" //========================================================= //! The class for the Entity Control packet for CIGI version 3 //! class CIGI_SPEC CigiEntityCtrlV3_3 : public CigiBaseEntityCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiEntityCtrlV3_3(); //========================================================= //! General Destructor //! virtual ~CigiEntityCtrlV3_3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Internal Temperature //========================================================= //! Sets the Alpha with bound checking control //! \param AlphaIn - The alpha of the entity
//! 0 - transparent.
//! 255 - fully visible //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAlpha(const Cigi_uint8 AlphaIn, bool bndchk=true) { Alpha = AlphaIn; Opacity = ((float)Alpha)/2.55f; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alpha value. //! \return The alpha of the entity
//! 0 - transparent.
//! 255 - fully visible //! Cigi_uint8 GetAlpha(void) const { return(Alpha); } //+> Yaw //========================================================= //! Sets the Yaw with bound checking control //! \param YawIn - The Yaw of the entity in degrees.
//! (0 - 360.0) //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetYaw(const float YawIn, bool bndchk=true); //========================================================= //! Gets the Yaw value //! \return The Yaw of the entity in degrees.
//! (0 to 360.0) //! float GetYaw(void) const { return(Yaw); } //+> Altitude //========================================================= //! Sets the altitude with bound checking control //! \param Alt - The altitude above MSL of the entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAlt(const double Alt, bool bndchk=true) { AltOrZoff = Alt; return(CIGI_SUCCESS); } //========================================================= //! Gets the altitude value //! \return The altitude above MSL of the entity in meters. //! double GetAlt(void) const { return(AltOrZoff); } //+> Z Offset //========================================================= //! Sets the Z Offset with bound checking control //! \param Zoff - The Z offset from the origin of the parent //! entity in meters. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetZoff(const double Zoff, bool bndchk=true) { AltOrZoff = (double)Zoff; return(CIGI_SUCCESS); } //========================================================= //! Gets the Z Offset value //! \return The Z offset from the origin of the parent //! entity in meters. //! double GetZoff(void) const { return(AltOrZoff); } //+> Entity State //========================================================= //! Sets the Entity State with bound checking control //! \param EntityStateIn - The current state of this entity.
//! 0 Inactive/Standby
//! 1 Active
//! 2 Destroy //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEntityState(const EntityStateGrp EntityStateIn, bool bndchk=true); //========================================================= //! Gets the Entity State value //! \return The current state of this entity.
//! 0 Inactive/Standby
//! 1 Active
//! 2 Destroy //! EntityStateGrp GetEntityState(void) const { return(EntityState); } //+> Ground/Ocean Clamp //========================================================= //! Sets the Ground/Ocean Clamp with bound checking control //! \param GrndClampIn - Ground/Ocean Clamp enable.
//! 0 Clamp
//! 1 Altitude clamp
//! 2 Altitude and Orientation clamp //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetGrndClamp(const GrndClampGrp GrndClampIn, bool bndchk=true); //========================================================= //! Gets the Ground/Ocean Clamp value //! \return The Ground/Ocean Clamp enable.
//! 0 Clamp
//! 1 Altitude clamp
//! 2 Altitude and Orientation clamp //! GrndClampGrp GetGrndClamp(void) const { return(GrndClamp); } //+> Inherit Alpha //========================================================= //! Sets the Inherit Alpha with bound checking control //! \param InheritAlphaIn - Flag for this entity inheriting alpha //! from the parent entity.
//! 0 No Inheritance
//! 1 Inherit //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetInheritAlpha(const InheritAlphaGrp InheritAlphaIn, bool bndchk=true); //========================================================= //! Gets the Inherit Alpha value //! \return The flag for this entity inheriting alpha //! from the parent entity.
//! 0 No Inheritance
//! 1 Inherit //! InheritAlphaGrp GetInheritAlpha(void) const { return(InheritAlpha); } //+> Animation Direction //========================================================= //! Sets the Animation Direction with bound checking control //! \param AnimationDirIn - Specifies the animation sequence direction.
//! 0 Forward
//! 1 Backward //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAnimationDir(const AnimationDirGrp AnimationDirIn, bool bndchk=true); //========================================================= //! Gets the Animation Direction value //! \return The animation sequence direction.
//! 0 Forward
//! 1 Backward //! AnimationDirGrp GetAnimationDir(void) const { return(AnimationDir); } //+> Animation Loop Mode //========================================================= //! Sets the Animation Loop Mode with bound checking control //! \param AnimationLoopModeIn - The mode in which to run the animation.
//! 0 One-Shot
//! 1 Continuous //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAnimationLoopMode(const AnimationLoopModeGrp AnimationLoopModeIn, bool bndchk=true); //========================================================= //! Gets the Animation Loop Mode value //! \return The mode in which to run the animation.
//! 0 One-Shot
//! 1 Continuous //! AnimationLoopModeGrp GetAnimationLoopMode(void) const { return(AnimationLoopMode); } //+> Animation State //========================================================= //! Sets the Animation State with bound checking control //! \param AnimationStateIn - The play state of the animation.
//! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetAnimationState(const AnimationStateGrp AnimationStateIn, bool bndchk=true); //========================================================= //! Gets the Animation State value //! \return The play state of the animation.
//! 0 Stop
//! 1 Pause
//! 2 Play
//! 3 Continue //! AnimationStateGrp GetAnimationState(void) const; //+> Smoothing Enabled //========================================================= //! Gets the Smoothing Enabled flag for V3.3 //! \return Smoothing Enabled flag //! bool GetSmoothingEn(void) const { return(SmoothingEn); } //========================================================= //! Enables or Disables motion smoothing of this entity.
//! Motion smoothing for an entity can only be enabled if //! global motion smoothing is enabled in the IG Ctrl packet //! and the motion smoothing for the entity is enabled. //! \param SmoothingEnabled - Enables (true) or disables (false) //! Extrapolation or Interpolation motion smoothing //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetSmoothingEn(const bool SmoothingEnabled, bool bndchk=true) { SmoothingEn = SmoothingEnabled; return(CIGI_SUCCESS); } }; #endif // #if !defined(_CIGI_ENTITY_CONTROL_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEnvCondReqV3.h000066400000000000000000000066031210750432300212050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvCondReqV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENV_COND_REQ_V3_INCLUDED_) #define _CIGI_ENV_COND_REQ_V3_INCLUDED_ #include "CigiBaseEnvCondReq.h" class CIGI_SPEC CigiEnvCondReqV3 : public CigiBaseEnvCondReq { public: //==> Management //========================================================= //! General Constructor //! CigiEnvCondReqV3(); //========================================================= //! General Destructor //! virtual ~CigiEnvCondReqV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_ENV_COND_REQ_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEnvCtrlV1.h000066400000000000000000000252171210750432300205560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENV_CTRL_V1_INCLUDED_) #define _CIGI_ENV_CTRL_V1_INCLUDED_ #include "CigiBaseEnvCtrl.h" class CIGI_SPEC CigiEnvCtrlV1 : public CigiBaseEnvCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiEnvCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiEnvCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V1 and V3. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V1 and V3. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Hold Object Manipulation //========================================================= //! The virtual FillHold function. //! \param Hold - A pointer to the Hold object. (Downcast to CigiBaseEnvCtrl) //! virtual void FillHold(CigiBaseEnvCtrl * Hold) const; //==> Accessing Member Variable Values functions //+> Hour //========================================================= //! Sets the Hour with bound checking control //! \param HourIn - Current hour //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHour(const Cigi_uint8 HourIn, bool bndchk=true); //========================================================= //! Gets the Hour value. //! \return the current Hour. Cigi_uint8 GetHour(void) const { return(Hour); } //+> Minute //========================================================= //! Sets the Minute with bound checking control //! \param MinuteIn - Current minute //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinute(const Cigi_uint8 MinuteIn, bool bndchk=true); //========================================================= //! Gets the Minute value. //! \return the current Minute. Cigi_uint8 GetMinute(void) const { return(Minute); } //+> Month //========================================================= //! Sets the Month with bound checking control //! \param MonthIn - current month //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMonth(const Cigi_uint8 MonthIn, bool bndchk=true); //========================================================= //! Gets the Month value. //! \return the current Month. Cigi_uint8 GetMonth(void) const { return(Month); } //+> Day //========================================================= //! Sets the Day with bound checking control //! \param DayIn - current day of the month //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDay(const Cigi_uint8 DayIn, bool bndchk=true); //========================================================= //! Gets the Day value. //! \return the current Day. Cigi_uint8 GetDay(void) const { return(Day); } //+> Year //========================================================= //! Sets the Year with bound checking control //! \param YearIn - current year //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYear(const Cigi_uint16 YearIn, bool bndchk=true) { Year = YearIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Year value. //! \return the current Year. Cigi_uint16 GetYear(void) const { return(Year); } //+> EphemerisEn //========================================================= //! Sets the EphemerisEn with bound checking control //! \param EphemerisEnIn - Enable (true) or disable (false) //! ephereris model. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEphemerisEn(const bool EphemerisEnIn, bool bndchk=true) { EphemerisEn = EphemerisEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EphemerisEn value. //! \return the current EphemerisEn. bool GetEphemerisEn(void) const { return(EphemerisEn); } //+> Humidity //========================================================= //! Sets the Humidity with bound checking control //! \param HumidityIn - Percentage humidity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk=true); //========================================================= //! Gets the Humidity value. //! \return the current Humidity. Cigi_uint8 GetHumidity(void) const { return(Humidity); } //+> AirTemp //========================================================= //! Sets the AirTemp with bound checking control //! \param AirTempIn - Current ambient air temperature //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAirTemp(const float AirTempIn, bool bndchk=true) { AirTemp = AirTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AirTemp value. //! \return the current AirTemp. float GetAirTemp(void) const { return(AirTemp); } //+> Visibility //========================================================= //! Sets the Visibility with bound checking control //! \param VisibilityIn - Global visibility. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVisibility(const float VisibilityIn, bool bndchk=true); //========================================================= //! Gets the Visibility value. //! \return the current Visibility. float GetVisibility(void) const { return(Visibility); } //+> HorizWindSp //========================================================= //! Sets the HorizWindSp with bound checking control //! \param HorizWindSpIn - Wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHorizWindSp(const float HorizWindSpIn, bool bndchk=true); //========================================================= //! Gets the HorizWindSp value. //! \return the current HorizWindSp. float GetHorizWindSp(void) const { return(HorizWindSp); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDir value. //! \return the current WindDir. float GetWindDir(void) const { return(WindDir); } }; #endif // #if !defined(_CIGI_ENV_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEnvCtrlV2.h000066400000000000000000000310551210750432300205540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENV_CTRL_V2_INCLUDED_) #define _CIGI_ENV_CTRL_V2_INCLUDED_ #include "CigiBaseEnvCtrl.h" class CIGI_SPEC CigiEnvCtrlV2 : public CigiBaseEnvCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiEnvCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiEnvCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V2 and V3. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V2 and V3. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Hold Object Manipulation //========================================================= //! The virtual FillHold function. //! \param Hold - A pointer to the Hold object. (Downcast to CigiBaseEnvCtrl) //! virtual void FillHold(CigiBaseEnvCtrl * Hold) const; //==> Accessing Member Variable Values functions //+> Hour //========================================================= //! Sets the Hour with bound checking control //! \param HourIn - Current hour //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHour(const Cigi_uint8 HourIn, bool bndchk=true); //========================================================= //! Gets the Hour value. //! \return the current Hour. Cigi_uint8 GetHour(void) const { return(Hour); } //+> Minute //========================================================= //! Sets the Minute with bound checking control //! \param MinuteIn - Current minute //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinute(const Cigi_uint8 MinuteIn, bool bndchk=true); //========================================================= //! Gets the Minute value. //! \return the current Minute. Cigi_uint8 GetMinute(void) const { return(Minute); } //+> Month //========================================================= //! Sets the Month with bound checking control //! \param MonthIn - Current month //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMonth(const Cigi_uint8 MonthIn, bool bndchk=true); //========================================================= //! Gets the Month value. //! \return the current Month. Cigi_uint8 GetMonth(void) const { return(Month); } //+> Day //========================================================= //! Sets the Day with bound checking control //! \param DayIn - Current day //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDay(const Cigi_uint8 DayIn, bool bndchk=true); //========================================================= //! Gets the Day value. //! \return the current Day. Cigi_uint8 GetDay(void) const { return(Day); } //+> Year //========================================================= //! Sets the Year with bound checking control //! \param YearIn - Current year //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYear(const Cigi_uint16 YearIn, bool bndchk=true) { Year = YearIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Year value. //! \return the current Year. Cigi_uint16 GetYear(void) const { return(Year); } //+> EphemerisEn //========================================================= //! Sets the EphemerisEn with bound checking control //! \param EphemerisEnIn - Enable (true) or disable (false) //! ephereris model. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEphemerisEn(const bool EphemerisEnIn, bool bndchk=true) { EphemerisEn = EphemerisEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EphemerisEn value. //! \return the current EphemerisEn. bool GetEphemerisEn(void) const { return(EphemerisEn); } //+> Humidity //========================================================= //! Sets the Humidity with bound checking control //! \param HumidityIn - Percentage humidity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk=true); //========================================================= //! Gets the Humidity value. //! \return the current Humidity. Cigi_uint8 GetHumidity(void) const { return(Humidity); } //+> AtmosEn //========================================================= //! Sets the AtmosEn with bound checking control //! \param AtmosEnIn - Enable (true) or disable (false) //! the atmospheric effects model //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAtmosEn(const bool AtmosEnIn, bool bndchk=true) { AtmosEn = AtmosEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AtmosEn value. //! \return the current AtmosEn. bool GetAtmosEn(void) const { return(AtmosEn); } //+> Aerosol //========================================================= //! Sets the Aerosol with bound checking control //! \param AerosolIn - percentage Aerosol content of the air. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAerosol(const float AerosolIn, bool bndchk=true); //========================================================= //! Gets the Aerosol value. //! \return the current Aerosol. float GetAerosol(void) const { return(Aerosol); } //+> AirTemp //========================================================= //! Sets the AirTemp with bound checking control //! \param AirTempIn - Current ambient air temperature. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAirTemp(const float AirTempIn, bool bndchk=true) { AirTemp = AirTempIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AirTemp value. //! \return the current AirTemp. float GetAirTemp(void) const { return(AirTemp); } //+> Visibility //========================================================= //! Sets the Visibility with bound checking control //! \param VisibilityIn - Global visibility //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVisibility(const float VisibilityIn, bool bndchk=true); //========================================================= //! Gets the Visibility value. //! \return the current Visibility. float GetVisibility(void) const { return(Visibility); } //+> HorizWindSp //========================================================= //! Sets the HorizWindSp with bound checking control //! \param HorizWindSpIn - Wind speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHorizWindSp(const float HorizWindSpIn, bool bndchk=true); //========================================================= //! Gets the HorizWindSp value. //! \return the current HorizWindSp. float GetHorizWindSp(void) const { return(HorizWindSp); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDir value. //! \return the current WindDir. float GetWindDir(void) const { return(WindDir); } //+> BaroPress //========================================================= //! Sets the BaroPress with bound checking control //! \param BaroPressIn - Current barometric pressure //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBaroPress(const float BaroPressIn, bool bndchk=true); //========================================================= //! Gets the BaroPress value. //! \return the current BaroPress. float GetBaroPress(void) const { return(BaroPress); } }; #endif // #if !defined(_CIGI_ENV_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiEnvRgnCtrlV3.h000066400000000000000000000066031210750432300212250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvRgnCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_ENV_RGN_CTRL_V3_INCLUDED_) #define _CIGI_ENV_RGN_CTRL_V3_INCLUDED_ #include "CigiBaseEnvRgnCtrl.h" class CIGI_SPEC CigiEnvRgnCtrlV3 : public CigiBaseEnvRgnCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiEnvRgnCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiEnvRgnCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_ENV_RGN_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiErrorCodes.h000066400000000000000000000053241210750432300210360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiErrorCodes.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 * 
* Author: The Boeing Company * */ #if ! defined( _CIGI_ERROR_CODES_INCLUDED_) #define _CIGI_ERROR_CODES_INCLUDED_ #define CIGI_SUCCESS 0 #define CIGI_ERROR_NONE 0 #define CIGI_ERROR_MISCELLANEOUS -1 #define CIGI_ERROR_UNEXPECTED_NULL -2 #define CIGI_ERROR_BUFFER_OVERRUN -3 #define CIGI_ERROR_CALLED_OUT_OF_SEQUENCE -4 #define CIGI_ERROR_INVALID_PACKET -5 #define CIGI_ERROR_INVALID_OPCODE -6 #define CIGI_ERROR_ALLOC_FAILED -7 #define CIGI_ERROR_BUFFER_TOO_SMALL -8 #define CIGI_ERROR_MAX_SESSIONS -9 #define CIGI_ERROR_INVALID_SESSION -10 #define CIGI_ERROR_INVALID_SESSION_TYPE -11 #define CIGI_ERROR_MISSING_IG_CONTROL_PACKET -12 #define CIGI_ERROR_MISSING_SOF_PACKET -13 #define CIGI_ERROR_NOT_IMPLEMENTED -14 #define CIGI_ERROR_PACKET_TOO_LARGE -15 #define CIGI_ERROR_INVALID_PACKET_SIZE -16 #define CIGI_ERROR_VALUE_OUT_OF_RANGE -17 #define CIGI_ERROR_WRONG_VERSION -18 #define CIGI_ERROR_INVALID_USER_PACKET -19 #define CIGI_ERROR_IMPROPER_PACKET -20 #endif // _CIGI_ERROR_CODES_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiEventNotificationV3.h000066400000000000000000000066771210750432300226440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEventNotificationV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_EVENT_NOTIFICATION_V3_INCLUDED_) #define _CIGI_EVENT_NOTIFICATION_V3_INCLUDED_ #include "CigiBaseEventNotification.h" class CIGI_SPEC CigiEventNotificationV3 : public CigiBaseEventNotification { public: //==> Management //========================================================= //! General Constructor //! CigiEventNotificationV3(); //========================================================= //! General Destructor //! virtual ~CigiEventNotificationV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_EVENT_NOTIFICATION_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiException.h000066400000000000000000000076221210750432300207300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiException.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Included the CigiTypes.h header file.
 * 
* Author: The Boeing Company * */ class CigiException; #if ! defined( _CIGI_EXCEPTION_INCLUDED_) #define _CIGI_EXCEPTION_INCLUDED_ // -------- include files ----------------------------------------- #include #include #include "CigiErrorCodes.h" #include #include "CigiTypes.h" // -------- preprocessor definitions ------------------------------ // -------- class definition -------------------------------------- //========================================================= //! The general base exception class for the CIGI API //! class CIGI_SPEC CigiException : public std::exception { public: //==> Management //========================================================= //! The general constructor for the base CIGI exception class //! CigiException( void) { }; //========================================================= //! The general destructor for the base CIGI exception class //! virtual ~CigiException( void) throw() { }; //==> Accessing Member Variable Values functions //========================================================= //! Returns whether the exception has a message. //! \return true for having a message and false for no msg.. //! bool HasMessage( void) const { return !Msg.empty(); } //========================================================= //! Gets the error code for the exception. //! \return The error code for this exception. //! int GetErrorCode( void) const { return(ErrorCode); } //========================================================= //! Returns whether this exception has a set error code. //! \return True if this exception has an error code set. //! bool HasErrorCode( void) const { return(ErrorCode != CIGI_ERROR_NONE); // same as CIGI_SUCCESS } //========================================================= //! The virtual implemented what funtion. //! \return The message for this exception. //! virtual const char *what() const throw() { return Msg.c_str(); } protected: //========================================================= //! The message for this exception. //! std::string Msg; //========================================================= //! The error code for this exception. //! int ErrorCode; }; #endif // _CIGI_EXCEPTION_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiExceptions.h000066400000000000000000000454431210750432300211160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiExceptions.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declarations for exporting the 
 *  classes in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if ! defined( _CIGI_EXCEPTIONS_INCLUDED_) #define _CIGI_EXCEPTIONS_INCLUDED_ #include "CigiException.h" #include #include #include //========================================================= //! This is the exception thrown when a problem involving //! a class, variable, memory, etc. allocatin failure //! is encountered. //! class CIGI_SPEC CigiAllocFailedException : public CigiException { public: //========================================================= //! General Constructor for the CigiAllocFailedException //! exception class //! CigiAllocFailedException(void) { Msg = "Allocation Failure\n"; ErrorCode = CIGI_ERROR_ALLOC_FAILED; } //========================================================= //! General Destructor for the CigiAllocFailedException //! exception class //! virtual ~CigiAllocFailedException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! the current message buffer being overrun is encountered. //! class CIGI_SPEC CigiBufferOverrunException : public CigiException { public: //========================================================= //! General Constructor for the CigiBufferOverrunException //! exception class //! CigiBufferOverrunException(void) { Msg = "Buffer Overrun Error\n"; ErrorCode = CIGI_ERROR_BUFFER_OVERRUN; } //========================================================= //! General Destructor for the CigiBufferOverrunException //! exception class //! virtual ~CigiBufferOverrunException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! the buffer being to small to use is encountered. //! class CIGI_SPEC CigiBufferTooSmallException : public CigiException { public: //========================================================= //! General Constructor for the CigiBufferTooSmallException //! exception class //! CigiBufferTooSmallException(void) { Msg = "Buffer Too Small Error\n"; ErrorCode = CIGI_ERROR_BUFFER_TOO_SMALL; } //========================================================= //! General Destructor for the CigiBufferTooSmallException //! exception class //! virtual ~CigiBufferTooSmallException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! routines having a specific call sequence being called //! out of that sequence is encountered. //! class CIGI_SPEC CigiCalledOutOfSequenceException : public CigiException { public: //========================================================= //! General Constructor for the CigiCalledOutOfSequenceException //! exception class //! CigiCalledOutOfSequenceException(void) { Msg = "Routine Call Out Of Sequence Error\n"; ErrorCode = CIGI_ERROR_CALLED_OUT_OF_SEQUENCE; } //========================================================= //! General Destructor for the CigiCalledOutOfSequenceException //! exception class //! virtual ~CigiCalledOutOfSequenceException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! the use of an invalid opcode/packet id is encountered. //! class CIGI_SPEC CigiInvalidOpcodeException : public CigiException { public: //========================================================= //! General Constructor for the CigiInvalidOpcodeException //! exception class //! CigiInvalidOpcodeException(void) { Msg = "Invalid Packet ID\n"; ErrorCode = CIGI_ERROR_INVALID_OPCODE; } //========================================================= //! General Destructor for the CigiInvalidOpcodeException //! exception class //! virtual ~CigiInvalidOpcodeException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an invalid packet is encountered. //! class CIGI_SPEC CigiInvalidPacketException : public CigiException { public: //========================================================= //! General Constructor for the CigiInvalidPacketException //! exception class //! CigiInvalidPacketException(void) { Msg = "Invalid Packet\n"; ErrorCode = CIGI_ERROR_INVALID_PACKET; } //========================================================= //! General Destructor for the CigiInvalidPacketException //! exception class //! virtual ~CigiInvalidPacketException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an incorrect packet size is encountered. //! class CIGI_SPEC CigiInvalidPacketSizeException : public CigiException { public: //========================================================= //! General Constructor for the CigiInvalidPacketSizeException //! exception class //! CigiInvalidPacketSizeException(void) { Msg = "Invalid Packet Size\n"; ErrorCode = CIGI_ERROR_INVALID_PACKET_SIZE; } //========================================================= //! General Destructor for the CigiInvalidPacketSizeException //! exception class //! virtual ~CigiInvalidPacketSizeException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an invalid session being requested is encountered. //! class CIGI_SPEC CigiInvalidSessionException : public CigiException { public: //========================================================= //! General Constructor for the CigiInvalidSessionException //! exception class //! CigiInvalidSessionException(void) { Msg = "Invalid Session\n"; ErrorCode = CIGI_ERROR_INVALID_SESSION; } //========================================================= //! General Destructor for the CigiInvalidSessionException //! exception class //! virtual ~CigiInvalidSessionException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! invalid seesion type being requested is encountered. //! class CIGI_SPEC CigiInvalidSessionTypeException : public CigiException { public: //========================================================= //! General Constructor for the CigiInvalidSessionTypeException //! exception class //! CigiInvalidSessionTypeException(void) { Msg = "Invalid Session Type\n"; ErrorCode = CIGI_ERROR_INVALID_SESSION_TYPE; } //========================================================= //! General Destructor for the CigiInvalidSessionTypeException //! exception class //! virtual ~CigiInvalidSessionTypeException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! too many sessions being requested is encountered. //! class CIGI_SPEC CigiMaxSessionsException : public CigiException { public: //========================================================= //! General Constructor for the CigiMaxSessionsException //! exception class //! CigiMaxSessionsException(void) { Msg = "Requested Number Of Sessions Exceeds Maximum\n"; ErrorCode = CIGI_ERROR_MAX_SESSIONS; } //========================================================= //! General Destructor for the CigiMaxSessionsException //! exception class //! virtual ~CigiMaxSessionsException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! the IG Control message not being created and used is encountered. //! class CIGI_SPEC CigiMissingIgControlException : public CigiException { public: //========================================================= //! General Constructor for the CigiMissingIgControlException //! exception class //! CigiMissingIgControlException(void) { Msg = "The Message Is Missing The IG Control Packet\n"; ErrorCode = CIGI_ERROR_MISSING_IG_CONTROL_PACKET; } //========================================================= //! General Destructor for the CigiMissingIgControlException //! exception class //! virtual ~CigiMissingIgControlException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! the Start Of Frame message not being created and used //! is encountered. //! class CIGI_SPEC CigiMissingStartOfFrameException : public CigiException { public: //========================================================= //! General Constructor for the CigiMissingStartOfFrameException //! exception class //! CigiMissingStartOfFrameException(void) { Msg = "The Message Is Missing The Start Of Frame Packet\n"; ErrorCode = CIGI_ERROR_MISSING_SOF_PACKET; } //========================================================= //! General Destructor for the CigiMissingStartOfFrameException //! exception class //! virtual ~CigiMissingStartOfFrameException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an Unimplemented function, packet, etc. is encountered. //! class CIGI_SPEC CigiNotImplementedException : public CigiException { public: //========================================================= //! General Constructor for the CigiNotImplementedException //! exception class //! CigiNotImplementedException(void) { Msg = "Not Implemented Error\n"; ErrorCode = CIGI_ERROR_NOT_IMPLEMENTED; } //========================================================= //! General Destructor for the CigiNotImplementedException //! exception class //! virtual ~CigiNotImplementedException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! a null pointer being improperly used is encountered. //! class CIGI_SPEC CigiNullPointerException : public CigiException { public: //========================================================= //! General Constructor for the CigiNullPointerException //! exception class //! CigiNullPointerException(void) { Msg = "Null Pointer Error\n"; ErrorCode = CIGI_ERROR_UNEXPECTED_NULL; } //========================================================= //! General Destructor for the CigiNullPointerException //! exception class //! virtual ~CigiNullPointerException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! a packet being too large is encountered. //! class CIGI_SPEC CigiPacketTooLargeException : public CigiException { public: //========================================================= //! General Constructor for the CigiPacketTooLargeException //! exception class //! CigiPacketTooLargeException(void) { Msg = "Packet Is Too Large\n"; ErrorCode = CIGI_ERROR_PACKET_TOO_LARGE; } //========================================================= //! General Destructor for the CigiPacketTooLargeException //! exception class //! virtual ~CigiPacketTooLargeException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! a packet parameter being set to an invalid value //! is encountered. //! class CIGI_SPEC CigiValueOutOfRangeException : public CigiException { public: //========================================================= //! General Constructor for the CigiValueOutOfRangeException //! exception class //! CigiValueOutOfRangeException(void) { Msg = "Value Out Of Range\n"; ErrorCode = CIGI_ERROR_VALUE_OUT_OF_RANGE; } //========================================================= //! Integer Data Fill Constructor for the CigiValueOutOfRangeException //! exception class //! CigiValueOutOfRangeException(const char *ParameterName, int Value, int Low, int High) { std::ostringstream os; os << "Parameter Out of Range: Parameter " << ParameterName << " is " << Value << ". The valid range is from " << Low << " to " << High << std::endl; Msg = os.str(); ErrorCode = CIGI_ERROR_VALUE_OUT_OF_RANGE; } //========================================================= //! Float/Double Data Fill Constructor for the CigiValueOutOfRangeException //! exception class //! CigiValueOutOfRangeException(const char *ParameterName, double Value, double Low, double High) { std::ostringstream os; os << "Parameter Out of Range: Parameter " << ParameterName << " is " << Value << ". The valid range is from " << Low << " to " << High << std::endl; Msg = os.str(); ErrorCode = CIGI_ERROR_VALUE_OUT_OF_RANGE; } //========================================================= //! Float/Double Data Fill Constructor for the CigiValueOutOfRangeException //! exception class //! CigiValueOutOfRangeException(const char *ParameterName, double Value, const char *Mod, double Limit) { std::ostringstream os; os << "Parameter Out of Range: Parameter " << ParameterName << " is " << Value << ". The valid range is " << Mod << " " << Limit << std::endl; Msg = os.str(); ErrorCode = CIGI_ERROR_VALUE_OUT_OF_RANGE; } //========================================================= //! General Destructor for the CigiValueOutOfRangeException //! exception class //! virtual ~CigiValueOutOfRangeException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an attempted use of the wrong CIGI version is encountered. //! class CIGI_SPEC CigiWrongVersionException : public CigiException { public: //========================================================= //! General Constructor for the CigiWrongVersionException //! exception class //! CigiWrongVersionException(void) { Msg = "Wrong Cigi Version Used\n"; ErrorCode = CIGI_ERROR_WRONG_VERSION; } //========================================================= //! General Destructor for the CigiWrongVersionException //! exception class //! virtual ~CigiWrongVersionException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an attempted use of the wrong CIGI version is encountered. //! class CIGI_SPEC CigiInvalidUserPacketException : public CigiException { public: //========================================================= //! General Constructor for the CigiInvalidUserPacketException //! exception class //! CigiInvalidUserPacketException(void) { Msg = "Cigi User Defined Packets Must Have an ID above 199\n"; ErrorCode = CIGI_ERROR_INVALID_USER_PACKET; } //========================================================= //! Constructor used to specify the invalid user packet id //! CigiInvalidUserPacketException(Cigi_uint8 PacketID) { std::ostringstream os; os << "Cigi User Defined Packets Must Have an ID above 199\nUsed ID was " << (int)PacketID << std::endl; Msg = os.str(); ErrorCode = CIGI_ERROR_INVALID_USER_PACKET; } //========================================================= //! General Destructor for the CigiWrongVersionException //! exception class //! virtual ~CigiInvalidUserPacketException(void) throw() { }; protected: }; //========================================================= //! This is the exception thrown when a problem involving //! an attempted use of the wrong CIGI version is encountered. //! class CIGI_SPEC CigiImproperPacketException : public CigiException { public: //========================================================= //! General Constructor for the CigiImproperPacketException //! exception class //! CigiImproperPacketException(void) { Msg = "Improper packet for Session Type\n"; ErrorCode = CIGI_ERROR_IMPROPER_PACKET; } //========================================================= //! General Destructor for the CigiWrongVersionException //! exception class //! virtual ~CigiImproperPacketException(void) throw() { }; protected: }; #endif // #if ! defined(_CIGI_EXCEPTIONS_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatHotReqV3.h000066400000000000000000000221621210750432300210360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotReqV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_HOT_REQ_V3_INCLUDED_) #define _CIGI_HAT_HOT_REQ_V3_INCLUDED_ #include "CigiBaseHatHotReq.h" class CIGI_SPEC CigiHatHotReqV3 : public CigiBaseHatHotReq { public: //==> Management //========================================================= //! General Constructor //! CigiHatHotReqV3(); //========================================================= //! General Destructor //! virtual ~CigiHatHotReqV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - The type of request and response desired
//! HAT=0
//! HOT=1
//! Extended=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> SrcCoordSys //========================================================= //! Sets the SrcCoordSys with bound checking control //! \param SrcCoordSysIn - The Coordinate system of the point data
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk=true); //========================================================= //! Gets the SrcCoordSys value. //! \return the current SrcCoordSys. CoordSysGrp GetSrcCoordSys(void) const { return(SrcCoordSys); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the Origin Entity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Xoff //========================================================= //! Sets the Xoff with bound checking control //! \param XoffIn - The position of the request point //! specified as an offset along the X axis of the origin //! entity and measured from the origin of that entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXoff(const double XoffIn, bool bndchk=true) { LatOrXoff = XoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Xoff value. //! \return the current Xoff. double GetXoff(void) const { return(LatOrXoff); } //+> Yoff //========================================================= //! Sets the Yoff with bound checking control //! \param YoffIn - The position of the request point //! specified as an offset along the Y axis of the origin //! entity and measured from the origin of that entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYoff(const double YoffIn, bool bndchk=true) { LonOrYoff = YoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Yoff value. //! \return the current Yoff. double GetYoff(void) const { return(LonOrYoff); } //+> Alt //========================================================= //! Sets the Alt with bound checking control //! \param AltIn - The altitude of the request point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlt(const double AltIn, bool bndchk=true) { AltOrZoff = AltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alt value. //! \return the current Alt. double GetAlt(void) const { return(AltOrZoff); } //+> Zoff //========================================================= //! Sets the Zoff with bound checking control //! \param ZoffIn - The position of the request point //! specified as an offset along the Z axis of the origin //! entity and measured from the origin of that entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZoff(const double ZoffIn, bool bndchk=true) { AltOrZoff = ZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Zoff value. //! \return the current Zoff. double GetZoff(void) const { return(AltOrZoff); } }; #endif // #if !defined(_CIGI_HAT_HOT_REQ_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatHotReqV3_2.h000066400000000000000000000235241210750432300212620ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotReqV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiHatHotReqV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_HOT_REQ_V3_2_INCLUDED_) #define _CIGI_HAT_HOT_REQ_V3_2_INCLUDED_ #include "CigiBaseHatHotReq.h" class CIGI_SPEC CigiHatHotReqV3_2 : public CigiBaseHatHotReq { public: //==> Management //========================================================= //! General Constructor //! CigiHatHotReqV3_2(); //========================================================= //! General Destructor //! virtual ~CigiHatHotReqV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - The type of request and response desired
//! HAT=0
//! HOT=1
//! Extended=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> SrcCoordSys //========================================================= //! Sets the SrcCoordSys with bound checking control //! \param SrcCoordSysIn - The Coordinate system of the point data
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk=true); //========================================================= //! Gets the SrcCoordSys value. //! \return the current SrcCoordSys. CoordSysGrp GetSrcCoordSys(void) const { return(SrcCoordSys); } //+> UpdatePeriod //========================================================= //! Sets the UpdatePeriod with bound checking control //! \param UpdatePeriodIn - The number of frames between each //! hat/hot response from the IG. If zero - the IG should //! only respond with one hat/hot response. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetUpdatePeriod(const Cigi_uint8 UpdatePeriodIn, bool bndchk=true) { UpdatePeriod = UpdatePeriodIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Update Period value. //! \return The number of frames between each //! hat/hot response from the IG. If zero - the IG should //! only respond with one hat/hot response. Cigi_uint8 GetUpdatePeriod(void) const { return(UpdatePeriod); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the Origin Entity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Xoff //========================================================= //! Sets the Xoff with bound checking control //! \param XoffIn - The position of the request point //! specified as an offset along the X axis of the origin //! entity and measured from the origin of that entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXoff(const double XoffIn, bool bndchk=true) { LatOrXoff = XoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Xoff value. //! \return the current Xoff. double GetXoff(void) const { return(LatOrXoff); } //+> Yoff //========================================================= //! Sets the Yoff with bound checking control //! \param YoffIn - The position of the request point //! specified as an offset along the Y axis of the origin //! entity and measured from the origin of that entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYoff(const double YoffIn, bool bndchk=true) { LonOrYoff = YoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Yoff value. //! \return the current Yoff. double GetYoff(void) const { return(LonOrYoff); } //+> Alt //========================================================= //! Sets the Alt with bound checking control //! \param AltIn - The altitude of the request point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlt(const double AltIn, bool bndchk=true) { AltOrZoff = AltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alt value. //! \return the current Alt. double GetAlt(void) const { return(AltOrZoff); } //+> Zoff //========================================================= //! Sets the Zoff with bound checking control //! \param ZoffIn - The position of the request point //! specified as an offset along the Z axis of the origin //! entity and measured from the origin of that entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZoff(const double ZoffIn, bool bndchk=true) { AltOrZoff = ZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Zoff value. //! \return the current Zoff. double GetZoff(void) const { return(AltOrZoff); } }; #endif // #if !defined(_CIGI_HAT_HOT_REQ_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatHotRespV3.h000066400000000000000000000136231210750432300212220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_HOT_RESP_V3_INCLUDED_) #define _CIGI_HAT_HOT_RESP_V3_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHatHotRespV3 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHatHotRespV3(); //========================================================= //! General Destructor //! virtual ~CigiHatHotRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Request/Response type
//! HAT=0
//! HOT=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> Hat //========================================================= //! Sets the Hat with bound checking control //! \param HatIn - Height above terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHat(const double HatIn, bool bndchk=true) { Hat = HatIn; VldHat = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hat value. //! \return the current Hat. double GetHat(void) const { return(Hat); } //+> Hot //========================================================= //! Sets the Hot with bound checking control //! \param HotIn - Height of terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHot(const double HotIn, bool bndchk=true) { Hot = HotIn; VldHot = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hot value. //! \return the current Hot. double GetHot(void) const { return(Hot); } }; #endif // #if !defined(_CIGI_HAT_HOT_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatHotRespV3_2.h000066400000000000000000000150511210750432300214400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotRespV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiHatHotRespV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_HOT_RESP_V3_2_INCLUDED_) #define _CIGI_HAT_HOT_RESP_V3_2_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHatHotRespV3_2 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHatHotRespV3_2(); //========================================================= //! General Destructor //! virtual ~CigiHatHotRespV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Request/Response type
//! HAT=0
//! HOT=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> HostFrame //========================================================= //! Sets the HostFrame with bound checking control //! \param HostFrameIn - The host frame when the hat/hot was //! calculated. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHostFrame(const Cigi_uint8 HostFrameIn, bool bndchk=true) { HostFrame = HostFrameIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the host frame value. //! \return the host frame when the hat/hot was calculated. Cigi_uint8 GetHostFrame(void) const { return(HostFrame); } //+> Hat //========================================================= //! Sets the Hat with bound checking control //! \param HatIn - Height above terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHat(const double HatIn, bool bndchk=true) { Hat = HatIn; VldHat = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hat value. //! \return the current Hat. double GetHat(void) const { return(Hat); } //+> Hot //========================================================= //! Sets the Hot with bound checking control //! \param HotIn - Height of terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHot(const double HotIn, bool bndchk=true) { Hot = HotIn; VldHot = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hot value. //! \return the current Hot. double GetHot(void) const { return(Hot); } }; #endif // #if !defined(_CIGI_HAT_HOT_RESP_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatHotXRespV3.h000066400000000000000000000171321210750432300213510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotXRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  01/22/2007 Greg Basler                       Version 1.7.5
 *  Removed the accessors for ReqType.  Request Type or Response Type is
 *  not availible for the HAT/HOT Extended Response Packet.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_HOT_XRESP_V3_INCLUDED_) #define _CIGI_HAT_HOT_XRESP_V3_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHatHotXRespV3 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHatHotXRespV3(); //========================================================= //! General Destructor //! virtual ~CigiHatHotXRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Hat //========================================================= //! Sets the Hat with bound checking control //! \param HatIn - Height above terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHat(const double HatIn, bool bndchk=true) { Hat = HatIn; VldHat = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hat value. //! \return the current Hat. double GetHat(void) const { return(Hat); } //+> Hot //========================================================= //! Sets the Hot with bound checking control //! \param HotIn - Height of terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHot(const double HotIn, bool bndchk=true) { Hot = HotIn; VldHot = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hot value. //! \return the current Hot. double GetHot(void) const { return(Hot); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - Material Code of the test point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } //+> NormAz //========================================================= //! Sets the NormAz with bound checking control //! \param NormAzIn - The Azimuth from true north of the normal //! vector of the polygon which contains the test point. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormAz(const float NormAzIn, bool bndchk=true); //========================================================= //! Gets the NormAz value. //! \return the current NormAz. float GetNormAz(void) const { return(NormAz); } //+> NormEl //========================================================= //! Sets the NormEl with bound checking control //! \param NormElIn - The Elevation of the normal vector of the polygon //! which contains the test point. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormEl(const float NormElIn, bool bndchk=true); //========================================================= //! Gets the NormEl value. //! \return the current NormEl. float GetNormEl(void) const { return(NormEl); } }; #endif // #if !defined(_CIGI_HAT_HOT_XRESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatHotXRespV3_2.h000066400000000000000000000201431210750432300215660ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotXRespV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiHatHotXRespV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  01/22/2007 Greg Basler                       Version 1.7.5
 *  Removed the accessors for ReqType.  Request Type or Response Type is
 *  not availible for the HAT/HOT Extended Response Packet.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_HOT_XRESP_V3_2_INCLUDED_) #define _CIGI_HAT_HOT_XRESP_V3_2_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHatHotXRespV3_2 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHatHotXRespV3_2(); //========================================================= //! General Destructor //! virtual ~CigiHatHotXRespV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> HostFrame //========================================================= //! Sets the HostFrame with bound checking control //! \param HostFrameIn - The host frame when the hat/hot was //! calculated. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHostFrame(const Cigi_uint8 HostFrameIn, bool bndchk=true) { HostFrame = HostFrameIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the host frame value. //! \return the host frame when the hat/hot was calculated. Cigi_uint8 GetHostFrame(void) const { return(HostFrame); } //+> Hat //========================================================= //! Sets the Hat with bound checking control //! \param HatIn - Height above terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHat(const double HatIn, bool bndchk=true) { Hat = HatIn; VldHat = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hat value. //! \return the current Hat. double GetHat(void) const { return(Hat); } //+> Hot //========================================================= //! Sets the Hot with bound checking control //! \param HotIn - Height of terrain result //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHot(const double HotIn, bool bndchk=true) { Hot = HotIn; VldHot = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hot value. //! \return the current Hot. double GetHot(void) const { return(Hot); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - Material Code of the test point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } //+> NormAz //========================================================= //! Sets the NormAz with bound checking control //! \param NormAzIn - The Azimuth from true north of the normal //! vector of the polygon which contains the test point. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormAz(const float NormAzIn, bool bndchk=true); //========================================================= //! Gets the NormAz value. //! \return the current NormAz. float GetNormAz(void) const { return(NormAz); } //+> NormEl //========================================================= //! Sets the NormEl with bound checking control //! \param NormElIn - The Elevation of the normal vector of the polygon //! which contains the test point. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormEl(const float NormElIn, bool bndchk=true); //========================================================= //! Gets the NormEl value. //! \return the current NormEl. float GetNormEl(void) const { return(NormEl); } }; #endif // #if !defined(_CIGI_HAT_HOT_XRESP_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatReqV1.h000066400000000000000000000111141210750432300203540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatReqV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_REQ_V1_INCLUDED_) #define _CIGI_HAT_REQ_V1_INCLUDED_ #include "CigiBaseHatHotReq.h" class CIGI_SPEC CigiHatReqV1 : public CigiBaseHatHotReq { public: //==> Management //========================================================= //! General Constructor //! CigiHatReqV1(); //========================================================= //! General Destructor //! virtual ~CigiHatReqV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Alt //========================================================= //! Sets the Alt with bound checking control //! \param AltIn - The referance altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlt(const double AltIn, bool bndchk=true) { AltOrZoff = AltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alt value. //! \return the current Alt. double GetAlt(void) const { return(AltOrZoff); } }; #endif // #if !defined(_CIGI_HAT_REQ_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatReqV2.h000066400000000000000000000111151210750432300203560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatReqV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_REQ_V2_INCLUDED_) #define _CIGI_HAT_REQ_V2_INCLUDED_ #include "CigiBaseHatHotReq.h" class CIGI_SPEC CigiHatReqV2 : public CigiBaseHatHotReq { public: //==> Management //========================================================= //! General Constructor //! CigiHatReqV2(); //========================================================= //! General Destructor //! virtual ~CigiHatReqV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Alt //========================================================= //! Sets the Alt with bound checking control //! \param AltIn - The referance altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlt(const double AltIn, bool bndchk=true) { AltOrZoff = AltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alt value. //! \return the current Alt. double GetAlt(void) const { return(AltOrZoff); } }; #endif // #if !defined(_CIGI_HAT_REQ_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatRespV1.h000066400000000000000000000126561210750432300205520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatRespV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_RESP_V1_INCLUDED_) #define _CIGI_HAT_RESP_V1_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHatRespV1 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHatRespV1(); //========================================================= //! General Destructor //! virtual ~CigiHatRespV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Hat //========================================================= //! Sets the Hat with bound checking control //! \param HatIn - The Hat result data. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHat(const double HatIn, bool bndchk=true) { Hat = HatIn; VldHat = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hat value. //! \return the current Hat. double GetHat(void) const { return(Hat); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the test point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } }; #endif // #if !defined(_CIGI_HAT_HOT_RESP_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHatRespV2.h000066400000000000000000000126571210750432300205540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatRespV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HAT_RESP_V2_INCLUDED_) #define _CIGI_HAT_RESP_V2_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHatRespV2 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHatRespV2(); //========================================================= //! General Destructor //! virtual ~CigiHatRespV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Hat //========================================================= //! Sets the Hat with bound checking control //! \param HatIn - The Hat result data. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHat(const double HatIn, bool bndchk=true) { Hat = HatIn; VldHat = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hat value. //! \return the current Hat. double GetHat(void) const { return(Hat); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the test point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } }; #endif // #if !defined(_CIGI_HAT_HOT_RESP_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHoldEnvCtrl.h000066400000000000000000000122201210750432300211440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHoldEnvCtrl.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Initialized the MinorVersion member variable in the constructor.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HOLD_ENV_CTRL_INCLUDED_) #define _CIGI_HOLD_ENV_CTRL_INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "CigiBaseEnvCtrl.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_HOLD_ENV_CTRL_PACKET_ID_V3 0 #define CIGI_HOLD_ENV_CTRL_PACKET_SIZE_V3 0 class CIGI_SPEC CigiHoldEnvCtrl : public CigiBaseEnvCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiHoldEnvCtrl() { PacketID = CIGI_HOLD_ENV_CTRL_PACKET_ID_V3; PacketSize = CIGI_HOLD_ENV_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; Hour = 0; Minute = 0; Month = 1; Day = 1; Year = 2000; StarInt = 0.0; EphemerisEn = false; SunEn = false; MoonEn = false; StarEn = false; DateVld = false; AtmosEn = false; Aerosol = 0.0; Humidity = 30; AirTemp = 0.0; Visibility = 64373.76f; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; } //========================================================= //! General Destructor //! virtual ~CigiHoldEnvCtrl() { }; //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V2 and V3. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { return(0); } //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is used to point to the Environmental Control //! holding object when going between V2 and V3. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { return(0); } //==> Hold Object Manipulation //========================================================= //! A virtual FillHold function. //! This function is not implemented in this class. //! virtual void FillHold(CigiBaseEnvCtrl * Hold) const { }; //==> ID & Size Manipulation //========================================================= //! Sets the packet id. //! \param - The packet id. //! void SetPacketID(Cigi_uint8 PacketIdIn) { PacketID = PacketIdIn; } //========================================================= //! Sets the size of the packet. //! \param - The size in bytes of the packet. //! void SetPacketSize(Cigi_uint8 PacketSizeIn) { PacketSize = PacketSizeIn; } }; #endif // !defined(_CIGI_HOLD_ENV_CTRL_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHostSession.h000066400000000000000000000042551210750432300212520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHostSession.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HOST_SESSION_INCLUDED_) #define _CIGI_HOST_SESSION_INCLUDED_ #include "CigiSession.h" //========================================================= //! The class for the Host Session //! class CIGI_SPEC CigiHostSession : public CigiSession { public: //==> Management //========================================================= //! Main Constructor //! CigiHostSession(const int NumInBuf = 2, const int InBufLen = 16384, const int NumOutBuf = 2, const int OutBufLen = 16384); //========================================================= //! General Destructor //! virtual ~CigiHostSession(); }; #endif // !defined(_CIGI_HOST_SESSION_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHotReqV2.h000066400000000000000000000110671210750432300204020ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHotReqV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HOT_REQ_V2_INCLUDED_) #define _CIGI_HOT_REQ_V2_INCLUDED_ #include "CigiBaseHatHotReq.h" class CIGI_SPEC CigiHotReqV2 : public CigiBaseHatHotReq { public: //==> Management //========================================================= //! General Constructor //! CigiHotReqV2(); //========================================================= //! General Destructor //! virtual ~CigiHotReqV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Alt //========================================================= //! Sets the Alt with bound checking control //! \param AltIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlt(const double AltIn, bool bndchk=true) { AltOrZoff = AltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alt value. //! \return the current Alt. double GetAlt(void) const { return(AltOrZoff); } }; #endif // #if !defined(_CIGI_HOT_REQ_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiHotRespV2.h000066400000000000000000000126571210750432300205720ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHotRespV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_HOT_RESP_V2_INCLUDED_) #define _CIGI_HOT_RESP_V2_INCLUDED_ #include "CigiBaseHatHotResp.h" class CIGI_SPEC CigiHotRespV2 : public CigiBaseHatHotResp { public: //==> Management //========================================================= //! General Constructor //! CigiHotRespV2(); //========================================================= //! General Destructor //! virtual ~CigiHotRespV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Hot //========================================================= //! Sets the Hot with bound checking control //! \param HotIn - The Hot result data. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHot(const double HotIn, bool bndchk=true) { Hot = HotIn; VldHot = true; return(CIGI_SUCCESS); } //========================================================= //! Gets the Hot value. //! \return the current Hot. double GetHot(void) const { return(Hot); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the test point //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } }; #endif // #if !defined(_CIGI_HAT_HOT_RESP_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGCtrlV1.h000066400000000000000000000146231210750432300203240ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the SetFrameCntr accessor method.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_IG_CTRL_V1_INCLUDED_) #define _CIGI_IG_CTRL_V1_INCLUDED_ #include "CigiBaseIGCtrl.h" //========================================================= //! The class for the IG Control packet for CIGI version 1 //! class CIGI_SPEC CigiIGCtrlV1 : public CigiBaseIGCtrl { public: CigiIGCtrlV1(); virtual ~CigiIGCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; LastRcvdIGFrame = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the Timestamp value for V1 //! \return TimeStampV1 The timestamp value //! Cigi_uint32 GetTimeStamp(void) const { return(TimeStampV1); } //========================================================= //! Sets the Timestamp value for V1.
//! This also converts to and sets the V2 and V3 timestamp values. //! \param TimeStamp - Specifies the timestamp value. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk=true); //+> Tracking Device Enable //========================================================= //! Gets the Tracking Device Enable flag for V1 //! \return TrackDeviceEn - Tracking Device enabled or disabled. //! TrackDeviceEnGrp GetTrackDeviceEn(void) const { return(TrackDeviceEn); } //========================================================= //! Sets the Tracking Device Enable flag for V1.
//! \param TrackDeviceEnIn - Specifies the Tracking Device Enable flag. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTrackDeviceEn(const TrackDeviceEnGrp TrackDeviceEnIn, bool bndchk=true); //+> Boresight Tracking Device //========================================================= //! Gets the Boresight Tracking Device flag for V1 //! \return BoresightTrackDevice - Boresight Tracking Device command. //! bool GetBoresightTrackDevice(void) const { return(BoresightTrackDevice); } //========================================================= //! Sets the Boresight Tracking Device flag for V1.
//! \param BoresightTrackDeviceIn - Specifies the //! Boresight Tracking Device command. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetBoresightTrackDevice(const bool BoresightTrackDeviceIn, bool bndchk=true) { BoresightTrackDevice = BoresightTrackDeviceIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_IG_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGCtrlV2.h000066400000000000000000000143731210750432300203270ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the SetFrameCntr accessor method.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_IG_CTRL_V2_INCLUDED_) #define _CIGI_IG_CTRL_V2_INCLUDED_ #include "CigiBaseIGCtrl.h" //========================================================= //! The class for the IG Control packet for CIGI version 2 //! class CIGI_SPEC CigiIGCtrlV2 : public CigiBaseIGCtrl { public: CigiIGCtrlV2(); virtual ~CigiIGCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; LastRcvdIGFrame = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the Timestamp value for V2 //! \return TimeStampV2 The timestamp value //! float GetTimeStamp(void) const { return(TimeStampV2); } //========================================================= //! Sets the Timestamp value for V2.
//! This also converts to and sets the V1 and V3 timestamp values. //! \param TimeStamp - Specifies the timestamp value. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const float TimeStamp, bool bndchk=true); //+> Tracking Device Enable //========================================================= //! Gets the Tracking Device Enable flag for V2 //! \return TrackDeviceEn - Tracking Device enabled or disabled. //! TrackDeviceEnGrp GetTrackDeviceEn(void) const { return(TrackDeviceEn); } //========================================================= //! Sets the Tracking Device Enable flag for V2.
//! \param TrackDeviceEnIn - Specifies the Tracking Device Enable flag. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTrackDeviceEn(const TrackDeviceEnGrp TrackDeviceEnIn, bool bndchk=true); //+> Boresight Tracking Device //========================================================= //! Gets the Boresight Tracking Device flag for V2 //! \return BoresightTrackDevice - Boresight Tracking Device command. //! bool GetBoresightTrackDevice(void) const { return(BoresightTrackDevice); } //========================================================= //! Sets the Boresight Tracking Device flag for V2.
//! \param BoresightTrackDeviceIn - Specifies the //! Boresight Tracking Device command. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetBoresightTrackDevice(const bool BoresightTrackDeviceIn, bool bndchk=true) { BoresightTrackDevice = BoresightTrackDeviceIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_IG_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGCtrlV3.h000066400000000000000000000122531210750432300203230ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the SetFrameCntr accessor method.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_IG_CONTROL_V3_INCLUDED_) #define _CIGI_IG_CONTROL_V3_INCLUDED_ #include "CigiBaseIGCtrl.h" //========================================================= //! The class for the IG Control packet for CIGI version 3 //! class CIGI_SPEC CigiIGCtrlV3 : public CigiBaseIGCtrl { public: CigiIGCtrlV3(); virtual ~CigiIGCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; LastRcvdIGFrame = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the Timestamp value for V3 //! \return TimeStampV2 The timestamp value //! Cigi_uint32 GetTimeStamp(void) const { return(TimeStampV3); } //========================================================= //! Sets the Timestamp value for V2.
//! This also converts to and sets the V1 and V2 timestamp values. //! \param TimeStamp - Specifies the timestamp value. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk=true); //+> Timestamp Valid //========================================================= //! Gets the Timestamp valid flag for V3 //! \return TimestampValid - The timestamp valid flag //! bool GetTimeStampValid(void) const { return(TimestampValid); } int SetTimeStampValid(const bool TimeStampValidIn, bool bndchk=true) { TimestampValid = TimeStampValidIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_IG_CONTROL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGCtrlV3_2.h000066400000000000000000000140731210750432300205460ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiIGCtrlV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Corrected the SetTimeStampValid description.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_IG_CONTROL_V3_2_INCLUDED_) #define _CIGI_IG_CONTROL_V3_2_INCLUDED_ #include "CigiBaseIGCtrl.h" //========================================================= //! The class for the IG Control packet for CIGI version 3 //! class CIGI_SPEC CigiIGCtrlV3_2 : public CigiBaseIGCtrl { public: CigiIGCtrlV3_2(); virtual ~CigiIGCtrlV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the Timestamp value for V3 //! \return TimeStampV2 The timestamp value //! Cigi_uint32 GetTimeStamp(void) const { return(TimeStampV3); } //========================================================= //! Sets the Timestamp value for V2.
//! This also converts to and sets the V1 and V2 timestamp values. //! \param TimeStamp - Specifies the timestamp value. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk=true); //+> Timestamp Valid //========================================================= //! Gets the Timestamp valid flag for V3 //! \return TimestampValid - The timestamp valid flag //! bool GetTimeStampValid(void) const { return(TimestampValid); } //========================================================= //! Sets the Timestamp valid flag for V3 //! \param TimeStampValidIn - Sets or clears the Time Stamp Valid flag //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStampValid(const bool TimeStampValidIn, bool bndchk=true) { TimestampValid = TimeStampValidIn; return(CIGI_SUCCESS); } //+> Last Received IG Frame //========================================================= //! Gets the last received IG Frame id value //! \return Current last received IG Frame //! Cigi_uint32 GetLastRcvdIGFrame(void) const { return(LastRcvdIGFrame); } //========================================================= //! Sets the last received IG Frame with bound checking control //! \param LastRcvdIGFrameIn - Specifies the last received IG frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetLastRcvdIGFrame(const Cigi_uint32 LastRcvdIGFrameIn, bool bndchk=true) { LastRcvdIGFrame = LastRcvdIGFrameIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_IG_CONTROL_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGCtrlV3_3.h000066400000000000000000000147451210750432300205550ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Initial Release for CIGI 3.3 compatibility.
 *  Based on CigiIGCtrlV3_2.h"
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_IG_CONTROL_V3_3_INCLUDED_) #define _CIGI_IG_CONTROL_V3_3_INCLUDED_ #include "CigiBaseIGCtrl.h" //========================================================= //! The class for the IG Control packet for CIGI version 3 //! class CIGI_SPEC CigiIGCtrlV3_3 : public CigiBaseIGCtrl { public: CigiIGCtrlV3_3(); virtual ~CigiIGCtrlV3_3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the Timestamp value for V3 //! \return TimeStampV2 The timestamp value //! Cigi_uint32 GetTimeStamp(void) const { return(TimeStampV3); } //========================================================= //! Sets the Timestamp value for V2.
//! This also converts to and sets the V1 and V2 timestamp values. //! \param TimeStamp - Specifies the timestamp value. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk=true); //+> Timestamp Valid //========================================================= //! Gets the Timestamp valid flag for V3 //! \return TimestampValid - The timestamp valid flag //! bool GetTimeStampValid(void) const { return(TimestampValid); } //========================================================= //! Sets the Timestamp valid flag for V3 //! \param TimeStampValidIn - Sets or clears the Time Stamp Valid flag //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStampValid(const bool TimeStampValidIn, bool bndchk=true) { TimestampValid = TimeStampValidIn; return(CIGI_SUCCESS); } //+> Smoothing Enabled //========================================================= //! Gets the Smoothing Enabled flag for V3.3 //! \return Smoothing Enabled flag //! bool GetSmoothingEn(void) const { return(SmoothingEn); } //========================================================= //! Enables or Disables motion smoothing.
//! \param SmoothingEnabled - Enables (true) or disables (false) //! Extrapolation or Interpolation motion smoothing //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetSmoothingEn(const bool SmoothingEnabled, bool bndchk=true) { SmoothingEn = SmoothingEnabled; return(CIGI_SUCCESS); } //+> Last Received IG Frame //========================================================= //! Gets the last received IG Frame id value //! \return Current last received IG Frame //! Cigi_uint32 GetLastRcvdIGFrame(void) const { return(LastRcvdIGFrame); } //========================================================= //! Sets the last received IG Frame with bound checking control //! \param LastRcvdIGFrameIn - Specifies the last received IG frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetLastRcvdIGFrame(const Cigi_uint32 LastRcvdIGFrameIn, bool bndchk=true) { LastRcvdIGFrame = LastRcvdIGFrameIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_IG_CONTROL_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGMsgV2.h000066400000000000000000000100731210750432300201420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiIGMsgV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the
 *  class in a Windows DLL.
 *
 *  06/12/2006 Greg Basler                       Version 1.7.1
 *  Changed native char type to Cigi type Cigi_Ascii.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  Added Variable length packet processing
 *  
 * 
* The Boeing Company * */ #if !defined(_CIGI_IG_MSG_V2_INCLUDED_) #define _CIGI_IG_MSG_V2_INCLUDED_ #include "CigiBaseIGMsg.h" class CIGI_SPEC CigiIGMsgV2 : public CigiBaseIGMsg { public: //==> Management //========================================================= //! General Constructor //! CigiIGMsgV2(); //========================================================= //! General Destructor //! virtual ~CigiIGMsgV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, unsigned char * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(unsigned char * Buff, bool Swap, void *Spec); //========================================================= //! A virtual function to determine the size that the //! packet will take up when packed. //! \param refPacket - A pointer to the current pack point. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket); //==> Accessing Member Variable Values functions //+> Msg //========================================================= //! Sets the Msg with bound checking control //! \param MsgIn - Message string //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMsg(const Cigi_Ascii *MsgIn, bool bndchk=true); }; #endif // #if !defined(_CIGI_IG_MSG_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGMsgV3.h000066400000000000000000000101511210750432300201400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiIGMsgV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the
 *  class in a Windows DLL.
 *
 *  06/12/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to
 *  Cigi types Cigi_Ascii, Cigi_int8, and Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  Added Variable length packet processing
 *  
 * 
* The Boeing Company * */ #if !defined(_CIGI_IG_MSG_V3_INCLUDED_) #define _CIGI_IG_MSG_V3_INCLUDED_ #include "CigiBaseIGMsg.h" class CIGI_SPEC CigiIGMsgV3 : public CigiBaseIGMsg { public: //==> Management //========================================================= //! General Constructor //! CigiIGMsgV3(); //========================================================= //! General Destructor //! virtual ~CigiIGMsgV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual function to determine the size that the //! packet will take up when packed. //! \param refPacket - A pointer to the current pack point. //! //! \return The size that the packet will take up when packed //! virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket); //==> Accessing Member Variable Values functions //+> Msg //========================================================= //! Sets the Msg with bound checking control //! \param MsgIn - Message string //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMsg(const Cigi_Ascii *MsgIn, bool bndchk=true); }; #endif // #if !defined(_CIGI_IG_MSG_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIGSession.h000066400000000000000000000042361210750432300206330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGSession.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 * 
* @author The Boeing Company * */ #if !defined(_CIGI_IG_SESSION_INCLUDED_) #define _CIGI_IG_SESSION_INCLUDED_ #include "CigiSession.h" //========================================================= //! The class for the IG Session //! class CIGI_SPEC CigiIGSession : public CigiSession { public: //==> Management //========================================================= //! Main Constructor //! CigiIGSession(const int NumInBuf = 2, const int InBufLen = 16384, const int NumOutBuf = 2, const int OutBufLen = 16384); //========================================================= //! General Destructor //! virtual ~CigiIGSession(); }; #endif // !defined(_CIGI_IG_SESSION_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIO.h000066400000000000000000000103651210750432300172770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIO.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_IO_INCLUDED_) #define _CIGI_IO_INCLUDED_ #include "CigiIncomingMsg.h" #include "CigiOutgoingMsg.h" //========================================================= //! The base class for Cigi IO.
//! This class must be inherited. //! class CIGI_SPEC CigiIO { public: //==> Management //========================================================= //! General Constructor //! CigiIO(CigiIncomingMsg &InMsg, CigiOutgoingMsg &OutMsg); //========================================================= //! General Destructor //! virtual ~CigiIO(); //==> Transmission Member functions //========================================================= //! Processes and send a message. //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int Send(void); //========================================================= //! Receive and processes a message //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int Receive(void); //========================================================= //! Receive a message and store it for later processing //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int Recv(void); protected: //==> Member variables //========================================================= //! Message In
//! A referance to a Cigi incoming message object. //! CigiIncomingMsg &MsgIn; //========================================================= //! Message Out
//! A referance to a Cigi outgoing message object. //! CigiOutgoingMsg &MsgOut; //==> Member protected functions //========================================================= //! A pure virtual function to output the data.
//! This function is not implemented by this class. //! \param Buffer - A pointer to the buffer to write //! \param Length - The length of the message in bytes. //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Write(Cigi_uint8 * Buffer, int Length) =0; //========================================================= //! A pure virtual function to input the data.
//! This function is not implemented by this class. //! \param Buffer - A pointer to the buffer to fill. //! \param MaxLength - The maximum length allowed for the message in bytes. //! \return This returns the number of bytes in the message //! virtual int Read(Cigi_uint8 * Buffer, int MaxLength) =0; }; #endif // !defined(_CIGI_IO_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiIncomingMsg.h000066400000000000000000000544431210750432300212070ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIncomingMsg.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  07/05/2005 Greg Basler                       Version 1.5.4
 *  Noted that the ProcessIncomingMsg function can throw exceptions, listed 
 *  in the comments section of the method.
 *
 *  10/28/2005 Greg Basler                       Version 1.5.7
 *  Corrected the description for SetReaderCigiVersion.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the GetReaderCigiMinorVersion accessor method.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added an overloaded SetReaderCigiVersion method to accept a 
 *  CigiMinorVersionIn parameter.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Updated the existing SetReaderCigiVersion method to call the new 
 *  implementation with a default version number of 0.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_INCOMING_MESSAGE_INCLUDED_) #define _CIGI_INCOMING_MESSAGE_INCLUDED_ #include #include "CigiMessage.h" #include "CigiMessageBuffer.h" #include "CigiBaseEventProcessor.h" #include "CigiBaseSignalProcessing.h" #include "CigiSignalType.h" //========================================================= //! The formatting definition for all static callback functions //! typedef void (* CigiCBProcessor)(CigiBasePacket *Packet); class CigiDefaultPacket; class CigiSession; //========================================================= //! The class for incoming messages //! class CIGI_SPEC CigiIncomingMsg : public CigiMessage { friend class CigiSession; public: //==> Management //========================================================= //! General Constructor //! CigiIncomingMsg(); //========================================================= //! General Destructor //! virtual ~CigiIncomingMsg(); //==> Processing Member functions //+> Processing Incoming Messages //========================================================= //! This processes the incoming message contained in a //! user supplied buffer.
//! This routine can throw a CigiMissingIgControlException or //! CigiMissingStartOfFrameException exception. //! \param Buff - Pointer to the beginning of the message //! in a user supplied buffer. //! \param Size - Size in bytes of the message //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int ProcessIncomingMsg(Cigi_uint8 *Buff, int Size); //========================================================= //! This processes the incoming message using the internal buffer //! This can also throw the following exceptions: //! - CigiMissingStartOfFrameException //! - CigiMissingIgControlException //! - CigiBufferOverrunException //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int ProcessIncomingMsg(void) { int Rslt = CIGI_ERROR_UNEXPECTED_NULL; if(CrntMsgBuf != NULL) Rslt = ProcessIncomingMsg(CrntMsgBuf->Buffer, CrntMsgBuf->BufferFillCnt); return(Rslt); } //========================================================= //! This processes the current packet.
//! This takes the given packet object and calls the correct //! Event Managers, CallBacks, and Signals. //! \param PcktId - The packet id converted to the reader's //! version of CIGI. //! \param Pckt - Pointer to the packet //! in a user supplied buffer. //! void ProcessPacket(int PcktId, CigiBasePacket *Pckt); //+> Iterative packet processing method calls //========================================================= //! This gets the first packet of the message //! //! \return This returns a pointer to the first message //! CigiBasePacket * GetFirstPacket(void); //========================================================= //! This gets the next packet of the message //! //! \return This returns a pointer to the next message //! CigiBasePacket * GetNextPacket(void); //+> Packet Processor Management //========================================================= //! This places the specifed event method processor into //! the event processor list for this packet. //! \param PacketID - The Packet ID to which the specified //! event processor will be linked. //! \param EventMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterEventProcessor(int PacketID, CigiBaseEventProcessor *EventMgr); //========================================================= //! This removes the specifed event method processor from //! the event processor list for this packet. //! \param PacketID - The Packet ID to which the specified //! event processor is currently linked. //! \param EventMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterEventProcessor(int PacketID, CigiBaseEventProcessor *EventMgr); //========================================================= //! This places the specifed callback method processor into //! the callback processor list for this packet. //! \param PacketID - The Packet ID to which the specified //! callback processor will be linked. //! \param CallBack - A pointer to the callback processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterCallBack(int PacketID, CigiCBProcessor CallBack); //========================================================= //! This removes the specifed callback method processor from //! the callback processor list for this packet. //! \param PacketID - The Packet ID to which the specified //! callback processor is currently linked. //! \param CallBack - A pointer to the callback processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterCallBack(int PacketID, CigiCBProcessor CallBack); //========================================================= //! This places the specifed signal method processor into //! the event processor list. //! \param SignalMgr - A pointer to the signal processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterSignalProcessor(CigiBaseSignalProcessing *SignalMgr); //========================================================= //! This removes the specifed signal method processor from //! the signal processor list. //! \param SignalMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterSignalProcessor(CigiBaseSignalProcessing *SignalMgr); //========================================================= //! This places the specifed event method processor into //! the unrecognized event processor list. //! \param EventMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterUnrecognizedPacketEvent(CigiBaseEventProcessor *EventMgr) { return(RegisterEventProcessor(0,EventMgr)); } //========================================================= //! This removes the specifed Event method processor from //! the unrecognized Event processor list. //! \param EventMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterUnrecognizedPacketEvent(CigiBaseEventProcessor *EventMgr) { return(UnregisterEventProcessor(0,EventMgr)); } //========================================================= //! This places the specifed CallBack method processor into //! the unrecognized CallBack processor list. //! \param CallBack - A pointer to the CallBack processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterUnrecognizedPacketCallBack(CigiCBProcessor CallBack) { return(RegisterCallBack(0,CallBack)); } //========================================================= //! This removes the specifed CallBack method processor from //! the unrecognized CallBack processor list. //! \param CallBack - A pointer to the CallBack processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterUnrecognizedPacketCallBack(CigiCBProcessor CallBack) { return(UnregisterCallBack(0,CallBack)); } //========================================================= //! This places the specifed Event method processor into //! the unhandled Event processor list. //! \param EventMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterUnhandledPacketEvent(CigiBaseEventProcessor *EventMgr) { return(RegisterEventProcessor(256,EventMgr)); } //========================================================= //! This removes the specifed signal method processor from //! the signal processor list. //! \param EventMgr - A pointer to the event processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterUnhandledPacketEvent(CigiBaseEventProcessor *EventMgr) { return(UnregisterEventProcessor(256,EventMgr)); } //========================================================= //! This places the specifed CallBack method processor into //! the unhandled callback processor list. //! \param CallBack - A pointer to the CallBack processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterUnhandledPacketCallBack(CigiCBProcessor CallBack) { return(RegisterCallBack(256,CallBack)); } //========================================================= //! This removes the specifed CallBack method processor from //! the unhandled callback processor list. //! \param CallBack - A pointer to the CallBack processor //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnregisterUnhandledPacketCallBack(CigiCBProcessor CallBack) { return(UnregisterCallBack(256,CallBack)); } //==> Buffer Packing Managers //========================================================= //! Gets a pointer to the next Message buffer to be used to //! input a message. //! \return This returns a pointer to the next Message buffer. //! Cigi_uint8 *GetNextBuffToLoad(void); //========================================================= //! Advances the message buffer index to the next Message buffer //! to be used to process a message. //! void AdvanceCrntBuffer(void); //========================================================= //! Sets the size of the message in the Current fill buffer. //! \param MsgSize - the size (in bytes) of the message just //! placed into the current message fill buffer. //! void SetCrntMsgSize(int MsgSize) { if(CrntMsgBuf != NULL) CrntMsgBuf->BufferFillCnt = MsgSize; } //==> Accessing Member Variable Values functions //========================================================= //! Gets a pointer to the current Message buffer. //! \return the pointer to the Message buffer //! Cigi_uint8 * GetMsgBuffer() { if(CrntMsgBuf == NULL) AdvanceCrntBuffer(); return(CrntMsgBuf->Buffer); } //========================================================= //! Sets the size of the message in the Current fill buffer. //! \return This returns the message buffer size //! int GetMsgBufSize(void) { return(CrntMsgBuf->BufferSize); } //+> Iteration Method Flag //========================================================= //! Sets the flag specifying whether the Iteration method is being used. //! \param IterationIn - Iteration method flag.
//! true - The Iteration method is being used.
//! false - The Callback, Event, (and/or) Signal method(s) //! (is/are) used. //! void UsingIteration(bool IterationIn=true) { Iteration = IterationIn; } //========================================================= //! Gets the flag specifying whether the Iteration method is being used. //! \return - Iteration method flag.
//! true - The Iteration method is being used.
//! false - The Callback, Event, (and/or) Signal method(s) //! (is/are) used. //! bool CheckIteration(void) { return(Iteration); } //+> Reader's CIGI Version //========================================================= //! This allows the user to specify the version of CIGI //! that the reader software uses. This is needed to //! do version conversion processing. It also adjusts the //! signal tables. //! \param Version - the version of CIGI that the reader //! software uses. //! void SetReaderVersion(CigiVersionID &Version); //========================================================= //! Sets the CIGI version that the reader is using. //! \param CigiVersionIn - The CIGI version to which the application //! is coded.
//! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetReaderCigiVersion(const int CigiVersionIn, bool bndchk=true) { CigiVersionID tVer(CigiVersionIn,0); SetReaderVersion(tVer); return(CIGI_SUCCESS); } //========================================================= //! Sets the CIGI version that the reader is using. //! \param CigiVersionIn - The CIGI version to which the application //! is coded.
//! \param CigiMinorVersionIn - The CIGI minor version to which the application //! is coded.
//! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetReaderCigiVersion(const int CigiVersionIn, const int CigiMinorVersionIn, bool bndchk=true) { CigiVersionID tVer(CigiVersionIn,CigiMinorVersionIn); SetReaderVersion(tVer); return(CIGI_SUCCESS); } //========================================================= //! Gets the CIGI version that the reader is using. //! \return The CIGI version that the Reader is using. //! int GetReaderCigiVersion(void) const { return(ReaderVersion.CigiMajorVersion); } //========================================================= //! Gets the Reader's Cigi Minor Version. //! \return the Cigi Minor Version of the reader and processing routines. //! int GetReaderCigiMinorVersion(void) const { return(ReaderVersion.CigiMinorVersion); } //+> Registering //========================================================= //! Register a user packet for use. //! \param Packet - A pointer to the packet manager object //! \param PacketID - The packet id //! \param HostSend - A flag specifying whether the host //! can send this packet. //! \param IGSend - A flag specifying whether the IG //! can send this packet. //! //! \return the a flag specifying whether the specified //! packet is valid to send. //! int RegisterUserPacket(CigiBasePacket *Packet, Cigi_uint8 PacketID, bool HostSend, bool IGSend); protected: //==> Member variables //========================================================= //! Iteration
//! Specifies whether the Iteration method is being used
//! true - The Iteration method is being used.
//! false - The Callback, Event, (and/or) Signal method(s) //! (is/are) used. //! bool Iteration; //========================================================= //! CrntPacket
//! A pointer to the first byte of the current packet. //! Cigi_uint8 *CrntPacket; //========================================================= //! ReadBufferPos
//! An index into the message buffer specifying where the //! the next byte to be read is. //! int ReadBufferPos; //========================================================= //! EventList
//! The table of Event lists. //! listEventList[257]; //========================================================= //! CallBackList
//! The table of Callback lists. //! listCallBackList[257]; //========================================================= //! SignalList
//! The beginning of the Signal list. //! listSignalList; //========================================================= //! Swap
//! Specifies when the message must be byte swapped. //! bool Swap; //========================================================= //! MostMatureCigiVersionReceived
//! Specifies the most mature (i.e. newest version) of CIGI received. //! CigiVersionID MostMatureCigiVersionReceived; //========================================================= //! ProcessingVersion
//! Specifies the current version of CIGI being used for iteration. //! CigiVersionID ProcessingVersion; //========================================================= //! ReaderVersion
//! Specifies the current version of CIGI being used by //! the reader. //! CigiVersionID ReaderVersion; //========================================================= //! The Conversion Table for managers of incoming packets //! CigiBasePacket *IncomingHandlerTbl[256]; //========================================================= //! The Table containing the Signal Type of the packet //! for managers of incoming packets. //! CigiSignalType::Type SignalTbl[256]; //========================================================= //! A pointer to the default packet used to unpack //! un recognized packets. //! CigiDefaultPacket *DefaultPckt; //==> Member protected functions //========================================================= //! This takes the packet id and determines which signal method //! to call. It then goes through the signal list and calls //! the correct signal method in each of the signal objects. //! \param PacketID - The Packet ID of the message to be processed. //! \param Packet - A pointer to the packet object that has //! parsed the current message packet. //! bool SignalJump(const Cigi_uint8 PacketID, CigiBasePacket *Packet); //========================================================= //! Clear the Processing Table //! \param Complete - If true - the entire table is cleared. //! if false - the table is cleared except for the user //! defined section. //! void ClearTbls(bool Complete); //========================================================= //! Sets the external interface tables to Host output with //! Cigi Version 1 packets //! void SetIncomingHostV1Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 1 packets //! void SetIncomingIGV1Tbls(void); //========================================================= //! Sets the external interface tables to Host output with //! Cigi Version 2 packets //! void SetIncomingHostV2Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 2 packets //! void SetIncomingIGV2Tbls(void); //========================================================= //! Sets the external interface tables to Host output with //! Cigi Version 3 packets //! void SetIncomingHostV3Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 3 packets //! void SetIncomingIGV3Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 3 packets //! int CheckFirstPacket(Cigi_uint8 *Buff); }; #endif // !defined(_CIGI_INCOMING_MESSAGE_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosRespV1.h000066400000000000000000000114521210750432300205640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_RESP_V1_INCLUDED_) #define _CIGI_LOS_RESP_V1_INCLUDED_ #include "CigiBaseLosResp.h" class CIGI_SPEC CigiLosRespV1 : public CigiBaseLosResp { public: //==> Management //========================================================= //! General Constructor //! CigiLosRespV1(); //========================================================= //! General Destructor //! virtual ~CigiLosRespV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the intersected surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } }; #endif // #if !defined(_CIGI_LOS_RESP_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosRespV2.h000066400000000000000000000114531210750432300205660ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_RESP_V2_INCLUDED_) #define _CIGI_LOS_RESP_V2_INCLUDED_ #include "CigiBaseLosResp.h" class CIGI_SPEC CigiLosRespV2 : public CigiBaseLosResp { public: //==> Management //========================================================= //! General Constructor //! CigiLosRespV2(); //========================================================= //! General Destructor //! virtual ~CigiLosRespV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the intersected surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } }; #endif // #if !defined(_CIGI_LOS_RESP_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosRespV3.h000066400000000000000000000143711210750432300205710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_RESP_V3_INCLUDED_) #define _CIGI_LOS_RESP_V3_INCLUDED_ #include "CigiBaseLosResp.h" class CIGI_SPEC CigiLosRespV3 : public CigiBaseLosResp { public: //==> Management //========================================================= //! General Constructor //! CigiLosRespV3(); //========================================================= //! General Destructor //! virtual ~CigiLosRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityIDValid //========================================================= //! Sets the EntityIDValid with bound checking control //! \param EntityIDValidIn - intersection with an entity and //! the entity id is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityIDValid(const bool EntityIDValidIn, bool bndchk=true) { EntityIDValid = EntityIDValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityIDValid value. //! \return the current EntityIDValid. bool GetEntityIDValid(void) const { return(EntityIDValid); } //+> RespCount //========================================================= //! Sets the RespCount with bound checking control //! \param RespCountIn - The number of responses for this LOS operation. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRespCount(const Cigi_uint8 RespCountIn, bool bndchk=true) { RespCount = RespCountIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RespCount value. //! \return the current RespCount. Cigi_uint8 GetRespCount(void) const { return(RespCount); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the entity intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } }; #endif // #if !defined(_CIGI_LOS_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosRespV3_2.h000066400000000000000000000153761210750432300210200ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosRespV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_RESP_V3_2_INCLUDED_) #define _CIGI_LOS_RESP_V3_2_INCLUDED_ #include "CigiBaseLosResp.h" class CIGI_SPEC CigiLosRespV3_2 : public CigiBaseLosResp { public: //==> Management //========================================================= //! General Constructor //! CigiLosRespV3_2(); //========================================================= //! General Destructor //! virtual ~CigiLosRespV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityIDValid //========================================================= //! Sets the EntityIDValid with bound checking control //! \param EntityIDValidIn - intersection with an entity and //! the entity id is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityIDValid(const bool EntityIDValidIn, bool bndchk=true) { EntityIDValid = EntityIDValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityIDValid value. //! \return the current EntityIDValid. bool GetEntityIDValid(void) const { return(EntityIDValid); } //+> HostFrame //========================================================= //! Sets the HostFrame with bound checking control //! \param HostFrameIn - The host frame when the hat/hot was //! calculated. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHostFrame(const Cigi_uint8 HostFrameIn, bool bndchk=true) { HostFrame = HostFrameIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the host frame value. //! \return the host frame when the hat/hot was calculated. Cigi_uint8 GetHostFrame(void) const { return(HostFrame); } //+> RespCount //========================================================= //! Sets the RespCount with bound checking control //! \param RespCountIn - The number of responses for this LOS operation. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRespCount(const Cigi_uint8 RespCountIn, bool bndchk=true) { RespCount = RespCountIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RespCount value. //! \return the current RespCount. Cigi_uint8 GetRespCount(void) const { return(RespCount); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the entity intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } }; #endif // #if !defined(_CIGI_LOS_RESP_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosSegReqV1.h000066400000000000000000000065721210750432300210500ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_SEG_REQ_V1_INCLUDED_) #define _CIGI_LOS_SEG_REQ_V1_INCLUDED_ #include "CigiBaseLosSegReq.h" class CIGI_SPEC CigiLosSegReqV1 : public CigiBaseLosSegReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosSegReqV1(); //========================================================= //! General Destructor //! virtual ~CigiLosSegReqV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_LOS_SEG_REQ_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosSegReqV2.h000066400000000000000000000065731210750432300210520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_SEG_REQ_V2_INCLUDED_) #define _CIGI_LOS_SEG_REQ_V2_INCLUDED_ #include "CigiBaseLosSegReq.h" class CIGI_SPEC CigiLosSegReqV2 : public CigiBaseLosSegReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosSegReqV2(); //========================================================= //! General Destructor //! virtual ~CigiLosSegReqV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_LOS_SEG_REQ_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosSegReqV3.h000066400000000000000000000322231210750432300210420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_SEG_REQ_V3_INCLUDED_) #define _CIGI_LOS_SEG_REQ_V3_INCLUDED_ #include "CigiBaseLosSegReq.h" class CIGI_SPEC CigiLosSegReqV3 : public CigiBaseLosSegReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosSegReqV3(); //========================================================= //! General Destructor //! virtual ~CigiLosSegReqV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Request type
//! This specifies whether the response should be basic or extended.
//! Basic=0
//! Extended=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> SrcCoordSys //========================================================= //! Sets the SrcCoordSys with bound checking control //! \param SrcCoordSysIn - Specifies in which coordinate system //! the starting point is specified.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk=true); //========================================================= //! Gets the SrcCoordSys value. //! \return the current SrcCoordSys. CoordSysGrp GetSrcCoordSys(void) const { return(SrcCoordSys); } //+> DstCoordSys //========================================================= //! Sets the DstCoordSys with bound checking control //! \param DstCoordSysIn - Specifies in which coordinate system //! the ending point is specified.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstCoordSys(const CoordSysGrp DstCoordSysIn, bool bndchk=true); //========================================================= //! Gets the DstCoordSys value. //! \return the current DstCoordSys. CoordSysGrp GetDstCoordSys(void) const { return(DstCoordSys); } //+> ResponseCoordSys //========================================================= //! Sets the ResponseCoordSys with bound checking control //! \param ResponseCoordSysIn - Specifies in which coordinate system //! the response intersection point is specified.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk=true); //========================================================= //! Gets the ResponseCoordSys value. //! \return the current ResponseCoordSys. CoordSysGrp GetResponseCoordSys(void) const { return(ResponseCoordSys); } //+> AlphaThresh //========================================================= //! Sets the AlphaThresh with bound checking control //! \param AlphaThreshIn - The IG will only register an intersection //! when the intersected polygon has an alpha of this value or higher. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlphaThresh(const Cigi_uint8 AlphaThreshIn, bool bndchk=true) { AlphaThresh = AlphaThreshIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AlphaThresh value. //! \return the current AlphaThresh. Cigi_uint8 GetAlphaThresh(void) const { return(AlphaThresh); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The Entity ID that the source and/or destination //! point is measured from when the coordinate system for that point //! is specified as "Entity" //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> SrcXoff //========================================================= //! Sets the SrcXoff with bound checking control //! \param SrcXoffIn - The source point X axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcXoff(const double SrcXoffIn, bool bndchk=true) { SrcXLat = SrcXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcXoff value. //! \return the current SrcXoff. double GetSrcXoff(void) const { return(SrcXLat); } //+> SrcYoff //========================================================= //! Sets the SrcYoff with bound checking control //! \param SrcYoffIn - The source point Y axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcYoff(const double SrcYoffIn, bool bndchk=true) { SrcYLon = SrcYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcYoff value. //! \return the current SrcYoff. double GetSrcYoff(void) const { return(SrcYLon); } //+> SrcZoff //========================================================= //! Sets the SrcZoff with bound checking control //! \param SrcZoffIn - The source point Z axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcZoff(const double SrcZoffIn, bool bndchk=true) { SrcZAlt = SrcZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcZoff value. //! \return the current SrcZoff. double GetSrcZoff(void) const { return(SrcZAlt); } //+> DstXoff //========================================================= //! Sets the DstXoff with bound checking control //! \param DstXoffIn - The destination point X axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstXoff(const double DstXoffIn, bool bndchk=true) { DstXLat = DstXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstXoff value. //! \return the current DstXoff. double GetDstXoff(void) const { return(DstXLat); } //+> DstYoff //========================================================= //! Sets the DstYoff with bound checking control //! \param DstYoffIn - The destination point Y axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstYoff(const double DstYoffIn, bool bndchk=true) { DstYLon = DstYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstYoff value. //! \return the current DstYoff. double GetDstYoff(void) const { return(DstYLon); } //+> DstZoff //========================================================= //! Sets the DstZoff with bound checking control //! \param DstZoffIn - The destination point Z axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstZoff(const double DstZoffIn, bool bndchk=true) { DstZAlt = DstZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstZoff value. //! \return the current DstZoff. double GetDstZoff(void) const { return(DstZAlt); } //+> Mask //========================================================= //! Sets the Mask with bound checking control //! \param MaskIn - The material mask to turn on or off registration //! of intersections with polygons having specific material properties. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMask(const Cigi_uint32 MaskIn, bool bndchk=true) { Mask = MaskIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Mask value. //! \return the current Mask. Cigi_uint32 GetMask(void) const { return(Mask); } }; #endif // #if !defined(_CIGI_LOS_SEG_REQ_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosSegReqV3_2.h000066400000000000000000000366041210750432300212720ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosSegReqV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_SEG_REQ_V3_2_INCLUDED_) #define _CIGI_LOS_SEG_REQ_V3_2_INCLUDED_ #include "CigiBaseLosSegReq.h" class CIGI_SPEC CigiLosSegReqV3_2 : public CigiBaseLosSegReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosSegReqV3_2(); //========================================================= //! General Destructor //! virtual ~CigiLosSegReqV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Request type
//! This specifies whether the response should be basic or extended.
//! Basic=0
//! Extended=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> SrcCoordSys //========================================================= //! Sets the SrcCoordSys with bound checking control //! \param SrcCoordSysIn - Specifies in which coordinate system //! the starting point is specified.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk=true); //========================================================= //! Gets the SrcCoordSys value. //! \return the current SrcCoordSys. CoordSysGrp GetSrcCoordSys(void) const { return(SrcCoordSys); } //+> DstCoordSys //========================================================= //! Sets the DstCoordSys with bound checking control //! \param DstCoordSysIn - Specifies in which coordinate system //! the ending point is specified.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstCoordSys(const CoordSysGrp DstCoordSysIn, bool bndchk=true); //========================================================= //! Gets the DstCoordSys value. //! \return the current DstCoordSys. CoordSysGrp GetDstCoordSys(void) const { return(DstCoordSys); } //+> ResponseCoordSys //========================================================= //! Sets the ResponseCoordSys with bound checking control //! \param ResponseCoordSysIn - Specifies in which coordinate system //! the response intersection point is specified.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk=true); //========================================================= //! Gets the ResponseCoordSys value. //! \return the current ResponseCoordSys. CoordSysGrp GetResponseCoordSys(void) const { return(ResponseCoordSys); } //+> DestEntityIDValid //========================================================= //! Sets the DestEntityIDValid with bound checking control //! \param DestEntityIDValidIn - Specifies whether the destination //! entity's ID is a valid value.
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDestEntityIDValid(const bool DestEntityIDValidIn, bool bndchk=true) { DestEntityIDValid = DestEntityIDValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DestEntityIDValid value. //! \return the current DestEntityIDValid. bool GetDestEntityIDValid(void) const { return(DestEntityIDValid); } //+> AlphaThresh //========================================================= //! Sets the AlphaThresh with bound checking control //! \param AlphaThreshIn - The IG will only register an intersection //! when the intersected polygon has an alpha of this value or higher. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlphaThresh(const Cigi_uint8 AlphaThreshIn, bool bndchk=true) { AlphaThresh = AlphaThreshIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AlphaThresh value. //! \return the current AlphaThresh. Cigi_uint8 GetAlphaThresh(void) const { return(AlphaThresh); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The Entity ID that the source and/or destination //! point is measured from when the coordinate system for that point //! is specified as "Entity" //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> SrcXoff //========================================================= //! Sets the SrcXoff with bound checking control //! \param SrcXoffIn - The source point X axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcXoff(const double SrcXoffIn, bool bndchk=true) { SrcXLat = SrcXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcXoff value. //! \return the current SrcXoff. double GetSrcXoff(void) const { return(SrcXLat); } //+> SrcYoff //========================================================= //! Sets the SrcYoff with bound checking control //! \param SrcYoffIn - The source point Y axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcYoff(const double SrcYoffIn, bool bndchk=true) { SrcYLon = SrcYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcYoff value. //! \return the current SrcYoff. double GetSrcYoff(void) const { return(SrcYLon); } //+> SrcZoff //========================================================= //! Sets the SrcZoff with bound checking control //! \param SrcZoffIn - The source point Z axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcZoff(const double SrcZoffIn, bool bndchk=true) { SrcZAlt = SrcZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcZoff value. //! \return the current SrcZoff. double GetSrcZoff(void) const { return(SrcZAlt); } //+> DstXoff //========================================================= //! Sets the DstXoff with bound checking control //! \param DstXoffIn - The destination point X axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstXoff(const double DstXoffIn, bool bndchk=true) { DstXLat = DstXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstXoff value. //! \return the current DstXoff. double GetDstXoff(void) const { return(DstXLat); } //+> DstYoff //========================================================= //! Sets the DstYoff with bound checking control //! \param DstYoffIn - The destination point Y axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstYoff(const double DstYoffIn, bool bndchk=true) { DstYLon = DstYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstYoff value. //! \return the current DstYoff. double GetDstYoff(void) const { return(DstYLon); } //+> DstZoff //========================================================= //! Sets the DstZoff with bound checking control //! \param DstZoffIn - The destination point Z axis offset in meters from //! the specified entity's origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDstZoff(const double DstZoffIn, bool bndchk=true) { DstZAlt = DstZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the DstZoff value. //! \return the current DstZoff. double GetDstZoff(void) const { return(DstZAlt); } //+> Mask //========================================================= //! Sets the Mask with bound checking control //! \param MaskIn - The material mask to turn on or off registration //! of intersections with polygons having specific material properties. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMask(const Cigi_uint32 MaskIn, bool bndchk=true) { Mask = MaskIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Mask value. //! \return the current Mask. Cigi_uint32 GetMask(void) const { return(Mask); } //+> UpdatePeriod //========================================================= //! Sets the UpdatePeriod with bound checking control //! \param UpdatePeriodIn - The number of frames between each //! LOS response from the IG. If zero - the IG should //! only respond with one hat/hot response. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetUpdatePeriod(const Cigi_uint8 UpdatePeriodIn, bool bndchk=true) { UpdatePeriod = UpdatePeriodIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Update Period value. //! \return The number of frames between each //! hat/hot response from the IG. If zero - the IG should //! only respond with one hat/hot response. Cigi_uint8 GetUpdatePeriod(void) const { return(UpdatePeriod); } //+> DestEntityID //========================================================= //! Sets the DestEntityID with bound checking control //! \param DestEntityIDIn - The destination entity's ID. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetDestEntityID(const Cigi_uint16 DestEntityIDIn, bool bndchk=true) { DestEntityID = DestEntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Mask value. //! \return the current Mask. Cigi_uint16 GetDestEntityID(void) const { return(DestEntityID); } }; #endif // #if !defined(_CIGI_LOS_SEG_REQ_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosVectReqV1.h000066400000000000000000000077721210750432300212360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_VECT_REQ_V1_INCLUDED_) #define _CIGI_LOS_VECT_REQ_V1_INCLUDED_ #include "CigiBaseLosVectReq.h" class CIGI_SPEC CigiLosVectReqV1 : public CigiBaseLosVectReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosVectReqV1(); //========================================================= //! General Destructor //! virtual ~CigiLosVectReqV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> VectAz //========================================================= //! Sets the VectAz with bound checking control //! \param VectAzIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVectAz(const float VectAzIn, bool bndchk=true); //========================================================= //! Gets the VectAz value. //! \return the current VectAz. float GetVectAz(void) { if(VectAz < 0.0f) VectAz += 360.0f; return(VectAz); } }; #endif // #if !defined(_CIGI_LOS_VECT_REQ_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosVectReqV2.h000066400000000000000000000113741210750432300212300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_VECT_REQ_V2_INCLUDED_) #define _CIGI_LOS_VECT_REQ_V2_INCLUDED_ #include "CigiBaseLosVectReq.h" class CIGI_SPEC CigiLosVectReqV2 : public CigiBaseLosVectReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosVectReqV2(); //========================================================= //! General Destructor //! virtual ~CigiLosVectReqV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> VectAz //========================================================= //! Sets the VectAz with bound checking control //! \param VectAzIn - Azimuth angle of the vector //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVectAz(const float VectAzIn, bool bndchk=true); //========================================================= //! Gets the VectAz value. //! \return the current VectAz. float GetVectAz(void) { if(VectAz < 0.0f) VectAz += 360.0f; return(VectAz); } //+> MinRange //========================================================= //! Sets the MinRange with bound checking control //! \param MinRangeIn - Minimum range from the starting point //! where intersections will be reported. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinRange(const float MinRangeIn, bool bndchk=true) { MinRange = MinRangeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the MinRange value. //! \return the current MinRange. float GetMinRange(void) const { return(MinRange); } }; #endif // #if !defined(_CIGI_LOS_VECT_REQ_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosVectReqV3.h000066400000000000000000000266461210750432300212410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_VECT_REQ_V3_INCLUDED_) #define _CIGI_LOS_VECT_REQ_V3_INCLUDED_ #include "CigiBaseLosVectReq.h" class CIGI_SPEC CigiLosVectReqV3 : public CigiBaseLosVectReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosVectReqV3(); //========================================================= //! General Destructor //! virtual ~CigiLosVectReqV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Specifies which type of response //! is desired.
//! Basic=0
//! Extended=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> SrcCoordSys //========================================================= //! Sets the SrcCoordSys with bound checking control //! \param SrcCoordSysIn - Specifies which coordinate system //! is used to define the source or starting point.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk=true); //========================================================= //! Gets the SrcCoordSys value. //! \return the current SrcCoordSys. CoordSysGrp GetSrcCoordSys(void) const { return(SrcCoordSys); } //+> ResponseCoordSys //========================================================= //! Sets the ResponseCoordSys with bound checking control //! \param ResponseCoordSysIn - Specifies which coordinate system //! is desired to define the intersection point.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk=true); //========================================================= //! Gets the ResponseCoordSys value. //! \return the current ResponseCoordSys. CoordSysGrp GetResponseCoordSys(void) const { return(ResponseCoordSys); } //+> AlphaThresh //========================================================= //! Sets the AlphaThresh with bound checking control //! \param AlphaThreshIn - The lowest alpha value that will cause //! a report to be generated when intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlphaThresh(const Cigi_uint8 AlphaThreshIn, bool bndchk=true) { AlphaThresh = AlphaThreshIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AlphaThresh value. //! \return the current AlphaThresh. Cigi_uint8 GetAlphaThresh(void) const { return(AlphaThresh); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> VectAz //========================================================= //! Sets the VectAz with bound checking control //! \param VectAzIn - The azimuth of the LOS vector //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVectAz(const float VectAzIn, bool bndchk=true); //========================================================= //! Gets the VectAz value. //! \return the current VectAz. float GetVectAz(void) { if(VectAz > 180.0f) VectAz -= 360.0f; return(VectAz); } //+> MinRange //========================================================= //! Sets the MinRange with bound checking control //! \param MinRangeIn - The minimum range from the starting //! or source point that will result in a report when intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinRange(const float MinRangeIn, bool bndchk=true) { MinRange = MinRangeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the MinRange value. //! \return the current MinRange. float GetMinRange(void) const { return(MinRange); } //+> SrcXoff //========================================================= //! Sets the SrcXoff with bound checking control //! \param SrcXoffIn - The offset of the starting or source point //! along the X axis from the origin of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcXoff(const double SrcXoffIn, bool bndchk=true) { SrcXLat = SrcXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcXoff value. //! \return the current SrcXoff. double GetSrcXoff(void) const { return(SrcXLat); } //+> SrcYoff //========================================================= //! Sets the SrcYoff with bound checking control //! \param SrcYoffIn - The offset of the starting or source point //! along the Y axis from the origin of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcYoff(const double SrcYoffIn, bool bndchk=true) { SrcYLon = SrcYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcYoff value. //! \return the current SrcYoff. double GetSrcYoff(void) const { return(SrcYLon); } //+> SrcZoff //========================================================= //! Sets the SrcZoff with bound checking control //! \param SrcZoffIn - The offset of the starting or source point //! along the Z axis from the origin of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcZoff(const double SrcZoffIn, bool bndchk=true) { SrcZAlt = SrcZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcZoff value. //! \return the current SrcZoff. double GetSrcZoff(void) const { return(SrcZAlt); } //+> Mask //========================================================= //! Sets the Mask with bound checking control //! \param MaskIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMask(const Cigi_uint32 MaskIn, bool bndchk=true) { Mask = MaskIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Mask value. //! \return the current Mask. Cigi_uint32 GetMask(void) const { return(Mask); } }; #endif // #if !defined(_CIGI_LOS_VECT_REQ_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosVectReqV3_2.h000066400000000000000000000302051210750432300214440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosVectReqV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_VECT_REQ_V3_2_INCLUDED_) #define _CIGI_LOS_VECT_REQ_V3_2_INCLUDED_ #include "CigiBaseLosVectReq.h" class CIGI_SPEC CigiLosVectReqV3_2 : public CigiBaseLosVectReq { public: //==> Management //========================================================= //! General Constructor //! CigiLosVectReqV3_2(); //========================================================= //! General Destructor //! virtual ~CigiLosVectReqV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ReqType //========================================================= //! Sets the ReqType with bound checking control //! \param ReqTypeIn - Specifies which type of response //! is desired.
//! Basic=0
//! Extended=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk=true); //========================================================= //! Gets the ReqType value. //! \return the current ReqType. ReqTypeGrp GetReqType(void) const { return(ReqType); } //+> SrcCoordSys //========================================================= //! Sets the SrcCoordSys with bound checking control //! \param SrcCoordSysIn - Specifies which coordinate system //! is used to define the source or starting point.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk=true); //========================================================= //! Gets the SrcCoordSys value. //! \return the current SrcCoordSys. CoordSysGrp GetSrcCoordSys(void) const { return(SrcCoordSys); } //+> ResponseCoordSys //========================================================= //! Sets the ResponseCoordSys with bound checking control //! \param ResponseCoordSysIn - Specifies which coordinate system //! is desired to define the intersection point.
//! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk=true); //========================================================= //! Gets the ResponseCoordSys value. //! \return the current ResponseCoordSys. CoordSysGrp GetResponseCoordSys(void) const { return(ResponseCoordSys); } //+> AlphaThresh //========================================================= //! Sets the AlphaThresh with bound checking control //! \param AlphaThreshIn - The lowest alpha value that will cause //! a report to be generated when intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlphaThresh(const Cigi_uint8 AlphaThreshIn, bool bndchk=true) { AlphaThresh = AlphaThreshIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the AlphaThresh value. //! \return the current AlphaThresh. Cigi_uint8 GetAlphaThresh(void) const { return(AlphaThresh); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> VectAz //========================================================= //! Sets the VectAz with bound checking control //! \param VectAzIn - The azimuth of the LOS vector //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVectAz(const float VectAzIn, bool bndchk=true); //========================================================= //! Gets the VectAz value. //! \return the current VectAz. float GetVectAz(void) { if(VectAz > 180.0f) VectAz -= 360.0f; return(VectAz); } //+> MinRange //========================================================= //! Sets the MinRange with bound checking control //! \param MinRangeIn - The minimum range from the starting //! or source point that will result in a report when intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMinRange(const float MinRangeIn, bool bndchk=true) { MinRange = MinRangeIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the MinRange value. //! \return the current MinRange. float GetMinRange(void) const { return(MinRange); } //+> SrcXoff //========================================================= //! Sets the SrcXoff with bound checking control //! \param SrcXoffIn - The offset of the starting or source point //! along the X axis from the origin of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcXoff(const double SrcXoffIn, bool bndchk=true) { SrcXLat = SrcXoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcXoff value. //! \return the current SrcXoff. double GetSrcXoff(void) const { return(SrcXLat); } //+> SrcYoff //========================================================= //! Sets the SrcYoff with bound checking control //! \param SrcYoffIn - The offset of the starting or source point //! along the Y axis from the origin of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcYoff(const double SrcYoffIn, bool bndchk=true) { SrcYLon = SrcYoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcYoff value. //! \return the current SrcYoff. double GetSrcYoff(void) const { return(SrcYLon); } //+> SrcZoff //========================================================= //! Sets the SrcZoff with bound checking control //! \param SrcZoffIn - The offset of the starting or source point //! along the Z axis from the origin of the origin entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetSrcZoff(const double SrcZoffIn, bool bndchk=true) { SrcZAlt = SrcZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the SrcZoff value. //! \return the current SrcZoff. double GetSrcZoff(void) const { return(SrcZAlt); } //+> Mask //========================================================= //! Sets the Mask with bound checking control //! \param MaskIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMask(const Cigi_uint32 MaskIn, bool bndchk=true) { Mask = MaskIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Mask value. //! \return the current Mask. Cigi_uint32 GetMask(void) const { return(Mask); } //+> UpdatePeriod //========================================================= //! Sets the UpdatePeriod with bound checking control //! \param UpdatePeriodIn - The number of frames between each //! LOS response from the IG. If zero - the IG should //! only respond with one hat/hot response. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetUpdatePeriod(const Cigi_uint8 UpdatePeriodIn, bool bndchk=true) { UpdatePeriod = UpdatePeriodIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Update Period value. //! \return The number of frames between each //! hat/hot response from the IG. If zero - the IG should //! only respond with one hat/hot response. Cigi_uint8 GetUpdatePeriod(void) const { return(UpdatePeriod); } }; #endif // #if !defined(_CIGI_LOS_VECT_REQ_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosXRespV3.h000066400000000000000000000351311210750432300207160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosXRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_XRESP_V3_INCLUDED_) #define _CIGI_LOS_XRESP_V3_INCLUDED_ #include "CigiBaseLosResp.h" class CIGI_SPEC CigiLosXRespV3 : public CigiBaseLosResp { public: //==> Management //========================================================= //! General Constructor //! CigiLosXRespV3(); //========================================================= //! General Destructor //! virtual ~CigiLosXRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityIDValid //========================================================= //! Sets the EntityIDValid with bound checking control //! \param EntityIDValidIn - intersection with an entity and //! the entity id is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityIDValid(const bool EntityIDValidIn, bool bndchk=true) { EntityIDValid = EntityIDValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityIDValid value. //! \return the current EntityIDValid. bool GetEntityIDValid(void) const { return(EntityIDValid); } //+> RangeValid //========================================================= //! Sets the RangeValid with bound checking control //! \param RangeValidIn - There is an intersection and the //! range data is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRangeValid(const bool RangeValidIn, bool bndchk=true) { RangeValid = RangeValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RangeValid value. //! \return the current RangeValid. bool GetRangeValid(void) const { return(RangeValid); } //+> IntersectionCoordSys //========================================================= //! Sets the IntersectionCoordSys with bound checking control //! \param IntersectionCoordSysIn - The intersection position
//! data coordinate system. //! Geodetic=0
//! Entity=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetIntersectionCoordSys(const LOSCoordGrp IntersectionCoordSysIn, bool bndchk=true); //========================================================= //! Gets the IntersectionCoordSys value. //! \return the current IntersectionCoordSys. LOSCoordGrp GetIntersectionCoordSys(void) const { return(IntersectionCoordSys); } //+> RespCount //========================================================= //! Sets the RespCount with bound checking control //! \param RespCountIn - The number of responses for this LOS operation. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRespCount(const Cigi_uint8 RespCountIn, bool bndchk=true) { RespCount = RespCountIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RespCount value. //! \return the current RespCount. Cigi_uint8 GetRespCount(void) const { return(RespCount); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the entity intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Xoff //========================================================= //! Sets the Xoff with bound checking control //! \param XoffIn - The offset along the X axis of the //! intersected entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXoff(const double XoffIn, bool bndchk=true) { LatOrXoff = XoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Xoff value. //! \return the current Xoff. double GetXoff(void) const { return(LatOrXoff); } //+> Yoff //========================================================= //! Sets the Yoff with bound checking control //! \param YoffIn - The offset along the Y axis of the //! intersected entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYoff(const double YoffIn, bool bndchk=true) { LonOrYoff = YoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Yoff value. //! \return the current Yoff. double GetYoff(void) const { return(LonOrYoff); } //+> Zoff //========================================================= //! Sets the Zoff with bound checking control //! \param ZoffIn - The offset along the Z axis of the //! intersected entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZoff(const double ZoffIn, bool bndchk=true) { AltOrZoff = ZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Zoff value. //! \return the current Zoff. double GetZoff(void) const { return(AltOrZoff); } //+> Red //========================================================= //! Sets the Red with bound checking control //! \param RedIn - The red color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRed(const Cigi_uint8 RedIn, bool bndchk=true) { Red = RedIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Red value. //! \return the current Red. Cigi_uint8 GetRed(void) const { return(Red); } //+> Green //========================================================= //! Sets the Green with bound checking control //! \param GreenIn - The green color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGreen(const Cigi_uint8 GreenIn, bool bndchk=true) { Green = GreenIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Green value. //! \return the current Green. Cigi_uint8 GetGreen(void) const { return(Green); } //+> Blue //========================================================= //! Sets the Blue with bound checking control //! \param BlueIn - The blue color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBlue(const Cigi_uint8 BlueIn, bool bndchk=true) { Blue = BlueIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Blue value. //! \return the current Blue. Cigi_uint8 GetBlue(void) const { return(Blue); } //+> Alpha //========================================================= //! Sets the Alpha with bound checking control //! \param AlphaIn - The alpha color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlpha(const Cigi_uint8 AlphaIn, bool bndchk=true) { Alpha = AlphaIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alpha value. //! \return the current Alpha. Cigi_uint8 GetAlpha(void) const { return(Alpha); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the intersected surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } //+> NormalAz //========================================================= //! Sets the NormalAz with bound checking control //! \param NormalAzIn - The azimuth of the surface normal at //! the point of intersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormalAz(const float NormalAzIn, bool bndchk=true); //========================================================= //! Gets the NormalAz value. //! \return the current NormalAz. float GetNormalAz(void) const { return(NormalAz); } //+> NormalEl //========================================================= //! Sets the NormalEl with bound checking control //! \param NormalElIn - The elevation of the surface normal at //! the point of intersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormalEl(const float NormalElIn, bool bndchk=true); //========================================================= //! Gets the NormalEl value. //! \return the current NormalEl. float GetNormalEl(void) const { return(NormalEl); } }; #endif // #if !defined(_CIGI_LOS_XRESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiLosXRespV3_2.h000066400000000000000000000352101210750432300211350ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosXRespV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosXRespV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed the way ValidV1or2 and IntersectionCoordSys is calculated.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_LOS_XRESP_V3_2_INCLUDED_) #define _CIGI_LOS_XRESP_V3_2_INCLUDED_ #include "CigiBaseLosResp.h" class CIGI_SPEC CigiLosXRespV3_2 : public CigiBaseLosResp { public: //==> Management //========================================================= //! General Constructor //! CigiLosXRespV3_2(); //========================================================= //! General Destructor //! virtual ~CigiLosXRespV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> EntityIDValid //========================================================= //! Sets the EntityIDValid with bound checking control //! \param EntityIDValidIn - intersection with an entity and //! the entity id is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityIDValid(const bool EntityIDValidIn, bool bndchk=true) { EntityIDValid = EntityIDValidIn; if(EntityIDValidIn) { ValidV1or2 = false; IntersectionCoordSys = Entity; } else { ValidV1or2 = true; IntersectionCoordSys = Geodetic; } return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityIDValid value. //! \return the current EntityIDValid. bool GetEntityIDValid(void) const { return(EntityIDValid); } //+> RangeValid //========================================================= //! Sets the RangeValid with bound checking control //! \param RangeValidIn - There is an intersection and the //! range data is valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRangeValid(const bool RangeValidIn, bool bndchk=true) { RangeValid = RangeValidIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RangeValid value. //! \return the current RangeValid. bool GetRangeValid(void) const { return(RangeValid); } //+> HostFrame //========================================================= //! Sets the HostFrame with bound checking control //! \param HostFrameIn - The host frame when the hat/hot was //! calculated. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHostFrame(const Cigi_uint8 HostFrameIn, bool bndchk=true) { HostFrame = HostFrameIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the host frame value. //! \return the host frame when the hat/hot was calculated. Cigi_uint8 GetHostFrame(void) const { return(HostFrame); } //+> RespCount //========================================================= //! Sets the RespCount with bound checking control //! \param RespCountIn - The number of responses for this LOS operation. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRespCount(const Cigi_uint8 RespCountIn, bool bndchk=true) { RespCount = RespCountIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RespCount value. //! \return the current RespCount. Cigi_uint8 GetRespCount(void) const { return(RespCount); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - The ID of the entity intersected. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> Xoff //========================================================= //! Sets the Xoff with bound checking control //! \param XoffIn - The offset along the X axis of the //! intersected entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXoff(const double XoffIn, bool bndchk=true) { LatOrXoff = XoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Xoff value. //! \return the current Xoff. double GetXoff(void) const { return(LatOrXoff); } //+> Yoff //========================================================= //! Sets the Yoff with bound checking control //! \param YoffIn - The offset along the Y axis of the //! intersected entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYoff(const double YoffIn, bool bndchk=true) { LonOrYoff = YoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Yoff value. //! \return the current Yoff. double GetYoff(void) const { return(LonOrYoff); } //+> Zoff //========================================================= //! Sets the Zoff with bound checking control //! \param ZoffIn - The offset along the Z axis of the //! intersected entity from its origin. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZoff(const double ZoffIn, bool bndchk=true) { AltOrZoff = ZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Zoff value. //! \return the current Zoff. double GetZoff(void) const { return(AltOrZoff); } //+> Red //========================================================= //! Sets the Red with bound checking control //! \param RedIn - The red color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRed(const Cigi_uint8 RedIn, bool bndchk=true) { Red = RedIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Red value. //! \return the current Red. Cigi_uint8 GetRed(void) const { return(Red); } //+> Green //========================================================= //! Sets the Green with bound checking control //! \param GreenIn - The green color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGreen(const Cigi_uint8 GreenIn, bool bndchk=true) { Green = GreenIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Green value. //! \return the current Green. Cigi_uint8 GetGreen(void) const { return(Green); } //+> Blue //========================================================= //! Sets the Blue with bound checking control //! \param BlueIn - The blue color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBlue(const Cigi_uint8 BlueIn, bool bndchk=true) { Blue = BlueIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Blue value. //! \return the current Blue. Cigi_uint8 GetBlue(void) const { return(Blue); } //+> Alpha //========================================================= //! Sets the Alpha with bound checking control //! \param AlphaIn - The alpha color component of the surface at //! the point ofintersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAlpha(const Cigi_uint8 AlphaIn, bool bndchk=true) { Alpha = AlphaIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Alpha value. //! \return the current Alpha. Cigi_uint8 GetAlpha(void) const { return(Alpha); } //+> Material //========================================================= //! Sets the Material with bound checking control //! \param MaterialIn - The material code of the intersected surface. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) { Material = MaterialIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Material value. //! \return the current Material. Cigi_uint32 GetMaterial(void) const { return(Material); } //+> NormalAz //========================================================= //! Sets the NormalAz with bound checking control //! \param NormalAzIn - The azimuth of the surface normal at //! the point of intersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormalAz(const float NormalAzIn, bool bndchk=true); //========================================================= //! Gets the NormalAz value. //! \return the current NormalAz. float GetNormalAz(void) const { return(NormalAz); } //+> NormalEl //========================================================= //! Sets the NormalEl with bound checking control //! \param NormalElIn - The elevation of the surface normal at //! the point of intersection. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetNormalEl(const float NormalElIn, bool bndchk=true); //========================================================= //! Gets the NormalEl value. //! \return the current NormalEl. float GetNormalEl(void) const { return(NormalEl); } }; #endif // #if !defined(_CIGI_LOS_XRESP_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiMaritimeSurfaceCtrlV3.h000066400000000000000000000067241210750432300231120ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMaritimeSurfaceCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_MARITIME_SURFACE_CTRL_V3_INCLUDED_) #define _CIGI_MARITIME_SURFACE_CTRL_V3_INCLUDED_ #include "CigiBaseMaritimeSurfaceCtrl.h" class CIGI_SPEC CigiMaritimeSurfaceCtrlV3 : public CigiBaseMaritimeSurfaceCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiMaritimeSurfaceCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiMaritimeSurfaceCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_MARITIME_SURFACE_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiMaritimeSurfaceRespV3.h000066400000000000000000000067241210750432300231170ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMaritimeSurfaceRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_MARITIME_SURFACE_RESP_V3_INCLUDED_) #define _CIGI_MARITIME_SURFACE_RESP_V3_INCLUDED_ #include "CigiBaseMaritimeSurfaceResp.h" class CIGI_SPEC CigiMaritimeSurfaceRespV3 : public CigiBaseMaritimeSurfaceResp { public: //==> Management //========================================================= //! General Constructor //! CigiMaritimeSurfaceRespV3(); //========================================================= //! General Destructor //! virtual ~CigiMaritimeSurfaceRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_MARITIME_SURFACE_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiMessage.h000066400000000000000000000126631210750432300203570ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMessage.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  11/15/2004 Andrew Sampson                    Version 1.4a Beta
 *  Added the GetValidIGCtrlSOF() function.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  02/20/2006 Greg Basler                       Version 1.6.0
 *  Added the PackagedMsg variable to allow for correct updating of the
 *  host's IG_Ctrl's frame counter.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_MESSAGE_INCLUDED_) #define _CIGI_MESSAGE_INCLUDED_ #include #include "CigiAnimationTable.h" #include "CigiHoldEnvCtrl.h" #include "CigiMessageBuffer.h" class CigiSession; using namespace std; //========================================================= //! The base class for Messages //! class CIGI_SPEC CigiMessage { public: friend class CigiSession; //==> Management //========================================================= //! General Constructor //! CigiMessage(); //========================================================= //! General Destructor //! virtual ~CigiMessage(); //==> Public Accessor functions //========================================================= //! Gets the value indicating if a valid IGCtrl or SOF //! packet has been packed for the message. //! //! \return This returns a value indicating if a valid //! IGCtrl or SOF packet has been packed //! bool GetValidIGCtrlSOF() { bool Rslt = false; if(CrntMsgBuf != NULL) Rslt = CrntMsgBuf->IsValidIGCtrlSOF(); return(Rslt); } //==> Processing Member functions //========================================================= //! This creates the message buffers. //! \param NumBuf - Number of buffers to create //! \param BufLen - The size in bytes of each buffer //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int CreateBuffer(const int NumBuf = 2, const int BufLen = 16384); protected: //==> Member variables //========================================================= //! Active buffers //! list Buffers; //========================================================= //! Available buffers //! list AvailBuff; //========================================================= //! Current buffer //! CigiMessageBuffer *CrntMsgBuf; //========================================================= //! Current fill Buffer
//! Points to the buffer being currently filled //! CigiMessageBuffer *CrntFillBuf; //========================================================= //! Packaged Message
//! Points to the currently packaged message buffer //! CigiMessageBuffer *PackagedMsg; //========================================================= //! Buffer Size
//! Specifies the size of each buffer. //! int BufferSize; //========================================================= //! Animation Table object
//! A pointer to the Animation Table object for this session //! CigiAnimationTable *ATbl; //========================================================= //! //! //! CigiHoldEnvCtrl EnvHoldObj; //========================================================= //! The parent CIGI session for this outgoing message //! CigiSession *Session; //==> Member Protected Functions //========================================================= //! Sets the Animation Table object pointer //! \param AnimationTable - Specifies a Animation table object //! void SetAnimationTable(CigiAnimationTable *AnimationTable) { ATbl = AnimationTable; } //========================================================= //! Sets the Session object pointer //! \param SessionIn - Specifies a session object //! void SetSession(CigiSession *SessionIn) { Session = SessionIn; } }; #endif // !defined(_CIGI_MESSAGE_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiMessageBuffer.h000066400000000000000000000163371210750432300215130ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMessageBuffer.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Initial Release.
 *  
 *  07/15/2008 Greg Basler                       Version 2.2.0
 *  Improved buffer creation (provided by Andrew Sampson).
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_MESSAGE_BUFFER_INCLUDED_) #define _CIGI_MESSAGE_BUFFER_INCLUDED_ #include // for memset #include "CigiTypes.h" #include "CigiVersionID.h" class CigiOutgoingMsg; class CigiIncomingMsg; class CigiBaseIGCtrl; class CigiBaseSOF; //========================================================= //! The class Containing the Message buffer //! class CIGI_SPEC CigiMessageBuffer { public: friend class CigiOutgoingMsg; friend class CigiIncomingMsg; //==> Management //========================================================= //! General Constructor //! CigiMessageBuffer(const int BufLen = 16384) : Buffer(NULL) , BufferSize(0) , FillBufferPos(NULL) , BufferFillCnt(0) , Active(false) , Locked(false) , ValidIGCtrlSOF(false) , DataPresent(false) , PackIGCtrl(NULL) , PackSOF(NULL) { // This creates a buffer that has double word aligned size // Divide to get the number of double-words. The +1 is to cover any // remainder. BufferSize = ((BufLen/sizeof(Cigi_uint64)) + 1); // Multiply to convert the number of double-words to bytes BufferSize *= sizeof(Cigi_uint64); // Allocate the message buffer Buffer = new Cigi_uint8[BufferSize]; // Initialize empty buffer memset( Buffer, 0, BufferSize ); } //========================================================= //! General Destructor //! virtual ~CigiMessageBuffer(void) { if(Buffer != NULL) { delete [] Buffer; Buffer = NULL; } } //==> Public Accessor functions //========================================================= //! Gets the Cigi Version used by this buffer. //! //! \return The Cigi Version used by this buffer. //! CigiVersionID GetCigiVersion(void) { return(CigiVersion); } //========================================================= //! Gets the Major Cigi Version used by this buffer. //! //! \return The Major Cigi Version used by this buffer. //! int GetCigiMajorVersion(void) { return(CigiVersion.CigiMajorVersion); } //========================================================= //! Gets the Minor Cigi Version used by this buffer. //! //! \return The Minor Cigi Version used by this buffer. //! int GetCigiMinorVersion(void) { return(CigiVersion.CigiMinorVersion); } //========================================================= //! Gets the size of the buffer. //! //! \return The size of the buffer. //! int GetBufferSize(void) { return(BufferSize); } //========================================================= //! Gets the value indicating if the buffer is active. //! //! \return This returns a value indicating if the buffer //! is active //! bool IsActive(void) { return(Active); } //========================================================= //! Gets the value indicating if the buffer is locked. //! //! \return This returns a value indicating if the buffer //! is locked //! bool IsLocked(void) { return(Locked); } //========================================================= //! Gets the value indicating if a valid IG Control or SOF //! packet has been packed into the buffer. //! //! \return This returns a value indicating if a valid IG //! Control or SOF packet has been packed into the buffer. //! bool IsValidIGCtrlSOF(void) { return(ValidIGCtrlSOF); } //========================================================= //! Gets the value indicating if valid data is in the buffer. //! //! \return This returns a value indicating if valid data //! is in the buffer //! bool IsDataPresent(void) { return(DataPresent); } protected: //==> Member variables //========================================================= //! Buffer
//! The pointer to the buffer //! Cigi_uint8 *Buffer; //========================================================= //! CigiVersion
//! The CIGI Version currently used by this buffer. //! CigiVersionID CigiVersion; //========================================================= //! BufferSize
//! The size of the buffer. //! int BufferSize; //========================================================= //! FillBufferPos
//! A pointer to the next byte available for filling. //! Cigi_uint8 *FillBufferPos; //========================================================= //! BufferFillCnt
//! The number of bytes currently packed into the buffer. //! int BufferFillCnt; //========================================================= //! Active
//! A flag indicating whether the buffer is active. //! bool Active; //========================================================= //! Locked
//! A flag indicating whether the buffer is Locked. //! bool Locked; //========================================================= //! ValidIGCtrlSOF
//! A flag indicating whether the buffer contains a valid //! IG Control or SOF packet. //! bool ValidIGCtrlSOF; //========================================================= //! DataPresent
//! A flag indicating whether the buffer contains valid data. //! bool DataPresent; //========================================================= //! Pack IG Ctrl pointer
//! A pointer to the IG Control packet object that will //! pack the IG Control data into this buffer. //! CigiBaseIGCtrl *PackIGCtrl; //========================================================= //! Pack SOF pointer
//! A pointer to the SOF packet object that will //! pack the SOF data into this buffer. //! CigiBaseSOF *PackSOF; }; #endif // _CIGI_MESSAGE_BUFFER_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiMotionTrackCtrlV3.h000066400000000000000000000066601210750432300222630ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMotionTrackCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_MOTION_TRACK_CTRL_V3_INCLUDED_) #define _CIGI_MOTION_TRACK_CTRL_V3_INCLUDED_ #include "CigiBaseMotionTrackCtrl.h" class CIGI_SPEC CigiMotionTrackCtrlV3 : public CigiBaseMotionTrackCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiMotionTrackCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiMotionTrackCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_MOTION_TRACK_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiOutgoingMsg.h000066400000000000000000000645061210750432300212400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiOutgoingMsg.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  02/20/2006 Greg Basler                       Version 1.6.0
 *  Added the PackageMsg, GetCurrentlyPackagedMsg, and FreeMsg methods to
 *  better update the frame the frame counter in the IG_Ctrl packet for hosts
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Granted friend access to the CigiVersionJumpTable class.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added an overloaded UpdateSOF method without the LastIGCtrl parameter to 
 *  update the the start of frame packet's frame counter.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Deprecated the existing UpdateSOF method and modified it to call the new 
 *  implementation.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added a protected Reset method to reset the buffer system.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the CurrentIGCtrl member variable to store the last IGCtrl packed 
 *  into a message.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the CurrentSOF member variable to store the last SOF packed into a 
 *  message.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_OUTGOING_MESSAGE_INCLUDED_) #define _CIGI_OUTGOING_MESSAGE_INCLUDED_ #include #include #include "CigiMessage.h" #include "CigiBasePacket.h" #include "CigiBaseEntityCtrl.h" #include "CigiBaseIGCtrl.h" #include "CigiBaseSOF.h" #include "CigiMessageBuffer.h" #include "CigiBaseVariableSizePckt.h" #include "CigiDefaultPacket.h" class CigiSession; //========================================================= //! The class for the outgoing message //! class CIGI_SPEC CigiOutgoingMsg : public CigiMessage { friend class CigiSession; public: //==> Management //========================================================= //! General Constructor //! CigiOutgoingMsg(); //========================================================= //! General Destructor //! virtual ~CigiOutgoingMsg(); //==> Buffer Packing Operators with References //========================================================= //! Packs the buffer with the specifed IG Control packet. //! \param refPacket - A reference to an IG Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseIGCtrl &refPacket); //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A reference to an IG Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object inline CigiOutgoingMsg & pack(CigiBaseIGCtrl &refPacket) { return (*this) << refPacket; } //========================================================= //! Packs the buffer with the specifed Start Of Frame packet. //! \param refPacket - A reference to an Start Of Frame packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseSOF &refPacket); //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A reference to an Start Of Frame packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseSOF &refPacket) { return (*this) << refPacket; } //========================================================= //! Packs the buffer with the specifed Entity Control packet. //! \param refPacket - A reference to an Entity Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseEntityCtrl &refPacket); //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A reference to an Entity Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseEntityCtrl &refPacket) { return (*this) << refPacket; } //========================================================= //! Packs the buffer with the specifed packet. //! \param refPacket - A reference to an Enviroment type //! Control packet. This includes Celestial and Atmosphere Ctrl //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseEnvCtrl &refPacket); //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A reference to an Enviroment type //! Control packet. This includes Celestial and Atmosphere Ctrl //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseEnvCtrl &refPacket) { return (*this) << refPacket; } //========================================================= //! Packs the buffer with the specifed packet. //! \param refPacket - A reference to a variable size packet //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseVariableSizePckt &refPacket); //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A reference to a variable size packet //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseVariableSizePckt &refPacket) { return (*this) << refPacket; } //========================================================= //! Packs the buffer with the pointer to the specifed packet. //! \param refBasePacket - A reference to a base packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBasePacket &refBasePacket); //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refBasePacket - A reference to a base packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBasePacket &refBasePacket) { return (*this) << refBasePacket; } //==> Buffer Packing Operators with Pointers //========================================================= //! Packs the buffer with the pointer to the specifed IG Control packet. //! \param refPacket - A pointer to an IG Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseIGCtrl *refPacket) { return(operator<<(*refPacket)); } //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A pointer to an IG Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseIGCtrl *refPacket) { return this->pack(*refPacket); } //========================================================= //! Packs the buffer with the pointer to the specifed Start Of Frame packet. //! \param refPacket - A pointer to an Start Of Frame packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseSOF *refPacket) { return(operator<<(*refPacket)); } //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A pointer to an Start Of Frame packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseSOF *refPacket) { return this->pack(*refPacket); } //========================================================= //! Packs the buffer with the pointer to the specifed Entity Control packet. //! \param refPacket - A pointer to an Entity Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseEntityCtrl *refPacket) { return(operator<<(*refPacket)); } //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A pointer to an Entity Control packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseEntityCtrl *refPacket) { return this->pack(*refPacket); } //========================================================= //! Packs the buffer with the pointer to the specifed packet. //! \param refPacket - A pointer to an Enviroment type //! Control packet. This includes Celestial and Atmosphere Ctrl //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseEnvCtrl *refPacket) { return(operator<<(*refPacket)); } //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A pointer to an Enviroment type //! Control packet. This includes Celestial and Atmosphere Ctrl //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseEnvCtrl *refPacket) { return this->pack(*refPacket); } //========================================================= //! Packs the buffer with the specifed packet. //! \param refPacket - A pointer to a variable size packet //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBaseVariableSizePckt *refPacket) { return(operator<<(*refPacket)); } //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refPacket - A pointer to a variable size packet //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBaseVariableSizePckt *refPacket) { return this->pack(*refPacket); } //========================================================= //! Packs the buffer with the pointer to the specifed packet. //! \param refBasePacket - A pointer to a base packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & operator <<(CigiBasePacket *refBasePacket) { return(operator<<(*refBasePacket)); } //========================================================= //! Non operator-overloaded pack method for scripting. //! \param refBasePacket - A pointer to a base packet. //! //! \return This returns a reference to this CigiOutgoingMsg object CigiOutgoingMsg & pack(CigiBasePacket *refBasePacket) { return this->pack(*refBasePacket); } //==> Buffer Packing Managers //========================================================= //! Alerts the system that a message is being started. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int BeginMsg(void) { if(Buffers.empty()) AdvanceBuffer(); return(CIGI_SUCCESS); } //========================================================= //! Updates the Frame Counter in the IG Control or SOF packet //! of the current message. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UpdateFrameCntr(void); //========================================================= //! Increments the Frame Counter in the IG Control or SOF packet //! of the specified Outgoing message. If the IncomingMsg //! is NULL, data from the Version Jump Table is used. //! \param OutgoingMsg - A pointer to the outgoing msg buffer //! \param IncomingMsg - A pointer to the incoming msg buffer //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UpdateFrameCntr(Cigi_uint8 *OutgoingMsg, Cigi_uint8 *IncomingMsg = NULL); //========================================================= //! Updates the IG Control's Frame Counter and Database ID if needed //! \param OutgoingMsg - A pointer to the outgoing msg buffer //! \param IncomingMsg - A pointer to the incoming msg buffer //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UpdateIGCtrl(Cigi_uint8 *OutgoingMsg, Cigi_uint8 *IncomingMsg); //========================================================= //! Updates SOF's Frame Counter //! \param OutgoingMsg - A pointer to the outgoing msg buffer //! \param IncomingMsg - A pointer to the incoming msg buffer //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UpdateSOF(Cigi_uint8 *OutgoingMsg, Cigi_uint8 *IncomingMsg = NULL) { return(UpdateFrameCntr(OutgoingMsg,IncomingMsg)); } //========================================================= //! Locks the message for sending //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int LockMsg(void); //========================================================= //! Gets a pointer to the beginning of the message and //! the length of the message //! \param length - A reference to place the length of //! the message. //! \return Message - A pointer to the beginning of the message. //! Cigi_uint8 * GetMsg(int &length); //========================================================= //! Gets a pointer to the beginning of the buffer. //! \return Buffer - A pointer to the beginning of the buffer. //! Cigi_uint8 * GetBuffer(void); //========================================================= //! Gets the length of the message in bytes. //! //! \return The length of the message in bytes. //! int GetMsgLength(void); //========================================================= //! Gets a std::string of the buffer. Note - not really the //! most efficient way to retrieve the buffer contents, as it //! makes a copy of the buffer. Used by the scripting language //! wrapper. //! \return Buffer - A std::string copy of the buffer. //! std::string GetBufferString(void); //========================================================= //! Unlocks the message after sending //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int UnlockMsg(void); //========================================================= //! Packages the current message. //! Sets up the next buffer for packing. //! and returns a pointer to the message to be sent and the length. //! \param Msg - A pointer to a pointer to the beginning of the message. //! \param length - A reference to place the length of //! the message. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int PackageMsg(Cigi_uint8 **Msg, int &length); //========================================================= //! Gets the currently Packaged message. //! Sets up the next buffer for packing. //! and returns a pointer to the message to be sent and the length. //! \param Msg - A pointer to a pointer to the beginning of the message. //! \param length - A reference to place the length of //! the message. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int GetCurrentlyPackagedMsg(Cigi_uint8 **Msg, int &length) { if(PackagedMsg != NULL) { *Msg = PackagedMsg->Buffer; length = PackagedMsg->BufferFillCnt; return(CIGI_SUCCESS); } else { *Msg = (Cigi_uint8 *)0; // equivalent to NULL length = 0; return(CIGI_ERROR_UNEXPECTED_NULL); } } //========================================================= //! Frees the last packaged message buffer for use. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int FreeMsg(void); //+> Frame Count //========================================================= //! Sets the current Frame Count //! \param FrameCntIn - Sets the frame count of the session. //! void SetFrameCnt(const Cigi_uint32 FrameCntIn) { FrameCnt = FrameCntIn; } //========================================================= //! Gets the current Frame Count. //! \return the current frame count of the session. //! Cigi_uint32 GetFrameCnt(void) const { return(FrameCnt); } //+> Synchronous Operation //========================================================= //! Deprecated:
//! This member function nolonger does anything. //! \param Sync - Sets the synchronous/asynchronous mode //! of operation.
//! true - Synchronous operation. //! false - Asynchronous operation. //! void SetSynchronous(const bool Sync) { }; //========================================================= //! Gets the synchronous/asynchronous mode of operation. //! \return the synchronous/asynchronous mode of operation. //! true - Synchronous operation. //! false - Asynchronous operation. //! bool IsSynchronous(void) const; //+> Registering //========================================================= //! Register a user packet for use. //! \param Packet - A pointer to the packet manager object //! \param PacketID - The packet id //! \param HostSend - A flag specifying whether the host //! can send this packet. //! \param IGSend - A flag specifying whether the IG //! can send this packet. //! //! \return the a flag specifying whether the specified //! packet is valid to send. //! int RegisterUserPacket(CigiBasePacket *Packet, Cigi_uint8 PacketID, bool HostSend, bool IGSend); protected: //========================================================= //! Resets the buffer system. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int Reset(void); //========================================================= //! Prepairs a message buffer for packet insertion. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int InitMsg(void) { AdvanceBuffer(); return(CIGI_SUCCESS); } //========================================================= //! Sets the complete outgoing external interface Cigi //! Version with bound checking control //! \param CigiVersionIn - Sets the Cigi Version of //! the outgoing message interface //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetOutgoingCigiVersion(CigiVersionID &Version, bool bndchk=true); //========================================================= //! Sets the complete outgoing external interface Cigi //! Version with bound checking control //! \param CigiVersionIn - Sets the Cigi Version of //! the outgoing message interface //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! CigiVersionID GetOutgoingCigiVersion(void) { return(OutgoingVersion); } //========================================================= //! Sets the complete Cigi Version value of the most mature // Cigi Version of an incoming message received. //! \param CigiVersionIn - The most mature Cigi Version of //! the incoming message interface //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! void SetMostMatureReceivedCigiVersion(CigiVersionID &Version); //========================================================= //! Sets the count of the last frame received. //! \param LastRcvdFrame - The count of the last frame received. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! void SetLastRcvdFrame(Cigi_uint32 LastRcvdFrameIn) { LastRcvdFrame = LastRcvdFrameIn; } //========================================================= //! Sets the buffer's complete CIGI version. //! Also, changes which version of the IG Control packet //! gets packed into the buffer. //! It uses the version of CIGI that is currently set as //! the version being used for the Outgoing Message. //! void ChangeBufferCigiVersion(void); //========================================================= //! Deletes the contents of OutgoingHandlerTbl and sets entries in //! VldSnd accordingly. //! void ClearHandlerTable(void); //========================================================= //! Sets the external interface tables to Host output with //! Cigi Version 1 packets //! void SetOutgoingHostV1Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 1 packets //! void SetOutgoingIGV1Tbls(void); //========================================================= //! Sets the external interface tables to Host output with //! Cigi Version 2 packets //! void SetOutgoingHostV2Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 2 packets //! void SetOutgoingIGV2Tbls(void); //========================================================= //! Sets the external interface tables to Host output with //! Cigi Version 3 packets //! void SetOutgoingHostV3Tbls(void); //========================================================= //! Sets the external interface tables to IG output with //! Cigi Version 3 packets //! void SetOutgoingIGV3Tbls(void); //========================================================= //! Inserts a new buffer into the active buffer list //! and initiates it as the buffer currently being filled. //! void AdvanceBuffer(void); //========================================================= //! Packs the buffer with the pointer to the specifed packet. //! \param DataPacket - A packet object containing the data. //! \param PackingPacket - A packet object that will pack //! the data from the DataPacket. //! \param Spec - A pointer to special data //! CigiOutgoingMsg & PackObj(CigiBasePacket &DataPacket, CigiBasePacket &PackingPacket, void *Spec); //========================================================= //! Changes the outgoing cigi version. //! \param Version - The CIGI version to which to change. //! void ChangeOutgoingCigiVersion(CigiVersionID &Version); //========================================================= //! The Version of CIGI being sent out //! CigiVersionID OutgoingVersion; //========================================================= //! There is a change in the Commanded Version of Cigi //! bool CmdVersionChng; //========================================================= //! The Commanded Version of Cigi //! CigiVersionID CmdVersion; //========================================================= //! The most mature version of CIGI received //! CigiVersionID MostMatureVersionReceived; //========================================================= //! A default packet manager //! CigiDefaultPacket DefaultPacket; //========================================================= //! The Conversion Table for managers of outgoing packets //! CigiBasePacket *OutgoingHandlerTbl[256]; //========================================================= //! The Packet valid to send Table //! bool VldSnd[256]; //========================================================= //! The current frame count //! Cigi_uint32 FrameCnt; //========================================================= //! The count of the last received frame //! Cigi_uint32 LastRcvdFrame; //========================================================= //! An Array of IGCtrl packers //! CigiBaseIGCtrl *pIGCtrlPck[6]; //========================================================= //! An Array of SOF packers //! CigiBaseSOF *pSOFPck[5]; }; #endif // !defined(_CIGI_OUTGOING_MESSAGE_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiPositionReqV3.h000066400000000000000000000066111210750432300214540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiPositionReqV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_POSITION_REQ_V3_INCLUDED_) #define _CIGI_POSITION_REQ_V3_INCLUDED_ #include "CigiBasePositionReq.h" class CIGI_SPEC CigiPositionReqV3 : public CigiBasePositionReq { public: //==> Management //========================================================= //! General Constructor //! CigiPositionReqV3(); //========================================================= //! General Destructor //! virtual ~CigiPositionReqV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_POSITION_REQ_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiPositionRespV3.h000066400000000000000000000066221210750432300216400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiPositionRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_POSITION_RESP_V3_INCLUDED_) #define _CIGI_POSITION_RESP_V3_INCLUDED_ #include "CigiBasePositionResp.h" class CIGI_SPEC CigiPositionRespV3 : public CigiBasePositionResp { public: //==> Management //========================================================= //! General Constructor //! CigiPositionRespV3(); //========================================================= //! General Destructor //! virtual ~CigiPositionRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_POSITION_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiProcessType.h000066400000000000000000000036641210750432300212540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiProcessType.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) Class Library
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                Project version
 *  DESCRIPTION OF CHANGE........................
 *  
 *  2006.10.10 Greg Basler                       0.1
 *  Initial Release.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 *  Author: The Boeing Company
 *
 * 
*/ #if !defined(_CIGI_PROCESS_TYPE_INCLUDED_) #define _CIGI_PROCESS_TYPE_INCLUDED_ //========================================================= //! The enumeration or Table of Signal Types. //! namespace CigiProcessType { typedef enum { ProcNone=0, ProcIGCtrl=1, ProcSOF=2, ProcStd=3, ProcEntity=4, ProcEnvCtrl=5, ProcVarSize=6, ProcShortArtPartToArtPart=7, TwoPassCnvtProcNone=8, TwoPassCnvtProcStd=9 } Type; } #endif // _CIGI_PROCESS_TYPE_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiRateCtrlV1.h000066400000000000000000000101101210750432300207030ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_RATE_CTRL_V1_INCLUDED_) #define _CIGI_RATE_CTRL_V1_INCLUDED_ #include "CigiBaseRateCtrl.h" class CIGI_SPEC CigiRateCtrlV1 : public CigiBaseRateCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiRateCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiRateCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartIDV1 //========================================================= //! Sets the ArtPartIDV1 with bound checking control //! \param ArtPartIDIn - Specifies the art part to which //! this packet's data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartIDV1 value. //! \return the current ArtPartIDV1. Cigi_int8 GetArtPartID(void) const { return(ArtPartIDV1); } }; #endif // #if !defined(_CIGI_RATE_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiRateCtrlV2.h000066400000000000000000000101111210750432300207050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_RATE_CTRL_V2_INCLUDED_) #define _CIGI_RATE_CTRL_V2_INCLUDED_ #include "CigiBaseRateCtrl.h" class CIGI_SPEC CigiRateCtrlV2 : public CigiBaseRateCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiRateCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiRateCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartIDV1 //========================================================= //! Sets the ArtPartIDV1 with bound checking control //! \param ArtPartIDIn - Specifies the art part to which //! this packet's data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartIDV1 value. //! \return the current ArtPartIDV1. Cigi_int8 GetArtPartID(void) const { return(ArtPartIDV1); } }; #endif // #if !defined(_CIGI_RATE_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiRateCtrlV3.h000066400000000000000000000117471210750432300207260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the ArtPartIDIn parameter type from const Cigi_int8 to const unsigned 
 *  Cigi_int8 in the SetArtPartID method.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_RATE_CTRL_V3_INCLUDED_) #define _CIGI_RATE_CTRL_V3_INCLUDED_ #include "CigiBaseRateCtrl.h" class CIGI_SPEC CigiRateCtrlV3 : public CigiBaseRateCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiRateCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiRateCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartIDV3 //========================================================= //! Sets the ArtPartIDV3 with bound checking control //! \param ArtPartIDIn - Specifies the art part to which //! this packet's data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartIDV3 value. //! \return the current ArtPartIDV3. Cigi_uint8 GetArtPartID(void) const { return(ArtPartIDV3); } //+> ApplyToArtPart //========================================================= //! Sets the ApplyToArtPart with bound checking control //! \param ApplyToArtPartIn - Specifies whether this data is to be //! applied to an articulated part or an entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetApplyToArtPart(const bool ApplyToArtPartIn, bool bndchk=true); //========================================================= //! Gets the ApplyToArtPart value. //! \return the current ApplyToArtPart. bool GetApplyToArtPart(void) const { return(ApplyToArtPart); } }; #endif // #if !defined(_CIGI_RATE_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiRateCtrlV3_2.h000066400000000000000000000126051210750432300211410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiRateCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiRateCtrlV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_RATE_CTRL_V3_2_INCLUDED_) #define _CIGI_RATE_CTRL_V3_2_INCLUDED_ #include "CigiBaseRateCtrl.h" class CIGI_SPEC CigiRateCtrlV3_2 : public CigiBaseRateCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiRateCtrlV3_2(); //========================================================= //! General Destructor //! virtual ~CigiRateCtrlV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ArtPartIDV3 //========================================================= //! Sets the ArtPartIDV3 with bound checking control //! \param ArtPartIDIn - Specifies the art part to which //! this packet's data is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk=true); //========================================================= //! Gets the ArtPartIDV3 value. //! \return the current ArtPartIDV3. Cigi_uint8 GetArtPartID(void) const { return(ArtPartIDV3); } //+> ApplyToArtPart //========================================================= //! Sets the ApplyToArtPart with bound checking control //! \param ApplyToArtPartIn - Specifies whether this data is to be //! applied to an articulated part or an entity. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetApplyToArtPart(const bool ApplyToArtPartIn, bool bndchk=true); //========================================================= //! Gets the ApplyToArtPart value. //! \return the current ApplyToArtPart. bool GetApplyToArtPart(void) const { return(ApplyToArtPart); } //+> Coordinate System //========================================================= //! Sets the Coordinate System with bound checking control //! \param CoordSysIn - Specifies the coordinate system in which //! the rates are applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk=true); //========================================================= //! Gets the Coordinate System value. //! \return the current Coordinate System being used for rates. CoordSysGrp GetCoordSys(void) const { return(CoordSys); } }; #endif // #if !defined(_CIGI_RATE_CTRL_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSOFV1.h000066400000000000000000000101601210750432300176170ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the GetFrameCntr and SetFrameCntr accessor methods.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SOF_V1_INCLUDED_) #define _CIGI_SOF_V1_INCLUDED_ #include "CigiBaseSOF.h" //========================================================= //! The class for the Start Of Frame packet for CIGI version 1 //! class CIGI_SPEC CigiSOFV1 : public CigiBaseSOF { public: CigiSOFV1(); virtual ~CigiSOFV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Gets the Frame Counter value //! \return Current frame this data represents //! Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; LastRcvdHostFrame = FrameCntrIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_SOF_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSOFV2.h000066400000000000000000000114111210750432300176200ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the GetFrameCntr and SetFrameCntr accessor methods.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SOF_V2_INCLUDED_) #define _CIGI_SOF_V2_INCLUDED_ #include "CigiBaseSOF.h" //========================================================= //! The class for the Start Of Frame packet for CIGI version 2 //! class CIGI_SPEC CigiSOFV2 : public CigiBaseSOF { public: CigiSOFV2(); virtual ~CigiSOFV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Gets the Frame Counter value //! \return Current frame this data represents //! Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; LastRcvdHostFrame = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the V2 timestamp. //! \return The timestamp in microseconds. //! float GetTimeStamp(void) const { return(TimeStampV2); } //========================================================= //! Sets the timestamp V2 value with bound checking control. //! \param TimeStamp - Specifies the timestamp in microseconds. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const float TimeStamp, bool bndchk=true); }; #endif // !defined(_CIGI_SOF_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSOFV3.h000066400000000000000000000153151210750432300176300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the GetFrameCntr and SetFrameCntr accessor methods.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SOF_V3_INCLUDED_) #define _CIGI_SOF_V3_INCLUDED_ #include "CigiBaseSOF.h" //========================================================= //! The class for the Start Of Frame packet for CIGI version 3 //! class CIGI_SPEC CigiSOFV3 : public CigiBaseSOF { public: CigiSOFV3(); virtual ~CigiSOFV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Gets the Frame Counter value //! \return Current frame this data represents //! Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; LastRcvdHostFrame = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the V3 timestamp. //! \return The timestamp count in 10 microseconds increments. //! Cigi_uint32 GetTimeStamp(void) const { return(TimeStampV3); } //========================================================= //! Sets the timestamp V3 value with bound checking control. //! \param TimeStamp - Specifies the timestamp count in //! 10 microseconds increments. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk=true); //+> Timestamp Valid //========================================================= //! Gets the timestamp valid flag. //! \return The timestamp valid flag. //! bool GetTimeStampValid(void) const { return(TimestampValid); } //========================================================= //! Sets the timestamp valid flag with bound checking control. //! \param TimeStampValidIn - Specifies whether the timestamp //! is valid for use.
//! true - Timestamp is valid.
//! false - Timestamp is not valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStampValid(const bool TimeStampValidIn, bool bndchk=true) { TimestampValid = TimeStampValidIn; return(CIGI_SUCCESS); } //+> Earth Model Reference //========================================================= //! Gets the earth reference model indicator. //! \return The earth reference model indicator.
//! 0 - WGS84.
//! 1 - System defined. //! EarthRefModelGrp GetEarthRefModel(void) const { return(EarthRefModel); } //========================================================= //! Sets the earth reference model indicator with bound checking control. //! \param EarthRefModelIn - Specifies the earth reference model //! is valid for use.
//! 0 - WGS84.
//! 1 - System defined. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEarthRefModel(const EarthRefModelGrp EarthRefModelIn, bool bndchk=true); }; #endif // !defined(_CIGI_SOF_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSOFV3_2.h000066400000000000000000000161601210750432300200500ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV3_2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiSOFV3.h"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SOF_V3_2_INCLUDED_) #define _CIGI_SOF_V3_2_INCLUDED_ #include "CigiBaseSOF.h" //========================================================= //! The class for the Start Of Frame packet for CIGI version 3 //! class CIGI_SPEC CigiSOFV3_2 : public CigiBaseSOF { public: CigiSOFV3_2(); virtual ~CigiSOFV3_2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - Byte swapping required. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Frame Counter //========================================================= //! Gets the Frame Counter value //! \return Current frame this data represents //! Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } //========================================================= //! Sets the Frame Counter with bound checking control //! \param FrameCntrIn - Specifies the frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; return(CIGI_SUCCESS); } //+> Timestamp //========================================================= //! Gets the V3 timestamp. //! \return The timestamp count in 10 microseconds increments. //! Cigi_uint32 GetTimeStamp(void) const { return(TimeStampV3); } //========================================================= //! Sets the timestamp V3 value with bound checking control. //! \param TimeStamp - Specifies the timestamp count in //! 10 microseconds increments. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk=true); //+> Timestamp Valid //========================================================= //! Gets the timestamp valid flag. //! \return The timestamp valid flag. //! bool GetTimeStampValid(void) const { return(TimestampValid); } //========================================================= //! Sets the timestamp valid flag with bound checking control. //! \param TimeStampValidIn - Specifies whether the timestamp //! is valid for use.
//! true - Timestamp is valid.
//! false - Timestamp is not valid. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetTimeStampValid(const bool TimeStampValidIn, bool bndchk=true) { TimestampValid = TimeStampValidIn; return(CIGI_SUCCESS); } //+> Timestamp Valid //========================================================= //! Gets the earth reference model indicator. //! \return The earth reference model indicator.
//! 0 - WGS84.
//! 1 - System defined. //! EarthRefModelGrp GetEarthRefModel(void) const { return(EarthRefModel); } //========================================================= //! Sets the earth reference model indicator with bound checking control. //! \param EarthRefModelIn - Specifies the earth reference model //! is valid for use.
//! 0 - WGS84.
//! 1 - System defined. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetEarthRefModel(const EarthRefModelGrp EarthRefModelIn, bool bndchk=true); //+> Last Received Host Frame //========================================================= //! Gets the last received host frame id value //! \return last received host frame //! Cigi_uint32 GetLastRcvdHostFrame(void) const { return(LastRcvdHostFrame); } //========================================================= //! Sets the last received host frame with bound checking control //! \param LastRcvdHostFrameIn - Specifies the last received host frame. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetLastRcvdHostFrame(const Cigi_uint32 LastRcvdHostFrameIn, bool bndchk=true) { LastRcvdHostFrame = LastRcvdHostFrameIn; return(CIGI_SUCCESS); } }; #endif // !defined(_CIGI_SOF_V3_2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorCtrlV1.h000066400000000000000000000113601210750432300212710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_CTRL_V1_INCLUDED_) #define _CIGI_SENSOR_CTRL_V1_INCLUDED_ #include "CigiBaseSensorCtrl.h" class CIGI_SPEC CigiSensorCtrlV1 : public CigiBaseSensorCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiSensorCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiSensorCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - Specifies the view that this packet is to be applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> Gain //========================================================= //! Sets the Gain with bound checking control //! \param GainIn - Specifies the gain control value to be applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGain(const float GainIn, bool bndchk=true); //========================================================= //! Gets the Gain value. //! \return the current Gain. float GetGain(void) const { return(Gain * 100.0f); } }; #endif // #if !defined(_CIGI_SENSOR_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorCtrlV2.h000066400000000000000000000113471210750432300212770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_CTRL_V2_INCLUDED_) #define _CIGI_SENSOR_CTRL_V2_INCLUDED_ #include "CigiBaseSensorCtrl.h" class CIGI_SPEC CigiSensorCtrlV2 : public CigiBaseSensorCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiSensorCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiSensorCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - Specifies the view that this packet is to be applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> Gain //========================================================= //! Sets the Gain with bound checking control //! \param GainIn - Specifies the gain control value to be applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGain(const float GainIn, bool bndchk=true); //========================================================= //! Gets the Gain value. //! \return the current Gain. float GetGain(void) const { return(Gain); } }; #endif // #if !defined(_CIGI_SENSOR_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorCtrlV3.h000066400000000000000000000130051210750432300212710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_CTRL_V3_INCLUDED_) #define _CIGI_SENSOR_CTRL_V3_INCLUDED_ #include "CigiBaseSensorCtrl.h" class CIGI_SPEC CigiSensorCtrlV3 : public CigiBaseSensorCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiSensorCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiSensorCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - Specifies the view that this packet is to be applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { ViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> ResponseType //========================================================= //! Sets the ResponseType with bound checking control //! \param ResponseTypeIn - Specifies the response wanted.
//! GatePos=0
//! GateAndTargetPos=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetResponseType(const ResponseTypeGrp ResponseTypeIn, bool bndchk=true); //========================================================= //! Gets the ResponseType value. //! \return the current ResponseType. ResponseTypeGrp GetResponseType(void) const { return(ResponseType); } //+> Gain //========================================================= //! Sets the Gain with bound checking control //! \param GainIn - Specifies the gain control value to be applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGain(const float GainIn, bool bndchk=true); //========================================================= //! Gets the Gain value. //! \return the current Gain. float GetGain(void) const { return(Gain); } }; #endif // #if !defined(_CIGI_SENSOR_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorRespV1.h000066400000000000000000000101371210750432300212770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorRespV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_RESP_V1_INCLUDED_) #define _CIGI_SENSOR_RESP_V1_INCLUDED_ #include "CigiBaseSensorResp.h" class CIGI_SPEC CigiSensorRespV1 : public CigiBaseSensorResp { public: //==> Management //========================================================= //! General Constructor //! CigiSensorRespV1(); //========================================================= //! General Destructor //! virtual ~CigiSensorRespV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - View ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } }; #endif // #if !defined(_CIGI_SENSOR_RESP_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorRespV2.h000066400000000000000000000101371210750432300213000ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorRespV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_RESP_V2_INCLUDED_) #define _CIGI_SENSOR_RESP_V2_INCLUDED_ #include "CigiBaseSensorResp.h" class CIGI_SPEC CigiSensorRespV2 : public CigiBaseSensorResp { public: //==> Management //========================================================= //! General Constructor //! CigiSensorRespV2(); //========================================================= //! General Destructor //! virtual ~CigiSensorRespV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - View ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } }; #endif // #if !defined(_CIGI_SENSOR_RESP_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorRespV3.h000066400000000000000000000115321210750432300213010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_RESP_V3_INCLUDED_) #define _CIGI_SENSOR_RESP_V3_INCLUDED_ #include "CigiBaseSensorResp.h" class CIGI_SPEC CigiSensorRespV3 : public CigiBaseSensorResp { public: //==> Management //========================================================= //! General Constructor //! CigiSensorRespV3(); //========================================================= //! General Destructor //! virtual ~CigiSensorRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - View ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { ViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> FrameCntr //========================================================= //! Sets the FrameCntr with bound checking control //! \param FrameCntrIn - Frame counter value //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FrameCntr value. //! \return the current FrameCntr. Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } }; #endif // #if !defined(_CIGI_SENSOR_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSensorXRespV3.h000066400000000000000000000211471210750432300214340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorXRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SENSOR_XRESP_V3_INCLUDED_) #define _CIGI_SENSOR_XRESP_V3_INCLUDED_ #include "CigiBaseSensorResp.h" class CIGI_SPEC CigiSensorXRespV3 : public CigiBaseSensorResp { public: //==> Management //========================================================= //! General Constructor //! CigiSensorXRespV3(); //========================================================= //! General Destructor //! virtual ~CigiSensorXRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - View ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { ViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> EntityTgt //========================================================= //! Sets the EntityTgt with bound checking control //! \param EntityTgtIn - True if the tracked point is an entity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityTgt(const bool EntityTgtIn, bool bndchk=true) { EntityTgt = EntityTgtIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityTgt value. //! \return the current EntityTgt. bool GetEntityTgt(void) const { return(EntityTgt); } //+> EntityID //========================================================= //! Sets the EntityID with bound checking control //! \param EntityIDIn - Entity ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) { EntityID = EntityIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the EntityID value. //! \return the current EntityID. Cigi_uint16 GetEntityID(void) const { return(EntityID); } //+> FrameCntr //========================================================= //! Sets the FrameCntr with bound checking control //! \param FrameCntrIn - Frame counter value //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true) { FrameCntr = FrameCntrIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FrameCntr value. //! \return the current FrameCntr. Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); } //+> TrackPntLat //========================================================= //! Sets the TrackPntLat with bound checking control //! \param TrackPntLatIn - Tracked point's Latitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackPntLat(const double TrackPntLatIn, bool bndchk=true); //========================================================= //! Gets the TrackPntLat value. //! \return the current TrackPntLat. double GetTrackPntLat(void) const { return(TrackPntLat); } //+> TrackPntLon //========================================================= //! Sets the TrackPntLon with bound checking control //! \param TrackPntLonIn - Tracked point's Longitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackPntLon(const double TrackPntLonIn, bool bndchk=true); //========================================================= //! Gets the TrackPntLon value. //! \return the current TrackPntLon. double GetTrackPntLon(void) const { return(TrackPntLon); } //+> TrackPntAlt //========================================================= //! Sets the TrackPntAlt with bound checking control //! \param TrackPntAltIn - Tracked point's altitude //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackPntAlt(const double TrackPntAltIn, bool bndchk=true) { TrackPntAlt = TrackPntAltIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the TrackPntAlt value. //! \return the current TrackPntAlt. double GetTrackPntAlt(void) const { return(TrackPntAlt); } }; #endif // #if !defined(_CIGI_SENSOR_XRESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSession.h000066400000000000000000000260021210750432300204060ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSession.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added the GetCigiMinorVersion accessor method.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Added an overloaded SetCigiVersion method to accept a CigiMinorVersionIn 
 *  parameter.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the existing SetCigiVersion method to use the new SetCigiVersion 
 *  method with a default minor version of 0.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SESSION_INCLUDED_) #define _CIGI_SESSION_INCLUDED_ #include "CigiOutgoingMsg.h" #include "CigiIncomingMsg.h" #include "CigiAnimationTable.h" //========================================================= //! The base class for the Session
//! class CIGI_SPEC CigiSession { public: //========================================================= //! The enumeration for the Session Type //! enum SessionTypeEnum { Host, IG }; //==> Management //========================================================= //! General Destructor //! virtual ~CigiSession(); //==> Member functions //+> Cigi Version //========================================================= //! Sets the Cigi version of the external interface //! with bound checking control //! \param CigiVersionIn - The Cigi Version being used. //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetCigiVersion(const int CigiVersionIn, bool bndchk=true) { return( SetCigiVersion(CigiVersionIn, 0, bndchk)); } //========================================================= //! Sets the Cigi version of the external interface //! with bound checking control //! \param CigiVersionIn - The Cigi Version being used. //! \param CigiMinorVersionIn - Sets the Cigi Minor Version of //! the external interface //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetCigiVersion(const int CigiVersionIn, const int CigiMinorVersionIn, bool bndchk=true) { CigiVersionID tCigiVer; tCigiVer.CigiMajorVersion = CigiVersionIn; tCigiVer.CigiMinorVersion = CigiMinorVersionIn; return(OutMsg.SetOutgoingCigiVersion(tCigiVer,bndchk)); } //========================================================= //! Sets the Cigi version of the external interface //! with bound checking control //! \param CigiVersionIn - The Cigi Version being used. //! \param CigiMinorVersionIn - Sets the Cigi Minor Version of //! the external interface //! \param bndchk - Enables (true) or disables (false) bounds checking //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int SetCigiVersion(CigiVersionID CigiVersionIn, bool bndchk=true) { return(OutMsg.SetOutgoingCigiVersion(CigiVersionIn,bndchk)); } //========================================================= //! Sets the complete Cigi Version value of the most mature // Cigi Version of an incoming message received. //! \param CigiVersionIn - The most mature Cigi Version of //! the incoming message interface //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! void SetMostMatureReceivedCigiVersion(CigiVersionID &Version) { OutMsg.SetMostMatureReceivedCigiVersion(Version); } //========================================================= //! Gets the Cigi version of the external interface. //! \return the complete Cigi version of the external interface. //! CigiVersionID GetCompleteCigiVersion(void) { return(OutMsg.GetOutgoingCigiVersion()); } //========================================================= //! Gets the Cigi version of the external interface. //! \return the Cigi version of the external interface. //! int GetCigiVersion(void) { return(OutMsg.GetOutgoingCigiVersion().CigiMajorVersion); } //========================================================= //! Gets the Cigi Minor Version of the external interface. //! \return the Cigi Minor Version of the external interface. //! int GetCigiMinorVersion(void) { return(OutMsg.GetOutgoingCigiVersion().CigiMinorVersion); } //+> Managers //========================================================= //! Gets a reference to the Outgoing Message Manager object //! \return a reference to the Outgoing Message Manager object. //! CigiOutgoingMsg & GetOutgoingMsgMgr(void) { return(OutMsg); } //========================================================= //! Gets a reference to the Incoming Message Manager object //! \return a reference to the Incoming Message Manager object. //! CigiIncomingMsg & GetIncomingMsgMgr(void) { return(InMsg); } //========================================================= //! Gets a reference to the Animation Table Manager object //! \return a reference to the Animation Table Manager object. //! CigiAnimationTable & GetAnimationTableMgr(void) { return(ATbl); } //+> Interface Timing Method //========================================================= //! Specifies whether the interface is synchronous or asynchronous. //! \param Sync - The synchronous flag.
//! true - interface is synchronous.
//! false - interface is asynchronous.
//! void SetSynchronous(bool Sync) { Synchronous = Sync; } //========================================================= //! Gets whether the interface is synchronous or asynchronous. //! \return Sync - The synchronous flag.
//! true - interface is synchronous.
//! false - interface is asynchronous.
//! bool IsSynchronous(void) { return(Synchronous); } //+> User Packet Management //========================================================= //! Registers an user defined packet manager //! \param Packet - A pointer to an user defined packet manager object. //! \param PacketID - The packet ID this manager processes. //! \param HostSend - Flag specifying that the host can send this packet.
//! true - The host can send this packet.
//! false - The host cannot send this packet.
//! \param IGSend - Flag specifying that the IG can send this packet.
//! true - The IG can send this packet.
//! false - The IG cannot send this packet.
//! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! int RegisterUserPacket(CigiBasePacket *Packet, Cigi_uint8 PacketID, bool HostSend, bool IGSend) { int outMsgStatus = OutMsg.RegisterUserPacket(Packet,PacketID,HostSend,IGSend); int inMsgStatus = InMsg.RegisterUserPacket(Packet,PacketID,HostSend,IGSend); if( outMsgStatus == CIGI_SUCCESS && inMsgStatus == CIGI_SUCCESS ) return CIGI_SUCCESS; else if( outMsgStatus == CIGI_SUCCESS ) return inMsgStatus; else return outMsgStatus; } //+> Session Type //========================================================= //! Notification as to whether the session is a Host session //! //! \return This returns true if this is a host session //! bool IsHost(void) { return((SessionType == Host) ? true : false); } //========================================================= //! Notification as to whether the session is a IG session //! //! \return This returns true if this is a IG session //! bool IsIG(void) { return((SessionType == IG) ? true : false); } protected: //==> Member variables //========================================================= //! Outgoing Message Object
//! CigiOutgoingMsg OutMsg; //========================================================= //! Incoming Message Object
//! CigiIncomingMsg InMsg; //========================================================= //! Animation Table Object
//! CigiAnimationTable ATbl; //========================================================= //! Session Type IG or Host
//! SessionTypeEnum SessionType; //========================================================= //! A flag specifying whether this session is synchronous //! or asynchronous. //! bool Synchronous; //========================================================= //! //! //! const CigiVersionID MostMatureKnownCigi; //==> Member Functions //========================================================= //! Protected Constructor //! \param NumInBuf - The number of incoming message buffers. //! \param InBufLen - The size in bytes of each of the //! incoming message buffers. //! \param NumOutBuf - The number of outgoing message buffers. //! \param OutBufLen - The size in bytes of each of the //! outgoing message buffers. //! \param JTblType - The Jump Table type. (Host or IG) //! CigiSession(const int NumInBuf, const int InBufLen, const int NumOutBuf, const int OutBufLen, SessionTypeEnum SessionTypeIn); }; #endif // !defined(_CIGI_SESSION_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiShortArtPartCtrlV3.h000066400000000000000000000066741210750432300224330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortArtPartCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SHORT_ART_PART_CTRL_V3_INCLUDED_) #define _CIGI_SHORT_ART_PART_CTRL_V3_INCLUDED_ #include "CigiBaseShortArtPartCtrl.h" class CIGI_SPEC CigiShortArtPartCtrlV3 : public CigiBaseShortArtPartCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiShortArtPartCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiShortArtPartCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_SHORT_ART_PART_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiShortCompCtrlV3.h000066400000000000000000000351051210750432300217430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortCompCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SHORT_COMP_CTRL_V3_INCLUDED_) #define _CIGI_SHORT_COMP_CTRL_V3_INCLUDED_ #include "CigiBaseCompCtrl.h" class CIGI_SPEC CigiShortCompCtrlV3 : public CigiBaseCompCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiShortCompCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiShortCompCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> InstanceID //========================================================= //! Sets the InstanceID with bound checking control //! \param InstanceIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInstanceID(const Cigi_uint16 InstanceIDIn, bool bndchk=true) { InstanceID = InstanceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the InstanceID value. //! \return the current InstanceID. Cigi_uint16 GetInstanceID(void) const { return(InstanceID); } //+> CompState //========================================================= //! Sets the CompState with bound checking control //! \param CompStateIn - The state value //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompState(const Cigi_uint8 CompStateIn, bool bndchk=true) { CompState = (Cigi_uint16)CompStateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompState value. //! \return the current CompState. Cigi_uint8 GetCompState(void) const { Cigi_uint8 tState = (Cigi_uint8)((CompState > 0x00ff) ? 0x00ff : CompState); return(tState); } //+> CompClassV3 //========================================================= //! Sets the CompClassV3 with bound checking control //! \param CompClassV3In -
//! EntityV3=0
//! ViewV3=1
//! ViewGrpV3=2
//! SensorV3=3
//! RegionalSeaSurfaceV3=4
//! RegionalTerrainSurfaceV3=5
//! RegionalLayeredWeatherV3=6
//! GlobalSeaSurfaceV3=7
//! GlobalTerrainSurfaceV3=8
//! GlobalLayeredWeatherV3=9
//! AtmosphereV3=10
//! CelestialSphereV3=11
//! EventV3=12
//! SystemV3=13
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk=true); //========================================================= //! Gets the CompClassV3 value. //! \return the current CompClassV3. CompClassV3Grp GetCompClassV3(void) const { return(CompClassV3); } //+> CompData //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_uint8 value. Cigi_uint8 GetUCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_int8 value. Cigi_int8 GetCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_uint16 value. Cigi_uint16 GetUShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_int16 value. Cigi_int16 GetShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified unsigned Long value. Cigi_uint32 GetULongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified Long value. Cigi_int32 GetLongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified float value. float GetFloatCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified Int64 value. Cigi_uint64 GetI64CompData(const unsigned int Pos); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified double value. double GetDoubleCompData(const unsigned int Pos); protected: //==> Conversion Tables static const int CompClassCnvtSz = 14; static const CompAssocGrp CompClassV3xV1[CompClassCnvtSz]; static const CompClassV2Grp CompClassV3xV2[CompClassCnvtSz]; }; #endif // #if !defined(_CIGI_SHORT_COMP_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiShortCompCtrlV3_3.h000066400000000000000000000353301210750432300221650ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortCompCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Converted from CigiShortCompCtrlV3.h.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected problem with conversion from V3_3 to V2 & V1
 *   involving Component Classes of SymbolSurfaceV3_3 &
 *   SymbolV3_3.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SHORT_COMP_CTRL_V3_3_INCLUDED_) #define _CIGI_SHORT_COMP_CTRL_V3_3_INCLUDED_ #include "CigiBaseCompCtrl.h" class CIGI_SPEC CigiShortCompCtrlV3_3 : public CigiBaseCompCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiShortCompCtrlV3_3(); //========================================================= //! General Destructor //! virtual ~CigiShortCompCtrlV3_3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //========================================================= //! A virtual Conversion Information function. //! This function provides conversion information for this //! packet. //! \param CnvtVersion - The CIGI version to which this packet //! is being converted. //! \param CnvtInfo - The information needed for conversion //! //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo); //==> Accessing Member Variable Values functions //+> InstanceID //========================================================= //! Sets the InstanceID with bound checking control //! \param InstanceIDIn - //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetInstanceID(const Cigi_uint16 InstanceIDIn, bool bndchk=true) { InstanceID = InstanceIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the InstanceID value. //! \return the current InstanceID. Cigi_uint16 GetInstanceID(void) const { return(InstanceID); } //+> CompState //========================================================= //! Sets the CompState with bound checking control //! \param CompStateIn - the State value //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompState(const Cigi_uint8 CompStateIn, bool bndchk=true) { CompState = (Cigi_uint16)CompStateIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the CompState value. //! \return the current CompState. Cigi_uint8 GetCompState(void) const { Cigi_uint8 tState = (Cigi_uint8)((CompState > 0x00ff) ? 0x00ff : CompState); return(tState); } //+> CompClassV3 //========================================================= //! Sets the CompClassV3 with bound checking control //! \param CompClassV3In -
//! EntityV3=0
//! ViewV3=1
//! ViewGrpV3=2
//! SensorV3=3
//! RegionalSeaSurfaceV3=4
//! RegionalTerrainSurfaceV3=5
//! RegionalLayeredWeatherV3=6
//! GlobalSeaSurfaceV3=7
//! GlobalTerrainSurfaceV3=8
//! GlobalLayeredWeatherV3=9
//! AtmosphereV3=10
//! CelestialSphereV3=11
//! EventV3=12
//! SystemV3=13
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk=true); //========================================================= //! Gets the CompClassV3 value. //! \return the current CompClassV3. CompClassV3Grp GetCompClassV3(void) const { return(CompClassV3); } //+> CompData //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The byte position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param Pos - The half word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Word - The word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Sets the specified CompData with bound checking control //! \param CompDataIn - The byte data //! \param Pos - The double word position //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk=true); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_uint8 value. Cigi_uint8 GetUCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The byte position //! //! \return This returns the specified Cigi_int8 value. Cigi_int8 GetCharCompData(const unsigned int Word, const BytePos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_uint16 value. Cigi_uint16 GetUShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! \param Pos - The half word position //! //! \return This returns the specified Cigi_int16 value. Cigi_int16 GetShortCompData(const unsigned int Word, const HalfWordPos Pos); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified unsigned Long value. Cigi_uint32 GetULongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified Long value. Cigi_int32 GetLongCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Word - The word position //! //! \return This returns the specified float value. float GetFloatCompData(const unsigned int Word); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified Int64 value. Cigi_uint64 GetI64CompData(const unsigned int Pos); //========================================================= //! Gets the specified CompData //! \param Pos - The double word position //! //! \return This returns the specified double value. double GetDoubleCompData(const unsigned int Pos); protected: //==> Conversion Tables static const int CompClassCnvtSz = 16; static const CompAssocGrp CompClassV3xV1[16]; static const CompClassV2Grp CompClassV3xV2[16]; }; #endif // #if !defined(_CIGI_SHORT_COMP_CTRL_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiShortSymbolCtrlV3_3.h000066400000000000000000000057061210750432300225400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortSymbolCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SHORT_SYMBOL_CTRL_V3_3_INCLUDED_) #define _CIGI_SHORT_SYMBOL_CTRL_V3_3_INCLUDED_ #include "CigiBaseShortSymbolCtrl.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiShortSymbolCtrlV3_3 : public CigiBaseShortSymbolCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiShortSymbolCtrlV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiShortSymbolCtrlV3_3(void); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); }; #endif // #if !defined(_CIGI_SHORT_SYMBOL_CTRL_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSignalType.h000066400000000000000000000057601210750432300210520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSignalType.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) Class Library
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                Project version
 *  DESCRIPTION OF CHANGE........................
 *  
 *  2006.10.10 Greg Basler                       0.1
 *  Initial Release.
 *  
 *  2008.04.03 Greg Basler                       2.1.0
 *  Fixed signals and added symbol signals.
 *  
 *  Author: The Boeing Company
 *
 * 
*/ #if !defined(_CIGI_SIGNAL_TYPE_INCLUDED_) #define _CIGI_SIGNAL_TYPE_INCLUDED_ //========================================================= //! The enumeration or Table of Signal Types. //! namespace CigiSignalType { typedef enum { SigNone=0, SigIGCtrl, SigEntityCtrl, SigViewDef, SigViewCtrl, SigRateCtrl, SigSensorCtrl, SigTrajectory, SigWeatherCtrl, SigCollDetSegDef, SigLosSegReq, SigLosVectReq, SigHatHotReq, SigEnvCtrl, SigSpecEffDef, SigArtPartCtrl, SigCollDetVolDef, SigShortArtPartCtrl, SigConfClampEntityCtrl, SigMaritimeSurfaceCtrl, SigEnvRgnCtrl, SigTerrestrialSurfaceCtrl, SigMotionTrackCtrl, SigEarthModelDef, SigPostionReq, SigEnvCondReq, SigSOF, SigCollDetSegResp, SigSensorResp, SigSensorXResp, SigLosResp, SigLosXResp, SigHatHotResp, SigCollDetVolResp, SigPositionResp, SigWeatherCondResp, SigAerosolResp, SigMaritimeSurfaceResp, SigTerrestrialSurfaceResp, SigAnimationStop, SigEventNotification, SigHatReq, SigHotReq, SigHatResp, SigHotResp, SigHatHotXResp, SigWaveCtrl, SigIGMsg, SigAtmosCtrl, SigCelestialCtrl, SigCompCtrl, SigShortCompCtrl, SigSymbolSurfaceDef, SigSymbolCtrl, SigShortSymbolCtrl, SigSymbolTextDef, SigSymbolCircleDef, SigSymbolLineDef, SigSymbolClone } Type; } #endif // _CIGI_SIGNAL_TYPE_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiSpecEffDefV1.h000066400000000000000000000066031210750432300211310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSpecEffDefV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SPEC_EFF_DEF_V1_INCLUDED_) #define _CIGI_SPEC_EFF_DEF_V1_INCLUDED_ #include "CigiBaseSpecEffDef.h" class CIGI_SPEC CigiSpecEffDefV1 : public CigiBaseSpecEffDef { public: //==> Management //========================================================= //! General Constructor //! CigiSpecEffDefV1(); //========================================================= //! General Destructor //! virtual ~CigiSpecEffDefV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_SPEC_EFF_DEF_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSpecEffDefV2.h000066400000000000000000000066041210750432300211330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSpecEffDefV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SPEC_EFF_DEF_V2_INCLUDED_) #define _CIGI_SPEC_EFF_DEF_V2_INCLUDED_ #include "CigiBaseSpecEffDef.h" class CIGI_SPEC CigiSpecEffDefV2 : public CigiBaseSpecEffDef { public: //==> Management //========================================================= //! General Constructor //! CigiSpecEffDefV2(); //========================================================= //! General Destructor //! virtual ~CigiSpecEffDefV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_SPEC_EFF_DEF_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSwapping.h000066400000000000000000000151671210750432300205650ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added function modifiers to export the CigiSwap2, CigiSwap4, and CigiSwap8 
 *  functions when built as a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the implementations of the CigiCopy2, CigiCopy4, CIGI_FLOAT_TO_B6, 
 *  and CIGI_FLOAT_TO_BA to use CIGI-defined types instead of native C++ types.
 *  
 *  04/06/2005 Greg Basler                       Version 1.5.2
 *  Included the CigiTypes.h header file. Modified the CigiCopy2 and CigiCopy4 
 *  macros to use the cigi-defined data types instead of native types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Changed CigiCopy8 to make sure that it works for big endian and non-intel
 *  machines.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SWAPPING_INCLUDE_) #define _CIGI_SWAPPING_INCLUDE_ #include "CigiTypes.h" //========================================================= //! Byte swaps the Cigi_int16 pointed to by src //! and places the result into the Cigi_int16 pointed to by dest. //! \param dest - Specifies where the byte swapped Cigi_int16 //! should be placed //! \param src - Specifies the source Cigi_int16 to byte swap. //! void CIGI_SPEC CigiSwap2( void *dest, const void *src); //========================================================= //! Byte swaps the word pointed to by src //! and places the result into the word pointed to by dest. //! \param dest - Specifies where the byte swapped word //! should be placed //! \param src - Specifies the source word to byte swap. //! void CIGI_SPEC CigiSwap4( void *dest, const void *src); //========================================================= //! Byte swaps the double word pointed to by src
//! and places the result into the double word pointed to by dest. //! \param dest - Specifies where the byte swapped double word //! should be placed //! \param src - Specifies the source double word to byte swap. //! void CIGI_SPEC CigiSwap8( void *dest, const void *src); //========================================================= //! Copies the double word pointed to by src into the
//! double word pointed to by dest. //! \param dest - Specifies where the double word should be placed //! \param src - Specifies the source double word to copy. //! void CIGI_SPEC CigiCopy8( void *dest, const void *src); /** Macros for copying bytes of data from one address to another. */ //========================================================= //! Copies the byte pointed to by src into the byte
//! pointed to by dest. //! \param _dest_ - Specifies where the byte should be placed //! \param _src_ - Specifies the source byte to copy. //! #define CigiCopy1( _dest_, _src_) \ ( *( ( Cigi_int8*)( _dest_)) = *( ( Cigi_int8*)( _src_)) ) //========================================================= //! Copies the Cigi_int16 pointed to by src into the short
//! pointed to by dest. //! \param _dest_ - Specifies where the Cigi_int16 should be placed //! \param _src_ - Specifies the source Cigi_int16 to copy. //! #define CigiCopy2( _dest_, _src_) \ ( *( ( Cigi_int16*)( _dest_)) = *( ( Cigi_int16*)( _src_)) ) //========================================================= //! Copies the word pointed to by src into the word
//! pointed to by dest. //! \param _dest_ - Specifies where the word should be placed //! \param _src_ - Specifies the source word to copy. //! #define CigiCopy4( _dest_, _src_) \ ( *( ( Cigi_int32*)( _dest_)) = *( ( Cigi_int32*)( _src_)) ) //========================================================= //! Formats a double floating-point number (double) as a type B6 number.
//! note: Percision of up to 0.015625 may be lost in this conversion. //! \param _fval - Specifies the double floating-point number to convert. //! //! \return the B6 converted number. //! #define CIGI_FLOAT_TO_B6( _fval) ( (Cigi_int16)( ( _fval) * 64.0)) /** Formats a number of type B6 as a floating-point number (double). */ //========================================================= //! Formats a type B6 number as a double floating-point number (double). //! \param _b6val - Specifies the B6 format number to convert. //! //! \return the double converted number. //! #define CIGI_B6_TO_FLOAT( _b6val) ( ( (double) _b6val) / 64.0) //========================================================= //! Formats a double floating-point number (double) as a type B-angle number.
//! note: Percision of up to 0.0054931640625 may be lost in this conversion. //! \param _fval - Specifies the double floating-point number to convert. //! //! \return the B6 converted number. //! #define CIGI_FLOAT_TO_BA( _fval) ( (Cigi_int32)( ( _fval) * 182.0444)) /** Formats a number of type B6 as a floating-point number (double). */ //========================================================= //! Formats a type B-angle number as a double floating-point number (double). //! \param _baval - Specifies the B-angle format number to convert. //! //! \return the double converted number. //! #define CIGI_BA_TO_FLOAT( _baval) ( ( (double) _baval) / 182.0444) #endif // #if !defined(_CIGI_SWAPPING_INCLUDE_) cigi-ccl-3.3.3a+svn818/include/CigiSymbolCircleDefV3_3.h000066400000000000000000000104451210750432300224300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolCircleDefV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SYMBOL_CIRCLE_DEF_V3_3_INCLUDED_) #define _CIGI_SYMBOL_CIRCLE_DEF_V3_3_INCLUDED_ #include "CigiBaseSymbolCircleDef.h" #include "CigiCircleSymbolDataV3_3.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiSymbolCircleDefV3_3 : public CigiBaseSymbolCircleDef { public: //==> Management //========================================================= //! General Constructor //! CigiSymbolCircleDefV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiSymbolCircleDefV3_3(void); //========================================================= //! Copy Constructor //! CigiSymbolCircleDefV3_3(const CigiSymbolCircleDefV3_3 &BaseIn); //========================================================= //! Assignment operator //! CigiSymbolCircleDefV3_3 & operator=(const CigiSymbolCircleDefV3_3 &BaseIn); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //+> Circles //========================================================= //! A virtual Create Circle function. //! This will create a circle object and insert a pointer //! to the created circle object into the Circle Vector. //! //! \return The pointer to the new circle object. //! If the circle exceeds the maximum number of circles //! or the circle object cannot be created, this will //! return a NULL pointer. virtual CigiBaseCircleSymbolData * AddCircle(void); //========================================================= //! A virtual Remove Circle function. //! This will remove a Circle object from the Circle Vector. //! \param CircleIndex - Specifies the index of the desired circle. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h virtual int RemoveCircle(int CircleIndex, bool bndchk=true); }; #endif // #if !defined(_CIGI_SYMBOL_CIRCLE_DEF_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSymbolCloneV3_3.h000066400000000000000000000056371210750432300216570ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolCloneV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/03/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SYMBOL_CLONE_V3_3_INCLUDED_) #define _CIGI_SYMBOL_CLONE_V3_3_INCLUDED_ #include "CigiBaseSymbolClone.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiSymbolCloneV3_3 : public CigiBaseSymbolClone { public: //==> Management //========================================================= //! General Constructor //! CigiSymbolCloneV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiSymbolCloneV3_3(void); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); }; #endif // #if !defined(_CIGI_SYMBOL_CLONE_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSymbolCtrlV3_3.h000066400000000000000000000056261210750432300215210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SYMBOL_CTRL_V3_3_INCLUDED_) #define _CIGI_SYMBOL_CTRL_V3_3_INCLUDED_ #include "CigiBaseSymbolCtrl.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiSymbolCtrlV3_3 : public CigiBaseSymbolCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiSymbolCtrlV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiSymbolCtrlV3_3(void); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); }; #endif // #if !defined(_CIGI_SYMBOL_CTRL_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSymbolLineDefV3_3.h000066400000000000000000000104061210750432300221130ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolLineDefV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SYMBOL_LINE_DEF_V3_3_INCLUDED_) #define _CIGI_SYMBOL_LINE_DEF_V3_3_INCLUDED_ #include "CigiBaseSymbolLineDef.h" #include "CigiVertexSymbolDataV3_3.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiSymbolLineDefV3_3 : public CigiBaseSymbolLineDef { public: //==> Management //========================================================= //! General Constructor //! CigiSymbolLineDefV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiSymbolLineDefV3_3(void); //========================================================= //! Copy Constructor //! CigiSymbolLineDefV3_3(const CigiSymbolLineDefV3_3 &BaseIn); //========================================================= //! Assignment operator //! CigiSymbolLineDefV3_3 & operator=(const CigiSymbolLineDefV3_3 &BaseIn); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //+> Vertices //========================================================= //! A virtual Create Vertex function. //! This will create a Vertex object and insert a pointer to //! that created vertex into the Vertex Vector. //! //! \return The pointer to the new Vertex object. //! If the Vertex exceeds the maximum number of Vertices //! or the Vertex object cannot be created, this will //! return a NULL pointer. virtual CigiBaseVertexSymbolData * AddVertex(void); //========================================================= //! A virtual Remove Vertex function. //! This will remove a Vertex object from the Vertex Vector. //! \param VertexIndex - Specifies the index of the desired vertex //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h virtual int RemoveVertex(int VertexIndex, bool bndchk=true); }; #endif // #if !defined(_CIGI_SYMBOL_LINE_DEF_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSymbolSurfaceDefV3_3.h000066400000000000000000000057171210750432300226250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolSurfaceDefV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SYMBOL_SURFACE_DEF_V3_3_INCLUDED_) #define _CIGI_SYMBOL_SURFACE_DEF_V3_3_INCLUDED_ #include "CigiBaseSymbolSurfaceDef.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiSymbolSurfaceDefV3_3 : public CigiBaseSymbolSurfaceDef { public: //==> Management //========================================================= //! General Constructor //! CigiSymbolSurfaceDefV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiSymbolSurfaceDefV3_3(void); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); }; #endif // #if !defined(_CIGI_SYMBOL_SURFACE_DEF_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiSymbolTextDefV3_3.h000066400000000000000000000070111210750432300221460ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolTextDefV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_SYMBOL_TEXT_DEF_V3_3_INCLUDED_) #define _CIGI_SYMBOL_TEXT_DEF_V3_3_INCLUDED_ #include "CigiBaseSymbolTextDef.h" //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiSymbolTextDefV3_3 : public CigiBaseSymbolTextDef { public: //==> Management //========================================================= //! General Constructor //! CigiSymbolTextDefV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiSymbolTextDefV3_3(void); //========================================================= //! General Constructor //! CigiSymbolTextDefV3_3(const std::string &TextIn); //========================================================= //! Copy Constructor //! CigiSymbolTextDefV3_3(const CigiSymbolTextDefV3_3 &BaseIn); //========================================================= //! Assignment operator //! CigiSymbolTextDefV3_3 & operator=(const CigiSymbolTextDefV3_3 &BaseIn) { return((CigiSymbolTextDefV3_3 &)CigiBaseSymbolTextDef::operator=((CigiBaseSymbolTextDef &)BaseIn)); } //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); }; #endif // #if !defined(_CIGI_SYMBOL_TEXT_DEF_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiTerrestrialSurfaceCtrlV3.h000066400000000000000000000067601210750432300236430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTerrestrialSurfaceCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_TERRESTRIAL_SURFACE_CTRL_V3_INCLUDED_) #define _CIGI_TERRESTRIAL_SURFACE_CTRL_V3_INCLUDED_ #include "CigiBaseTerrestrialSurfaceCtrl.h" class CIGI_SPEC CigiTerrestrialSurfaceCtrlV3 : public CigiBaseTerrestrialSurfaceCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiTerrestrialSurfaceCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiTerrestrialSurfaceCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_TERRESTRIAL_SURFACE_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiTerrestrialSurfaceRespV3.h000066400000000000000000000067571210750432300236560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTerrestrialSurfaceRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_TERRESTRIAL_SURFACE_RESP_V3_INCLUDED_) #define _CIGI_TERRESTRIAL_SURFACE_RESP_V3_INCLUDED_ #include "CigiBaseTerrestrialSurfaceResp.h" class CIGI_SPEC CigiTerrestrialSurfaceRespV3 : public CigiBaseTerrestrialSurfaceResp { public: //==> Management //========================================================= //! General Constructor //! CigiTerrestrialSurfaceRespV3(); //========================================================= //! General Destructor //! virtual ~CigiTerrestrialSurfaceRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_TERRESTRIAL_SURFACE_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiTrajectoryDefV1.h000066400000000000000000000143051210750432300217420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTrajectoryDefV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_TRAJECTORY_DEF_V1_INCLUDED_) #define _CIGI_TRAJECTORY_DEF_V1_INCLUDED_ #include "CigiBaseTrajectoryDef.h" class CIGI_SPEC CigiTrajectoryDefV1 : public CigiBaseTrajectoryDef { public: //==> Management //========================================================= //! General Constructor //! CigiTrajectoryDefV1(); //========================================================= //! General Destructor //! virtual ~CigiTrajectoryDefV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Accel //========================================================= //! Sets the Accel with bound checking control //! \param AccelIn - Acceleration value. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAccel(const float AccelIn, bool bndchk=true) { Accel = AccelIn; AccelZ = Accel; return(CIGI_SUCCESS); } //========================================================= //! Gets the Accel value. //! \return the current Accel. float GetAccel(void) const { return(Accel); } //+> Xoff //========================================================= //! Sets the Xoff with bound checking control //! \param XoffIn - The offset along the entity's X axis from //! the entity's reference point from which the trajectory is started. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXoff(const float XoffIn, bool bndchk=true) { Xoff = XoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Xoff value. //! \return the current Xoff. float GetXoff(void) const { return(Xoff); } //+> Yoff //========================================================= //! Sets the Yoff with bound checking control //! \param YoffIn - The offset along the entity's Y axis from //! the entity's reference point from which the trajectory is started. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYoff(const float YoffIn, bool bndchk=true) { Yoff = YoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Yoff value. //! \return the current Yoff. float GetYoff(void) const { return(Yoff); } //+> Zoff //========================================================= //! Sets the Zoff with bound checking control //! \param ZoffIn - The offset along the entity's Z axis from //! the entity's reference point from which the trajectory is started. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZoff(const float ZoffIn, bool bndchk=true) { Zoff = ZoffIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Zoff value. //! \return the current Zoff. float GetZoff(void) const { return(Zoff); } }; #endif // #if !defined(_CIGI_TRAJECTORY_DEF_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiTrajectoryDefV2.h000066400000000000000000000100651210750432300217420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTrajectoryDefV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_TRAJECTORY_DEF_V2_INCLUDED_) #define _CIGI_TRAJECTORY_DEF_V2_INCLUDED_ #include "CigiBaseTrajectoryDef.h" class CIGI_SPEC CigiTrajectoryDefV2 : public CigiBaseTrajectoryDef { public: //==> Management //========================================================= //! General Constructor //! CigiTrajectoryDefV2(); //========================================================= //! General Destructor //! virtual ~CigiTrajectoryDefV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> Accel //========================================================= //! Sets the Accel with bound checking control //! \param AccelIn - Acceleration value. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAccel(const float AccelIn, bool bndchk=true) { Accel = AccelIn; AccelZ = Accel; return(CIGI_SUCCESS); } //========================================================= //! Gets the Accel value. //! \return the current Accel. float GetAccel(void) const { return(Accel); } }; #endif // #if !defined(_CIGI_TRAJECTORY_DEF_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiTrajectoryDefV3.h000066400000000000000000000121721210750432300217440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTrajectoryDefV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_TRAJECTORY_DEF_V3_INCLUDED_) #define _CIGI_TRAJECTORY_DEF_V3_INCLUDED_ #include "CigiBaseTrajectoryDef.h" class CIGI_SPEC CigiTrajectoryDefV3 : public CigiBaseTrajectoryDef { public: //==> Management //========================================================= //! General Constructor //! CigiTrajectoryDefV3(); //========================================================= //! General Destructor //! virtual ~CigiTrajectoryDefV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> AccelX //========================================================= //! Sets the Accel with bound checking control //! \param AccelIn - Acceleration value. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAccelX(const float AccelIn, bool bndchk=true); //========================================================= //! Gets the Accel value. //! \return the current Accel. float GetAccelX(void) const { return(AccelX); } //+> Accel //========================================================= //! Sets the Accel with bound checking control //! \param AccelIn - Acceleration value. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAccelY(const float AccelIn, bool bndchk=true); //========================================================= //! Gets the Accel value. //! \return the current Accel. float GetAccelY(void) const { return(AccelY); } //+> Accel //========================================================= //! Sets the Accel with bound checking control //! \param AccelIn - Acceleration value. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAccelZ(const float AccelIn, bool bndchk=true); //========================================================= //! Gets the Accel value. //! \return the current Accel. float GetAccelZ(void) const { return(AccelZ); } }; #endif // #if !defined(_CIGI_TRAJECTORY_DEF_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiTypes.h000066400000000000000000000053211210750432300200700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiTypes.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC preprocessor definition for building the project as a
 *  Windows DLL.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the PackPointer union type declaration.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined Cigi_uint16, Cigi_uint32, and Cigi_uint64 for various processors.
 *
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and
 *  Cigi_uint8.
 *
 *  07/15/2008 Greg Basler                       Version 2.2.1
 *  Removed the CCL library version from all files and created
 *  defines in this file for the current CCL library version.
 *
 *  09/09/2008 Greg Basler                       Version 2.2.1
 *  Initial Release.
 *  Split types file into specific architecture types files.,
 *
 * 
* Author: The Boeing Company */ #if !defined(CIGI_TYPES_H) #define CIGI_TYPES_H #define CCL_MAJOR_VERSION 3 #define CCL_MINOR_VERSION 3 #define CCL_PATCH_LEVEL 0 // Due to type problems between compilers #if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) #include "CigiTypes_MSVS_Win32.h" #else #include "CigiTypes_Default.h" #endif typedef union PackPointerUnion { Cigi_uint8 *c; Cigi_int8 *b; Cigi_uint16 *s; Cigi_int16 *h; Cigi_uint32 *l; float *f; double *d; } PackPointer; #endif // #if !defined(CIGI_TYPES_H) cigi-ccl-3.3.3a+svn818/include/CigiTypes_Default.h000066400000000000000000000035641210750432300215430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiTypes_Default.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/09/2008 Greg Basler                       Version 2.2.1
 *  Initial Release.
 *  Split types file into specific architecture types files.,
 *
 * 
* Author: The Boeing Company */ #if !defined(CIGI_TYPES_DEFAULT_H) #define CIGI_TYPES_DEFAULT_H #include typedef uint8_t Cigi_uint8; typedef int8_t Cigi_int8; typedef char Cigi_Ascii; typedef uint16_t Cigi_uint16; typedef int16_t Cigi_int16; typedef uint32_t Cigi_uint32; typedef int32_t Cigi_int32; typedef uint64_t Cigi_uint64; typedef int64_t Cigi_int64; #define _I64_CONST_(CONST_ARG) CONST_ARG ## LL #define CIGI_SPEC #endif // #if !defined(CIGI_TYPES_DEFAULT_H) cigi-ccl-3.3.3a+svn818/include/CigiTypes_MSVS_Win32.h000066400000000000000000000041131210750432300217200ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiTypes_MSVS_Win32.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/09/2008 Greg Basler                       Version 2.2.1
 *  Initial Release.
 *  Split types file into specific architecture types files.,
 *
 * 
* Author: The Boeing Company */ #if !defined(CIGI_TYPES_MSVS_WIN32_H) #define CIGI_TYPES_MSVS_WIN32_H typedef unsigned __int8 Cigi_uint8; typedef __int8 Cigi_int8; typedef char Cigi_Ascii; typedef unsigned __int16 Cigi_uint16; typedef __int16 Cigi_int16; typedef unsigned __int32 Cigi_uint32; typedef __int32 Cigi_int32; typedef unsigned __int64 Cigi_uint64; typedef __int64 Cigi_int64; #define _I64_CONST_(CONST_ARG) CONST_ARG ## i64 #ifdef CCL_DLL #ifdef _EXPORT_CCL_ #define CIGI_SPEC __declspec(dllexport) #else #define CIGI_SPEC __declspec(dllimport) #endif #else #define CIGI_SPEC #endif #endif // #if !defined(CIGI_TYPES_MSVC_WIN32_H) cigi-ccl-3.3.3a+svn818/include/CigiVersionID.h000066400000000000000000000172251210750432300206340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiVersionID.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VERSION_ID_INCLUDED_) #define _CIGI_VERSION_ID_INCLUDED_ #include "CigiTypes.h" class CIGI_SPEC CigiVersionID { public: //==> Management //========================================================= //! General Constructor //! CigiVersionID(void) : CigiMajorVersion(0) , CigiMinorVersion(0) { } //========================================================= //! Initializing Constructor //! CigiVersionID(int CigiMajorVersionIn, int CigiMinorVersionIn) : CigiMajorVersion(CigiMajorVersionIn) , CigiMinorVersion(CigiMinorVersionIn) { } //========================================================= //! General Destructor //! virtual ~CigiVersionID(void) { } //==> Public Accessor functions //========================================================= //! Gets the value indicating if a valid IGCtrl or SOF //! packet has been packed for the message. //! //! \return This returns a value indicating if a valid //! IGCtrl or SOF packet has been packed //! void SetCigiVersion(int CigiMajorVersionIn, int CigiMinorVersionIn) { CigiMajorVersion = CigiMajorVersionIn; CigiMinorVersion = CigiMinorVersionIn; } //==> Processor functions //========================================================= //! Gets the value indicating if a valid IGCtrl or SOF //! packet has been packed for the message. //! //! \return This returns a value indicating if a valid //! IGCtrl or SOF packet has been packed //! int GetCombinedCigiVersion(void) { int CVer = ((CigiMajorVersion << 8) & 0x0000ff00) | (CigiMinorVersion & 0x000000ff); return(CVer); } //========================================================= //! Determines if the version of CIGI is a known version. //! //! \return This returns a value indicating if a know //! version of CIGI is stored //! bool IsKnownCigiVersion(void) { bool KnownVer = false; if(CigiMajorVersion > 0) { if(CigiMajorVersion < 3) { if(CigiMinorVersion == 0) KnownVer = true; } else if(CigiMajorVersion == 3) { if((CigiMinorVersion >= 0) && (CigiMinorVersion <= 3)) KnownVer = true; } } return(KnownVer); } //========================================================= //! Determines if the best match to a known version of CIGI //! void BestCigiVersion(void) { if((CigiMajorVersion == 1) || (CigiMajorVersion == 2)) CigiMinorVersion = 0; else if(CigiMajorVersion == 3) { if(CigiMinorVersion > 3) CigiMinorVersion = 3; else if(CigiMinorVersion < 2) CigiMinorVersion = 0; } else { // Set the version to the most mature version of CIGI CigiMajorVersion = 3; CigiMinorVersion = 3; } } //==> Public operator functions //========================================================= //! Testing for equality //! //! \return This returns true if the versions are the same //! bool operator ==(const CigiVersionID &TestVersion) { return((CigiMajorVersion == TestVersion.CigiMajorVersion) && (CigiMinorVersion == TestVersion.CigiMinorVersion)); } //========================================================= //! Testing for Not Equal //! //! \return This returns true if the versions are not the same //! bool operator !=(const CigiVersionID &TestVersion) { return((CigiMajorVersion != TestVersion.CigiMajorVersion) || (CigiMinorVersion != TestVersion.CigiMinorVersion)); } //========================================================= //! Tests for greater than //! //! \return This returns true if the second version is //! a more mature version. //! bool operator >(const CigiVersionID &TestVersion) { bool Rslt = false; if(CigiMajorVersion > TestVersion.CigiMajorVersion) Rslt = true; else if(CigiMajorVersion == TestVersion.CigiMajorVersion) { if(CigiMinorVersion > TestVersion.CigiMinorVersion) Rslt = true; } return(Rslt); } //========================================================= //! Tests for greater than or equal to //! //! \return This returns true if the second version is //! the same or a more mature version. //! bool operator >=(const CigiVersionID &TestVersion) { bool Rslt = false; if(CigiMajorVersion > TestVersion.CigiMajorVersion) Rslt = true; else if(CigiMajorVersion == TestVersion.CigiMajorVersion) { if(CigiMinorVersion >= TestVersion.CigiMinorVersion) Rslt = true; } return(Rslt); } //========================================================= //! Tests for Less than //! //! \return This returns true if the second version is //! a less mature version. //! bool operator <(const CigiVersionID &TestVersion) { bool Rslt = false; if(CigiMajorVersion < TestVersion.CigiMajorVersion) Rslt = true; else if(CigiMajorVersion == TestVersion.CigiMajorVersion) { if(CigiMinorVersion < TestVersion.CigiMinorVersion) Rslt = true; } return(Rslt); } //========================================================= //! Tests for less than or equal to //! //! \return This returns true if the second version is //! the same or a less mature version. //! bool operator <=(const CigiVersionID &TestVersion) { bool Rslt = false; if(CigiMajorVersion < TestVersion.CigiMajorVersion) Rslt = true; else if(CigiMajorVersion == TestVersion.CigiMajorVersion) { if(CigiMinorVersion <= TestVersion.CigiMinorVersion) Rslt = true; } return(Rslt); } //==> Member variables //========================================================= //! Buffer Created
//! Specifies whether the buffer has been created. //! int CigiMajorVersion; //========================================================= //! Buffer Created
//! Specifies whether the buffer has been created. //! int CigiMinorVersion; }; #endif // _CIGI_VERSION_ID_INCLUDED_ cigi-ccl-3.3.3a+svn818/include/CigiVertexSymbolDataV3_3.h000066400000000000000000000061151210750432300226560ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiVertexSymbolDataV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VERTEX_SYMBOL_DATA_V3_3_INCLUDED_) #define _CIGI_VERTEX_SYMBOL_DATA_V3_3_INCLUDED_ #include "CigiBaseVertexSymbolData.h" // ==================================================================== // preprocessor definitions // ==================================================================== #define CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3 8 //========================================================= //! The base class for all packets. //! class CIGI_SPEC CigiVertexSymbolDataV3_3 : public CigiBaseVertexSymbolData { public: //==> Management //========================================================= //! General Constructor //! CigiVertexSymbolDataV3_3(void); //========================================================= //! General Destructor //! virtual ~CigiVertexSymbolDataV3_3(void); //==> Buffer Packing/Unpacking //========================================================= //! A virtual Pack function. //! \param Base - A pointer to the instance of the Circle //! Data to be packed. (Downcast to CigiBaseVertexSymbolData) //! \param Buff - A pointer to the current pack point. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBaseVertexSymbolData * Base, Cigi_uint8 * Buff) const; //========================================================= //! A virtual Unpack function. //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap); }; #endif // #if !defined(_CIGI_VERTEX_SYMBOL_DATA_V3_3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiViewCtrlV1.h000066400000000000000000000120071210750432300207310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the ViewIDIn parameter type from const unsigned short to const 
 *  Cigi_uint8 in the SetViewID method.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VIEW_CTRL_V1_INCLUDED_) #define _CIGI_VIEW_CTRL_V1_INCLUDED_ #include "CigiBaseViewCtrl.h" class CIGI_SPEC CigiViewCtrlV1 : public CigiBaseViewCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiViewCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiViewCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - Specifies the view that this packet controls.
//! If The Group ID is not 0, ViewID is ignored. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint8 GetViewID(void) const { if(ViewID < 31) return((Cigi_uint8)ViewID); else return((Cigi_uint8)0x1f); } //+> GroupID //========================================================= //! Sets the GroupID with bound checking control //! \param GroupIDIn - Specifies the view group that this packet controls. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk=true); //========================================================= //! Gets the GroupID value. //! \return the current GroupID. Cigi_uint8 GetGroupID(void) const { if(GroupID < 8) return(GroupID); else return((Cigi_uint8)0x07); } }; #endif // #if !defined(_CIGI_VIEW_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiViewCtrlV2.h000066400000000000000000000221211210750432300207300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the ViewIDIn parameter type from const unsigned short to const 
 *  Cigi_uint8 in the SetViewID method.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VIEW_CTRL_V2_INCLUDED_) #define _CIGI_VIEW_CTRL_V2_INCLUDED_ #include "CigiBaseViewCtrl.h" class CIGI_SPEC CigiViewCtrlV2 : public CigiBaseViewCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiViewCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiViewCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - Specifies the view that this packet controls.
//! If The Group ID is not 0, ViewID is ignored. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint8 GetViewID(void) const { if(ViewID < 31) return((Cigi_uint8)ViewID); else return((Cigi_uint8)0x1f); } //+> GroupID //========================================================= //! Sets the GroupID with bound checking control //! \param GroupIDIn - Specifies the view group that this packet controls. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk=true); //========================================================= //! Gets the GroupID value. //! \return the current GroupID. Cigi_uint8 GetGroupID(void) const { if(GroupID < 8) return(GroupID); else return((Cigi_uint8)0x07); } //+> XOffEn //========================================================= //! Sets the XOffEn with bound checking control //! \param XOffEnIn - Specifies if the X Offset data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXOffEn(const bool XOffEnIn, bool bndchk=true) { XOffEn = XOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XOffEn value. //! \return the current XOffEn. bool GetXOffEn(void) const { return(XOffEn); } //+> YOffEn //========================================================= //! Sets the YOffEn with bound checking control //! \param YOffEnIn - Specifies if the Y Offset data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYOffEn(const bool YOffEnIn, bool bndchk=true) { YOffEn = YOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YOffEn value. //! \return the current YOffEn. bool GetYOffEn(void) const { return(YOffEn); } //+> ZOffEn //========================================================= //! Sets the ZOffEn with bound checking control //! \param ZOffEnIn - Specifies if the Z Offset data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZOffEn(const bool ZOffEnIn, bool bndchk=true) { ZOffEn = ZOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZOffEn value. //! \return the current ZOffEn. bool GetZOffEn(void) const { return(ZOffEn); } //+> RollEn //========================================================= //! Sets the RollEn with bound checking control //! \param RollEnIn - Specifies if the roll data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRollEn(const bool RollEnIn, bool bndchk=true) { RollEn = RollEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RollEn value. //! \return the current RollEn. bool GetRollEn(void) const { return(RollEn); } //+> PitchEn //========================================================= //! Sets the PitchEn with bound checking control //! \param PitchEnIn - Specifies if the pitch data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitchEn(const bool PitchEnIn, bool bndchk=true) { PitchEn = PitchEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the PitchEn value. //! \return the current PitchEn. bool GetPitchEn(void) const { return(PitchEn); } //+> YawEn //========================================================= //! Sets the YawEn with bound checking control //! \param YawEnIn - Specifies if the yaw data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYawEn(const bool YawEnIn, bool bndchk=true) { YawEn = YawEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YawEn value. //! \return the current YawEn. bool GetYawEn(void) const { return(YawEn); } }; #endif // #if !defined(_CIGI_VIEW_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiViewCtrlV3.h000066400000000000000000000217701210750432300207420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VIEW_CTRL_V3_INCLUDED_) #define _CIGI_VIEW_CTRL_V3_INCLUDED_ #include "CigiBaseViewCtrl.h" class CIGI_SPEC CigiViewCtrlV3 : public CigiBaseViewCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiViewCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiViewCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - Specifies the view that this packet controls.
//! If The Group ID is not 0, ViewID is ignored. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { ViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> GroupID //========================================================= //! Sets the GroupID with bound checking control //! \param GroupIDIn - Specifies the view group that this packet controls. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk=true) { GroupID = GroupIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the GroupID value. //! \return the current GroupID. Cigi_uint8 GetGroupID(void) const { return(GroupID); } //+> XOffEn //========================================================= //! Sets the XOffEn with bound checking control //! \param XOffEnIn - Specifies if the X Offset data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetXOffEn(const bool XOffEnIn, bool bndchk=true) { XOffEn = XOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the XOffEn value. //! \return the current XOffEn. bool GetXOffEn(void) const { return(XOffEn); } //+> YOffEn //========================================================= //! Sets the YOffEn with bound checking control //! \param YOffEnIn - Specifies if the Y Offset data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYOffEn(const bool YOffEnIn, bool bndchk=true) { YOffEn = YOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YOffEn value. //! \return the current YOffEn. bool GetYOffEn(void) const { return(YOffEn); } //+> ZOffEn //========================================================= //! Sets the ZOffEn with bound checking control //! \param ZOffEnIn - Specifies if the Z Offset data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetZOffEn(const bool ZOffEnIn, bool bndchk=true) { ZOffEn = ZOffEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ZOffEn value. //! \return the current ZOffEn. bool GetZOffEn(void) const { return(ZOffEn); } //+> RollEn //========================================================= //! Sets the RollEn with bound checking control //! \param RollEnIn - Specifies if the roll data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRollEn(const bool RollEnIn, bool bndchk=true) { RollEn = RollEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RollEn value. //! \return the current RollEn. bool GetRollEn(void) const { return(RollEn); } //+> PitchEn //========================================================= //! Sets the PitchEn with bound checking control //! \param PitchEnIn - Specifies if the pitch data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPitchEn(const bool PitchEnIn, bool bndchk=true) { PitchEn = PitchEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the PitchEn value. //! \return the current PitchEn. bool GetPitchEn(void) const { return(PitchEn); } //+> YawEn //========================================================= //! Sets the YawEn with bound checking control //! \param YawEnIn - Specifies if the yaw data is valid //! and to be used. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetYawEn(const bool YawEnIn, bool bndchk=true) { YawEn = YawEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the YawEn value. //! \return the current YawEn. bool GetYawEn(void) const { return(YawEn); } }; #endif // #if !defined(_CIGI_VIEW_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiViewDefV1.h000066400000000000000000000135771210750432300205400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiViewDefV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the
 *  class in a Windows DLL.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the ViewIDIn parameter type from const unsigned short to const
 *  unsigned char in the SetViewID method.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the return type from unsigned short to unsigned char for the
 *  GetViewID method. Changed the inline implementation of the GetViewID
 *  method to check for a valid view ID before returning a value.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VIEW_DEF_V1_INCLUDED_) #define _CIGI_VIEW_DEF_V1_INCLUDED_ #include "CigiBaseViewDef.h" class CIGI_SPEC CigiViewDefV1 : public CigiBaseViewDef { public: //==> Management //========================================================= //! General Constructor //! CigiViewDefV1(); //========================================================= //! General Destructor //! virtual ~CigiViewDefV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - The View this packet to which this packet is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint8 GetViewID(void) const { if(ViewID < 31) return((Cigi_uint8)ViewID); else return((Cigi_uint8)0x1f); } //+> GroupID //========================================================= //! Sets the GroupID with bound checking control //! \param GroupIDIn - The group in which this view is place. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk=true); //========================================================= //! Gets the GroupID value. //! \return the current GroupID. Cigi_uint8 GetGroupID(void) const { return(GroupID); } //+> TrackerAssigned //========================================================= //! Sets the TrackerAssigned with bound checking control //! \param TrackerAssignedIn - Specifies if there is a tracker //! assigned to this view. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackerAssigned(const bool TrackerAssignedIn, bool bndchk=true) { TrackerAssigned = TrackerAssignedIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the TrackerAssigned value. //! \return the current TrackerAssigned. bool GetTrackerAssigned(void) const { return(TrackerAssigned); } }; #endif // #if !defined(_CIGI_VIEW_DEF_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiViewDefV2.h000066400000000000000000000246231210750432300205330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiViewDefV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the
 *  class in a Windows DLL.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the ViewIDIn parameter type from const unsigned short to const
 *  unsigned short in the SetViewID method.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed the return type from unsigned short to unsigned short for the
 *  GetViewID method. Changed the inline implementation of the GetViewID
 *  method to check for a valid view ID before returning a value.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VIEW_DEF_V2_INCLUDED_) #define _CIGI_VIEW_DEF_V2_INCLUDED_ #include "CigiBaseViewDef.h" class CIGI_SPEC CigiViewDefV2 : public CigiBaseViewDef { public: //==> Management //========================================================= //! General Constructor //! CigiViewDefV2(); //========================================================= //! General Destructor //! virtual ~CigiViewDefV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - The View this packet to which this packet is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk=true); //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint8 GetViewID(void) const { if(ViewID < 31) return((Cigi_uint8)ViewID); else return((Cigi_uint8)0x1f); } //+> GroupID //========================================================= //! Sets the GroupID with bound checking control //! \param GroupIDIn - The group in which this view is place. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk=true); //========================================================= //! Gets the GroupID value. //! \return the current GroupID. Cigi_uint8 GetGroupID(void) const { return(GroupID); } //+> FOVNearEn //========================================================= //! Sets the FOVNearEn with bound checking control //! \param FOVNearEnIn - States the validity of the FOVNear parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVNearEn(const bool FOVNearEnIn, bool bndchk=true) { FOVNearEn = FOVNearEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVNearEn value. //! \return the current FOVNearEn. bool GetFOVNearEn(void) const { return(FOVNearEn); } //+> FOVFarEn //========================================================= //! Sets the FOVFarEn with bound checking control //! \param FOVFarEnIn - States the validity of the FOVFar parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVFarEn(const bool FOVFarEnIn, bool bndchk=true) { FOVFarEn = FOVFarEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVFarEn value. //! \return the current FOVFarEn. bool GetFOVFarEn(void) const { return(FOVFarEn); } //+> FOVLeftEn //========================================================= //! Sets the FOVLeftEn with bound checking control //! \param FOVLeftEnIn - States the validity of the FOVLeftEn parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVLeftEn(const bool FOVLeftEnIn, bool bndchk=true) { FOVLeftEn = FOVLeftEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVLeftEn value. //! \return the current FOVLeftEn. bool GetFOVLeftEn(void) const { return(FOVLeftEn); } //+> FOVRightEn //========================================================= //! Sets the FOVRightEn with bound checking control //! \param FOVRightEnIn - States the validity of the FOVRight parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVRightEn(const bool FOVRightEnIn, bool bndchk=true) { FOVRightEn = FOVRightEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVRightEn value. //! \return the current FOVRightEn. bool GetFOVRightEn(void) const { return(FOVRightEn); } //+> FOVTopEn //========================================================= //! Sets the FOVTopEn with bound checking control //! \param FOVTopEnIn - States the validity of the FOVTop parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVTopEn(const bool FOVTopEnIn, bool bndchk=true) { FOVTopEn = FOVTopEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVTopEn value. //! \return the current FOVTopEn. bool GetFOVTopEn(void) const { return(FOVTopEn); } //+> FOVBottomEn //========================================================= //! Sets the FOVBottomEn with bound checking control //! \param FOVBottomEnIn - States the validity of the FOVBottom parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVBottomEn(const bool FOVBottomEnIn, bool bndchk=true) { FOVBottomEn = FOVBottomEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVBottomEn value. //! \return the current FOVBottomEn. bool GetFOVBottomEn(void) const { return(FOVBottomEn); } //+> TrackerAssigned //========================================================= //! Sets the TrackerAssigned with bound checking control //! \param TrackerAssignedIn - Specifies if there is a tracker //! assigned to this view. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetTrackerAssigned(const bool TrackerAssignedIn, bool bndchk=true) { TrackerAssigned = TrackerAssignedIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the TrackerAssigned value. //! \return the current TrackerAssigned. bool GetTrackerAssigned(void) const { return(TrackerAssigned); } }; #endif // #if !defined(_CIGI_VIEW_DEF_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiViewDefV3.h000066400000000000000000000255371210750432300205410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewDefV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_VIEW_DEF_V3_INCLUDED_) #define _CIGI_VIEW_DEF_V3_INCLUDED_ #include "CigiBaseViewDef.h" class CIGI_SPEC CigiViewDefV3 : public CigiBaseViewDef { public: //==> Management //========================================================= //! General Constructor //! CigiViewDefV3(); //========================================================= //! General Destructor //! virtual ~CigiViewDefV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> ViewID //========================================================= //! Sets the ViewID with bound checking control //! \param ViewIDIn - The View this packet to which this packet is applied. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true) { ViewID = ViewIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the ViewID value. //! \return the current ViewID. Cigi_uint16 GetViewID(void) const { return(ViewID); } //+> GroupID //========================================================= //! Sets the GroupID with bound checking control //! \param GroupIDIn - The group in which this view is place. //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk=true) { GroupID = GroupIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the GroupID value. //! \return the current GroupID. Cigi_uint8 GetGroupID(void) const { return(GroupID); } //+> FOVNearEn //========================================================= //! Sets the FOVNearEn with bound checking control //! \param FOVNearEnIn - States the validity of the FOVNear parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVNearEn(const bool FOVNearEnIn, bool bndchk=true) { FOVNearEn = FOVNearEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVNearEn value. //! \return the current FOVNearEn. bool GetFOVNearEn(void) const { return(FOVNearEn); } //+> FOVFarEn //========================================================= //! Sets the FOVFarEn with bound checking control //! \param FOVFarEnIn - States the validity of the FOVFar parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVFarEn(const bool FOVFarEnIn, bool bndchk=true) { FOVFarEn = FOVFarEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVFarEn value. //! \return the current FOVFarEn. bool GetFOVFarEn(void) const { return(FOVFarEn); } //+> FOVLeftEn //========================================================= //! Sets the FOVLeftEn with bound checking control //! \param FOVLeftEnIn - States the validity of the FOVLeft parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVLeftEn(const bool FOVLeftEnIn, bool bndchk=true) { FOVLeftEn = FOVLeftEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVLeftEn value. //! \return the current FOVLeftEn. bool GetFOVLeftEn(void) const { return(FOVLeftEn); } //+> FOVRightEn //========================================================= //! Sets the FOVRightEn with bound checking control //! \param FOVRightEnIn - States the validity of the FOVRight parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVRightEn(const bool FOVRightEnIn, bool bndchk=true) { FOVRightEn = FOVRightEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVRightEn value. //! \return the current FOVRightEn. bool GetFOVRightEn(void) const { return(FOVRightEn); } //+> FOVTopEn //========================================================= //! Sets the FOVTopEn with bound checking control //! \param FOVTopEnIn - States the validity of the FOVTop parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVTopEn(const bool FOVTopEnIn, bool bndchk=true) { FOVTopEn = FOVTopEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVTopEn value. //! \return the current FOVTopEn. bool GetFOVTopEn(void) const { return(FOVTopEn); } //+> FOVBottomEn //========================================================= //! Sets the FOVBottomEn with bound checking control //! \param FOVBottomEnIn - States the validity of the FOVBottom parameter
//! true - valid data : false - data is not valid //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetFOVBottomEn(const bool FOVBottomEnIn, bool bndchk=true) { FOVBottomEn = FOVBottomEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the FOVBottomEn value. //! \return the current FOVBottomEn. bool GetFOVBottomEn(void) const { return(FOVBottomEn); } //+> ProjectionType //========================================================= //! Sets the ProjectionType with bound checking control //! \param ProjectionTypeIn - The projection type (OpenGL compatible)
//! Perspective=0
//! Orthographic=1
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetProjectionType(const ProjectionTypeGrp ProjectionTypeIn, bool bndchk=true); //========================================================= //! Gets the ProjectionType value. //! \return the current ProjectionType. ProjectionTypeGrp GetProjectionType(void) const { return(ProjectionType); } //+> Reorder //========================================================= //! Sets the Reorder with bound checking control //! \param ReorderIn - Specifies whether the views should be reordered //! false - No Reordering : true - bring to front //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetReorder(const bool ReorderIn, bool bndchk=true) { Reorder = ReorderIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Reorder value. //! \return the current Reorder. bool GetReorder(void) const { return(Reorder); } }; #endif // #if !defined(_CIGI_VIEW_DEF_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiWaveCtrlV3.h000066400000000000000000000065571210750432300207400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWaveCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_WAVE_CTRL_V3_INCLUDED_) #define _CIGI_WAVE_CTRL_V3_INCLUDED_ #include "CigiBaseWaveCtrl.h" class CIGI_SPEC CigiWaveCtrlV3 : public CigiBaseWaveCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiWaveCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiWaveCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_WAVE_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiWeatherCondRespV3.h000066400000000000000000000066611210750432300222420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCondRespV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_WEATHER_COND_RESP_V3_INCLUDED_) #define _CIGI_WEATHER_COND_RESP_V3_INCLUDED_ #include "CigiBaseWeatherCondResp.h" class CIGI_SPEC CigiWeatherCondRespV3 : public CigiBaseWeatherCondResp { public: //==> Management //========================================================= //! General Constructor //! CigiWeatherCondRespV3(); //========================================================= //! General Destructor //! virtual ~CigiWeatherCondRespV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions }; #endif // #if !defined(_CIGI_WEATHER_COND_RESP_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiWeatherCtrlV1.h000066400000000000000000000126151210750432300214230ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_WEATHER_CTRL_V1_INCLUDED_) #define _CIGI_WEATHER_CTRL_V1_INCLUDED_ #include "CigiBaseWeatherCtrl.h" class CIGI_SPEC CigiWeatherCtrlV1 : public CigiBaseWeatherCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiWeatherCtrlV1(); //========================================================= //! General Destructor //! virtual ~CigiWeatherCtrlV1(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 1 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 1 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> PhenomenonType //========================================================= //! Sets the PhenomenonType with bound checking control //! \param PhenomenonTypeIn - What kind of weather is being controlled //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPhenomenonType(const Cigi_uint16 PhenomenonTypeIn, bool bndchk=true); //========================================================= //! Gets the PhenomenonType value. //! \return the current PhenomenonType. Cigi_uint16 GetPhenomenonType(void) const { return(PhenomenonType); } //+> Opacity //========================================================= //! Sets the Opacity with bound checking control //! \param OpacityIn - Visibility through a weather system //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetOpacity(const float OpacityIn, bool bndchk=true); //========================================================= //! Gets the Opacity value. //! \return the current Opacity. float GetOpacity(void) const { return(Opacity); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDir value. //! \return the current WindDir. float GetWindDir(void) const { return(WindDir); } }; #endif // #if !defined(_CIGI_WEATHER_CTRL_V1_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiWeatherCtrlV2.h000066400000000000000000000126161210750432300214250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCtrlV2.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_WEATHER_CTRL_V2_INCLUDED_) #define _CIGI_WEATHER_CTRL_V2_INCLUDED_ #include "CigiBaseWeatherCtrl.h" class CIGI_SPEC CigiWeatherCtrlV2 : public CigiBaseWeatherCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiWeatherCtrlV2(); //========================================================= //! General Destructor //! virtual ~CigiWeatherCtrlV2(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 2 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 2 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> PhenomenonType //========================================================= //! Sets the PhenomenonType with bound checking control //! \param PhenomenonTypeIn - What kind of weather is being controlled //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetPhenomenonType(const Cigi_uint16 PhenomenonTypeIn, bool bndchk=true); //========================================================= //! Gets the PhenomenonType value. //! \return the current PhenomenonType. Cigi_uint16 GetPhenomenonType(void) const { return(PhenomenonType); } //+> Opacity //========================================================= //! Sets the Opacity with bound checking control //! \param OpacityIn - Visibility through a weather system //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetOpacity(const float OpacityIn, bool bndchk=true); //========================================================= //! Gets the Opacity value. //! \return the current Opacity. float GetOpacity(void) const { return(Opacity); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDir value. //! \return the current WindDir. float GetWindDir(void) const { return(WindDir); } }; #endif // #if !defined(_CIGI_WEATHER_CTRL_V2_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/CigiWeatherCtrlV3.h000066400000000000000000000246131210750432300214260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCtrlV3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added the CIGI_SPEC modifier to the class declaration for exporting the 
 *  class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types in function declarations to CCL-defined types.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #if !defined(_CIGI_WEATHER_CTRL_V3_INCLUDED_) #define _CIGI_WEATHER_CTRL_V3_INCLUDED_ #include "CigiBaseWeatherCtrl.h" class CIGI_SPEC CigiWeatherCtrlV3 : public CigiBaseWeatherCtrl { public: //==> Management //========================================================= //! General Constructor //! CigiWeatherCtrlV3(); //========================================================= //! General Destructor //! virtual ~CigiWeatherCtrlV3(); //==> Buffer Packing/Unpacking //========================================================= //! The virtual Pack function for CIGI 3 //! \param Base - A pointer to the instance of the packet //! to be packed. (Downcast to CigiBasePacket) //! \param Buff - A pointer to the current pack point. //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const; //========================================================= //! The virtual Unpack function for CIGI 3 //! \param Buff - A pointer to the current pack point. //! \param Swap - N/A for V1 & V2 //! \param Spec - A pointer to special data - //! This is not used in this class. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h //! virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec); //==> Accessing Member Variable Values functions //+> RegionID //========================================================= //! Sets the RegionID with bound checking control //! \param RegionIDIn - Region ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRegionID(const Cigi_uint16 RegionIDIn, bool bndchk=true) { RegionID = RegionIDIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RegionID value. //! \return the current RegionID. Cigi_uint16 GetRegionID(void) const { return(RegionID); } //+> LayerID //========================================================= //! Sets the LayerID with bound checking control //! \param LayerIDIn - Layer ID //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetLayerID(const Cigi_uint8 LayerIDIn, bool bndchk=true); //========================================================= //! Gets the LayerID value. //! \return the current LayerID. Cigi_uint8 GetLayerID(void) const { return(LayerID); } //+> Humidity //========================================================= //! Sets the Humidity with bound checking control //! \param HumidityIn - The weather area's humidity //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk=true); //========================================================= //! Gets the Humidity value. //! \return the current Humidity. Cigi_uint8 GetHumidity(void) const { return(Humidity); } //+> RandomLightningEn //========================================================= //! Sets the RandomLightningEn with bound checking control //! \param RandomLightningEnIn - Random lightning enable //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetRandomLightningEn(const bool RandomLightningEnIn, bool bndchk=true) { RandomLightningEn = RandomLightningEnIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the RandomLightningEn value. //! \return the current RandomLightningEn. bool GetRandomLightningEn(void) const { return(RandomLightningEn); } //+> CloudType //========================================================= //! Sets the CloudType with bound checking control //! \param CloudTypeIn - Cloud type specification
//! None=0
//! Altocumulus=1
//! Altostratus=2
//! Cirrocumulus=3
//! Cirrostratus=4
//! Cirrus=5
//! Cumulonimbus=6
//! Cumulus=7
//! Nimbostratus=8
//! Stratocumulus=9
//! Stratus=10
//! DefA=11
//! DefB=12
//! DefC=13
//! DefD=14
//! DefE=15
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetCloudType(const CloudTypeGrp CloudTypeIn, bool bndchk=true); //========================================================= //! Gets the CloudType value. //! \return the current CloudType. CloudTypeGrp GetCloudType(void) const { return(CloudType); } //+> Scope //========================================================= //! Sets the Scope with bound checking control //! \param ScopeIn - Weather effects scope
//! Global=0
//! Regional=1
//! Entity=2
//! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetScope(const ScopeGrp ScopeIn, bool bndchk=true); //========================================================= //! Gets the Scope value. //! \return the current Scope. ScopeGrp GetScope(void) const { return(Scope); } //+> VertWindSp //========================================================= //! Sets the VertWindSp with bound checking control //! \param VertWindSpIn - Verticle Wind Speed //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetVertWindSp(const float VertWindSpIn, bool bndchk=true) { VertWindSp = VertWindSpIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the WindDirEl value. //! \return the current WindDirEl. float GetVertWindSp(void) const { return(VertWindSp); } //+> WindDir //========================================================= //! Sets the WindDir with bound checking control //! \param WindDirIn - Wind direction //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetWindDir(const float WindDirIn, bool bndchk=true); //========================================================= //! Gets the WindDirAz value. //! \return the current WindDirAz. float GetWindDir(void) const { return(WindDir); } //+> BaroPress //========================================================= //! Sets the BaroPress with bound checking control //! \param BaroPressIn - Barometric pressure //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetBaroPress(const float BaroPressIn, bool bndchk=true) { BaroPress = BaroPressIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the BaroPress value. //! \return the current BaroPress. float GetBaroPress(void) const { return(BaroPress); } //+> Aeorsol //========================================================= //! Sets the Aerosol with bound checking control //! \param AerosolIn - Aerosol consentration //! \param bndchk - Enables (true) or disables (false) bounds checking. //! //! \return This returns CIGI_SUCCESS or an error code //! defined in CigiErrorCodes.h int SetAerosol(const float AerosolIn, bool bndchk=true) { Aerosol = AerosolIn; return(CIGI_SUCCESS); } //========================================================= //! Gets the Aerosol value. //! \return the current Aerosol. float GetAerosol(void) const { return(Aerosol); } }; #endif // #if !defined(_CIGI_WEATHER_CTRL_V3_INCLUDED_) cigi-ccl-3.3.3a+svn818/include/Makefile.am000066400000000000000000000107061210750432300200560ustar00rootroot00000000000000 # (BTW - if you use include_HEADERS instead of pkginclude_HEADERS, you # will end up with your headers installed in /usr/local/include rather than # /usr/local/include/cigicl) # headers to be installed when 'make install' is run: pkginclude_HEADERS = \ CigiAerosolRespV3.h\ CigiAllPackets.h\ CigiAnimationStopV3.h\ CigiAnimationTable.h\ CigiArtPartCtrlV1.h\ CigiArtPartCtrlV2.h\ CigiArtPartCtrlV3.h\ CigiAtmosCtrl.h\ CigiBaseAerosolResp.h\ CigiBaseAnimationStop.h\ CigiBaseArtPartCtrl.h\ CigiBaseCircleSymbolData.h\ CigiBaseCollDetSegDef.h\ CigiBaseCollDetSegResp.h\ CigiBaseCollDetVolDef.h\ CigiBaseCollDetVolResp.h\ CigiBaseCompCtrl.h\ CigiBaseConfClampEntityCtrl.h\ CigiBaseEarthModelDef.h\ CigiBaseEntityCtrl.h\ CigiBaseEnvCondReq.h\ CigiBaseEnvCtrl.h\ CigiBaseEnvRgnCtrl.h\ CigiBaseEventNotification.h\ CigiBaseEventProcessor.h\ CigiBaseHatHotReq.h\ CigiBaseHatHotResp.h\ CigiBaseIGCtrl.h\ CigiBaseIGMsg.h\ CigiBaseLosResp.h\ CigiBaseLosSegReq.h\ CigiBaseLosVectReq.h\ CigiBaseMaritimeSurfaceCtrl.h\ CigiBaseMaritimeSurfaceResp.h\ CigiBaseMotionTrackCtrl.h\ CigiBasePacket.h\ CigiBasePositionReq.h\ CigiBasePositionResp.h\ CigiBaseRateCtrl.h\ CigiBaseSOF.h\ CigiBaseSensorCtrl.h\ CigiBaseSensorResp.h\ CigiBaseShortArtPartCtrl.h\ CigiBaseShortSymbolCtrl.h\ CigiBaseSignalProcessing.h\ CigiBaseSpecEffDef.h\ CigiBaseSymbolCircleDef.h\ CigiBaseSymbolClone.h\ CigiBaseSymbolCtrl.h\ CigiBaseSymbolLineDef.h\ CigiBaseSymbolSurfaceDef.h\ CigiBaseSymbolTextDef.h\ CigiBaseTerrestrialSurfaceCtrl.h\ CigiBaseTerrestrialSurfaceResp.h\ CigiBaseTrajectoryDef.h\ CigiBaseVariableSizePckt.h\ CigiBaseVertexSymbolData.h\ CigiBaseViewCtrl.h\ CigiBaseViewDef.h\ CigiBaseWaveCtrl.h\ CigiBaseWeatherCondResp.h\ CigiBaseWeatherCtrl.h\ CigiCelestialCtrl.h\ CigiCircleSymbolDataV3_3.h\ CigiCnvtInfoType.h\ CigiCollDetSegDefV1.h\ CigiCollDetSegDefV2.h\ CigiCollDetSegDefV3.h\ CigiCollDetSegRespV1.h\ CigiCollDetSegRespV2.h\ CigiCollDetSegRespV3.h\ CigiCollDetVolDefV2.h\ CigiCollDetVolDefV3.h\ CigiCollDetVolRespV2.h\ CigiCollDetVolRespV3.h\ CigiCompCtrlV1.h\ CigiCompCtrlV2.h\ CigiCompCtrlV3.h\ CigiCompCtrlV3_3.h\ CigiConfClampEntityCtrlV3.h\ CigiDefaultPacket.h\ CigiEarthModelDefV3.h\ CigiEntityCtrlV1.h\ CigiEntityCtrlV2.h\ CigiEntityCtrlV3.h\ CigiEntityCtrlV3_3.h\ CigiEnvCondReqV3.h\ CigiEnvCtrlV1.h\ CigiEnvCtrlV2.h\ CigiEnvRgnCtrlV3.h\ CigiErrorCodes.h\ CigiEventNotificationV3.h\ CigiException.h\ CigiExceptions.h\ CigiHatHotReqV3.h\ CigiHatHotReqV3_2.h\ CigiHatHotRespV3.h\ CigiHatHotRespV3_2.h\ CigiHatHotXRespV3.h\ CigiHatHotXRespV3_2.h\ CigiHatReqV1.h\ CigiHatReqV2.h\ CigiHatRespV1.h\ CigiHatRespV2.h\ CigiHoldEnvCtrl.h\ CigiHostSession.h\ CigiHotReqV2.h\ CigiHotRespV2.h\ CigiIGCtrlV1.h\ CigiIGCtrlV2.h\ CigiIGCtrlV3.h\ CigiIGCtrlV3_2.h\ CigiIGCtrlV3_3.h\ CigiIGMsgV2.h\ CigiIGMsgV3.h\ CigiIGSession.h\ CigiIO.h\ CigiIncomingMsg.h\ CigiLosRespV1.h\ CigiLosRespV2.h\ CigiLosRespV3.h\ CigiLosRespV3_2.h\ CigiLosSegReqV1.h\ CigiLosSegReqV2.h\ CigiLosSegReqV3.h\ CigiLosSegReqV3_2.h\ CigiLosVectReqV1.h\ CigiLosVectReqV2.h\ CigiLosVectReqV3.h\ CigiLosVectReqV3_2.h\ CigiLosXRespV3.h\ CigiLosXRespV3_2.h\ CigiMaritimeSurfaceCtrlV3.h\ CigiMaritimeSurfaceRespV3.h\ CigiMessage.h\ CigiMessageBuffer.h\ CigiMotionTrackCtrlV3.h\ CigiOutgoingMsg.h\ CigiPositionReqV3.h\ CigiPositionRespV3.h\ CigiProcessType.h\ CigiRateCtrlV1.h\ CigiRateCtrlV2.h\ CigiRateCtrlV3.h\ CigiRateCtrlV3_2.h\ CigiSOFV1.h\ CigiSOFV2.h\ CigiSOFV3.h\ CigiSOFV3_2.h\ CigiSensorCtrlV1.h\ CigiSensorCtrlV2.h\ CigiSensorCtrlV3.h\ CigiSensorRespV1.h\ CigiSensorRespV2.h\ CigiSensorRespV3.h\ CigiSensorXRespV3.h\ CigiSession.h\ CigiShortArtPartCtrlV3.h\ CigiShortCompCtrlV3.h\ CigiShortCompCtrlV3_3.h\ CigiShortSymbolCtrlV3_3.h\ CigiSignalType.h\ CigiSpecEffDefV1.h\ CigiSpecEffDefV2.h\ CigiSwapping.h\ CigiSymbolCircleDefV3_3.h\ CigiSymbolCloneV3_3.h\ CigiSymbolCtrlV3_3.h\ CigiSymbolLineDefV3_3.h\ CigiSymbolSurfaceDefV3_3.h\ CigiSymbolTextDefV3_3.h\ CigiTerrestrialSurfaceCtrlV3.h\ CigiTerrestrialSurfaceRespV3.h\ CigiTrajectoryDefV1.h\ CigiTrajectoryDefV2.h\ CigiTrajectoryDefV3.h\ CigiTypes.h\ CigiTypes_Default.h\ CigiTypes_MSVS_Win32.h\ CigiVersionID.h\ CigiVertexSymbolDataV3_3.h\ CigiViewCtrlV1.h\ CigiViewCtrlV2.h\ CigiViewCtrlV3.h\ CigiViewDefV1.h\ CigiViewDefV2.h\ CigiViewDefV3.h\ CigiWaveCtrlV3.h\ CigiWeatherCondRespV3.h\ CigiWeatherCtrlV1.h\ CigiWeatherCtrlV2.h\ CigiWeatherCtrlV3.h cigi-ccl-3.3.3a+svn818/license.html000066400000000000000000000606161210750432300167140ustar00rootroot00000000000000

GNU Lesser General Public License

Version 2.1, February 1999

Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.

This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.

When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.

To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.

For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.

We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.

To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.

Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.

Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.

When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.

We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.

For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.

In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.

Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.

The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".

A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.

The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)

"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) The modified work must itself be a software library.

b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.

c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.

d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.

(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.

In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.

Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.

This option is useful when you wish to copy part of the code of the Library into a program that is not a library.

4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.

If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.

5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.

When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.

If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)

Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.

6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:

a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)

b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.

c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.

d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.

e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.

For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.

7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:

a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.

b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.

8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.

10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.

11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.

14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

cigi-ccl-3.3.3a+svn818/scripting/000077500000000000000000000000001210750432300163755ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/scripting/python/000077500000000000000000000000001210750432300177165ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/scripting/python/build-python.sh000077500000000000000000000015321210750432300226740ustar00rootroot00000000000000 # python-config may be named something else on your distro... PYTHON_CONFIG="python2.5-config" echo Note - you should install the CCL before running this script. This echo script uses pkg-config, which means that the installed version of echo the CCL will be used to generate the wrapper interface. echo echo Using swig to generate wrapper code... swig -c++ -python -DCIGI_SPEC `pkg-config --cflags cigicl` -outdir . -o ./swig_wrap.cxx ../swig.i echo Compiling wrapper code... g++ -I. `${PYTHON_CONFIG} --includes` `pkg-config --cflags cigicl` -fPIC -g -O2 -fPIC -c swig_wrap.cxx echo Linking wrapper code... gcc -shared -o _cigi.so swig_wrap.o `pkg-config --libs cigicl` `${PYTHON_CONFIG} --libs` -L'.' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -ldl -lcrypt -lm -lc cigi-ccl-3.3.3a+svn818/scripting/ruby/000077500000000000000000000000001210750432300173565ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/scripting/ruby/build-ruby.sh000077500000000000000000000014121210750432300217710ustar00rootroot00000000000000echo Note - you should install the CCL before running this script. This echo script uses pkg-config, which means that the installed version of echo the CCL will be used to generate the wrapper interface. echo echo Using swig to generate wrapper code... swig -c++ -ruby -DCIGI_SPEC `pkg-config --cflags cigicl` -outdir . -o ./swig_wrap.cxx ../swig.i echo Compiling wrapper code... g++ -I. -I/usr/local/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i486-linux `pkg-config --cflags cigicl` -fPIC -g -O2 -fPIC -c swig_wrap.cxx echo Linking wrapper code... gcc -shared -o cigi.so swig_wrap.o `pkg-config --libs cigicl` -L'.' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby -ldl -lcrypt -lm -lc cigi-ccl-3.3.3a+svn818/scripting/ruby/cigihost.rb000066400000000000000000000032221210750432300215130ustar00rootroot00000000000000require 'socket' require 'cigi' class CigiHost def self.define_own_accessors(*methods) for method in methods do self.class_eval("def #{method}=(v); @own.Set#{method.to_s.capitalize}(v); end") self.class_eval("def #{method}; @own.Get#{method.to_s.capitalize}; end") end end define_own_accessors :yaw,:pitch,:roll,:alt,:alpha,:xoff,:yoff,:zoff,:lat,:lon def initialize(params) raise ":receiveport not given" unless params.has_key?(:receiveport) raise ":ig_address not given" unless params.has_key?(:ig_address) raise ":ig_port not given" unless params.has_key?(:ig_port) @socket = UDPSocket.new @socket.bind(0,params[:receiveport]) @sendhost = params[:ig_address] @sendport = params[:ig_port] @session = Cigi::CigiHostSession.new @own = Cigi::CigiEntityCtrlV3.new @own.SetEntityID(0) @own.SetEntityType(0) @own.SetEntityState(Cigi::CigiBaseEntityCtrl::Active) self.lat = 35.0 self.lon = -119 self.alt = 0 self.yaw = 0 self.pitch = 0 self.roll = 0 end def yaw=(v) @own.SetYaw(limit(v,0.0,360.0)) end def pitch=(v) @own.SetPitch(limit(v,0.0,360.0)) end def run out = @session.GetOutgoingMsgMgr cigic = Cigi::CigiIGCtrlV3_2.new cigic.SetIGMode(Cigi::CigiBaseIGCtrl::Operate) loop do out.BeginMsg yield self out << cigic out << @own out.LockMsg buf = out.GetBufferString indata = @socket.recv 65536 @socket.send buf,0,@sendhost,@sendport out.UnlockMsg end end protected def limit(v,min,max) v -= max while v >= max v += max while v < min v end end cigi-ccl-3.3.3a+svn818/scripting/ruby/extconf.rb000066400000000000000000000000721210750432300213500ustar00rootroot00000000000000require 'mkmf' dir_config('cigi') create_makefile('cigi') cigi-ccl-3.3.3a+svn818/scripting/ruby/powermate.rb000077500000000000000000000364021210750432300217160ustar00rootroot00000000000000#!/usr/bin/ruby # ########################################################################### # # = PowerMate Interface Library for Linux # # == Description # # Interface Library to the Griffin PowerMate for Linux. # The library includs a (minimalist) generic classes for the Linux Input Event # Interface and convenience methods for Linux's ioctl(2) system call. # Library probably works only on x86 because of values taken directly # from asm/ioctl.h # # (c) Oliver M. Bolzer , 2002 # # == Revision History # # v0.5 (Feb 10, 2002) # - remember LED status so we can set individual values # there is no way to know the previous values, so we set some sane # values (everything off) the first time we write the status register # - set/get various LED status bits ( brightness, pulse_speed, pulse_mode, # pulse_awake?, pulse_asleep? ) # # v0.4 (Feb 7,2002) # - improve documentation for use with RDoc http://rdoc.sourceforge.net/ # # v0.3.1 (Feb 4, 2002) # - detect old product ID of if the HID driver grabs the device # - also usable when only the HID driver is installed, can't change # LED status though # # v0.3 (Feb 3, 2002) # - LED-brightness settable (brightness=) # - record if button currently pressed # # v0.2 (Feb 2, 2002) # - react and decode LED-Status-Change # (PowerMate.on_led_change) # # v0.1 (Feb 1, 2002) # - Initial public release # # ==TODO # - need to detect PM unplug-replug, need to reopen device, # but there is no notification on unplug. Should be polled ? # (rumors say, Linux 2.5.4-preX supports plug events) # - maybe support for "click" and "double-click" # # ==Licence # # (c) Oliver M. Bolzer , 2002 # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the author nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ########################################################################### ## # module for Linux-specific classes, working close to the kernel module Linux ## # Linux ioctl(2) helper functions, values and definitions taken # from , beware of (unlikely) changes. # Probably works only on Linux/x86 module Ioctl ## shift values IOC_NRSHIFT = 0 IOC_TYPESHIFT = 8 IOC_SIZESHIFT = 16 IOC_DIRSHIFT = 30 ## Direction bits. IOC_NONE = 0 IOC_WRITE = 1 IDC_READ = 2 ## # encode an ioctl(2) from the specification commonly found # in Linux *.h files, +array+ is an Array consisting of # [ direction bit, type (String), number, size ] def Ioctl.encode( array ) raise ArgumentError if array.class != Array raise ArgumentError.new( "Array has wrong number of elements, must be 4" ) if array.size != 4 array[0] << IOC_DIRSHIFT | array[1].unpack('C').first << IOC_TYPESHIFT | array[2] << IOC_NRSHIFT | array[3] << IOC_SIZESHIFT; end # Ioctl.encode() end # module Ioctl ## # constants related to Linux's Input Event System, # taken from ; # only partial, will be extended as neccersary module InputConstants include Linux::Ioctl ## The event structure itself Input_event = Struct.new( :time, :type, :code, :value ) EVENT_SIZE = 16 ## Protocol version EV_VERSION = 0x010000 ## Event types EV_RST = 0x00 EV_KEY = 0x01 EV_REL = 0x02 EV_ABS = 0x03 EV_MSC = 0x04 EV_LED = 0x11 EV_SND = 0x12 EV_REP = 0x14 EV_FF = 0x15 EV_MAX = 0x1f ## ioctl's EVIOCGVERSION = Linux::Ioctl.encode([ IDC_READ, 'E', 0x01, 32 ]) EVIOCGNAME = Linux::Ioctl.encode([ IDC_READ, 'E', 0x06, 255 ]) ## Buttons BTN_MISC = 0x100 BTN_0 = 0x100 BTN_1 = 0x101 BTN_2 = 0x102 BTN_3 = 0x103 BTN_4 = 0x104 BTN_5 = 0x105 BTN_6 = 0x106 BTN_7 = 0x107 BTN_8 = 0x108 BTN_9 = 0x109 BTN_MOUSE= 0x110 BTN_LEFT = 0x110 BTN_RIGHT= 0x111 BTN_MIDDLE = 0x112 BTN_SIDE = 0x113 BTN_EXTRA= 0x114 BTN_FORWARD = 0x115 BTN_BACK = 0x116 ## Relative axes REL_X = 0x00 REL_Y = 0x01 REL_Z = 0x02 REL_HWHEEL = 0x06 REL_DIAL = 0x07 REL_WHEEL = 0x08 REL_MISC = 0x09 REL_MAX = 0x0f ## Misc. events MSC_SERIAL = 0x00 MSC_PULSELED = 0x01 MSC_MAX = 0x07 end # module InputConstants ## # class to handle Linux's Input Event Interface # (see linux/input.h), # currently a minimal implementation for the PowerMate class Input include Linux::Ioctl # various values and routines for ioctl(2) include Linux::InputConstants # constants from linux/input.h ## # open an Input Event Device def initialize( device ) @device = nil begin @device = File.open( device, File::Constants::RDONLY ) @writable = true end @devnode = device end # initialize() # path of device special file attr_reader :devnode ## does the permission on the device allow us to write? def writable? @writable end ## # device name as reported by EVIOCGNAME def dev_name if !@name then @name = "\0" * 255 # allocate string, 255 should be enough @device.ioctl( EVIOCGNAME, @name ) # retrieve device name @name.gsub!(/\0.*/, '') # strip extra NULLs end return @name end # dev_name() ## # iterator over each event being reported by the device # yields event of struct Linux::InputConstants::Input_event def each_event( &block ) while data = @device.read( EVENT_SIZE ) do rawevent = data.unpack( "l!l!s!s!i") # tv_sec, tv_nsec, type, code, value event = Input_event.new rawevent[0] += 1 if rawevent[0] = 0 # sometimes time is not set event.time = Time.at( rawevent[0], rawevent[1]) event.type = rawevent[2] event.code = rawevent[3] event.value = rawevent[4] yield event end end # each_event() ## # write an event into the device, some device use this to set their status def write_event( event ) raise TypeError if event.class != Input_event ## encode Input_event into "struct input_event" struct_input_event = [0, 0,event.type, event.code, event.value].pack("l!l!s!s!i!") begin File.open(self.devnode, "w+"){|f| f.write(struct_input_event) } rescue Errno::EACCES @writable = false ## can't seem to write, remember that end end # write_event() end # class Input end # module Linux ## # Interface to the Griffin PowerMate, a stainless steel dial like the # volume regulator on a stereo class PowerMate < Linux::Input ## # status of the LED # brightness: LED-brightness (0-255) # speed: pulse-speed (0-510) # mode: pule-style (0,1,2) # sleep: pulse while host is off # awake: pulse while host is on LedStatus = Struct.new( :brightness, :speed, :mode, :pulse_asleep, :pulse_awake) ## # find and open the first PowerMate in the system, # tries /dev/input/event0*, raises RuntimeError if no # readable PowerMate is found (check those permissions, if it doesn't work!) def initialize Dir.foreach( '/dev/input/' ){|file| next unless file =~ /^event\d+/ # only look at event* begin super( '/dev/input/' + file ) case self.dev_name when "Griffin PowerMate" # normal ID break when "Griffin Technology, Inc. Griffin PowerMate" # grabed by HID? break when "Griffin SoundKnob" # old ID break end rescue Errno::EACCES, Errno::ENODEV next end } ## could not find one raise RuntimeError.new("No PowerMate found in system") if !@device ## initialize instance variables @btn_pressed = false ## initialize LED Status flags @status = LedStatus.new @status.brightness = 0 @status.speed = 0 @status.mode = 0 @status.pulse_asleep = false @status.pulse_awake = false end # initialize ## # Button status def button_pressed? @btn_pressed end ## # register button-press event-handler def on_button_press( &block ) @btn_press_handler = block end ## # register button-released event-handler def on_button_release( &block ) @btn_release_handler = block end ## # register dial event-handler def on_rotate( &block ) @rotate_handler = block end ## # register LED status-change event-handler # block gets a LedStatus Struct as argument def on_led_change( &block ) @led_handler = block end ## # iterator over all events, dispatches to event specific hanlders before # handling &block def each_event( &block ) super{|event| case event.type ## key pressed when EV_KEY if event.code == BTN_0 or event.code == BTN_MOUSE then if event.value == 1 and @btn_press_handler then @btn_pressed = true @btn_press_handler.call( event ) elsif @btn_release_handler @btn_pressed = false @btn_release_handler.call(event ) end end ## dial rotated when EV_REL if event.code == REL_DIAL or event.code == REL_X then @rotate_handler.call( event ) if @rotate_handler end ## LED status change when EV_MSC ## decode status flag # bits 0- 7: 8 bits: LED brightness # bits 8-16: 9 bits: pulsing speed modifier # bits 17-18: 2 bits: pulse table # bit 19: 1 bit : pulse whilst asleep? # bit 20: 1 bit : pulse constantly? @status.brightness = event.value & 0xff @status.speed = (event.value >> 8) & 0x1FF @status.mode = (event.value >> 17) & 0x3 @status.pulse_asleep = (event.value >> 19) & 0x1 if @status.pulse_asleep == 1 then @status.pulse_asleep = true else @status.pulse_asleep = false end @status.pulse_awake = (event.value >> 20) & 0x1 if @status.pulse_awake == 1 then @status.pulse_awake = true else @status.pulse_awake = false end @led_handler.call( @status ) if @led_handler end # when ## handle generic event handler block.call( event ) if block } end # each_event ## # last known LED brightness def brightness @status.brightness end # brightness() ## # set LED brightness def brightness=( value ) value = 0 if value < 0 value = 255 if value > 255 @status.brightness = value set_status( @status ) end # brightness=() ## # last known pulse speed def pulse_speed @status.speed end # pulse_speed() ## # set pulse speed 0-510, only values close to 255 make much sense def pulse_speed=( value ) value = 0 if value < 0 value = 510 if value > 510 @status.speed = value set_status( @status ) end # pulse_speed=() ## # set pulse mode (0,1 or 2) def pulse_mode=( value ) value = 0 if value < 0 value = 2 if value > 0 @status.mode = value set_status( @status ) end #pulse_mode=() ## # last known pulse mode def pulse_mode @status.mode end # pulse_mode() ## # set pulse status when the host is running def pulse_awake=( value ) @status.pulse_awake = value set_status( @status ) end # pulse_awake=() ## # pulse when host is running? (last known status) def pulse_awake? @status.pulse_awake end # pulse_awake?() ## # set pulse status when the host is not running def pulse_asleep=( value ) @status.pulse_asleep = value set_status( @status ) end # pulse_asleep=() ## # pulse when host is not runnging? (last knwon status) def pulse_asleep? @status.pulse_asleep end # pulse_asleep?() ## # write LED status to device def set_status( status ) event = Input_event.new event.type = EV_MSC event.code = MSC_PULSELED if status.pulse_asleep then asleep = 1 else asleep = 0 end if status.pulse_awake then awake = 1 else awake = 0 end ## encode status bits event.value = status.brightness | (status.speed << 8 ) | (status.mode << 17) event.value = event.value | ( asleep << 19 ) | (awake << 20 ) self.write_event( event ) if self.writable? end private :set_status end # class PowerMate #### only execute if called directly #### if $0 == __FILE__ then ## # API demo, reportin envents coming from the PowerMate ## find and open the PowerMate pmate = nil begin pmate = PowerMate.new rescue RuntimeError => e $stderr << "Error: " + e.to_s + "\n" exit end ## found it $stdout << "PowerMate found on #{pmate.devnode}\n" ## register event handler for button press, switch off LED pmate.on_button_press{ print "Button pressed\n" pmate.brightness = 0 } ## register event handler for button release, turn on LED pmate.on_button_release{ print "Button released\n" pmate.brightness = 255 } ## register event handler for button rotation pmate.on_rotate{|event| print "Button has been rotated #{event.value} units\n" } ## register event handler for LED status change pmate.on_led_change{|status| printf "new LED status: brightness: %i, speed: %i, mode: %i, pulse_asleep?: %s, pulse_awake? %s\n", status.brightness, status.speed, status.mode, status.pulse_asleep, status.pulse_awake } ## handle events endlessly begin Thread.new{ pmate.each_event{} }.join rescue Interrupt exit(0) end end # if $0 = __FILE__ cigi-ccl-3.3.3a+svn818/scripting/ruby/test.rb000066400000000000000000000016231210750432300206640ustar00rootroot00000000000000require 'socket' require 'cigi' require 'powermate' socket = UDPSocket.new socket.bind(0,9000) session = Cigi::CigiHostSession.new #session.SetCigiVersion(3,3) out = session.GetOutgoingMsgMgr cigic = Cigi::CigiIGCtrlV3_2.new cigic.SetIGMode(Cigi::CigiBaseIGCtrl::Operate) own = Cigi::CigiEntityCtrlV3.new own.SetEntityID(0) own.SetEntityType(0) own.SetEntityState(Cigi::CigiBaseEntityCtrl::Active) own.SetLat(35.5) own.SetLon(-119) own.SetAlt(1000) own.SetYaw(0) own.SetPitch(0) own.SetRoll(0) @yaw = 0 pmate = PowerMate.new pmate.on_rotate do |event| @yaw += event.value @yaw -= 360.0 while @yaw >= 360.0 @yaw += 360.0 while @yaw < 0 end Thread.new { pmate.each_event{} } loop do out.BeginMsg out << cigic own.SetYaw(@yaw) puts "yaw is #{@yaw}" out << own out.LockMsg buf = out.GetBuffer indata = socket.recv 65536 socket.send buf,0,"127.0.0.1",8000 out.UnlockMsg end cigi-ccl-3.3.3a+svn818/scripting/ruby/test2.rb000066400000000000000000000006371210750432300207520ustar00rootroot00000000000000require 'cigihost' require 'powermate' host = CigiHost.new(:receiveport => 8005, :ig_address => '127.0.0.1', :ig_port => 8000) if false pmate = PowerMate.new pmate.on_rotate do |event| host.yaw += event.value end Thread.new { pmate.each_event{} } end 25 direction = 1 host.roll = -90 yaw = 0 host.run do yaw += 0.01 * direction host.yaw = yaw direction *= -1 if yaw > 25.0 or yaw < -25.0 end cigi-ccl-3.3.3a+svn818/scripting/swig.i000066400000000000000000000267341210750432300175340ustar00rootroot00000000000000%module cigi %include "std_vector.i" %include "std_string.i" %{ #include "CigiAerosolRespV3.h" #include "CigiAnimationStopV3.h" #include "CigiAnimationTable.h" #include "CigiArtPartCtrlV1.h" #include "CigiArtPartCtrlV2.h" #include "CigiArtPartCtrlV3.h" #include "CigiAtmosCtrl.h" #include "CigiBaseAerosolResp.h" #include "CigiBaseAnimationStop.h" #include "CigiBaseArtPartCtrl.h" #include "CigiBaseCircleSymbolData.h" #include "CigiBaseCollDetSegDef.h" #include "CigiBaseCollDetSegResp.h" #include "CigiBaseCollDetVolDef.h" #include "CigiBaseCollDetVolResp.h" #include "CigiBaseCompCtrl.h" #include "CigiBaseConfClampEntityCtrl.h" #include "CigiBaseEarthModelDef.h" #include "CigiBaseEntityCtrl.h" #include "CigiBaseEnvCondReq.h" #include "CigiBaseEnvCtrl.h" #include "CigiBaseEnvRgnCtrl.h" #include "CigiBaseEventNotification.h" #include "CigiBaseEventProcessor.h" #include "CigiBaseHatHotReq.h" #include "CigiBaseHatHotResp.h" #include "CigiBaseIGCtrl.h" #include "CigiBaseIGMsg.h" #include "CigiBaseLosResp.h" #include "CigiBaseLosSegReq.h" #include "CigiBaseLosVectReq.h" #include "CigiBaseMaritimeSurfaceCtrl.h" #include "CigiBaseMaritimeSurfaceResp.h" #include "CigiBaseMotionTrackCtrl.h" #include "CigiBasePacket.h" #include "CigiBasePositionReq.h" #include "CigiBasePositionResp.h" #include "CigiBaseRateCtrl.h" #include "CigiBaseSOF.h" #include "CigiBaseSensorCtrl.h" #include "CigiBaseSensorResp.h" #include "CigiBaseShortArtPartCtrl.h" #include "CigiBaseShortSymbolCtrl.h" #include "CigiBaseSignalProcessing.h" #include "CigiBaseSpecEffDef.h" #include "CigiBaseSymbolCircleDef.h" #include "CigiBaseSymbolClone.h" #include "CigiBaseSymbolCtrl.h" #include "CigiBaseSymbolLineDef.h" #include "CigiBaseSymbolSurfaceDef.h" #include "CigiBaseSymbolTextDef.h" #include "CigiBaseTerrestrialSurfaceCtrl.h" #include "CigiBaseTerrestrialSurfaceResp.h" #include "CigiBaseTrajectoryDef.h" #include "CigiBaseVariableSizePckt.h" #include "CigiBaseVertexSymbolData.h" #include "CigiBaseViewCtrl.h" #include "CigiBaseViewDef.h" #include "CigiBaseWaveCtrl.h" #include "CigiBaseWeatherCondResp.h" #include "CigiBaseWeatherCtrl.h" #include "CigiCelestialCtrl.h" #include "CigiCircleSymbolDataV3_3.h" #include "CigiCnvtInfoType.h" #include "CigiCollDetSegDefV1.h" #include "CigiCollDetSegDefV2.h" #include "CigiCollDetSegDefV3.h" #include "CigiCollDetSegRespV1.h" #include "CigiCollDetSegRespV2.h" #include "CigiCollDetSegRespV3.h" #include "CigiCollDetVolDefV2.h" #include "CigiCollDetVolDefV3.h" #include "CigiCollDetVolRespV2.h" #include "CigiCollDetVolRespV3.h" #include "CigiCompCtrlV1.h" #include "CigiCompCtrlV2.h" #include "CigiCompCtrlV3.h" #include "CigiCompCtrlV3_3.h" #include "CigiConfClampEntityCtrlV3.h" #include "CigiDefaultPacket.h" #include "CigiEarthModelDefV3.h" #include "CigiEntityCtrlV1.h" #include "CigiEntityCtrlV2.h" #include "CigiEntityCtrlV3.h" #include "CigiEntityCtrlV3_3.h" #include "CigiEnvCondReqV3.h" #include "CigiEnvCtrlV1.h" #include "CigiEnvCtrlV2.h" #include "CigiEnvRgnCtrlV3.h" #include "CigiErrorCodes.h" #include "CigiEventNotificationV3.h" #include "CigiException.h" #include "CigiExceptions.h" #include "CigiHatHotReqV3.h" #include "CigiHatHotReqV3_2.h" #include "CigiHatHotRespV3.h" #include "CigiHatHotRespV3_2.h" #include "CigiHatHotXRespV3.h" #include "CigiHatHotXRespV3_2.h" #include "CigiHatReqV1.h" #include "CigiHatReqV2.h" #include "CigiHatRespV1.h" #include "CigiHatRespV2.h" #include "CigiHoldEnvCtrl.h" #include "CigiHostSession.h" #include "CigiHotReqV2.h" #include "CigiHotRespV2.h" #include "CigiIGCtrlV1.h" #include "CigiIGCtrlV2.h" #include "CigiIGCtrlV3.h" #include "CigiIGCtrlV3_2.h" #include "CigiIGCtrlV3_3.h" #include "CigiIGMsgV2.h" #include "CigiIGMsgV3.h" #include "CigiIGSession.h" #include "CigiIO.h" #include "CigiIncomingMsg.h" #include "CigiLosRespV1.h" #include "CigiLosRespV2.h" #include "CigiLosRespV3.h" #include "CigiLosRespV3_2.h" #include "CigiLosSegReqV1.h" #include "CigiLosSegReqV2.h" #include "CigiLosSegReqV3.h" #include "CigiLosSegReqV3_2.h" #include "CigiLosVectReqV1.h" #include "CigiLosVectReqV2.h" #include "CigiLosVectReqV3.h" #include "CigiLosVectReqV3_2.h" #include "CigiLosXRespV3.h" #include "CigiLosXRespV3_2.h" #include "CigiMaritimeSurfaceCtrlV3.h" #include "CigiMaritimeSurfaceRespV3.h" #include "CigiMessage.h" #include "CigiMessageBuffer.h" #include "CigiMotionTrackCtrlV3.h" #include "CigiOutgoingMsg.h" #include "CigiPositionReqV3.h" #include "CigiPositionRespV3.h" #include "CigiProcessType.h" #include "CigiRateCtrlV1.h" #include "CigiRateCtrlV2.h" #include "CigiRateCtrlV3.h" #include "CigiRateCtrlV3_2.h" #include "CigiSOFV1.h" #include "CigiSOFV2.h" #include "CigiSOFV3.h" #include "CigiSOFV3_2.h" #include "CigiSensorCtrlV1.h" #include "CigiSensorCtrlV2.h" #include "CigiSensorCtrlV3.h" #include "CigiSensorRespV1.h" #include "CigiSensorRespV2.h" #include "CigiSensorRespV3.h" #include "CigiSensorXRespV3.h" #include "CigiSession.h" #include "CigiShortArtPartCtrlV3.h" #include "CigiShortCompCtrlV3.h" #include "CigiShortCompCtrlV3_3.h" #include "CigiShortSymbolCtrlV3_3.h" #include "CigiSignalType.h" #include "CigiSpecEffDefV1.h" #include "CigiSpecEffDefV2.h" #include "CigiSwapping.h" #include "CigiSymbolCircleDefV3_3.h" #include "CigiSymbolCloneV3_3.h" #include "CigiSymbolCtrlV3_3.h" #include "CigiSymbolLineDefV3_3.h" #include "CigiSymbolSurfaceDefV3_3.h" #include "CigiSymbolTextDefV3_3.h" #include "CigiTerrestrialSurfaceCtrlV3.h" #include "CigiTerrestrialSurfaceRespV3.h" #include "CigiTrajectoryDefV1.h" #include "CigiTrajectoryDefV2.h" #include "CigiTrajectoryDefV3.h" #include "CigiTypes.h" #include "CigiVersionID.h" #include "CigiVertexSymbolDataV3_3.h" #include "CigiViewCtrlV1.h" #include "CigiViewCtrlV2.h" #include "CigiViewCtrlV3.h" #include "CigiViewDefV1.h" #include "CigiViewDefV2.h" #include "CigiViewDefV3.h" #include "CigiWaveCtrlV3.h" #include "CigiWeatherCondRespV3.h" #include "CigiWeatherCtrlV1.h" #include "CigiWeatherCtrlV2.h" #include "CigiWeatherCtrlV3.h" %} // "None" is a reserved word in Python; the following will // rename uses of None in the CCL... %rename(NoCloud) CigiBaseWeatherCtrl::None; %rename(NoDatum) CigiBaseShortSymbolCtrl::None; %include CigiBasePacket.h %include CigiBaseVariableSizePckt.h %include CigiSession.h %include CigiMessage.h %include CigiBaseAerosolResp.h %include CigiBaseAnimationStop.h %include CigiBaseArtPartCtrl.h %include CigiBaseCircleSymbolData.h %include CigiBaseCollDetSegDef.h %include CigiBaseCollDetSegResp.h %include CigiBaseCollDetVolDef.h %include CigiBaseCollDetVolResp.h %include CigiBaseCompCtrl.h %include CigiBaseConfClampEntityCtrl.h %include CigiBaseEarthModelDef.h %include CigiBaseEntityCtrl.h %include CigiBaseEnvCondReq.h %include CigiBaseEnvCtrl.h %include CigiBaseEnvRgnCtrl.h %include CigiBaseEventNotification.h %include CigiBaseEventProcessor.h %include CigiBaseHatHotReq.h %include CigiBaseHatHotResp.h %include CigiBaseIGCtrl.h %include CigiBaseIGMsg.h %include CigiBaseLosResp.h %include CigiBaseLosSegReq.h %include CigiBaseLosVectReq.h %include CigiBaseMaritimeSurfaceCtrl.h %include CigiBaseMaritimeSurfaceResp.h %include CigiBaseMotionTrackCtrl.h %include CigiBasePositionReq.h %include CigiBasePositionResp.h %include CigiBaseRateCtrl.h %include CigiBaseSOF.h %include CigiBaseSensorCtrl.h %include CigiBaseSensorResp.h %include CigiBaseShortArtPartCtrl.h %include CigiBaseShortSymbolCtrl.h %include CigiBaseSignalProcessing.h %include CigiBaseSpecEffDef.h %include CigiBaseSymbolCircleDef.h %include CigiBaseSymbolClone.h %include CigiBaseSymbolCtrl.h %include CigiBaseSymbolLineDef.h %include CigiBaseSymbolSurfaceDef.h %include CigiBaseSymbolTextDef.h %include CigiBaseTerrestrialSurfaceCtrl.h %include CigiBaseTerrestrialSurfaceResp.h %include CigiBaseTrajectoryDef.h %include CigiBaseVertexSymbolData.h %include CigiBaseViewCtrl.h %include CigiBaseViewDef.h %include CigiBaseWaveCtrl.h %include CigiBaseWeatherCondResp.h %include CigiBaseWeatherCtrl.h %include CigiAerosolRespV3.h %include CigiAnimationStopV3.h %include CigiAnimationTable.h %include CigiArtPartCtrlV1.h %include CigiArtPartCtrlV2.h %include CigiArtPartCtrlV3.h %include CigiAtmosCtrl.h %include CigiCelestialCtrl.h %include CigiCircleSymbolDataV3_3.h %include CigiCnvtInfoType.h %include CigiCollDetSegDefV1.h %include CigiCollDetSegDefV2.h %include CigiCollDetSegDefV3.h %include CigiCollDetSegRespV1.h %include CigiCollDetSegRespV2.h %include CigiCollDetSegRespV3.h %include CigiCollDetVolDefV2.h %include CigiCollDetVolDefV3.h %include CigiCollDetVolRespV2.h %include CigiCollDetVolRespV3.h %include CigiCompCtrlV1.h %include CigiCompCtrlV2.h %include CigiCompCtrlV3.h %include CigiCompCtrlV3_3.h %include CigiConfClampEntityCtrlV3.h %include CigiDefaultPacket.h %include CigiEarthModelDefV3.h %include CigiEntityCtrlV1.h %include CigiEntityCtrlV2.h %include CigiEntityCtrlV3.h %include CigiEntityCtrlV3_3.h %include CigiEnvCondReqV3.h %include CigiEnvCtrlV1.h %include CigiEnvCtrlV2.h %include CigiEnvRgnCtrlV3.h %include CigiErrorCodes.h %include CigiEventNotificationV3.h %include CigiException.h %include CigiExceptions.h %include CigiHatHotReqV3.h %include CigiHatHotReqV3_2.h %include CigiHatHotRespV3.h %include CigiHatHotRespV3_2.h %include CigiHatHotXRespV3.h %include CigiHatHotXRespV3_2.h %include CigiHatReqV1.h %include CigiHatReqV2.h %include CigiHatRespV1.h %include CigiHatRespV2.h %include CigiHoldEnvCtrl.h %include CigiHostSession.h %include CigiHotReqV2.h %include CigiHotRespV2.h %include CigiIGCtrlV1.h %include CigiIGCtrlV2.h %include CigiIGCtrlV3.h %include CigiIGCtrlV3_2.h %include CigiIGCtrlV3_3.h %include CigiIGMsgV2.h %include CigiIGMsgV3.h %include CigiIGSession.h %include CigiIO.h %include CigiIncomingMsg.h %include CigiLosRespV1.h %include CigiLosRespV2.h %include CigiLosRespV3.h %include CigiLosRespV3_2.h %include CigiLosSegReqV1.h %include CigiLosSegReqV2.h %include CigiLosSegReqV3.h %include CigiLosSegReqV3_2.h %include CigiLosVectReqV1.h %include CigiLosVectReqV2.h %include CigiLosVectReqV3.h %include CigiLosVectReqV3_2.h %include CigiLosXRespV3.h %include CigiLosXRespV3_2.h %include CigiMaritimeSurfaceCtrlV3.h %include CigiMaritimeSurfaceRespV3.h %include CigiMessageBuffer.h %include CigiMotionTrackCtrlV3.h %include CigiOutgoingMsg.h %include CigiPositionReqV3.h %include CigiPositionRespV3.h %include CigiProcessType.h %include CigiRateCtrlV1.h %include CigiRateCtrlV2.h %include CigiRateCtrlV3.h %include CigiRateCtrlV3_2.h %include CigiSOFV1.h %include CigiSOFV2.h %include CigiSOFV3.h %include CigiSOFV3_2.h %include CigiSensorCtrlV1.h %include CigiSensorCtrlV2.h %include CigiSensorCtrlV3.h %include CigiSensorRespV1.h %include CigiSensorRespV2.h %include CigiSensorRespV3.h %include CigiSensorXRespV3.h %include CigiShortArtPartCtrlV3.h %include CigiShortCompCtrlV3.h %include CigiShortCompCtrlV3_3.h %include CigiShortSymbolCtrlV3_3.h %include CigiSignalType.h %include CigiSpecEffDefV1.h %include CigiSpecEffDefV2.h %include CigiSwapping.h %include CigiSymbolCircleDefV3_3.h %include CigiSymbolCloneV3_3.h %include CigiSymbolCtrlV3_3.h %include CigiSymbolLineDefV3_3.h %include CigiSymbolSurfaceDefV3_3.h %include CigiSymbolTextDefV3_3.h %include CigiTerrestrialSurfaceCtrlV3.h %include CigiTerrestrialSurfaceRespV3.h %include CigiTrajectoryDefV1.h %include CigiTrajectoryDefV2.h %include CigiTrajectoryDefV3.h %include CigiTypes.h %include CigiVersionID.h %include CigiVertexSymbolDataV3_3.h %include CigiViewCtrlV1.h %include CigiViewCtrlV2.h %include CigiViewCtrlV3.h %include CigiViewDefV1.h %include CigiViewDefV2.h %include CigiViewDefV3.h %include CigiWaveCtrlV3.h %include CigiWeatherCondRespV3.h %include CigiWeatherCtrlV1.h %include CigiWeatherCtrlV2.h %include CigiWeatherCtrlV3.h cigi-ccl-3.3.3a+svn818/source/000077500000000000000000000000001210750432300156735ustar00rootroot00000000000000cigi-ccl-3.3.3a+svn818/source/CigiAerosolRespV3.cpp000066400000000000000000000077001210750432300216460ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAerosolRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiAerosolRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiAerosolRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAerosolRespV3::CigiAerosolRespV3() { PacketID = CIGI_AEROSOL_RESP_PACKET_ID_V3; PacketSize = CIGI_AEROSOL_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; RequestID = 0; LayerID = 0; AerosolConcentration = 0.0; } // ================================================ // ~CigiAerosolRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAerosolRespV3::~CigiAerosolRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAerosolRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseAerosolResp * Data = ( CigiBaseAerosolResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->RequestID; *CDta.c++ = Data->LayerID; *CDta.f++ = Data->AerosolConcentration; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAerosolRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size RequestID = *CDta.c++; LayerID = *CDta.c++; if(!Swap) AerosolConcentration = *CDta.f++; else CigiSwap4(&AerosolConcentration, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiAnimationStopV3.cpp000066400000000000000000000074521210750432300222010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAnimationStopV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiAnimationStopV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiAnimationStopV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAnimationStopV3::CigiAnimationStopV3() { PacketID = CIGI_ANIMATION_STOP_PACKET_ID_V3; PacketSize = CIGI_ANIMATION_STOP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; } // ================================================ // ~CigiAnimationStopV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAnimationStopV3::~CigiAnimationStopV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAnimationStopV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseAnimationStop * Data = ( CigiBaseAnimationStop *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAnimationStopV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) EntityID = *CDta.s++; else CigiSwap2(&EntityID, CDta.s++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiAnimationTable.cpp000066400000000000000000000066001210750432300220640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAnimationTable.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiAnimationTable.h" #include "CigiErrorCodes.h" #include // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiAnimationTable // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAnimationTable::CigiAnimationTable() { memset(AnimationTable,0,16384); } // ================================================ // ~CigiAnimationTable // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAnimationTable::~CigiAnimationTable() { } // ==================================================================== // Accessors // ==================================================================== // ================================================ // GetPastAnimation // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiAnimationTable::GetPastAnimation(const Cigi_uint16 EntityID) { int ndx; int shift; shift = EntityID & 0x3; ndx = EntityID >> 2; return((Cigi_uint32)(AnimationTable[ndx] >> shift) & 0x03); } // ================================================ // SetPastAnimation // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAnimationTable::SetPastAnimation(const Cigi_uint16 EntityID, const Cigi_uint32 State) { int ndx; int shift; Cigi_uint8 mask; shift = EntityID & 0x3; ndx = EntityID >> 2; mask = 0x03 << shift; AnimationTable[ndx] = (AnimationTable[ndx] & (~mask)) | ((Cigi_uint8)(State & 0x03) << shift); return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiArtPartCtrlV1.cpp000066400000000000000000000171361210750432300216140ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiArtPartCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiArtPartCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiArtPartCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiArtPartCtrlV1::CigiArtPartCtrlV1() { PacketID = CIGI_ART_PART_CTRL_PACKET_ID_V1; PacketSize = CIGI_ART_PART_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ArtPartEn = false; XOffEn = false; YOffEn = false; ZOffEn = false; RollEn = false; PitchEn = false; YawEn = false; XOff = 0.0; YOff = 0.0; ZOff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiArtPartCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiArtPartCtrlV1::~CigiArtPartCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_int16 tsCnvt; Cigi_int32 tlCnvt; double tdCnvt; union Conversion_short { Cigi_uint16 u; Cigi_int16 s; } tuCnvt; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseArtPartCtrl * Data = ( CigiBaseArtPartCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); *CDta.c++ = Data->ArtPartIDV1; Cigi_uint8 HDta = 0; if(Data->ArtPartEn) HDta = 0x80; if(Data->XOffEn) HDta |= 0x40; if(Data->YOffEn) HDta |= 0x20; if(Data->ZOffEn) HDta |= 0x10; if(Data->RollEn) HDta |= 0x08; if(Data->PitchEn) HDta |= 0x04; if(Data->YawEn) HDta |= 0x02; *CDta.c++ = HDta; *CDta.s++ = 0; // b6 & degrees tsCnvt = CIGI_FLOAT_TO_B6((double)Data->XOff); CIGI_SCOPY2(CDta.s++, &tsCnvt); tsCnvt = CIGI_FLOAT_TO_B6((double)Data->YOff); CIGI_SCOPY2(CDta.s++, &tsCnvt); tsCnvt = CIGI_FLOAT_TO_B6((double)Data->ZOff); CIGI_SCOPY2(CDta.s++, &tsCnvt); tdCnvt = (double)Data->Roll; if(tdCnvt < 0.0) tdCnvt += 360.0; tlCnvt = CIGI_FLOAT_TO_BA(tdCnvt); if((tlCnvt > 65535)||(tlCnvt < 0)) tsCnvt = 0; else { tuCnvt.u = (Cigi_uint16)tlCnvt; tsCnvt = tuCnvt.s; } CIGI_SCOPY2(CDta.s++, &tsCnvt); tdCnvt = (double)Data->Pitch; if(tdCnvt < 0.0) tdCnvt += 360.0; tlCnvt = CIGI_FLOAT_TO_BA(tdCnvt); if((tlCnvt > 65535)||(tlCnvt < 0)) tsCnvt = 0; else { tuCnvt.u = (Cigi_uint16)tlCnvt; tsCnvt = tuCnvt.s; } CIGI_SCOPY2(CDta.s++, &tsCnvt); tlCnvt = CIGI_FLOAT_TO_BA((double)Data->Yaw); if((tlCnvt > 65535)||(tlCnvt < 0)) tsCnvt = 0; else { tuCnvt.u = (Cigi_uint16)tlCnvt; tsCnvt = tuCnvt.s; } CIGI_SCOPY2(CDta.s++, &tsCnvt); memcpy(Buff,tBuf,CIGI_ART_PART_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; double DBuf[6]; Cigi_int16 tsCnvt; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_ART_PART_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); ArtPartIDV1 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ArtPartEn = ((HDta & 0x80) != 0); XOffEn = ((HDta & 0x40) != 0); ZOffEn = ((HDta & 0x10) != 0); YOffEn = ((HDta & 0x20) != 0); RollEn = ((HDta & 0x08) != 0); PitchEn = ((HDta & 0x04) != 0); YawEn = ((HDta & 0x02) != 0); CDta.s++; // b6 & degrees CIGI_SCOPY2(&tsCnvt, CDta.s++); XOff = (float)CIGI_B6_TO_FLOAT(tsCnvt); CIGI_SCOPY2(&tsCnvt, CDta.s++); YOff = (float)CIGI_B6_TO_FLOAT(tsCnvt); CIGI_SCOPY2(&tsCnvt, CDta.s++); ZOff = (float)CIGI_B6_TO_FLOAT(tsCnvt); CIGI_SCOPY2(&tsCnvt, CDta.s++); Roll = (float)CIGI_BA_TO_FLOAT(tsCnvt); if(Roll > 180.0) Roll -= 360.0; CIGI_SCOPY2(&tsCnvt, CDta.s++); Pitch = (float)CIGI_BA_TO_FLOAT(tsCnvt); if(Pitch > 180.0) Pitch -= 360.0; CIGI_SCOPY2(&tsCnvt, CDta.s++); Yaw = (float)CIGI_BA_TO_FLOAT(tsCnvt); ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV1::SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV1 = ArtPartIDIn; ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiArtPartCtrlV2.cpp000066400000000000000000000143561210750432300216160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiArtPartCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiArtPartCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiArtPartCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiArtPartCtrlV2::CigiArtPartCtrlV2() { PacketID = CIGI_ART_PART_CTRL_PACKET_ID_V2; PacketSize = CIGI_ART_PART_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ArtPartEn = false; XOffEn = false; YOffEn = false; ZOffEn = false; RollEn = false; PitchEn = false; YawEn = false; XOff = 0.0; YOff = 0.0; ZOff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiArtPartCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiArtPartCtrlV2::~CigiArtPartCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseArtPartCtrl * Data = ( CigiBaseArtPartCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); *CDta.c++ = Data->ArtPartIDV1; Cigi_uint8 HDta = 0; if(Data->ArtPartEn) HDta = 0x80; if(Data->XOffEn) HDta |= 0x40; if(Data->YOffEn) HDta |= 0x20; if(Data->ZOffEn) HDta |= 0x10; if(Data->RollEn) HDta |= 0x08; if(Data->PitchEn) HDta |= 0x04; if(Data->YawEn) HDta |= 0x02; *CDta.c++ = HDta; *CDta.s++ = 0; CIGI_SCOPY4(CDta.f++, &Data->XOff); CIGI_SCOPY4(CDta.f++, &Data->YOff); CIGI_SCOPY4(CDta.f++, &Data->ZOff); CIGI_SCOPY4(CDta.f++, &Data->Roll); CIGI_SCOPY4(CDta.f++, &Data->Pitch); CIGI_SCOPY4(CDta.f++, &Data->Yaw); memcpy(Buff,tBuf,CIGI_ART_PART_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_ART_PART_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); ArtPartIDV1 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ArtPartEn = ((HDta & 0x80) != 0); XOffEn = ((HDta & 0x40) != 0); YOffEn = ((HDta & 0x20) != 0); ZOffEn = ((HDta & 0x10) != 0); RollEn = ((HDta & 0x08) != 0); PitchEn = ((HDta & 0x04) != 0); YawEn = ((HDta & 0x02) != 0); CDta.s++; CIGI_SCOPY4(&XOff, CDta.f++); CIGI_SCOPY4(&YOff, CDta.f++); CIGI_SCOPY4(&ZOff, CDta.f++); CIGI_SCOPY4(&Roll, CDta.f++); CIGI_SCOPY4(&Pitch, CDta.f++); CIGI_SCOPY4(&Yaw, CDta.f++); ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV2::SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV1 = ArtPartIDIn; ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiArtPartCtrlV3.cpp000066400000000000000000000144001210750432300216050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiArtPartCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiArtPartCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiArtPartCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiArtPartCtrlV3::CigiArtPartCtrlV3() { PacketID = CIGI_ART_PART_CTRL_PACKET_ID_V3; PacketSize = CIGI_ART_PART_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ArtPartEn = false; XOffEn = false; YOffEn = false; ZOffEn = false; RollEn = false; PitchEn = false; YawEn = false; XOff = 0.0; YOff = 0.0; ZOff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiArtPartCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiArtPartCtrlV3::~CigiArtPartCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseArtPartCtrl * Data = ( CigiBaseArtPartCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->ArtPartIDV3; Cigi_uint8 HDta = 0; if(Data->ArtPartEn) HDta = 0x01; if(Data->XOffEn) HDta |= 0x02; if(Data->YOffEn) HDta |= 0x04; if(Data->ZOffEn) HDta |= 0x08; if(Data->RollEn) HDta |= 0x10; if(Data->PitchEn) HDta |= 0x20; if(Data->YawEn) HDta |= 0x40; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.f++ = Data->XOff; *CDta.f++ = Data->YOff; *CDta.f++ = Data->ZOff; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Yaw; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; ArtPartIDV3 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ArtPartEn = ((HDta & 0x01) != 0); XOffEn = ((HDta & 0x02) != 0); YOffEn = ((HDta & 0x04) != 0); ZOffEn = ((HDta & 0x08) != 0); RollEn = ((HDta & 0x10) != 0); PitchEn = ((HDta & 0x20) != 0); YawEn = ((HDta & 0x40) != 0); CDta.s++; XOff = *CDta.f++; YOff = *CDta.f++; ZOff = *CDta.f++; Roll = *CDta.f++; Pitch = *CDta.f++; Yaw = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); ArtPartIDV3 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ArtPartEn = ((HDta & 0x01) != 0); XOffEn = ((HDta & 0x02) != 0); YOffEn = ((HDta & 0x04) != 0); ZOffEn = ((HDta & 0x08) != 0); RollEn = ((HDta & 0x10) != 0); PitchEn = ((HDta & 0x20) != 0); YawEn = ((HDta & 0x40) != 0); CDta.s++; CigiSwap4(&XOff, CDta.f++); CigiSwap4(&YOff, CDta.f++); CigiSwap4(&ZOff, CDta.f++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Yaw, CDta.f++); } ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiArtPartCtrlV3::SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV3 = ArtPartIDIn; ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiAtmosCtrl.cpp000066400000000000000000000203621210750432300211060ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiAtmosCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiAtmosCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiAtmosCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAtmosCtrlV3::CigiAtmosCtrlV3() { PacketID = CIGI_ATMOS_CTRL_PACKET_ID_V3; PacketSize = CIGI_ATMOS_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; Hour = 0; Minute = 0; Month = 1; Day = 1; Year = 2000; StarInt = 0.0; EphemerisEn = false; SunEn = false; MoonEn = false; StarEn = false; DateVld = false; AtmosEn = false; Aerosol = 0.0; Humidity = 30; AirTemp = 0.0; Visibility = 64373.76f; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; } // ================================================ // ~CigiAtmosCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiAtmosCtrlV3::~CigiAtmosCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseEnvCtrl * Data; if(Spec == NULL) Data = ( CigiBaseEnvCtrl *)Base; else Data = ( CigiBaseEnvCtrl *)Spec; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = (Data->AtmosEn) ? 0x01 : 0; *CDta.c++ = Data->Humidity; *CDta.f++ = Data->AirTemp; *CDta.f++ = Data->Visibility; *CDta.f++ = Data->HorizWindSp; *CDta.f++ = Data->VertWindSp; *CDta.f++ = Data->WindDir; *CDta.f++ = Data->BaroPress; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { AtmosEn = (*CDta.c++ != 0); Humidity = *CDta.c++; AirTemp = *CDta.f++; Visibility = *CDta.f++; HorizWindSp = *CDta.f++; VertWindSp = *CDta.f++; WindDir = *CDta.f++; BaroPress = *CDta.f++; } else { AtmosEn = (*CDta.c++ != 0); Humidity = *CDta.c++; CigiSwap4(&AirTemp, CDta.f++); CigiSwap4(&Visibility, CDta.f++); CigiSwap4(&HorizWindSp, CDta.f++); CigiSwap4(&VertWindSp, CDta.f++); CigiSwap4(&WindDir, CDta.f++); CigiSwap4(&BaroPress, CDta.f++); } if(Spec != NULL) { CigiBaseEnvCtrl * Data = (CigiBaseEnvCtrl *)Spec; Data->AtmosEn = AtmosEn; Data->Humidity = Humidity; Data->AirTemp = AirTemp; Data->Visibility = Visibility; Data->HorizWindSp = HorizWindSp; Data->VertWindSp = VertWindSp; Data->WindDir = WindDir; Data->BaroPress = BaroPress; } return(PacketSize); } // ==================================================================== // Filling the Hold object // ==================================================================== // ================================================ // FillHold // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiAtmosCtrlV3::FillHold(CigiBaseEnvCtrl * Hold) const { Hold->AtmosEn = AtmosEn; Hold->Humidity = Humidity; Hold->AirTemp = AirTemp; Hold->Visibility = Visibility; Hold->HorizWindSp = HorizWindSp; Hold->VertWindSp = VertWindSp; Hold->WindDir = WindDir; Hold->BaroPress = BaroPress; } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Humidity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HumidityIn < 0)||(HumidityIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Humidity",(Cigi_uint8)HumidityIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Humidity = HumidityIn; return(CIGI_SUCCESS); } // ================================================ // Visibility // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::SetVisibility(const float VisibilityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (VisibilityIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Visibility",(float)VisibilityIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Visibility = VisibilityIn; return(CIGI_SUCCESS); } // ================================================ // HorizWindSp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::SetHorizWindSp(const float HorizWindSpIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (HorizWindSpIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("HorizWindSp",(float)HorizWindSpIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif HorizWindSp = HorizWindSpIn; return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } // ================================================ // BaroPress // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiAtmosCtrlV3::SetBaroPress(const float BaroPressIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (BaroPressIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("BaroPress",(float)BaroPressIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif BaroPress = BaroPressIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseAerosolResp.cpp000066400000000000000000000071331210750432300222300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseAerosolResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseAerosolResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseAerosolResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseAerosolResp::CigiBaseAerosolResp() { } // ================================================ // ~CigiBaseAerosolResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseAerosolResp::~CigiBaseAerosolResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseAerosolResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_AEROSOL_RESP_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // AerosolConcentration // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseAerosolResp::SetAerosolConcentration(const float AerosolConcentrationIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (AerosolConcentrationIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AerosolConcentration",(float)AerosolConcentrationIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AerosolConcentration = AerosolConcentrationIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseArtPartCtrl.cpp000066400000000000000000000106461210750432300221770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseArtPartCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseArtPartCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseArtPartCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseArtPartCtrl::CigiBaseArtPartCtrl() { } // ================================================ // ~CigiBaseArtPartCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseArtPartCtrl::~CigiBaseArtPartCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseArtPartCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // V1 & V2 use the same ID number if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_ART_PART_CTRL_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_ART_PART_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Roll // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseArtPartCtrl::SetRoll(const float RollIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RollIn < -180.0)||(RollIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Roll",(float)RollIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Roll = RollIn; return(CIGI_SUCCESS); } // ================================================ // Pitch // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseArtPartCtrl::SetPitch(const float PitchIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PitchIn < -90.0)||(PitchIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pitch",(float)PitchIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Pitch = PitchIn; return(CIGI_SUCCESS); } // ================================================ // Yaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseArtPartCtrl::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseCircleSymbolData.cpp000066400000000000000000000101521210750432300231460ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCircleSymbolData.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  01/17/2008 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseCircleSymbolData.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCircleSymbolData::CigiBaseCircleSymbolData(void) { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCircleSymbolData::~CigiBaseCircleSymbolData(void) { } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetRadius // ================================================ int CigiBaseCircleSymbolData::SetRadius(const float RadiusIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RadiusIn < 0.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("RadiusIn", (int)RadiusIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Radius = RadiusIn; return(CIGI_SUCCESS); } // ================================================ // InnerRadius // ================================================ int CigiBaseCircleSymbolData::SetInnerRadius(const float InnerRadiusIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((InnerRadiusIn < 0.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("InnerRadiusIn", (int)InnerRadiusIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif InnerRadius = InnerRadiusIn; return(CIGI_SUCCESS); } // ================================================ // StartAngle // ================================================ int CigiBaseCircleSymbolData::SetStartAngle(const float StartAngleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((StartAngleIn < 0.0)||(StartAngleIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("StartAngle", (double)StartAngleIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif StartAngle = StartAngleIn; return(CIGI_SUCCESS); } // ================================================ // EndAngle // ================================================ int CigiBaseCircleSymbolData::SetEndAngle(const float EndAngleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EndAngleIn < 0.0)||(EndAngleIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EndAngle", (double)EndAngleIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif EndAngle = EndAngleIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseCollDetSegResp.cpp000066400000000000000000000060671210750432300226160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetSegResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseCollDetSegResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseCollDetSegResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCollDetSegResp::CigiBaseCollDetSegResp() { } // ================================================ // ~CigiBaseCollDetSegResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCollDetSegResp::~CigiBaseCollDetSegResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseCollDetSegResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: V1 & V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiBaseCollDetVolDef.cpp000066400000000000000000000062611210750432300224210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetVolDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseCollDetVolDef.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseCollDetVolDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCollDetVolDef::CigiBaseCollDetVolDef() { } // ================================================ // ~CigiBaseCollDetVolDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCollDetVolDef::~CigiBaseCollDetVolDef() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseCollDetVolDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 2) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiBaseCollDetVolResp.cpp000066400000000000000000000072731210750432300226400ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseCollDetVolResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseCollDetVolResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseCollDetVolResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCollDetVolResp::CigiBaseCollDetVolResp() { } // ================================================ // ~CigiBaseCollDetVolResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCollDetVolResp::~CigiBaseCollDetVolResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseCollDetVolResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 2) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CollType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseCollDetVolResp::SetCollType(const CollTypeGrp CollTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CollTypeIn < 0)||(CollTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CollType",(CollTypeGrp)CollTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CollType = CollTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseConfClampEntityCtrl.cpp000066400000000000000000000110461210750432300236540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseConfClampEntityCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseConfClampEntityCtrl.h" #include "CigiBaseEntityCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseConfClampEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseConfClampEntityCtrl::CigiBaseConfClampEntityCtrl() { } // ================================================ // ~CigiBaseConfClampEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseConfClampEntityCtrl::~CigiBaseConfClampEntityCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseConfClampEntityCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Yaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseConfClampEntityCtrl::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } // ================================================ // Lat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseConfClampEntityCtrl::SetLat(const double LatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LatIn < -90.0)||(LatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lat",(double)LatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Lat = LatIn; return(CIGI_SUCCESS); } // ================================================ // Lon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseConfClampEntityCtrl::SetLon(const double LonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LonIn < -180.0)||(LonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lon",(double)LonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Lon = LonIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseEntityCtrl.cpp000066400000000000000000000152551210750432300220770ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEntityCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseEntityCtrl.h" #include "CigiExceptions.h" // Animation State conversion Tables const CigiBaseEntityCtrl::AnimationStateGrp CigiBaseEntityCtrl::ToV1[10] = { DeactivateUnload, // Stop Deactivate, // Pause LoadActivate, // Play Continue, // Continue NoAction, // NoAction Load, // Load LoadActivate, // LoadActivate Activate, // Activate Deactivate, // Deactivate DeactivateUnload // DeactivateUnload }; const CigiBaseEntityCtrl::AnimationStateGrp CigiBaseEntityCtrl::ToV3[10] = { Stop, // Stop Pause, // Pause Play, // Play Continue, // Continue NoAction, // NoAction Stop, // Load Play, // LoadActivate Play, // Activate Pause, // Deactivate Stop // DeactivateUnload }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEntityCtrl::CigiBaseEntityCtrl() { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEntityCtrl::~CigiBaseEntityCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcEntity; // All versions of this packet have the same packet id number CnvtInfo.CnvtPacketID = CIGI_ENTITY_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::SetPitch(const float PitchIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PitchIn < -90.0f)||(PitchIn > 90.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pitch",(double)PitchIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Pitch = PitchIn; return(CIGI_SUCCESS); } // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::SetRoll(const float RollIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RollIn < -180.0f)||(RollIn > 180.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Roll",(double)RollIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Roll = RollIn; return(CIGI_SUCCESS); } // ================================================ // SetLat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::SetLat(const double Lat, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((Lat < -90.0f)||(Lat > 90.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lat",Lat,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LatOrXoff = Lat; return(CIGI_SUCCESS); } // ================================================ // SetLon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::SetLon(const double Lon, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((Lon < -180.0f)||(Lon > 180.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lon",Lon,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LonOrYoff = Lon; return(CIGI_SUCCESS); } // ================================================ // SetAttachState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::SetAttachState(const AttachStateGrp AttachStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AttachStateIn < 0)||(AttachStateIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AttachState",AttachStateIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AttachState = AttachStateIn; return(CIGI_SUCCESS); } // ================================================ // SetCollisionDetectEn // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEntityCtrl::SetCollisionDetectEn(const CollisionDetectGrp CollisionDetectEnIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CollisionDetectEnIn < 0)||(CollisionDetectEnIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CollisionDetectEn",CollisionDetectEnIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CollisionDetectEn = CollisionDetectEnIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseEnvCondReq.cpp000066400000000000000000000111031210750432300217660ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEnvCondReq.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseEnvCondReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEnvCondReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEnvCondReq::CigiBaseEnvCondReq() { } // ================================================ // ~CigiBaseEnvCondReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEnvCondReq::~CigiBaseEnvCondReq() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvCondReq::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_ENV_COND_REQ_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvCondReq::SetReqType(const Cigi_uint8 ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 15))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(int)ReqTypeIn,0,15); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // Lat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvCondReq::SetLat(const double LatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LatIn < -90.0)||(LatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lat",(double)LatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Lat = LatIn; return(CIGI_SUCCESS); } // ================================================ // Lon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvCondReq::SetLon(const double LonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LonIn < -180.0)||(LonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lon",(double)LonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Lon = LonIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseEnvCtrl.cpp000066400000000000000000000061011210750432300213410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEnvCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseEnvCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEnvCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEnvCtrl::CigiBaseEnvCtrl() { Hour = 0; Minute = 0; Month = 1; Day = 1; Year = 2000; StarInt = 0.0; EphemerisEn = false; SunEn = false; MoonEn = false; StarEn = false; DateVld = false; AtmosEn = false; Aerosol = 0.0; Humidity = 30; AirTemp = 0.0; Visibility = 64373.76f; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; } // ================================================ // ~CigiBaseEnvCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEnvCtrl::~CigiBaseEnvCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcEnvCtrl; CnvtInfo.CnvtPacketID = 0; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiBaseEnvRgnCtrl.cpp000066400000000000000000000161241210750432300220160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEnvRgnCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseEnvRgnCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEnvRgnCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEnvRgnCtrl::CigiBaseEnvRgnCtrl() { } // ================================================ // ~CigiBaseEnvRgnCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEnvRgnCtrl::~CigiBaseEnvRgnCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_ENV_RGN_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetRgnState(const RgnStateGrp RgnStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RgnStateIn < 0)||(RgnStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("RgnState",(RgnStateGrp)RgnStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif RgnState = RgnStateIn; return(CIGI_SUCCESS); } // ================================================ // WeatherProp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetWeatherProp(const MergeCtrlGrp WeatherPropIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WeatherPropIn < 0)||(WeatherPropIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WeatherProp",(MergeCtrlGrp)WeatherPropIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WeatherProp = WeatherPropIn; return(CIGI_SUCCESS); } // ================================================ // Aerosol // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetAerosol(const MergeCtrlGrp AerosolIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AerosolIn < 0)||(AerosolIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Aerosol",(MergeCtrlGrp)AerosolIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Aerosol = AerosolIn; return(CIGI_SUCCESS); } // ================================================ // MaritimeSurface // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetMaritimeSurface(const MergeCtrlGrp MaritimeSurfaceIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MaritimeSurfaceIn < 0)||(MaritimeSurfaceIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("MaritimeSurface",(MergeCtrlGrp)MaritimeSurfaceIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif MaritimeSurface = MaritimeSurfaceIn; return(CIGI_SUCCESS); } // ================================================ // TerrestrialSurface // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetTerrestrialSurface(const MergeCtrlGrp TerrestrialSurfaceIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TerrestrialSurfaceIn < 0)||(TerrestrialSurfaceIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TerrestrialSurface",(MergeCtrlGrp)TerrestrialSurfaceIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TerrestrialSurface = TerrestrialSurfaceIn; return(CIGI_SUCCESS); } // ================================================ // Lat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetLat(const double LatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LatIn < -90.0)||(LatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lat",(double)LatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Lat = LatIn; return(CIGI_SUCCESS); } // ================================================ // Lon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetLon(const double LonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LonIn < -180.0)||(LonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lon",(double)LonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Lon = LonIn; return(CIGI_SUCCESS); } // ================================================ // Rotation // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEnvRgnCtrl::SetRotation(const float RotationIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RotationIn < -180.0)||(RotationIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Rotation",(float)RotationIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Rotation = RotationIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseEventNotification.cpp000066400000000000000000000136341210750432300234250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseEventNotification.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseEventNotification.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEnvRgnCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEventNotification::CigiBaseEventNotification() { } // ================================================ // ~CigiBaseEnvRgnCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEventNotification::~CigiBaseEventNotification() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEventNotification::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_EVENT_NOTIFICATION_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEventNotification::SetEventData(const Cigi_uint32 EventDataIn, int ndx, bool bndchk) { if((ndx < 0)||(ndx > 2)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } EventData.ul[ndx] = EventDataIn; return(CIGI_SUCCESS); } // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEventNotification::SetEventData(const Cigi_int32 EventDataIn, int ndx, bool bndchk) { if((ndx < 0)||(ndx > 2)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } EventData.l[ndx] = EventDataIn; return(CIGI_SUCCESS); } // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseEventNotification::SetEventData(const float EventDataIn, int ndx, bool bndchk) { if((ndx < 0)||(ndx > 2)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } EventData.f[ndx] = EventDataIn; return(CIGI_SUCCESS); } // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiBaseEventNotification::GetULEventData(int ndx) { if((ndx < 0)||(ndx > 2)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); #endif if(ndx < 0) return(EventData.ul[0]); else return(EventData.ul[2]); } return(EventData.ul[ndx]); } // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiBaseEventNotification::GetLEventData(int ndx) { if((ndx < 0)||(ndx > 2)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); #endif if(ndx < 0) return(EventData.l[0]); else return(EventData.l[2]); } return(EventData.l[ndx]); } // ================================================ // RgnState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiBaseEventNotification::GetFEventData(int ndx) { if((ndx < 0)||(ndx > 2)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Event Data Index",ndx,0,2); #endif if(ndx < 0) return((float)EventData.ul[0]); else return((float)EventData.ul[2]); } return(EventData.f[ndx]); } cigi-ccl-3.3.3a+svn818/source/CigiBaseHatHotReq.cpp000066400000000000000000000062071210750432300216320ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseHatHotReq.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseHatHotReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseHatHotReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseHatHotReq::CigiBaseHatHotReq() { } // ================================================ // ~CigiBaseHatHotReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseHatHotReq::~CigiBaseHatHotReq() { } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Lat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseHatHotReq::SetLat(const double LatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LatIn < -90.0)||(LatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lat",(double)LatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LatOrXoff = LatIn; return(CIGI_SUCCESS); } // ================================================ // Lon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseHatHotReq::SetLon(const double LonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LonIn < -180.0)||(LonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Lon",(double)LonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LonOrYoff = LonIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseIGCtrl.cpp000066400000000000000000000102641210750432300211150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseIGCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Implemented the SetDatabaseID method in the implemenation file instead of 
 *  inlining it in the header file.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseIGCtrl.h" #include "CigiExceptions.h" #include "CigiSwapping.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseIGCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseIGCtrl::CigiBaseIGCtrl() { } // ================================================ // ~CigiBaseIGCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseIGCtrl::~CigiBaseIGCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseIGCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcIGCtrl; // All versions of this packet have the same packet id number CnvtInfo.CnvtPacketID = CIGI_IG_CTRL_PACKET_ID_V1; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetDatabaseID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseIGCtrl::SetDatabaseID(const Cigi_int8 DataBaseIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DataBaseIDIn < 0)||(DataBaseIDIn > 127))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DataBaseID",DataBaseIDIn,0,127); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DatabaseID = DataBaseIDIn; return(CIGI_SUCCESS); } // ================================================ // SetIGMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseIGCtrl::SetIGMode(IGModeGrp IGModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((IGModeIn < 0)||(IGModeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("IGMode",IGModeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif IGMode = IGModeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseLosResp.cpp000066400000000000000000000063131210750432300213600ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseLosResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseLosResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseLosResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseLosResp::CigiBaseLosResp() { } // ================================================ // ~CigiBaseLosResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseLosResp::~CigiBaseLosResp() { } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Latitude // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosResp::SetLatitude(const double LatitudeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LatitudeIn < -90.0)||(LatitudeIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Latitude",(double)LatitudeIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LatOrXoff = LatitudeIn; return(CIGI_SUCCESS); } // ================================================ // Longitude // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosResp::SetLongitude(const double LongitudeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LongitudeIn < -180.0)||(LongitudeIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Longitude",(double)LongitudeIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LonOrYoff = LongitudeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseLosSegReq.cpp000066400000000000000000000117601210750432300216370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseLosSegReq.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseLosSegReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseLosSegReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseLosSegReq::CigiBaseLosSegReq() { } // ================================================ // ~CigiBaseLosSegReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseLosSegReq::~CigiBaseLosSegReq() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosSegReq::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: CIGI_LOS_SEG_REQ_PACKET_ID_V1 & // CIGI_LOS_SEG_REQ_PACKET_ID_V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SrcLat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosSegReq::SetSrcLat(const double SrcLatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcLatIn < -90.0)||(SrcLatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcLat",(double)SrcLatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcXLat = SrcLatIn; return(CIGI_SUCCESS); } // ================================================ // SrcLon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosSegReq::SetSrcLon(const double SrcLonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcLonIn < -180.0)||(SrcLonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcLon",(double)SrcLonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcYLon = SrcLonIn; return(CIGI_SUCCESS); } // ================================================ // DstLat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosSegReq::SetDstLat(const double DstLatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DstLatIn < -90.0)||(DstLatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DstLat",(double)DstLatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DstXLat = DstLatIn; return(CIGI_SUCCESS); } // ================================================ // DstLon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosSegReq::SetDstLon(const double DstLonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DstLonIn < -180.0)||(DstLonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DstLon",(double)DstLonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DstYLon = DstLonIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseLosVectReq.cpp000066400000000000000000000110171210750432300220150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseLosVectReq.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseLosVectReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseLosVectReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseLosVectReq::CigiBaseLosVectReq() { } // ================================================ // ~CigiBaseLosVectReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseLosVectReq::~CigiBaseLosVectReq() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosVectReq::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: CIGI_LOS_VECT_REQ_PACKET_ID_V1 & // CIGI_LOS_VECT_REQ_PACKET_ID_V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // VectEl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosVectReq::SetVectEl(const float VectElIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VectElIn < -90.0)||(VectElIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VectEl",(float)VectElIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VectEl = VectElIn; return(CIGI_SUCCESS); } // ================================================ // SrcLat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosVectReq::SetSrcLat(const double SrcLatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcLatIn < -90.0)||(SrcLatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcLat",(double)SrcLatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcXLat = SrcLatIn; return(CIGI_SUCCESS); } // ================================================ // SrcLon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseLosVectReq::SetSrcLon(const double SrcLonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcLonIn < -180.0)||(SrcLonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcLon",(double)SrcLonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcYLon = SrcLonIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseMaritimeSurfaceCtrl.cpp000066400000000000000000000101221210750432300236670ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseMaritimeSurfaceCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseMaritimeSurfaceCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseMaritimeSurfaceCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseMaritimeSurfaceCtrl::CigiBaseMaritimeSurfaceCtrl() { } // ================================================ // ~CigiBaseMaritimeSurfaceCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseMaritimeSurfaceCtrl::~CigiBaseMaritimeSurfaceCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMaritimeSurfaceCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Scope // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMaritimeSurfaceCtrl::SetScope(const ScopeGrp ScopeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ScopeIn < 0)||(ScopeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Scope = ScopeIn; return(CIGI_SUCCESS); } // ================================================ // Clarity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMaritimeSurfaceCtrl::SetClarity(const float ClarityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ClarityIn < 0.0)||(ClarityIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Clarity",(float)ClarityIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Clarity = ClarityIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseMaritimeSurfaceResp.cpp000066400000000000000000000071551210750432300237100ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseMaritimeSurfaceResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseMaritimeSurfaceResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseMaritimeSurfaceResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseMaritimeSurfaceResp::CigiBaseMaritimeSurfaceResp() { } // ================================================ // ~CigiBaseMaritimeSurfaceResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseMaritimeSurfaceResp::~CigiBaseMaritimeSurfaceResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMaritimeSurfaceResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Clarity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMaritimeSurfaceResp::SetClarity(const float ClarityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ClarityIn < 0.0)||(ClarityIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Clarity",(float)ClarityIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Clarity = ClarityIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseMotionTrackCtrl.cpp000066400000000000000000000070441210750432300230520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseMotionTrackCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseMotionTrackCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseMotionTrackCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseMotionTrackCtrl::CigiBaseMotionTrackCtrl() { } // ================================================ // ~CigiBaseMotionTrackCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseMotionTrackCtrl::~CigiBaseMotionTrackCtrl() { } // ==================================================================== // conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMotionTrackCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Scope // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseMotionTrackCtrl::SetScope(const ScopeGrp ScopeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ScopeIn < 0)||(ScopeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Scope = ScopeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBasePositionReq.cpp000066400000000000000000000111611210750432300222420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBasePositionReq.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  Moved Packet information to base packet.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBasePositionReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBasePositionReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBasePositionReq::CigiBasePositionReq() { } // ================================================ // ~CigiBasePositionReq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBasePositionReq::~CigiBasePositionReq() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionReq::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_POSITION_REQ_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // UpdateMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionReq::SetUpdateMode(const UpdateModeGrp UpdateModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((UpdateModeIn < 0)||(UpdateModeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("UpdateMode",(UpdateModeGrp)UpdateModeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif UpdateMode = UpdateModeIn; return(CIGI_SUCCESS); } // ================================================ // ObjectClass // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionReq::SetObjectClass(const ObjectClassGrp ObjectClassIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ObjectClassIn < 0)||(ObjectClassIn > 5))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ObjectClass",(ObjectClassGrp)ObjectClassIn,0,5); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ObjectClass = ObjectClassIn; return(CIGI_SUCCESS); } // ================================================ // CoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionReq::SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CoordSysIn < 0)||(CoordSysIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CoordSys",(CoordSysGrp)CoordSysIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CoordSys = CoordSysIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBasePositionResp.cpp000066400000000000000000000127221210750432300224300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBasePositionResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBasePositionResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBasePositionResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBasePositionResp::CigiBasePositionResp() { } // ================================================ // ~CigiBasePositionResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBasePositionResp::~CigiBasePositionResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_POSITION_RESP_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ObjectClass // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionResp::SetObjectClass(const ObjectClassGrp ObjectClassIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ObjectClassIn < 0)||(ObjectClassIn > 4))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ObjectClass",(ObjectClassGrp)ObjectClassIn,0,4); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ObjectClass = ObjectClassIn; return(CIGI_SUCCESS); } // ================================================ // CoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionResp::SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CoordSysIn < 0)||(CoordSysIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CoordSys",(CoordSysGrp)CoordSysIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CoordSys = CoordSysIn; return(CIGI_SUCCESS); } // ================================================ // Roll // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionResp::SetRoll(const float RollIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RollIn < -180.0)||(RollIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Roll",(float)RollIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Roll = RollIn; return(CIGI_SUCCESS); } // ================================================ // Pitch // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionResp::SetPitch(const float PitchIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PitchIn < -90.0)||(PitchIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pitch",(float)PitchIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Pitch = PitchIn; return(CIGI_SUCCESS); } // ================================================ // Yaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBasePositionResp::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSOF.cpp000066400000000000000000000064651210750432300204300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSOF.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSOF.h" #include "CigiExceptions.h" #include "CigiSwapping.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseSOF // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSOF::CigiBaseSOF() { } // ================================================ // ~CigiBaseSOF // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSOF::~CigiBaseSOF() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSOF::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcSOF; // All versions of this packet have the same packet id number CnvtInfo.CnvtPacketID = CIGI_SOF_PACKET_ID_V1; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetIGMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSOF::SetIGMode(IGModeGrp IGModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((IGModeIn < 0)||(IGModeIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("IGMode",IGModeIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif IGMode = IGModeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSensorCtrl.cpp000066400000000000000000000137001210750432300220650ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSensorCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSensorCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseSensorCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSensorCtrl::CigiBaseSensorCtrl() { } // ================================================ // ~CigiBaseSensorCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSensorCtrl::~CigiBaseSensorCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_SENSOR_CTRL_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_SENSOR_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Polarity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::SetPolarity(const PolarityGrp PolarityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PolarityIn < 0)||(PolarityIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Polarity",(PolarityGrp)PolarityIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Polarity = PolarityIn; return(CIGI_SUCCESS); } // ================================================ // TrackMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::SetTrackMode(const TrackModeGrp TrackModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TrackModeIn < 0)||(TrackModeIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TrackMode",(TrackModeGrp)TrackModeIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TrackMode = TrackModeIn; return(CIGI_SUCCESS); } // ================================================ // TrackPolarity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::SetTrackPolarity(const TrackPolarityGrp TrackPolarityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TrackPolarityIn < 0)||(TrackPolarityIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TrackPolarity",(TrackPolarityGrp)TrackPolarityIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TrackPolarity = TrackPolarityIn; return(CIGI_SUCCESS); } // ================================================ // Level // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::SetLevel(const float LevelIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LevelIn < 0.0)||(LevelIn > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Level",(float)LevelIn,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Level = LevelIn; return(CIGI_SUCCESS); } // ================================================ // ACCoupling // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::SetACCoupling(const float ACCouplingIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (ACCouplingIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ACCoupling",(float)ACCouplingIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ACCoupling = ACCouplingIn; return(CIGI_SUCCESS); } // ================================================ // Noise // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorCtrl::SetNoise(const float NoiseIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NoiseIn < 0.0)||(NoiseIn > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Noise",(float)NoiseIn,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Noise = NoiseIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSensorResp.cpp000066400000000000000000000111231210750432300220670ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSensorResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSensorResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseSensorResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSensorResp::CigiBaseSensorResp() { } // ================================================ // ~CigiBaseSensorResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSensorResp::~CigiBaseSensorResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: CIGI_SENSOR_RESP_PACKET_ID_V1 & // CIGI_SENSOR_RESP_PACKET_ID_V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_SENSOR_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_SENSOR_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SensorStat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorResp::SetSensorStat(const SensorStatGrp SensorStatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SensorStatIn < 0)||(SensorStatIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SensorStat",(SensorStatGrp)SensorStatIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SensorStat = SensorStatIn; return(CIGI_SUCCESS); } // ================================================ // GateXoff // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorResp::SetGateXoff(const float GateXoffIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GateXoffIn < -180.0)||(GateXoffIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GateXoff",(float)GateXoffIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GateXoff = GateXoffIn; return(CIGI_SUCCESS); } // ================================================ // GateYoff // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSensorResp::SetGateYoff(const float GateYoffIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GateYoffIn < -180.0)||(GateYoffIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GateYoff",(float)GateYoffIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GateYoff = GateYoffIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseShortArtPartCtrl.cpp000066400000000000000000000144271210750432300232200ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseShortArtPartCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseShortArtPartCtrl.h" #include "CigiArtPartCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseShortArtPartCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseShortArtPartCtrl::CigiBaseShortArtPartCtrl() { } // ================================================ // ~CigiBaseShortArtPartCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseShortArtPartCtrl::~CigiBaseShortArtPartCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseShortArtPartCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { // V1 & V2 of the Art Part packet // uses the same packet id number CnvtInfo.ProcID = CigiProcessType::ProcShortArtPartToArtPart; CnvtInfo.CnvtPacketID = CIGI_ART_PART_CTRL_PACKET_ID_V2; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ================================================ // SpecialConversion // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseShortArtPartCtrl::SpecialConversion(CigiVersionID &CnvtVersion, Cigi_uint8 ArtPartID, CigiArtPartCtrlV3 *ArtPart) { if(ArtPart == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } ArtPart->SetArtPartID(ArtPartID); ArtPart->SetEntityID(EntityID); if((ArtPart1 == ArtPartID) && ArtPart1En) { ArtPart->SetArtPartEn(true); switch(DofSelect1) { case Xoff: ArtPart->SetXOff(Dof1); ArtPart->SetXOffEn(true); break; case Yoff: ArtPart->SetYOff(Dof1); ArtPart->SetYOffEn(true); break; case Zoff: ArtPart->SetZOff(Dof1); ArtPart->SetZOffEn(true); break; case Yaw: ArtPart->SetYaw(Dof1); ArtPart->SetYawEn(true); break; case Pitch: ArtPart->SetPitch(Dof1); ArtPart->SetPitchEn(true); break; case Roll: ArtPart->SetRoll(Dof1); ArtPart->SetRollEn(true); break; default: break; } } if((ArtPart2 == ArtPartID) && ArtPart2En) { ArtPart->SetArtPartEn(true); switch(DofSelect2) { case Xoff: ArtPart->SetXOff(Dof2); ArtPart->SetXOffEn(true); break; case Yoff: ArtPart->SetYOff(Dof2); ArtPart->SetYOffEn(true); break; case Zoff: ArtPart->SetZOff(Dof2); ArtPart->SetZOffEn(true); break; case Yaw: ArtPart->SetYaw(Dof2); ArtPart->SetYawEn(true); break; case Pitch: ArtPart->SetPitch(Dof2); ArtPart->SetPitchEn(true); break; case Roll: ArtPart->SetRoll(Dof2); ArtPart->SetRollEn(true); break; default: break; } } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // DofSelect1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseShortArtPartCtrl::SetDofSelect1(const DofSelectGrp DofSelect1In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DofSelect1In < 0)||(DofSelect1In > 6))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DofSelect1",(DofSelectGrp)DofSelect1In,0,6); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DofSelect1 = DofSelect1In; return(CIGI_SUCCESS); } // ================================================ // DofSelect2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseShortArtPartCtrl::SetDofSelect2(const DofSelectGrp DofSelect2In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DofSelect2In < 0)||(DofSelect2In > 6))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DofSelect2",(DofSelectGrp)DofSelect2In,0,6); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DofSelect2 = DofSelect2In; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseShortSymbolCtrl.cpp000066400000000000000000000354741210750432300231150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseShortSymbolCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseShortSymbolCtrl.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseShortSymbolCtrl::CigiBaseShortSymbolCtrl(void) { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseShortSymbolCtrl::~CigiBaseShortSymbolCtrl(void) { } // ==================================================================== // Conversion Control // ==================================================================== int CigiBaseShortSymbolCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetSymbolState // ================================================ int CigiBaseShortSymbolCtrl::SetSymbolState(const CigiBaseSymbolCtrl::SymbolStateGrp SymbolStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SymbolStateIn < 0)||(SymbolStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SymbolState", (int)SymbolStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SymbolState = SymbolStateIn; return(CIGI_SUCCESS); } // ================================================ // SetAttachState // ================================================ int CigiBaseShortSymbolCtrl::SetAttachState(const CigiBaseSymbolCtrl::AttachStateGrp AttachStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AttachStateIn < 0)||(AttachStateIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AttachState", (int)AttachStateIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AttachState = AttachStateIn; return(CIGI_SUCCESS); } // ================================================ // SetFlashCtrl // ================================================ int CigiBaseShortSymbolCtrl::SetFlashCtrl(const CigiBaseSymbolCtrl::FlashCtrlGrp FlashCtrlIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((FlashCtrlIn < 0)||(FlashCtrlIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("FlashCtrl", (int)FlashCtrlIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif FlashCtrl = FlashCtrlIn; return(CIGI_SUCCESS); } // ================================================ // SetInheritColor // ================================================ int CigiBaseShortSymbolCtrl::SetInheritColor(const CigiBaseSymbolCtrl::InheritColorGrp InheritColorIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((InheritColorIn < 0)||(InheritColorIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("InheritColor", (int)InheritColorIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif InheritColor = InheritColorIn; return(CIGI_SUCCESS); } // ================================================ // GetDatumType // ================================================ CigiBaseShortSymbolCtrl::DatumTypeGrp CigiBaseShortSymbolCtrl::GetDatumType(int DatumId) const { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(None); } return(DatumType[(DatumId)]); } // ================================================ // GetUIntDatum // ================================================ Cigi_uint32 CigiBaseShortSymbolCtrl::GetUIntDatum(int DatumId) const { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(0); } return(Datum[(DatumId)].UIntValue); } // ================================================ // GetColorDatum // ================================================ int CigiBaseShortSymbolCtrl::GetColorDatum(int DatumId, Cigi_uint8 &RedValue, Cigi_uint8 &GreenValue, Cigi_uint8 &BlueValue, Cigi_uint8 &AlphaValue, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } RedValue = (Cigi_uint8)((Datum[(DatumId)].UIntValue >> 24) & 0xff); GreenValue = (Cigi_uint8)((Datum[(DatumId)].UIntValue >> 16) & 0xff); BlueValue = (Cigi_uint8)((Datum[(DatumId)].UIntValue >> 8) & 0xff); AlphaValue = (Cigi_uint8)((Datum[(DatumId)].UIntValue) & 0xff); return(CIGI_SUCCESS); } // ================================================ // GetFloatDatum // ================================================ float CigiBaseShortSymbolCtrl::GetFloatDatum(int DatumId) const { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(0.0); } return(Datum[(DatumId)].FloatValue); } // ================================================ // SetDatumNone // ================================================ int CigiBaseShortSymbolCtrl::SetDatumNone(int DatumId, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = None; Datum[(DatumId)].UIntValue = 0; return(CIGI_SUCCESS); } // ================================================ // SetSurfaceID // ================================================ int CigiBaseShortSymbolCtrl::SetSurfaceID(int DatumId, const Cigi_uint16 SurfaceIDIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = SurfaceIdDatumType; Datum[(DatumId)].UIntValue = (Cigi_uint32)SurfaceIDIn; return(CIGI_SUCCESS); } // ================================================ // SetParentSymbolID // ================================================ int CigiBaseShortSymbolCtrl::SetParentSymbolID(int DatumId, const Cigi_uint16 ParentSymbolIDIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = ParentIdDatumType; Datum[(DatumId)].UIntValue = (Cigi_uint32)ParentSymbolIDIn; return(CIGI_SUCCESS); } // ================================================ // SetLayer // ================================================ int CigiBaseShortSymbolCtrl::SetLayer(int DatumId, const Cigi_uint8 LayerIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = LayerDatumType; Datum[(DatumId)].UIntValue = (Cigi_uint32)LayerIn; return(CIGI_SUCCESS); } // ================================================ // SetFlashDutyCycle // ================================================ int CigiBaseShortSymbolCtrl::SetFlashDutyCycle(int DatumId, const Cigi_uint8 FlashDutyCycleIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #ifndef CIGI_NO_BND_CHK if(bndchk && ((FlashDutyCycleIn < 0)||(FlashDutyCycleIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("FlashDutyCycle", (int)FlashDutyCycleIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DatumType[(DatumId)] = FlashDutyCycleDatumType; Datum[(DatumId)].UIntValue = (Cigi_uint32)FlashDutyCycleIn; return(CIGI_SUCCESS); } // ================================================ // SetFlashDutyCycle // ================================================ int CigiBaseShortSymbolCtrl::SetFlashPeriod(int DatumId, const float FlashPeriodIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = FlashPeriodDatumType; Datum[(DatumId)].FloatValue = FlashPeriodIn; return(CIGI_SUCCESS); } // ================================================ // SetUPosition // ================================================ int CigiBaseShortSymbolCtrl::SetUPosition(int DatumId, const float UPositionIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = UPositionDatumType; Datum[(DatumId)].FloatValue = UPositionIn; return(CIGI_SUCCESS); } // ================================================ // SetVPosition // ================================================ int CigiBaseShortSymbolCtrl::SetVPosition(int DatumId, const float VPositionIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = VPositionDatumType; Datum[(DatumId)].FloatValue = VPositionIn; return(CIGI_SUCCESS); } // ================================================ // SetRotation // ================================================ int CigiBaseShortSymbolCtrl::SetRotation(int DatumId, const float RotationIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = RotationDatumType; Datum[(DatumId)].FloatValue = RotationIn; return(CIGI_SUCCESS); } // ================================================ // SetScaleU // ================================================ int CigiBaseShortSymbolCtrl::SetScaleU(int DatumId, const float ScaleUIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = ScaleUDatumType; Datum[(DatumId)].FloatValue = ScaleUIn; return(CIGI_SUCCESS); } // ================================================ // SetScaleV // ================================================ int CigiBaseShortSymbolCtrl::SetScaleV(int DatumId, const float ScaleVIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = ScaleVDatumType; Datum[(DatumId)].FloatValue = ScaleVIn; return(CIGI_SUCCESS); } // ================================================ // SetColor // ================================================ int CigiBaseShortSymbolCtrl::SetColor(int DatumId, const Cigi_uint8 RedIn, const Cigi_uint8 GreenIn, const Cigi_uint8 BlueIn, const Cigi_uint8 AlphaIn, bool bndchk) { //This must be bound checked! if((DatumId < 0)||(DatumId > 1)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DatumId", (int)DatumId,1,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } DatumType[(DatumId)] = ColorDatumType; Cigi_uint32 cColor = (Cigi_uint32)AlphaIn; Cigi_uint32 tColor = (Cigi_uint32)RedIn; cColor |= ((tColor << 24) & 0xff000000); tColor = (Cigi_uint32)GreenIn; cColor |= ((tColor << 16) & 0x00ff0000); tColor = (Cigi_uint32)BlueIn; cColor |= ((tColor << 8) & 0x0000ff00); Datum[(DatumId)].UIntValue = cColor; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSpecEffDef.cpp000066400000000000000000000127411210750432300217250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSpecEffDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSpecEffDef.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseSpecEffDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSpecEffDef::CigiBaseSpecEffDef() { } // ================================================ // ~CigiBaseSpecEffDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSpecEffDef::~CigiBaseSpecEffDef() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSpecEffDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { // V1 & V2 use the same packet id number if(CnvtVersion.CigiMajorVersion > 2) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SPEC_EFF_DEF_PACKET_ID_V2; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SeqDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSpecEffDef::SetSeqDir(const SeqDirGrp SeqDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SeqDirIn < 0)||(SeqDirIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SeqDir",(SeqDirGrp)SeqDirIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SeqDir = SeqDirIn; return(CIGI_SUCCESS); } // ================================================ // XScale // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSpecEffDef::SetXScale(const float XScaleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((XScaleIn < 0.0)||(XScaleIn > 512.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("XScale",(float)XScaleIn,0.0,512.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif XScale = XScaleIn; return(CIGI_SUCCESS); } // ================================================ // YScale // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSpecEffDef::SetYScale(const float YScaleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YScaleIn < 0.0)||(YScaleIn > 512.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("YScale",(float)YScaleIn,0.0,512.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif YScale = YScaleIn; return(CIGI_SUCCESS); } // ================================================ // ZScale // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSpecEffDef::SetZScale(const float ZScaleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ZScaleIn < 0.0)||(ZScaleIn > 512.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ZScale",(float)ZScaleIn,0.0,512.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ZScale = ZScaleIn; return(CIGI_SUCCESS); } // ================================================ // TimeScale // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSpecEffDef::SetTimeScale(const float TimeScaleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TimeScaleIn < 0.0)||(TimeScaleIn > 512.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TimeScale",(float)TimeScaleIn,0.0,512.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TimeScale = TimeScaleIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSymbolCircleDef.cpp000066400000000000000000000155051210750432300230020ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolCircleDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSymbolCircleDef.h" #include "CigiExceptions.h" using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseSymbolCircleDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolCircleDef::CigiBaseSymbolCircleDef(void) { } // ================================================ // ~CigiBaseSymbolCircleDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolCircleDef::~CigiBaseSymbolCircleDef(void) { CigiBaseCircleSymbolData *pCircle; vector::iterator iCircle; for(iCircle=Circles.begin();iCircle!=Circles.end();iCircle++) { pCircle = *iCircle; if(pCircle != NULL) delete pCircle; } Circles.clear(); } // ================================================ // CigiBaseSymbolCircleDef - Copy constructor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolCircleDef::CigiBaseSymbolCircleDef(const CigiBaseSymbolCircleDef &BaseIn) { SymbolID = BaseIn.SymbolID; DrawingStyle = BaseIn.DrawingStyle; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; // The Circle Vector should be copied in the specific version class } // ================================================ // Copy operator // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolCircleDef & CigiBaseSymbolCircleDef::operator=(const CigiBaseSymbolCircleDef &BaseIn) { SymbolID = BaseIn.SymbolID; DrawingStyle = BaseIn.DrawingStyle; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; // The Circle Vector should be copied in the specific version class return(*this); } // ==================================================================== // Conversion Control // ==================================================================== int CigiBaseSymbolCircleDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetDrawingStyle // ================================================ int CigiBaseSymbolCircleDef::SetDrawingStyle(const DrawingStyleGrp DrawingStyleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DrawingStyleIn < 0)||(DrawingStyleIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DrawingStyle", (int)DrawingStyleIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DrawingStyle = DrawingStyleIn; return(CIGI_SUCCESS); } // ================================================ // SetLineWidth // ================================================ int CigiBaseSymbolCircleDef::SetLineWidth(const float LineWidthIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (LineWidthIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("LineWidth", (double)LineWidthIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LineWidth = LineWidthIn; return(CIGI_SUCCESS); } // ================================================ // SetStipplePatternLen // ================================================ int CigiBaseSymbolCircleDef::SetStipplePatternLen(const float StipplePatternLenIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (StipplePatternLenIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("StipplePatternLen", (double)StipplePatternLenIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif StipplePatternLen = StipplePatternLenIn; return(CIGI_SUCCESS); } // ================================================ // GetCircleCount // ================================================ int CigiBaseSymbolCircleDef::GetCircleCount(void) { return(Circles.size()); } // ================================================ // GetCircle // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCircleSymbolData * CigiBaseSymbolCircleDef::GetCircle(int CircleIndex, bool bndchk) { CigiBaseCircleSymbolData * pCircle = NULL; if((CircleIndex >= 0) && ((Cigi_uint8)CircleIndex < Circles.size())) { pCircle = Circles[CircleIndex]; } else { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CircleIndex", (int)CircleIndex,0,Circles.size()); #endif } #endif } return(pCircle); } // ================================================ // ClearCircles // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiBaseSymbolCircleDef::ClearCircles(void) { CigiBaseCircleSymbolData *pCircle; vector::iterator iCircle; for(iCircle=Circles.begin();iCircle!=Circles.end();iCircle++) { pCircle = *iCircle; if(pCircle != NULL) delete pCircle; } Circles.clear(); VariableDataSize = 0; } cigi-ccl-3.3.3a+svn818/source/CigiBaseSymbolClone.cpp000066400000000000000000000062751210750432300222260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolClone.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/03/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSymbolClone.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolClone::CigiBaseSymbolClone(void) { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolClone::~CigiBaseSymbolClone(void) { } // ==================================================================== // Conversion Control // ==================================================================== int CigiBaseSymbolClone::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SYMBOL_CLONE_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetSymbolState // ================================================ int CigiBaseSymbolClone::SetSourceType(const SymbolSourceGrp SourceTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SourceTypeIn < 0)||(SourceTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SymbolSourceType", (int)SourceTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SourceType = SourceTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSymbolCtrl.cpp000066400000000000000000000124501210750432300220620ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSymbolCtrl.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolCtrl::CigiBaseSymbolCtrl(void) { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolCtrl::~CigiBaseSymbolCtrl(void) { } // ==================================================================== // Conversion Control // ==================================================================== int CigiBaseSymbolCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetSymbolState // ================================================ int CigiBaseSymbolCtrl::SetSymbolState(const SymbolStateGrp SymbolStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SymbolStateIn < 0)||(SymbolStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SymbolState", (int)SymbolStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SymbolState = SymbolStateIn; return(CIGI_SUCCESS); } // ================================================ // SetAttachState // ================================================ int CigiBaseSymbolCtrl::SetAttachState(const AttachStateGrp AttachStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AttachStateIn < 0)||(AttachStateIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AttachState", (int)AttachStateIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AttachState = AttachStateIn; return(CIGI_SUCCESS); } // ================================================ // SetFlashCtrl // ================================================ int CigiBaseSymbolCtrl::SetFlashCtrl(const FlashCtrlGrp FlashCtrlIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((FlashCtrlIn < 0)||(FlashCtrlIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("FlashCtrl", (int)FlashCtrlIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif FlashCtrl = FlashCtrlIn; return(CIGI_SUCCESS); } // ================================================ // SetInheritColor // ================================================ int CigiBaseSymbolCtrl::SetInheritColor(const InheritColorGrp InheritColorIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((InheritColorIn < 0)||(InheritColorIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("InheritColor", (int)InheritColorIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif InheritColor = InheritColorIn; return(CIGI_SUCCESS); } // ================================================ // SetFlashDutyCycle // ================================================ int CigiBaseSymbolCtrl::SetFlashDutyCycle(const Cigi_uint8 FlashDutyCycleIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((FlashDutyCycleIn < 0)||(FlashDutyCycleIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("FlashDutyCycle", (int)FlashDutyCycleIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif FlashDutyCycle = FlashDutyCycleIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSymbolLineDef.cpp000066400000000000000000000152721210750432300224710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolLineDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSymbolLineDef.h" #include "CigiExceptions.h" using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseSymbolLineDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolLineDef::CigiBaseSymbolLineDef(void) { } // ================================================ // ~CigiBaseSymbolLineDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolLineDef::~CigiBaseSymbolLineDef(void) { CigiBaseVertexSymbolData *pVtx; vector::iterator iVtx; for(iVtx=Vertices.begin();iVtx!=Vertices.end();iVtx++) { pVtx = *iVtx; if(pVtx != NULL) delete pVtx; } Vertices.clear(); } // ================================================ // CigiBaseSymbolLineDef - Copy constructor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolLineDef::CigiBaseSymbolLineDef(const CigiBaseSymbolLineDef &BaseIn) { SymbolID = BaseIn.SymbolID; Primitive = BaseIn.Primitive; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; // The Vertex Vector should be copied in the specific version class } // ================================================ // Copy operator // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolLineDef & CigiBaseSymbolLineDef::operator=(const CigiBaseSymbolLineDef &BaseIn) { SymbolID = BaseIn.SymbolID; Primitive = BaseIn.Primitive; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; // The Vertex Vector should be copied in the specific version class return(*this); } // ==================================================================== // Conversion Control // ==================================================================== int CigiBaseSymbolLineDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetPrimitive // ================================================ int CigiBaseSymbolLineDef::SetPrimitive(const PrimitiveGrp PrimitiveIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PrimitiveIn < 0)||(PrimitiveIn > 6))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Primitive", (int)PrimitiveIn,0,6); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Primitive = PrimitiveIn; return(CIGI_SUCCESS); } // ================================================ // SetLineWidth // ================================================ int CigiBaseSymbolLineDef::SetLineWidth(const float LineWidthIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (LineWidthIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("LineWidth", (double)LineWidthIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif LineWidth = LineWidthIn; return(CIGI_SUCCESS); } // ================================================ // SetStipplePatternLen // ================================================ int CigiBaseSymbolLineDef::SetStipplePatternLen(const float StipplePatternLenIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (StipplePatternLenIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("StipplePatternLen", (double)StipplePatternLenIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif StipplePatternLen = StipplePatternLenIn; return(CIGI_SUCCESS); } // ================================================ // GetVertexCount // ================================================ int CigiBaseSymbolLineDef::GetVertexCount(void) { return(Vertices.size()); } // ================================================ // GetVertex // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseVertexSymbolData * CigiBaseSymbolLineDef::GetVertex(int VertexIndex, bool bndchk) { CigiBaseVertexSymbolData * pVtx = NULL; if((VertexIndex >= 0) && ((Cigi_uint8)VertexIndex < Vertices.size())) { pVtx = Vertices[VertexIndex]; } else { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VertexIndex", (int)VertexIndex,0,Vertices.size()); #endif } #endif } return(pVtx); } // ================================================ // ClearVertices // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiBaseSymbolLineDef::ClearVertices(void) { CigiBaseVertexSymbolData *pVtx; vector::iterator iVtx; for(iVtx=Vertices.begin();iVtx!=Vertices.end();iVtx++) { pVtx = *iVtx; if(pVtx != NULL) delete pVtx; } Vertices.clear(); VariableDataSize = 0; } cigi-ccl-3.3.3a+svn818/source/CigiBaseSymbolSurfaceDef.cpp000066400000000000000000000224361210750432300231720ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolSurfaceDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSymbolSurfaceDef.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolSurfaceDef::CigiBaseSymbolSurfaceDef(void) { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolSurfaceDef::~CigiBaseSymbolSurfaceDef(void) { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetSurfaceState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetSurfaceState( const StateGrp SurfaceStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SurfaceStateIn < Active)||(SurfaceStateIn > Destroyed))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Surface State", (int)SurfaceStateIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SurfaceState = SurfaceStateIn; return(CIGI_SUCCESS); } // ================================================ // SetAttached // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetAttached( const AttachStateGrp AttachedIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AttachedIn < EntityAttached) || (AttachedIn > ViewAttached))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Attached State", (int)AttachedIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Attached = AttachedIn; return(CIGI_SUCCESS); } // ================================================ // SetBillBoardState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetBillboardState( const BillboardStateGrp BillboardStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((BillboardStateIn < NotBillboard) || (BillboardStateIn > Billboard))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Billboard State", (int)BillboardStateIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif BillboardState = BillboardStateIn; return(CIGI_SUCCESS); } // ================================================ // SetPerspectiveGrowth // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetPerspectiveGrowth( const PerspectiveGrowthStateGrp PerspectiveGrowthIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PerspectiveGrowthIn < Disable) || (PerspectiveGrowthIn > Enable))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Perspective Growth", (int)PerspectiveGrowthIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif PerspectiveGrowth = PerspectiveGrowthIn; return(CIGI_SUCCESS); } // ================================================ // SetYaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0) || (YawIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw", (float)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif YawBottom = YawIn; return(CIGI_SUCCESS); } // ================================================ // SetPitch // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetPitch(const float PitchIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PitchIn < -90.0) || (PitchIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pitch", (float)PitchIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Pitch = PitchIn; return(CIGI_SUCCESS); } // ================================================ // SetRoll // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetRoll(const float RollIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RollIn < -180.0) || (RollIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Roll", (float)RollIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Roll = RollIn; return(CIGI_SUCCESS); } // ================================================ // SetLeftEdgePosition // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetLeftEdgePosition( const float LeftEdgePosition, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LeftEdgePosition < 0.0) || (LeftEdgePosition > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Left Edge Position", (float)LeftEdgePosition,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif XLeft = LeftEdgePosition; return(CIGI_SUCCESS); } // ================================================ // SetRightEdgePosition // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetRightEdgePosition( const float RightEdgePosition, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RightEdgePosition < 0.0) || (RightEdgePosition > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Right Edge Position", (float)RightEdgePosition,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif YRight = RightEdgePosition; return(CIGI_SUCCESS); } // ================================================ // SetTopEdgePosition // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetTopEdgePosition( const float TopEdgePosition, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TopEdgePosition < 0.0) || (TopEdgePosition > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Top Edge Position", (float)TopEdgePosition,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ZTop = TopEdgePosition; return(CIGI_SUCCESS); } // ================================================ // SetBottomEdgePosition // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolSurfaceDef::SetBottomEdgePosition( const float BottomEdgePosition, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((BottomEdgePosition < 0.0) || (BottomEdgePosition > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Bottom Edge Position", (float)BottomEdgePosition,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif YawBottom = BottomEdgePosition; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseSymbolTextDef.cpp000066400000000000000000000135001210750432300225160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseSymbolTextDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseSymbolTextDef.h" #include "CigiExceptions.h" using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolTextDef::CigiBaseSymbolTextDef(void) { } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolTextDef::~CigiBaseSymbolTextDef(void) { } // ================================================ // CigiBaseSymbolTextDef - Copy constructor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolTextDef::CigiBaseSymbolTextDef(const CigiBaseSymbolTextDef &BaseIn) { SymbolID = BaseIn.SymbolID; Alignment = BaseIn.Alignment; Orientation = BaseIn.Orientation; FontSize = BaseIn.FontSize; VariableDataSize = BaseIn.VariableDataSize; Text = BaseIn.Text; } // ================================================ // Copy operator // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseSymbolTextDef & CigiBaseSymbolTextDef::operator=(const CigiBaseSymbolTextDef &BaseIn) { SymbolID = BaseIn.SymbolID; Alignment = BaseIn.Alignment; Orientation = BaseIn.Orientation; FontSize = BaseIn.FontSize; VariableDataSize = BaseIn.VariableDataSize; Text = BaseIn.Text; return(*this); } // ==================================================================== // Conversion Control // ==================================================================== int CigiBaseSymbolTextDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.GetCombinedCigiVersion() < 0x303) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetAlignment // ================================================ int CigiBaseSymbolTextDef::SetAlignment(const AlignmentGrp AlignmentIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AlignmentIn < 0)||(AlignmentIn > 8))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Alignment", (int)AlignmentIn,0,8); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Alignment = AlignmentIn; return(CIGI_SUCCESS); } // ================================================ // SetOrientation // ================================================ int CigiBaseSymbolTextDef::SetOrientation(const OrientationGrp OrientationIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((OrientationIn < 0)||(OrientationIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Orientation", (int)OrientationIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Orientation = OrientationIn; return(CIGI_SUCCESS); } // ================================================ // SetFontSize // ================================================ int CigiBaseSymbolTextDef::SetFontSize(const float FontSizeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (FontSize < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("FontSize", (double)FontSizeIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif FontSize = FontSizeIn; return(CIGI_SUCCESS); } // ================================================ // SetText // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseSymbolTextDef::SetText(const std::string &TextIn, bool bndchk) { int TxtSz = TextIn.size(); #ifndef CIGI_NO_BND_CHK if(bndchk && ((TxtSz < 0)||(TxtSz > MaxCharCnt))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TextSize", (int)TxtSz,1,MaxCharCnt); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Text = TextIn; if(TxtSz > MaxCharCnt) { Text.resize(MaxCharCnt,0); TxtSz = MaxCharCnt; } int Term = 0; if(TxtSz < 4) Term = 4 - TxtSz; else Term = 8 - ((TxtSz - 4) % 8); VariableDataSize = TxtSz + Term; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseTerrestrialSurfaceCtrl.cpp000066400000000000000000000114541210750432300244310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseTerrestrialSurfaceCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseTerrestrialSurfaceCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseTerrestrialSurfaceCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseTerrestrialSurfaceCtrl::CigiBaseTerrestrialSurfaceCtrl() { } // ================================================ // ~CigiBaseTerrestrialSurfaceCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseTerrestrialSurfaceCtrl::~CigiBaseTerrestrialSurfaceCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseTerrestrialSurfaceCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Scope // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseTerrestrialSurfaceCtrl::SetScope(const ScopeGrp ScopeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ScopeIn < 0)||(ScopeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Scope = ScopeIn; return(CIGI_SUCCESS); } // ================================================ // Severity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseTerrestrialSurfaceCtrl::SetSeverity(const Cigi_uint8 SeverityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SeverityIn < 0)||(SeverityIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Severity",(Cigi_uint8)SeverityIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Severity = SeverityIn; return(CIGI_SUCCESS); } // ================================================ // Coverage // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseTerrestrialSurfaceCtrl::SetCoverage(const Cigi_uint8 CoverageIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CoverageIn < 0)||(CoverageIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Coverage",(Cigi_uint8)CoverageIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Coverage = CoverageIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseTrajectoryDef.cpp000066400000000000000000000060641210750432300225410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseTrajectoryDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseTrajectoryDef.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseTrajectoryDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseTrajectoryDef::CigiBaseTrajectoryDef() { } // ================================================ // ~CigiBaseTrajectoryDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseTrajectoryDef::~CigiBaseTrajectoryDef() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseTrajectoryDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // V1 & V2 have the same packet id number if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_TRAJECTORY_DEF_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_TRAJECTORY_DEF_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiBaseViewCtrl.cpp000066400000000000000000000105771210750432300215370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseViewCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseViewCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseViewCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseViewCtrl::CigiBaseViewCtrl() { } // ================================================ // ~CigiBaseViewCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseViewCtrl::~CigiBaseViewCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // V1 & V2 have the same packet id number if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_VIEW_CTRL_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_VIEW_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Roll // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewCtrl::SetRoll(const float RollIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RollIn < -180.0)||(RollIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Roll",(float)RollIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Roll = RollIn; return(CIGI_SUCCESS); } // ================================================ // Pitch // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewCtrl::SetPitch(const float PitchIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PitchIn < -90.0)||(PitchIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pitch",(float)PitchIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Pitch = PitchIn; return(CIGI_SUCCESS); } // ================================================ // Yaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewCtrl::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseViewDef.cpp000066400000000000000000000113351210750432300213220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseViewDef.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseViewDef.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseViewDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseViewDef::CigiBaseViewDef() { } // ================================================ // ~CigiBaseViewDef // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseViewDef::~CigiBaseViewDef() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewDef::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // V1 & V2 have the same packet id number if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_VIEW_DEF_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_VIEW_DEF_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // MirrorMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewDef::SetMirrorMode(const MirrorModeGrp MirrorModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MirrorModeIn < 0)||(MirrorModeIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("MirrorMode",(MirrorModeGrp)MirrorModeIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif MirrorMode = MirrorModeIn; return(CIGI_SUCCESS); } // ================================================ // PixelReplicateMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewDef::SetPixelReplicateMode(const PixelReplicateModeGrp PixelReplicateModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PixelReplicateModeIn < 0)||(PixelReplicateModeIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("PixelReplicateMode",(PixelReplicateModeGrp)PixelReplicateModeIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif PixelReplicateMode = PixelReplicateModeIn; return(CIGI_SUCCESS); } // ================================================ // ViewType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseViewDef::SetViewType(const Cigi_uint8 ViewTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewTypeIn < 0)||(ViewTypeIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewType",(Cigi_uint8)ViewTypeIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewType = ViewTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseWaveCtrl.cpp000066400000000000000000000154531210750432300215250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseWaveCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseWaveCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseWaveCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseWaveCtrl::CigiBaseWaveCtrl() { } // ================================================ // ~CigiBaseWaveCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseWaveCtrl::~CigiBaseWaveCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_WAVE_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Scope // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetScope(const ScopeGrp ScopeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ScopeIn < 0)||(ScopeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Scope = ScopeIn; return(CIGI_SUCCESS); } // ================================================ // Breaker // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetBreaker(const BreakerGrp BreakerIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((BreakerIn < 0)||(BreakerIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Breaker",(BreakerGrp)BreakerIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Breaker = BreakerIn; return(CIGI_SUCCESS); } // ================================================ // WaveHt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetWaveHt(const float WaveHtIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (WaveHtIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WaveHt",(float)WaveHtIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WaveHt = WaveHtIn; return(CIGI_SUCCESS); } // ================================================ // WaveLen // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetWaveLen(const float WaveLenIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (WaveLenIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WaveLen",(float)WaveLenIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WaveLen = WaveLenIn; return(CIGI_SUCCESS); } // ================================================ // Period // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetPeriod(const float PeriodIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (PeriodIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Period",(float)PeriodIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Period = PeriodIn; return(CIGI_SUCCESS); } // ================================================ // Direction // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetDirection(const float DirectionIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DirectionIn < 0.0)||(DirectionIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Direction",(float)DirectionIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Direction = DirectionIn; return(CIGI_SUCCESS); } // ================================================ // PhaseOff // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetPhaseOff(const float PhaseOffIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PhaseOffIn < -360.0)||(PhaseOffIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("PhaseOff",(float)PhaseOffIn,-360.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif PhaseOff = PhaseOffIn; return(CIGI_SUCCESS); } // ================================================ // Leading // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWaveCtrl::SetLeading(const float LeadingIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((LeadingIn < -180.0)||(LeadingIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Leading",(float)LeadingIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Leading = LeadingIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseWeatherCondResp.cpp000066400000000000000000000133031210750432300230230ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseWeatherCondResp.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseWeatherCondResp.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseWeatherCondResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseWeatherCondResp::CigiBaseWeatherCondResp() { } // ================================================ // ~CigiBaseWeatherCondResp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseWeatherCondResp::~CigiBaseWeatherCondResp() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCondResp::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion < 3) { CnvtInfo.ProcID = CigiProcessType::ProcNone; CnvtInfo.CnvtPacketID = 0; } else { CnvtInfo.ProcID = CigiProcessType::ProcStd; CnvtInfo.CnvtPacketID = CIGI_WEATHER_COND_RESP_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Humidity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCondResp::SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HumidityIn < 0)||(HumidityIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Humidity",(Cigi_uint8)HumidityIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Humidity = HumidityIn; return(CIGI_SUCCESS); } // ================================================ // Visibility // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCondResp::SetVisibility(const float VisibilityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (VisibilityIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Visibility",(float)VisibilityIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Visibility = VisibilityIn; return(CIGI_SUCCESS); } // ================================================ // HorizWindSp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCondResp::SetHorizWindSp(const float HorizWindSpIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (HorizWindSpIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("HorizWindSp",(float)HorizWindSpIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif HorizWindSp = HorizWindSpIn; return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCondResp::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } // ================================================ // BaroPress // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCondResp::SetBaroPress(const float BaroPressIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (BaroPressIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("BaroPress",(float)BaroPressIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif BaroPress = BaroPressIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiBaseWeatherCtrl.cpp000066400000000000000000000124561210750432300222220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiBaseWeatherCtrl.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiBaseWeatherCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseWeatherCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseWeatherCtrl::CigiBaseWeatherCtrl() { } // ================================================ // ~CigiBaseWeatherCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseWeatherCtrl::~CigiBaseWeatherCtrl() { } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCtrl::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // V1 & V2 have the same packet id number if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_WEATHER_CTRL_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_WEATHER_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // VisibilityRng // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCtrl::SetVisibilityRng(const float VisibilityRngIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (VisibilityRngIn < 0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VisibilityRng",(double)VisibilityRngIn,">=",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VisibilityRng = VisibilityRngIn; if(VisibilityRng > 70000.0f) Opacity = 100.0f; else Opacity = ((VisibilityRng/70000.0f)*100.0f); return(CIGI_SUCCESS); } // ================================================ // Severity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCtrl::SetSeverity(const Cigi_uint8 SeverityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SeverityIn < 0)||(SeverityIn > 5))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Severity",(Cigi_uint8)SeverityIn,0,5); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Severity = SeverityIn; return(CIGI_SUCCESS); } // ================================================ // ScudFreq // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCtrl::SetScudFreq(const float ScudFreqIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ScudFreqIn < 0.0)||(ScudFreqIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ScudFreq",(float)ScudFreqIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ScudFreq = ScudFreqIn; return(CIGI_SUCCESS); } // ================================================ // Coverage // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiBaseWeatherCtrl::SetCoverage(const float CoverageIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CoverageIn < 0.0)||(CoverageIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Coverage",(float)CoverageIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Coverage = CoverageIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCelestialCtrl.cpp000066400000000000000000000221471210750432300217330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCelestialCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCelestialCtrl.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCelestialCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCelestialCtrlV3::CigiCelestialCtrlV3() { PacketID = CIGI_CELESTIAL_CTRL_PACKET_ID_V3; PacketSize = CIGI_CELESTIAL_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; Hour = 0; Minute = 0; Month = 1; Day = 1; Year = 2000; StarInt = 0.0; EphemerisEn = false; SunEn = false; MoonEn = false; StarEn = false; DateVld = false; AtmosEn = false; Aerosol = 0.0; Humidity = 30; AirTemp = 0.0; Visibility = 64373.76f; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; } // ================================================ // ~CigiCelestialCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCelestialCtrlV3::~CigiCelestialCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseEnvCtrl * Data; if(Spec == NULL) Data = ( CigiBaseEnvCtrl *)Base; else Data = ( CigiBaseEnvCtrl *)Spec; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->Hour; *CDta.c++ = Data->Minute; Cigi_uint8 HDta = (Data->EphemerisEn) ? 0x01 : 0; HDta |= (Data->SunEn) ? 0x02 : 0; HDta |= (Data->MoonEn) ? 0x04 : 0; HDta |= (Data->StarEn) ? 0x08 : 0; HDta |= (Data->DateVld) ? 0x10 : 0; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; // Determine date Cigi_uint32 date = ((Cigi_uint32)Data->Month * 1000000) + ((Cigi_uint32)Data->Day * 10000) + (Cigi_uint32)Data->Year; *CDta.l++ = date; *CDta.f++ = Data->StarInt; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; Cigi_uint32 date; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { Hour = *CDta.c++; Minute = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; EphemerisEn = ((HDta & 0x01) != 0); SunEn = ((HDta & 0x02) != 0); MoonEn = ((HDta & 0x04) != 0); StarEn = ((HDta & 0x08) != 0); DateVld = ((HDta & 0x10) != 0); CDta.c += 3; date = *CDta.l++; StarInt = *CDta.f++; } else { Hour = *CDta.c++; Minute = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; EphemerisEn = ((HDta & 0x01) != 0); SunEn = ((HDta & 0x02) != 0); MoonEn = ((HDta & 0x04) != 0); StarEn = ((HDta & 0x08) != 0); DateVld = ((HDta & 0x10) != 0); CDta.c += 3; CigiSwap4(&date, CDta.l++); CigiSwap4(&StarInt, CDta.f++); } // Determine date Month = (Cigi_uint8)(date / 1000000); date -= ((Cigi_uint32)Month * 1000000); Day = (Cigi_uint8)(date / 10000); date -= ((Cigi_uint32)Day * 10000); Year = (Cigi_uint16)date; if(Spec != NULL) { CigiBaseEnvCtrl * Data = (CigiBaseEnvCtrl *)Spec; Data->Hour = Hour; Data->Minute = Minute; Data->EphemerisEn = EphemerisEn; Data->SunEn = SunEn; Data->MoonEn = MoonEn; Data->StarEn = StarEn; Data->DateVld = DateVld; Data->StarInt = StarInt; Data->Month = Month; Data->Day = Day; Data->Year = Year; } return(PacketSize); } // ==================================================================== // Filling the Hold object // ==================================================================== // ================================================ // FillHold // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiCelestialCtrlV3::FillHold(CigiBaseEnvCtrl * Hold) const { Hold->Hour = Hour; Hold->Minute = Minute; Hold->EphemerisEn = EphemerisEn; Hold->SunEn = SunEn; Hold->MoonEn = MoonEn; Hold->StarEn = StarEn; Hold->DateVld = DateVld; Hold->Month = Month; Hold->Day = Day; Hold->Year = Year; Hold->StarInt = StarInt; } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Hour // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::SetHour(const Cigi_uint8 HourIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HourIn < 0)||(HourIn > 23))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Hour",(Cigi_uint8)HourIn,0,23); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Hour = HourIn; return(CIGI_SUCCESS); } // ================================================ // Minute // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::SetMinute(const Cigi_uint8 MinuteIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MinuteIn < 0)||(MinuteIn > 59))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Minute",(Cigi_uint8)MinuteIn,0,59); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Minute = MinuteIn; return(CIGI_SUCCESS); } // ================================================ // Month // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::SetMonth(const Cigi_uint8 MonthIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MonthIn < 1)||(MonthIn > 12))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Month",(Cigi_uint8)MonthIn,1,12); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Month = MonthIn; return(CIGI_SUCCESS); } // ================================================ // Day // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::SetDay(const Cigi_uint8 DayIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DayIn < 1)||(DayIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Day",(Cigi_uint8)DayIn,1,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Day = DayIn; return(CIGI_SUCCESS); } // ================================================ // Star Field Intensity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCelestialCtrlV3::SetStarInt(const float StarIntIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((StarIntIn < 0.0)||(StarIntIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("StarInt",StarIntIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif StarInt = StarIntIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCircleSymbolDataV3_3.cpp000066400000000000000000000071431210750432300230140ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCircleSymbolDataV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  01/17/2008 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCircleSymbolDataV3_3.h" #include "CigiExceptions.h" #include "CigiSwapping.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCircleSymbolDataV3_3::CigiCircleSymbolDataV3_3(void) { CenterUPosition = 0.0f; CenterVPosition = 0.0f; Radius = 0.0f; InnerRadius = 0.0f; StartAngle = 0.0f; EndAngle = 0.0f; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCircleSymbolDataV3_3::~CigiCircleSymbolDataV3_3(void) { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCircleSymbolDataV3_3::Pack(CigiBaseCircleSymbolData * Base, Cigi_uint8 * Buff) const { PackPointer CDta; CigiCircleSymbolDataV3_3 * Data = ( CigiCircleSymbolDataV3_3 *)Base; CDta.c = Buff; *CDta.f++ = Data->CenterUPosition; *CDta.f++ = Data->CenterVPosition; *CDta.f++ = Data->Radius; *CDta.f++ = Data->InnerRadius; *CDta.f++ = Data->StartAngle; *CDta.f++ = Data->EndAngle; return(CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCircleSymbolDataV3_3::Unpack(Cigi_uint8 * Buff, bool Swap) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; if(!Swap) { CenterUPosition = *CDta.f++; CenterVPosition = *CDta.f++; Radius = *CDta.f++; InnerRadius = *CDta.f++; StartAngle = *CDta.f++; EndAngle = *CDta.f++; } else { CigiSwap4(&CenterUPosition, CDta.f++); CigiSwap4(&CenterVPosition, CDta.f++); CigiSwap4(&Radius, CDta.f++); CigiSwap4(&InnerRadius, CDta.f++); CigiSwap4(&StartAngle, CDta.f++); CigiSwap4(&EndAngle, CDta.f++); } return(CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetSegDefV1.cpp000066400000000000000000000161001210750432300220040ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegDefV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetSegDefV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetSegDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegDefV1::CigiCollDetSegDefV1() { PacketID = CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1; PacketSize = CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; SegmentID = 0; SegmentEn = false; X1 = 0.0; Y1 = 0.0; Z1 = 0.0; X2 = 0.0; Y2 = 0.0; Z2 = 0.0; Mask = 0; } // ================================================ // ~CigiCollDetSegDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegDefV1::~CigiCollDetSegDefV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCollDetSegDef * Data = ( CigiBaseCollDetSegDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = Data->SegmentID; if(HDta > 127) HDta = 127; HDta |= (Data->SegmentEn) ? 0x80 : 0x00; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Mask); float tpt; Cigi_int16 stpt; tpt = Data->X1 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Y1 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Z1 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->X2 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Y2 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Z2 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); memcpy(Buff,tBuf,CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; SegmentID = HDta & 0x7f; SegmentEn = ((HDta & 0x80) != 0); CDta.c += 3; CIGI_SCOPY4(&Mask, CDta.l++); Cigi_int16 stpt; float tpt; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; X1 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Y1 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Z1 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; X2 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Y2 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Z2 = tpt * 0.015625f; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SegmentID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV1::SetSegmentID(const Cigi_uint8 SegmentIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SegmentIDIn < 0)||(SegmentIDIn > 127))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SegmentID",(Cigi_uint8)SegmentIDIn,0,127); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SegmentID = SegmentIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetSegDefV2.cpp000066400000000000000000000161001210750432300220050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegDefV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetSegDefV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetSegDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegDefV2::CigiCollDetSegDefV2() { PacketID = CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2; PacketSize = CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; SegmentID = 0; SegmentEn = false; X1 = 0.0; Y1 = 0.0; Z1 = 0.0; X2 = 0.0; Y2 = 0.0; Z2 = 0.0; Mask = 0; } // ================================================ // ~CigiCollDetSegDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegDefV2::~CigiCollDetSegDefV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCollDetSegDef * Data = ( CigiBaseCollDetSegDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = Data->SegmentID; if(HDta > 127) HDta = 127; HDta |= (Data->SegmentEn) ? 0x80 : 0x00; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Mask); float tpt; Cigi_int16 stpt; tpt = Data->X1 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Y1 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Z1 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->X2 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Y2 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); tpt = Data->Z2 / 0.015625f; if(tpt > 32767.0f) stpt = 32767; else if(tpt < -32768.0f) stpt = -32768; else stpt = (Cigi_int16)tpt; CIGI_SCOPY2(CDta.s++, &stpt); memcpy(Buff,tBuf,CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; SegmentID = HDta & 0x7f; SegmentEn = ((HDta & 0x80) != 0); CDta.c += 3; CIGI_SCOPY4(&Mask, CDta.l++); Cigi_int16 stpt; float tpt; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; X1 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Y1 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Z1 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; X2 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Y2 = tpt * 0.015625f; CIGI_SCOPY2(&stpt, CDta.s++); tpt = (float)stpt; Z2 = tpt * 0.015625f; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SegmentID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV2::SetSegmentID(const Cigi_uint8 SegmentIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SegmentIDIn < 0)||(SegmentIDIn > 127))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SegmentID",(Cigi_uint8)SegmentIDIn,0,127); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SegmentID = SegmentIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetSegDefV3.cpp000066400000000000000000000115501210750432300220120ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegDefV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetSegDefV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetSegDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegDefV3::CigiCollDetSegDefV3() { PacketID = CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3; PacketSize = CIGI_COLL_DET_SEG_DEF_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; SegmentID = 0; SegmentEn = false; X1 = 0.0; Y1 = 0.0; Z1 = 0.0; X2 = 0.0; Y2 = 0.0; Z2 = 0.0; Mask = 0; } // ================================================ // ~CigiCollDetSegDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegDefV3::~CigiCollDetSegDefV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCollDetSegDef * Data = ( CigiBaseCollDetSegDef *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->SegmentID; Cigi_uint8 HDta = (Data->SegmentEn) ? 0x01 : 0x00; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.f++ = Data->X1; *CDta.f++ = Data->Y1; *CDta.f++ = Data->Z1; *CDta.f++ = Data->X2; *CDta.f++ = Data->Y2; *CDta.f++ = Data->Z2; *CDta.l++ = Data->Mask; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegDefV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; SegmentID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SegmentEn = ((HDta & 0x01) != 0); CDta.s++; X1 = *CDta.f++; Y1 = *CDta.f++; Z1 = *CDta.f++; X2 = *CDta.f++; Y2 = *CDta.f++; Z2 = *CDta.f++; Mask = *CDta.l++; } else { CigiSwap2(&EntityID, CDta.s++); SegmentID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SegmentEn = ((HDta & 0x01) != 0); CDta.s++; CigiSwap4(&X1, CDta.f++); CigiSwap4(&Y1, CDta.f++); CigiSwap4(&Z1, CDta.f++); CigiSwap4(&X2, CDta.f++); CigiSwap4(&Y2, CDta.f++); CigiSwap4(&Z2, CDta.f++); CigiSwap4(&Mask, CDta.l++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiCollDetSegRespV1.cpp000066400000000000000000000130431210750432300222220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegRespV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetSegRespV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetSegRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegRespV1::CigiCollDetSegRespV1() { PacketID = CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1; PacketSize = CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; SegID = 0; CollType = NonEntity; CollEntityID = 0; Material = 0; IntersectDist = 0.0; X = 0.0; Y = 0.0; Z = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiCollDetSegRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegRespV1::~CigiCollDetSegRespV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCollDetSegResp * Data = ( CigiBaseCollDetSegResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->SegID << 1) & 0xfe; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Material); if(Data->IsValidV1or2) { CIGI_SCOPY4(CDta.f++, &Data->X); CIGI_SCOPY4(CDta.f++, &Data->Y); CIGI_SCOPY4(CDta.f++, &Data->Z); } else { float tzero = 0.0f; CIGI_SCOPY4(CDta.f++, &tzero); CIGI_SCOPY4(CDta.f++, &tzero); CIGI_SCOPY4(CDta.f++, &tzero); } memcpy(Buff,tBuf,CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); SegID = (*CDta.c++ >> 1) & 0x7f; CDta.c += 3; CIGI_SCOPY4(&Material, CDta.l++); CIGI_SCOPY4(&X, CDta.f++); CIGI_SCOPY4(&Y, CDta.f++); CIGI_SCOPY4(&Z, CDta.f++); IsValidV1or2 = true; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SegID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV1::SetSegID(const Cigi_uint8 SegIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SegIDIn < 0)||(SegIDIn > 127))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SegID",(Cigi_uint8)SegIDIn,0,127); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SegID = SegIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetSegRespV2.cpp000066400000000000000000000143271210750432300222310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegRespV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetSegRespV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetSegRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegRespV2::CigiCollDetSegRespV2() { PacketID = CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2; PacketSize = CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; SegID = 0; CollType = NonEntity; CollEntityID = 0; Material = 0; IntersectDist = 0.0; X = 0.0; Y = 0.0; Z = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiCollDetSegRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegRespV2::~CigiCollDetSegRespV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCollDetSegResp * Data = ( CigiBaseCollDetSegResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->SegID << 1) & 0xfe; HDta |= ((Cigi_uint8)Data->CollType) & 0x01; *CDta.c++ = HDta; *CDta.c++ = 0; CIGI_SCOPY2(CDta.s++, &Data->CollEntityID); CIGI_SCOPY4(CDta.l++, &Data->Material); if(Data->IsValidV1or2) { CIGI_SCOPY4(CDta.f++, &Data->X); CIGI_SCOPY4(CDta.f++, &Data->Y); CIGI_SCOPY4(CDta.f++, &Data->Z); } else { float tzero = 0.0f; CIGI_SCOPY4(CDta.f++, &tzero); CIGI_SCOPY4(CDta.f++, &tzero); CIGI_SCOPY4(CDta.f++, &tzero); } memcpy(Buff,tBuf,CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; SegID = (HDta >> 1) & 0x7f; CollType = (CollTypeGrp)(HDta & 0x01); CDta.c++; CIGI_SCOPY2(&CollEntityID, CDta.s++); CIGI_SCOPY4(&Material, CDta.l++); CIGI_SCOPY4(&X, CDta.f++); CIGI_SCOPY4(&Y, CDta.f++); CIGI_SCOPY4(&Z, CDta.f++); IsValidV1or2 = true; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SegID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV2::SetSegID(const Cigi_uint8 SegIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SegIDIn < 0)||(SegIDIn > 127))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SegID",(Cigi_uint8)SegIDIn,0,127); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SegID = SegIDIn; return(CIGI_SUCCESS); } // ================================================ // CollType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV2::SetCollType(const CollTypeGrp CollTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CollTypeIn < 0)||(CollTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CollType",(CollTypeGrp)CollTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CollType = CollTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetSegRespV3.cpp000066400000000000000000000121371210750432300222270ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetSegRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetSegRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetSegRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegRespV3::CigiCollDetSegRespV3() { PacketID = CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3; PacketSize = CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; SegID = 0; CollType = NonEntity; CollEntityID = 0; Material = 0; IntersectDist = 0.0; X = 0.0; Y = 0.0; Z = 0.0; IsValidV1or2 = false; } // ================================================ // ~CigiCollDetSegRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetSegRespV3::~CigiCollDetSegRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCollDetSegResp * Data = ( CigiBaseCollDetSegResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->SegID; *CDta.c++ = ((Cigi_uint8)Data->CollType) & 0x01; *CDta.s++ = Data->CollEntityID; *CDta.l++ = Data->Material; if(!Data->IsValidV1or2) *CDta.f++ = Data->IntersectDist; else *CDta.f++ = 0.0f; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; SegID = *CDta.c++; CollType = (CollTypeGrp)(*CDta.c++ & 0x01); CollEntityID = *CDta.s++; Material = *CDta.l++; IntersectDist = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); SegID = *CDta.c++; CollType = (CollTypeGrp)(*CDta.c++ & 0x01); CigiSwap2(&CollEntityID, CDta.s++); CigiSwap4(&Material, CDta.l++); CigiSwap4(&IntersectDist, CDta.f++); } IsValidV1or2 = false; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CollType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetSegRespV3::SetCollType(const CollTypeGrp CollTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CollTypeIn < 0)||(CollTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CollType",(CollTypeGrp)CollTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CollType = CollTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetVolDefV2.cpp000066400000000000000000000137621210750432300220420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolDefV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetVolDefV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetVolDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolDefV2::CigiCollDetVolDefV2() { PacketID = CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2; PacketSize = CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; VolID = 0; VolEn = false; VolType = Sphere; Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; HeightOrRadius = 0.0; Width = 0.0; Depth = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiCollDetVolDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolDefV2::~CigiCollDetVolDefV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCollDetVolDef * Data = ( CigiBaseCollDetVolDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = Data->VolID & 0x7f; HDta |= (Data->VolEn) ? 0x80 : 0; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; float tfDim = Data->Xoff / 0.015625f; Cigi_int16 tsDim = (short)tfDim; CIGI_SCOPY2(CDta.s++, &tsDim); tfDim = Data->Yoff / 0.015625f; tsDim = (Cigi_int16)tfDim; CIGI_SCOPY2(CDta.s++, &tsDim); tfDim = Data->Zoff / 0.015625f; tsDim = (Cigi_int16)tfDim; CIGI_SCOPY2(CDta.s++, &tsDim); tfDim = Data->HeightOrRadius / 0.015625f; tsDim = (Cigi_int16)tfDim; CIGI_SCOPY2(CDta.s++, &tsDim); tfDim = Data->Width / 0.015625f; tsDim = (Cigi_int16)tfDim; CIGI_SCOPY2(CDta.s++, &tsDim); tfDim = Data->Depth / 0.015625f; tsDim = (Cigi_int16)tfDim; CIGI_SCOPY2(CDta.s++, &tsDim); memcpy(Buff,tBuf,CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; VolID = HDta & 0x7f; VolEn = ((HDta & 0x80) != 0); CDta.c += 3; Cigi_int16 tsScl; CIGI_SCOPY2(&tsScl, CDta.s++); float tfScl = (float)tsScl; Xoff = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.s++); tfScl = (float)tsScl; Yoff = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.s++); tfScl = (float)tsScl; Zoff = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.s++); tfScl = (float)tsScl; HeightOrRadius = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.s++); tfScl = (float)tsScl; Width = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.s++); tfScl = (float)tsScl; Depth = tfScl * 0.015625f; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiCollDetVolDefV3.cpp000066400000000000000000000164461210750432300220450ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolDefV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetVolDefV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetVolDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolDefV3::CigiCollDetVolDefV3() { PacketID = CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3; PacketSize = CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; VolID = 0; VolEn = false; VolType = Sphere; Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; HeightOrRadius = 0.0; Width = 0.0; Depth = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiCollDetVolDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolDefV3::~CigiCollDetVolDefV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCollDetVolDef * Data = ( CigiBaseCollDetVolDef *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->VolID; Cigi_uint8 HDta = (Data->VolEn) ? 0x01 : 0; HDta |= (Data->VolType << 1) & 0x02; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.f++ = Data->Xoff; *CDta.f++ = Data->Yoff; *CDta.f++ = Data->Zoff; *CDta.f++ = Data->HeightOrRadius; *CDta.f++ = Data->Width; *CDta.f++ = Data->Depth; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Yaw; *CDta.l = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; VolID = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; VolEn = ((HDta & 0x01) != 0); VolType = (VolTypeGrp)((HDta >> 1) & 0x01); CDta.s++; Xoff = *CDta.f++; Yoff = *CDta.f++; Zoff = *CDta.f++; HeightOrRadius = *CDta.f++; Width = *CDta.f++; Depth = *CDta.f++; Roll = *CDta.f++; Pitch = *CDta.f++; Yaw = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); VolID = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; VolEn = ((HDta & 0x01) != 0); VolType = (VolTypeGrp)((HDta >> 1) & 0x01); CDta.s++; CigiSwap4(&Xoff, CDta.f++); CigiSwap4(&Yoff, CDta.f++); CigiSwap4(&Zoff, CDta.f++); CigiSwap4(&HeightOrRadius, CDta.f++); CigiSwap4(&Width, CDta.f++); CigiSwap4(&Depth, CDta.f++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Yaw, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // VolType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV3::SetVolType(const VolTypeGrp VolTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VolTypeIn < 0)||(VolTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VolType",(VolTypeGrp)VolTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VolType = VolTypeIn; return(CIGI_SUCCESS); } // ================================================ // Roll // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV3::SetRoll(const float RollIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((RollIn < -180.0)||(RollIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Roll",(float)RollIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Roll = RollIn; return(CIGI_SUCCESS); } // ================================================ // Pitch // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV3::SetPitch(const float PitchIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((PitchIn < -90.0)||(PitchIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pitch",(float)PitchIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Pitch = PitchIn; return(CIGI_SUCCESS); } // ================================================ // Yaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolDefV3::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetVolRespV2.cpp000066400000000000000000000122171210750432300222470ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolRespV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetVolRespV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetVolRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolRespV2::CigiCollDetVolRespV2() { PacketID = CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2; PacketSize = CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; VolID = 0; CollType = NonEntity; CollEntityID = 0; CollVolID = 0; } // ================================================ // ~CigiCollDetVolRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolRespV2::~CigiCollDetVolRespV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolRespV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCollDetVolResp * Data = ( CigiBaseCollDetVolResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->VolID << 1) & 0xfe; HDta |= (Cigi_uint16)(Data->CollType & 0x01); *CDta.c++ = HDta; *CDta.c++ = 0; CIGI_SCOPY2(CDta.s++, &Data->CollEntityID); memcpy(Buff,tBuf,CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolRespV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; VolID = (HDta >> 1) & 0x7f; CollType = (CollTypeGrp)(HDta & 0x01); CDta.c++; CIGI_SCOPY2(&CollEntityID, CDta.s++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // VolID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolRespV2::SetVolID(const Cigi_uint8 VolIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VolIDIn < 0)||(VolIDIn > 127))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VolID",(Cigi_uint8)VolIDIn,0,127); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VolID = VolIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiCollDetVolRespV3.cpp000066400000000000000000000105561210750432300222540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCollDetVolRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCollDetVolRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCollDetVolRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolRespV3::CigiCollDetVolRespV3() { PacketID = CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3; PacketSize = CIGI_COLL_DET_VOL_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; VolID = 0; CollType = NonEntity; CollEntityID = 0; CollVolID = 0; } // ================================================ // ~CigiCollDetVolRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCollDetVolRespV3::~CigiCollDetVolRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCollDetVolResp * Data = ( CigiBaseCollDetVolResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->VolID; *CDta.c++ = (Cigi_uint8)(Data->CollType & 0x01); *CDta.s++ = Data->CollEntityID; *CDta.c++ = Data->CollVolID; *CDta.c++ = 0; *CDta.s++ = 0; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCollDetVolRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; VolID = *CDta.c++; CollType = (CollTypeGrp)(*CDta.c++ & 0x01); CollEntityID = *CDta.s++; CollVolID = *CDta.c++; } else { CigiSwap2(&EntityID, CDta.s++); VolID = *CDta.c++; CollType = (CollTypeGrp)(*CDta.c++ & 0x01); CigiSwap2(&CollEntityID, CDta.s++); CollVolID = *CDta.c++; } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiCompCtrlV1.cpp000066400000000000000000000514411210750432300211320ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Changed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCompCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif const CigiBaseCompCtrl::CompClassV3Grp CigiCompCtrlV1::CompClassV1xV3[CigiCompCtrlV1::CompClassCnvtSz] = { EntityV3, AtmosphereV3, ViewV3 }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCompCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV1::CigiCompCtrlV1() { PacketID = CIGI_COMP_CTRL_PACKET_ID_V1; PacketSize = CIGI_COMP_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; CompID = 0; InstanceID = 0; EntityID = 0; ViewID = 0; CompState = 0; CompAssoc = Entity; CompClassV2 = EntityV2; CompClassV3 = EntityV3; CompData[0] = 0; CompData[1] = 0; CompData[2] = 0; CompData[3] = 0; CompData[4] = 0; CompData[5] = 0; } // ================================================ // ~CigiCompCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV1::~CigiCompCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCompCtrl * Data = ( CigiBaseCompCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->ViewID << 3) & 0xf8; HDta |= (Data->CompAssoc << 1) & 0x06; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY2(CDta.s++, &Data->CompID); CIGI_SCOPY2(CDta.s++, &Data->CompState); CIGI_SCOPY4(CDta.l++, &Data->CompData[0]); CIGI_SCOPY4(CDta.l++, &Data->CompData[1]); memcpy(Buff,tBuf,CIGI_COMP_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COMP_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; ViewID = (HDta >> 3) & 0x1f; CompAssoc = (CompAssocGrp)((HDta >> 1) & 0x03); CDta.c += 3; CIGI_SCOPY2(&CompID, CDta.s++); CIGI_SCOPY2(&CompState, CDta.s++); CIGI_SCOPY4(&CompData[0], CDta.l++); CIGI_SCOPY4(&CompData[1], CDta.l++); if((CompAssoc >= CigiBaseCompCtrl::Entity) && (CompAssoc <= CigiBaseCompCtrl::View)) { // The Component classes in V2 valued at 0, 1, & 2 // match the classes in V1 in value and purpose. CompClassV2 = (CompClassV2Grp)CompAssoc; CompClassV3 = CompClassV1xV3[(int)CompAssoc]; } else { CompClassV2 = CigiBaseCompCtrl::NoCnvtV2; CompClassV3 = CigiBaseCompCtrl::NoCnvtV3; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: CIGI_ART_PART_CTRL_PACKET_ID_V1 & // CIGI_ART_PART_CTRL_PACKET_ID_V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (ViewIDIn > 31)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint8)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = ViewIDIn; if(CompAssoc == CigiBaseCompCtrl::View) InstanceID = ViewID; return(CIGI_SUCCESS); } // ================================================ // CompAssoc // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompAssoc(const CompAssocGrp CompAssocIn, bool bndchk) { // V1 to V3 Component Class conversion table const CompClassV3Grp Assoc2ClassV3[3] = { EntityV3, AtmosphereV3, ViewV3 }; #ifndef CIGI_NO_BND_CHK if(bndchk && ((CompAssocIn < 0)||(CompAssocIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CompAssoc",(CompAssocGrp)CompAssocIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CompAssoc = CompAssocIn; CompClassV2 = (CompClassV2Grp)CompAssoc; CompClassV3 = CompClassV1xV3[CompAssocIn]; if(CompAssoc == CigiBaseCompCtrl::Entity) InstanceID = EntityID; else if(CompAssoc == CigiBaseCompCtrl::View) InstanceID = ViewID; else InstanceID = 0; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_int8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { union { Cigi_uint8 uc; Cigi_int8 sc; } cxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; cxfer.sc = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)cxfer.uc; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint16 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - short // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { union { Cigi_int16 s16; Cigi_uint16 u16; } sxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; sxfer.s16 = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)sxfer.u16; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint32 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } CompData[Word] = CompDataIn; return(CIGI_SUCCESS); } // ================================================ // SetCompData - long // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.s32 = CompDataIn; CompData[Word] = (Cigi_uint32)tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - float // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint32 lDta; float fDta; } XDta; XDta.fDta = CompDataIn; CompData[Word] = XDta.lDta; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint64 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((CompDataIn >> 32) & _I64_CONST_(0x00000000ffffffff)); CompData[Word] = (Cigi_uint32)(CompDataIn & _I64_CONST_(0x00000000ffffffff)); return(CIGI_SUCCESS); } // ================================================ // SetCompData - double // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV1::SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint64 i; double d; } XDta; XDta.d = CompDataIn; int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((XDta.i >> 32) & _I64_CONST_(0x00000000ffffffff)); CompData[Word] = (Cigi_uint32)(XDta.i & _I64_CONST_(0x00000000ffffffff)); return(CIGI_SUCCESS); } // ================================================ // GetUCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 CigiCompCtrlV1::GetUCharCompData(const unsigned int Word, const BytePos Pos) { Cigi_uint8 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta = 0; } else tDta = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta); } // ================================================ // GetCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int8 CigiCompCtrlV1::GetCharCompData(const unsigned int Word, const BytePos Pos) { union { Cigi_int8 sc; Cigi_uint8 uc; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta.uc = 0; } else tDta.uc = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta.sc); } // ================================================ // GetUShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint16 CigiCompCtrlV1::GetUShortCompData(const unsigned int Word, const HalfWordPos Pos) { Cigi_uint16 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta = 0; } else tDta = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta); } // ================================================ // GetShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int16 CigiCompCtrlV1::GetShortCompData(const unsigned int Word, const HalfWordPos Pos) { union { Cigi_int16 s16; Cigi_uint16 u16; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta.u16 = 0; } else tDta.u16 = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta.s16); } // ================================================ // GetULongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiCompCtrlV1::GetULongCompData(const unsigned int Word) { Cigi_uint32 tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta = 0; } else tDta = CompData[Word]; return(tDta); } // ================================================ // GetLongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiCompCtrlV1::GetLongCompData(const unsigned int Word) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.s32); } // ================================================ // GetFloatCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiCompCtrlV1::GetFloatCompData(const unsigned int Word) { union { float f32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.f32); } // ================================================ // GetI64CompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint64 CigiCompCtrlV1::GetI64CompData(const unsigned int Pos) { Cigi_uint64 tDta; if(Pos > 0) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; } return(tDta); } // ================================================ // GetDoubleCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv double CigiCompCtrlV1::GetDoubleCompData(const unsigned int Pos) { union DtaXfer { Cigi_uint64 i; double d; } XDta; if(Pos > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif XDta.d = 0.0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); XDta.i = tDtah | tDtal; } return(XDta.d); } cigi-ccl-3.3.3a+svn818/source/CigiCompCtrlV2.cpp000066400000000000000000000506441210750432300211370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Changed the conversion process.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCompCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // Component Class conversion Tables const CigiBaseCompCtrl::CompAssocGrp CigiCompCtrlV2::CompClassV2xV1[CigiCompCtrlV2::CompClassCnvtSz] = { Entity, Environment, View, NoCnvtV1, NoCnvtV1, NoCnvtV1 }; const CigiBaseCompCtrl::CompClassV3Grp CigiCompCtrlV2::CompClassV2xV3[CigiCompCtrlV2::CompClassCnvtSz] = { EntityV3, AtmosphereV3, ViewV3, ViewGrpV3, SensorV3, SystemV3 }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCompCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV2::CigiCompCtrlV2() { PacketID = CIGI_COMP_CTRL_PACKET_ID_V2; PacketSize = CIGI_COMP_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; CompID = 0; InstanceID = 0; EntityID = 0; ViewID = 0; CompState = 0; CompAssoc = CigiBaseCompCtrl::Entity; CompClassV2 = CigiBaseCompCtrl::EntityV2; CompClassV3 = CigiBaseCompCtrl::EntityV3; CompData[0] = 0; CompData[1] = 0; CompData[2] = 0; CompData[3] = 0; CompData[4] = 0; CompData[5] = 0; } // ================================================ // ~CigiCompCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV2::~CigiCompCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseCompCtrl * Data = ( CigiBaseCompCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->InstanceID); *CDta.c++ = Data->CompClassV2; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY2(CDta.s++, &Data->CompID); CIGI_SCOPY2(CDta.s++, &Data->CompState); CIGI_SCOPY4(CDta.l++, &Data->CompData[0]); CIGI_SCOPY4(CDta.l++, &Data->CompData[1]); memcpy(Buff,tBuf,CIGI_COMP_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_COMP_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&InstanceID, CDta.s++); CompClassV2 = (CompClassV2Grp)*CDta.c++; CDta.c += 3; CIGI_SCOPY2(&CompID, CDta.s++); CIGI_SCOPY2(&CompState, CDta.s++); CIGI_SCOPY4(&CompData[0], CDta.l++); CIGI_SCOPY4(&CompData[1], CDta.l++); if((CompClassV2 >= CigiBaseCompCtrl::EntityV2) && (CompClassV2 <= CigiBaseCompCtrl::SystemV2)) { CompAssoc = CompClassV2xV1[CompClassV2]; CompClassV3 = CompClassV2xV3[CompClassV2]; } else { CompAssoc = CigiBaseCompCtrl::NoCnvtV1; CompClassV3 = CigiBaseCompCtrl::NoCnvtV3; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { if(CnvtVersion.CigiMajorVersion == 2) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V2; } else if(CnvtVersion.CigiMajorVersion == 1) { if((CompAssoc >= Entity)&&(CompAssoc <= View)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V1; } else { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcNone; CnvtInfo.CnvtPacketID = 0; } } else { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CompClassV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompClassV2(const CompClassV2Grp CompClassV2In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CompClassV2In < 0)||(CompClassV2In > 5))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CompClassV2",(CompClassV2Grp)CompClassV2In,0,5); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CompClassV2 = CompClassV2In; CompAssoc = CompClassV2xV1[CompClassV2]; CompClassV3 = CompClassV2xV3[CompClassV2]; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_int8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { union { Cigi_int8 sc; Cigi_uint8 uc; } cxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; cxfer.sc = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)cxfer.uc; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint16 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - short // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { union { Cigi_int16 s16; Cigi_uint16 u16; } sxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; sxfer.s16 = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)sxfer.u16; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint32 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } CompData[Word] = CompDataIn; return(CIGI_SUCCESS); } // ================================================ // SetCompData - long // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_uint32 u32; Cigi_int32 s32; } tDta; if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.s32 = CompDataIn; CompData[Word] = (Cigi_uint32)tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - float // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint32 lDta; float fDta; } XDta; XDta.fDta = CompDataIn; CompData[Word] = XDta.lDta; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint64 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((CompDataIn >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(CompDataIn & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // SetCompData - double // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV2::SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint64 i; double d; } XDta; XDta.d = CompDataIn; int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((XDta.i >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(XDta.i & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // GetUCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 CigiCompCtrlV2::GetUCharCompData(const unsigned int Word, const BytePos Pos) { Cigi_uint8 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta = 0; } else tDta = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta); } // ================================================ // GetCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int8 CigiCompCtrlV2::GetCharCompData(const unsigned int Word, const BytePos Pos) { union { Cigi_int8 sc; Cigi_uint8 uc; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta.uc = 0; } else tDta.uc = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta.sc); } // ================================================ // GetUShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint16 CigiCompCtrlV2::GetUShortCompData(const unsigned int Word, const HalfWordPos Pos) { Cigi_uint16 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta = 0; } else tDta = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta); } // ================================================ // GetShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int16 CigiCompCtrlV2::GetShortCompData(const unsigned int Word, const HalfWordPos Pos) { union { Cigi_int16 s16; Cigi_uint16 u16; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta.u16 = 0; } else tDta.u16 = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta.s16); } // ================================================ // GetULongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiCompCtrlV2::GetULongCompData(const unsigned int Word) { Cigi_uint32 tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta = 0; } else tDta = CompData[Word]; return(tDta); } // ================================================ // GetLongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiCompCtrlV2::GetLongCompData(const unsigned int Word) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.s32); } // ================================================ // GetFloatCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiCompCtrlV2::GetFloatCompData(const unsigned int Word) { union { float f32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.f32); } // ================================================ // GetI64CompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint64 CigiCompCtrlV2::GetI64CompData(const unsigned int Pos) { Cigi_uint64 tDta; if(Pos > 0) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; } return(tDta); } // ================================================ // GetDoubleCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv double CigiCompCtrlV2::GetDoubleCompData(const unsigned int Pos) { union DtaXfer { Cigi_uint64 i; double d; } XDta; if(Pos > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); XDta.i = tDtah | tDtal; } return(XDta.d); } cigi-ccl-3.3.3a+svn818/source/CigiCompCtrlV3.cpp000066400000000000000000000542311210750432300211340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiCompCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Changed the conversion process.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCompCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // Component Class conversion Table const CigiBaseCompCtrl::CompAssocGrp CigiCompCtrlV3::CompClassV3xV1[CigiCompCtrlV3::CompClassCnvtSz] = { Entity, // EntityV3 View, // ViewV3 NoCnvtV1, // ViewGrpV3 NoCnvtV1, // SensorV3 NoCnvtV1, // RegionalSeaSurfaceV3 NoCnvtV1, // RegionalTerrainSurfaceV3 NoCnvtV1, // RegionalLayeredWeatherV3 NoCnvtV1, // GlobalSeaSurfaceV3 NoCnvtV1, // GlobalTerrainSurfaceV3 NoCnvtV1, // GlobalLayeredWeatherV3 Environment, // AtmosphereV3 Environment, // CelestialSphereV3 NoCnvtV1, // EventV3 NoCnvtV1 // SystemV3 }; const CigiBaseCompCtrl::CompClassV2Grp CigiCompCtrlV3::CompClassV3xV2[CigiCompCtrlV3::CompClassCnvtSz] = { EntityV2, // EntityV3 ViewV2, // ViewV3 ViewGrpV2, // ViewGrpV3 SensorV2, // SensorV3 NoCnvtV2, // RegionalSeaSurfaceV3 NoCnvtV2, // RegionalTerrainSurfaceV3 NoCnvtV2, // RegionalLayeredWeatherV3 NoCnvtV2, // GlobalSeaSurfaceV3 NoCnvtV2, // GlobalTerrainSurfaceV3 NoCnvtV2, // GlobalLayeredWeatherV3 EnvironmentV2, // AtmosphereV3 EnvironmentV2, // CelestialSphereV3 NoCnvtV2, // EventV3 SystemV2 // SystemV3 }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCompCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV3::CigiCompCtrlV3() { PacketID = CIGI_COMP_CTRL_PACKET_ID_V3; PacketSize = CIGI_COMP_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; CompID = 0; InstanceID = 0; EntityID = 0; ViewID = 0; CompState = 0; CompAssoc = CigiBaseCompCtrl::Entity; CompClassV2 = CigiBaseCompCtrl::EntityV2; CompClassV3 = CigiBaseCompCtrl::EntityV3; CompData[0] = 0; CompData[1] = 0; CompData[2] = 0; CompData[3] = 0; CompData[4] = 0; CompData[5] = 0; } // ================================================ // ~CigiCompCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV3::~CigiCompCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCompCtrl * Data = ( CigiBaseCompCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->CompID; *CDta.s++ = Data->InstanceID; *CDta.c++ = Data->CompClassV3 & 0x0f; *CDta.c++ = (Cigi_uint8)((Data->CompState > 0x00ff) ? 0x00ff : Data->CompState); *CDta.l++ = Data->CompData[0]; *CDta.l++ = Data->CompData[1]; *CDta.l++ = Data->CompData[2]; *CDta.l++ = Data->CompData[3]; *CDta.l++ = Data->CompData[4]; *CDta.l++ = Data->CompData[5]; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { CompID = *CDta.s++; InstanceID = *CDta.s++; CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x0f); CompState = (Cigi_uint16)*CDta.c++; CompData[0] = *CDta.l++; CompData[1] = *CDta.l++; CompData[2] = *CDta.l++; CompData[3] = *CDta.l++; CompData[4] = *CDta.l++; CompData[5] = *CDta.l++; } else { CigiSwap2(&CompID, CDta.s++); CigiSwap2(&InstanceID, CDta.s++); CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x0f); CompState = (Cigi_uint16)*CDta.c++; CigiSwap4(&CompData[0], CDta.l++); CigiSwap4(&CompData[1], CDta.l++); CigiSwap4(&CompData[2], CDta.l++); CigiSwap4(&CompData[3], CDta.l++); CigiSwap4(&CompData[4], CDta.l++); CigiSwap4(&CompData[5], CDta.l++); } if((CompClassV3 >= CigiBaseCompCtrl::EntityV3) && (CompClassV3 <= CigiBaseCompCtrl::SystemV3)) { CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; } else { CompAssoc = CigiBaseCompCtrl::NoCnvtV1; CompClassV2 = CigiBaseCompCtrl::NoCnvtV2; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { // Do not convert unless a conversion is found CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcNone; CnvtInfo.CnvtPacketID = 0; if(CnvtVersion.CigiMajorVersion == 3) { // All Component control packets from version 3 and above // use the same packet id number if(CnvtVersion.CigiMinorVersion < 3) { if((CompClassV3 >= EntityV3)&&(CompClassV3 <= SystemV3)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V3; } } else { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V3; } } else if(CnvtVersion.CigiMajorVersion == 2) { if((CompClassV2 >= EntityV2)&&(CompClassV2 <= SystemV2)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V2; } } else if(CnvtVersion.CigiMajorVersion == 1) { if((CompAssoc >= Entity)&&(CompAssoc <= View)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V1; } } else { // All Component control packets from version 3 and above // use the same packet id number CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CompClassV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CompClassV3In < 0)||(CompClassV3In > 13))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CompClassV3",(CompClassV3Grp)CompClassV3In,0,13); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CompClassV3 = CompClassV3In; CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_int8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { union { Cigi_int8 sc; Cigi_uint8 uc; } cxfer; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; cxfer.sc = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)cxfer.uc; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint16 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - short // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { union { Cigi_int16 s16; Cigi_uint16 u16; } sxfer; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; sxfer.s16 = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)sxfer.u16; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint32 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 5) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } CompData[Word] = CompDataIn; return(CIGI_SUCCESS); } // ================================================ // SetCompData - long // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 5) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.s32 = CompDataIn; CompData[Word] = (Cigi_uint32)tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - float // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 5) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint32 lDta; float fDta; } XDta; XDta.fDta = CompDataIn; CompData[Word] = XDta.lDta; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint64 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 2) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((CompDataIn >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(CompDataIn & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // SetCompData - double // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3::SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 2) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint64 i; double d; } XDta; XDta.d = CompDataIn; int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((XDta.i >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(XDta.i & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // GetUCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 CigiCompCtrlV3::GetUCharCompData(const unsigned int Word, const BytePos Pos) { Cigi_uint8 tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta = 0; } else tDta = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta); } // ================================================ // GetCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int8 CigiCompCtrlV3::GetCharCompData(const unsigned int Word, const BytePos Pos) { union { Cigi_int8 sc; Cigi_uint8 uc; } tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta.uc = 0; } else tDta.uc = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta.sc); } // ================================================ // GetUShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint16 CigiCompCtrlV3::GetUShortCompData(const unsigned int Word, const HalfWordPos Pos) { Cigi_uint16 tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta = 0; } else tDta = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta); } // ================================================ // GetShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int16 CigiCompCtrlV3::GetShortCompData(const unsigned int Word, const HalfWordPos Pos) { union { Cigi_int16 s16; Cigi_uint16 u16; } tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta.u16 = 0; } else tDta.u16 = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta.s16); } // ================================================ // GetULongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiCompCtrlV3::GetULongCompData(const unsigned int Word) { Cigi_uint32 tDta; if(Word > 5) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta = 0; } else tDta = CompData[Word]; return(tDta); } // ================================================ // GetLongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiCompCtrlV3::GetLongCompData(const unsigned int Word) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 5) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.s32); } // ================================================ // GetFloatCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiCompCtrlV3::GetFloatCompData(const unsigned int Word) { union { float f32; Cigi_uint32 u32; } tDta; if(Word > 5) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.f32); } // ================================================ // GetI64CompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint64 CigiCompCtrlV3::GetI64CompData(const unsigned int Pos) { Cigi_uint64 tDta; if(Pos > 2) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; } return(tDta); } // ================================================ // GetDoubleCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv double CigiCompCtrlV3::GetDoubleCompData(const unsigned int Pos) { Cigi_uint64 tDta; union DtaXfer { Cigi_uint64 i; double d; } XDta; if(Pos > 2) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; XDta.i = tDta; } return(XDta.d); } cigi-ccl-3.3.3a+svn818/source/CigiCompCtrlV3_3.cpp000066400000000000000000000527521210750432300213640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiCompCtrlV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  02/11/2008 Greg Basler                       Version 2.2.0
 *  Initial Release.
 *  Converted from CigiCompCtrlV3.cpp.
 *  Fixed conversion process
 *
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected problem with conversion from V3_3 to V2 & V1
 *   involving Component Classes of SymbolSurfaceV3_3 &
 *   SymbolV3_3.
 *
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiCompCtrlV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // Component Class conversion Table const CigiBaseCompCtrl::CompAssocGrp CigiCompCtrlV3_3::CompClassV3xV1[CigiCompCtrlV3_3::CompClassCnvtSz] = { Entity, // EntityV3 View, // ViewV3 NoCnvtV1, // ViewGrpV3 NoCnvtV1, // SensorV3 NoCnvtV1, // RegionalSeaSurfaceV3 NoCnvtV1, // RegionalTerrainSurfaceV3 NoCnvtV1, // RegionalLayeredWeatherV3 NoCnvtV1, // GlobalSeaSurfaceV3 NoCnvtV1, // GlobalTerrainSurfaceV3 NoCnvtV1, // GlobalLayeredWeatherV3 Environment, // AtmosphereV3 Environment, // CelestialSphereV3 NoCnvtV1, // EventV3 NoCnvtV1, // SystemV3 NoCnvtV1, // SymbolSurfaceV3_3 NoCnvtV1 // SymbolV3_3 }; const CigiBaseCompCtrl::CompClassV2Grp CigiCompCtrlV3_3::CompClassV3xV2[CigiCompCtrlV3_3::CompClassCnvtSz] = { EntityV2, // EntityV3 ViewV2, // ViewV3 ViewGrpV2, // ViewGrpV3 SensorV2, // SensorV3 NoCnvtV2, // RegionalSeaSurfaceV3 NoCnvtV2, // RegionalTerrainSurfaceV3 NoCnvtV2, // RegionalLayeredWeatherV3 NoCnvtV2, // GlobalSeaSurfaceV3 NoCnvtV2, // GlobalTerrainSurfaceV3 NoCnvtV2, // GlobalLayeredWeatherV3 EnvironmentV2, // AtmosphereV3 EnvironmentV2, // CelestialSphereV3 NoCnvtV2, // EventV3 SystemV2, // SystemV3 NoCnvtV2, // SymbolSurfaceV3_3 NoCnvtV2 // SymbolV3_3 }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiCompCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV3_3::CigiCompCtrlV3_3() { PacketID = CIGI_COMP_CTRL_PACKET_ID_V3_3; PacketSize = CIGI_COMP_CTRL_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; CompID = 0; InstanceID = 0; EntityID = 0; ViewID = 0; CompState = 0; CompAssoc = CigiBaseCompCtrl::Entity; CompClassV2 = CigiBaseCompCtrl::EntityV2; CompClassV3 = CigiBaseCompCtrl::EntityV3; CompData[0] = 0; CompData[1] = 0; CompData[2] = 0; CompData[3] = 0; CompData[4] = 0; CompData[5] = 0; } // ================================================ // ~CigiCompCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiCompCtrlV3_3::~CigiCompCtrlV3_3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCompCtrl * Data = ( CigiBaseCompCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->CompID; *CDta.s++ = Data->InstanceID; *CDta.c++ = Data->CompClassV3 & 0x3f; *CDta.c++ = (Cigi_uint8)((Data->CompState > 0x00ff) ? 0x00ff : Data->CompState); *CDta.l++ = Data->CompData[0]; *CDta.l++ = Data->CompData[1]; *CDta.l++ = Data->CompData[2]; *CDta.l++ = Data->CompData[3]; *CDta.l++ = Data->CompData[4]; *CDta.l++ = Data->CompData[5]; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { CompID = *CDta.s++; InstanceID = *CDta.s++; CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x3f); CompState = (Cigi_uint16)*CDta.c++; CompData[0] = *CDta.l++; CompData[1] = *CDta.l++; CompData[2] = *CDta.l++; CompData[3] = *CDta.l++; CompData[4] = *CDta.l++; CompData[5] = *CDta.l++; } else { CigiSwap2(&CompID, CDta.s++); CigiSwap2(&InstanceID, CDta.s++); CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x0f); CompState = (Cigi_uint16)*CDta.c++; CigiSwap4(&CompData[0], CDta.l++); CigiSwap4(&CompData[1], CDta.l++); CigiSwap4(&CompData[2], CDta.l++); CigiSwap4(&CompData[3], CDta.l++); CigiSwap4(&CompData[4], CDta.l++); CigiSwap4(&CompData[5], CDta.l++); } if((CompClassV3 >= CigiBaseCompCtrl::EntityV3) && (CompClassV3 <= CigiBaseCompCtrl::SymbolV3_3)) { CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; } else { CompAssoc = NoCnvtV1; CompClassV2 = NoCnvtV2; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { // Do not convert unless a conversion is found CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcNone; CnvtInfo.CnvtPacketID = 0; if(CnvtVersion.CigiMajorVersion == 3) { // All Component control packets from version 3 and above // use the same packet id number if(CnvtVersion.CigiMinorVersion < 3) { if((CompClassV3 >= EntityV3)&&(CompClassV3 <= SystemV3)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V3; } } else { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V3_3; } } else if(CnvtVersion.CigiMajorVersion == 2) { if((CompClassV2 >= EntityV2)&&(CompClassV2 <= SystemV2)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V2; } } else if(CnvtVersion.CigiMajorVersion == 1) { if((CompAssoc >= Entity)&&(CompAssoc <= View)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V1; } } else { // All Component control packets from version 3 and above // use the same packet id number CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CompClassV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CompClassV3In < 0)||(CompClassV3In > 15))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CompClassV3",(CompClassV3Grp)CompClassV3In,0,15); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CompClassV3 = CompClassV3In; CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_int8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { union { Cigi_int8 sc; Cigi_uint8 uc; } cxfer; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; cxfer.sc = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)cxfer.uc; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint16 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - short // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { union { Cigi_int16 s16; Cigi_uint16 u16; } sxfer; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; sxfer.s16 = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)sxfer.u16; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint32 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 5) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,5); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } CompData[Word] = CompDataIn; return(CIGI_SUCCESS); } // ================================================ // SetCompData - long // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 5) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,5); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.s32 = CompDataIn; CompData[Word] = (Cigi_uint32)tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - float // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 5) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,5); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint32 lDta; float fDta; } XDta; XDta.fDta = CompDataIn; CompData[Word] = XDta.lDta; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint64 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 2) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,2); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((CompDataIn >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(CompDataIn & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // SetCompData - double // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiCompCtrlV3_3::SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 2) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,2); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint64 i; double d; } XDta; XDta.d = CompDataIn; int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((XDta.i >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(XDta.i & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // GetUCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 CigiCompCtrlV3_3::GetUCharCompData(const unsigned int Word, const BytePos Pos) { Cigi_uint8 tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta = 0; } else tDta = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta); } // ================================================ // GetCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int8 CigiCompCtrlV3_3::GetCharCompData(const unsigned int Word, const BytePos Pos) { union { Cigi_int8 sc; Cigi_uint8 uc; } tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta.uc = 0; } else tDta.uc = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta.sc); } // ================================================ // GetUShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint16 CigiCompCtrlV3_3::GetUShortCompData(const unsigned int Word, const HalfWordPos Pos) { Cigi_uint16 tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,5); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta = 0; } else tDta = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta); } // ================================================ // GetShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int16 CigiCompCtrlV3_3::GetShortCompData(const unsigned int Word, const HalfWordPos Pos) { union { Cigi_int16 s16; Cigi_uint16 u16; } tDta; int Err = 0; if(Word > 5) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,5); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta.u16 = 0; } else tDta.u16 = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta.s16); } // ================================================ // GetULongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiCompCtrlV3_3::GetULongCompData(const unsigned int Word) { Cigi_uint32 tDta; if(Word > 5) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,5); #endif tDta = 0; } else tDta = CompData[Word]; return(tDta); } // ================================================ // GetLongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiCompCtrlV3_3::GetLongCompData(const unsigned int Word) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 5) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,5); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.s32); } // ================================================ // GetFloatCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiCompCtrlV3_3::GetFloatCompData(const unsigned int Word) { union { float f32; Cigi_uint32 u32; } tDta; if(Word > 5) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,5); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.f32); } // ================================================ // GetI64CompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint64 CigiCompCtrlV3_3::GetI64CompData(const unsigned int Pos) { Cigi_uint64 tDta; if(Pos > 2) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,2); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; } return(tDta); } // ================================================ // GetDoubleCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv double CigiCompCtrlV3_3::GetDoubleCompData(const unsigned int Pos) { Cigi_uint64 tDta; union DtaXfer { Cigi_uint64 i; double d; } XDta; if(Pos > 2) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,2); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; XDta.i = tDta; } return(XDta.d); } cigi-ccl-3.3.3a+svn818/source/CigiConfClampEntityCtrlV3.cpp000066400000000000000000000102431210750432300232700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiConfClampEntityCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiConfClampEntityCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiConfClampEntityCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiConfClampEntityCtrlV3::CigiConfClampEntityCtrlV3() { PacketID = CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3; PacketSize = CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; Yaw = 0.0; Lat = 0.0; Lon = 0.0; } // ================================================ // ~CigiConfClampEntityCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiConfClampEntityCtrlV3::~CigiConfClampEntityCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiConfClampEntityCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseConfClampEntityCtrl * Data = ( CigiBaseConfClampEntityCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.f++ = Data->Yaw; *CDta.d++ = Data->Lat; *CDta.d++ = Data->Lon; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiConfClampEntityCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; Yaw = *CDta.f++; Lat = *CDta.d++; Lon = *CDta.d++; } else { CigiSwap2(&EntityID, CDta.s++); CigiSwap4(&Yaw, CDta.f++); CigiSwap8(&Lat, CDta.d++); CigiSwap8(&Lon, CDta.d++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiDefaultPacket.cpp000066400000000000000000000060631210750432300217140ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiDefaultPacket.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiDefaultPacket.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiDefaultPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiDefaultPacket::CigiDefaultPacket() { PacketID = 0; PacketSize = 0; Version = 3; MinorVersion = 0; } // ================================================ // ~CigiDefaultPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiDefaultPacket::~CigiDefaultPacket() { } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiDefaultPacket::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { return(0); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiDefaultPacket::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { DataPtr = Buff; // Get Size DataPtr++; Cigi_uint8 CurrentSize = *DataPtr; return(CurrentSize); } cigi-ccl-3.3.3a+svn818/source/CigiEarthModelDefV3.cpp000066400000000000000000000101661210750432300220530ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEarthModelDefV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEarthModelDefV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEarthModelDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEarthModelDefV3::CigiEarthModelDefV3() { PacketID = CIGI_EARTH_MODEL_DEF_PACKET_ID_V3; PacketSize = CIGI_EARTH_MODEL_DEF_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; CustomERMEn = false; EquatorialRadius = 0.0; Flattening = 0.0; } // ================================================ // ~CigiEarthModelDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEarthModelDefV3::~CigiEarthModelDefV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEarthModelDefV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseEarthModelDef * Data = ( CigiBaseEarthModelDef *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = (Data->CustomERMEn) ? 0x01 : 0; *CDta.c++ = 0; *CDta.l++ = 0; *CDta.d++ = Data->EquatorialRadius; *CDta.d++ = Data->Flattening; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEarthModelDefV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size CustomERMEn = ((*CDta.c++ & 0x01) != 0); CDta.c += 5; if(!Swap) { EquatorialRadius = *CDta.d++; Flattening = *CDta.d++; } else { CigiSwap8(&EquatorialRadius, CDta.d++); CigiSwap8(&Flattening, CDta.d++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiEntityCtrlV1.cpp000066400000000000000000000235201210750432300215050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEntityCtrlV1.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEntityCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV1::CigiEntityCtrlV1() { // use the #defines PacketID = CIGI_ENTITY_CTRL_PACKET_ID_V1; PacketSize = CIGI_ENTITY_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; EntityType = 0; ParentID = 0; Alpha = 255; Opacity = 100.0f; Temperature = 0.0f; Roll = 0.0f; Pitch = 0.0f; Yaw = 0.0f; LatOrXoff = 0.0f; LonOrYoff = 0.0f; AltOrZoff = 0.0f; EntityState = Standby; AttachState = Detach; CollisionDetectEn = Disable; InheritAlpha = NoInherit; GrndClamp = NoClamp; AnimationDir = Forward; AnimationLoopMode = OneShot; AnimationState = Stop; PastAnimationState = Stop; SmoothingEn = false; } // ================================================ // ~CigiEntityCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV1::~CigiEntityCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { EntityStV1Grp en_rslt; EffectStateGrp ef_rslt; float talt; double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; CigiBaseEntityCtrl * Data = ( CigiBaseEntityCtrl *)Base; CDta.c = tBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Cigi_uint8)(((Data->AttachState << 6) & 0x40) | ((Data->CollisionDetectEn << 5) & 0x20)); if(Data->EntityState == Active) en_rslt = ConstructV1; else // Standby & Remove en_rslt = DestructV1; HDta |= (Cigi_uint8)((en_rslt << 7) & 0x80); AnimationStateGrp tAState = Data->AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV1[tAState]; else tAState = NoAction; if(tAState == Continue) { unsigned int PastAState = ATbl->GetPastAnimation(Data->EntityID); if((PastAState == Stop) || (PastAState == Pause)) tAState = LoadActivate; else tAState = NoAction; } ef_rslt = (EffectStateGrp)(tAState - 4); HDta |= (Cigi_uint8)((ef_rslt << 2) & 0x1C); tAState = ToV3[tAState]; if(tAState != NoAction) ATbl->SetPastAnimation(Data->EntityID,tAState); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY2(CDta.s++, &Data->EntityType); CIGI_SCOPY2(CDta.s++, &Data->ParentID); CIGI_SCOPY4(CDta.f++, &Data->Temperature); CIGI_SCOPY4(CDta.f++, &Data->Roll); CIGI_SCOPY4(CDta.f++, &Data->Pitch); CIGI_SCOPY4(CDta.f++, &Data->Yaw); talt = (float)Data->AltOrZoff; CIGI_SCOPY4(CDta.f++, &talt); CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_ENTITY_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { float talt; PackPointer CDta; double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; memcpy(tBuf,Buff,CIGI_ENTITY_CTRL_PACKET_SIZE_V1); CDta.c = tBuf; CDta.c += 2; CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c; AttachState = (AttachStateGrp)((HDta >> 6) &0x01); CollisionDetectEn = (CollisionDetectGrp)((HDta >> 5) & 0x01); SetEntityState((EntityStV1Grp)((HDta >> 7) & 0x01),false); AnimationState = (AnimationStateGrp)(((HDta >> 2) & 0x07) + 4); PastAnimationState = (AnimationStateGrp)ATbl->GetPastAnimation(EntityID); AnimationStateGrp tAState = AnimationState; if((tAState >= 0)&&(tAState <= 9)) { tAState = ToV3[tAState]; if((tAState >= 0)&&(tAState <= 3)) ATbl->SetPastAnimation(EntityID,tAState); } CDta.c += 4; CIGI_SCOPY2(&EntityType, CDta.s++); CIGI_SCOPY2(&ParentID, CDta.s++); CIGI_SCOPY4(&Temperature, CDta.f++); CIGI_SCOPY4(&Roll, CDta.f++); CIGI_SCOPY4(&Pitch, CDta.f++); CIGI_SCOPY4(&Yaw, CDta.f++); CIGI_SCOPY4(&talt, CDta.f++); AltOrZoff = (double)talt; CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); Alpha = 255; Opacity = 100.0f; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetHeading // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV1::SetHeading(const float Heading, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((Heading < 0.0f)||(Heading > 360.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Heading",(double)Heading,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = Heading; return(CIGI_SUCCESS); } // ================================================ // SetEntityState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV1::SetEntityState(const EntityStV1Grp EntityStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EntityStateIn < 0)||(EntityStateIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EntityState",EntityStateIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif if(EntityStateIn == ConstructV1) EntityState = Active; else EntityState = Remove; return(CIGI_SUCCESS); } // ================================================ // SetEffectState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV1::SetEffectState(const EffectStateGrp EffectStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EffectStateIn < 0)||(EffectStateIn > 5))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EffectState",EffectStateIn,0,5); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationState = (AnimationStateGrp)(EffectStateIn + 4); return(CIGI_SUCCESS); } // ================================================ // GetEntityState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV1::EntityStV1Grp CigiEntityCtrlV1::GetEntityState(void) const { EntityStV1Grp rslt; if(EntityState == Active) rslt = ConstructV1; else // Standby & Remove rslt = DestructV1; return(rslt); } // ================================================ // GetEffectState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV1::EffectStateGrp CigiEntityCtrlV1::GetEffectState() const { AnimationStateGrp tAState = AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV1[tAState]; else tAState = NoAction; if(tAState == Continue) { if((PastAnimationState == Stop) || (PastAnimationState == Pause)) tAState = LoadActivate; else tAState = NoAction; } return((EffectStateGrp)(tAState - 4)); } cigi-ccl-3.3.3a+svn818/source/CigiEntityCtrlV2.cpp000066400000000000000000000242651210750432300215150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEntityCtrlV2.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif const CigiEntityCtrlV2::EffectStV2Grp CigiEntityCtrlV2::V3toV2[4] = { StopV2, // Stop StopV2, // Pause RestartV2, // Play PlayV2, // Continue }; const CigiBaseEntityCtrl::AnimationStateGrp CigiEntityCtrlV2::V2toV3[3] = { Stop, // Stop Continue, // Play Play, // Restart }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEntityCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV2::CigiEntityCtrlV2() { PacketID = CIGI_ENTITY_CTRL_PACKET_ID_V2; PacketSize = CIGI_ENTITY_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; EntityType = 0; ParentID = 0; Alpha = 255; Opacity = 100.0f; Temperature = 0.0f; Roll = 0.0f; Pitch = 0.0f; Yaw = 0.0f; LatOrXoff = 0.0f; LonOrYoff = 0.0f; AltOrZoff = 0.0f; EntityState = Standby; AttachState = Detach; CollisionDetectEn = Disable; InheritAlpha = NoInherit; GrndClamp = NoClamp; AnimationDir = Forward; AnimationLoopMode = OneShot; AnimationState = Stop; PastAnimationState = Stop; SmoothingEn = false; } // ================================================ // ~CigiEntityCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV2::~CigiEntityCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { EffectStV2Grp rslt; double DBuf[7]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; CigiBaseEntityCtrl * Data = ( CigiBaseEntityCtrl *)Base; CDta.c = tBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Cigi_uint8)(((Data->EntityState << 6) & 0xC0) | ((Data->AttachState << 5) & 0x20) | ((Data->CollisionDetectEn << 4) & 0x10)); AnimationStateGrp tAState = Data->AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV3[tAState]; else tAState = NoAction; if(tAState == NoAction) { unsigned int PastAState = ATbl->GetPastAnimation(Data->EntityID); if((PastAState == Stop) || (PastAState == Pause)) tAState = (AnimationStateGrp)PastAState; else tAState = Continue; } ATbl->SetPastAnimation(Data->EntityID,tAState); rslt = V3toV2[tAState]; HDta |= (Cigi_uint8)((rslt << 2) & 0x0C); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY2(CDta.s++, &Data->EntityType); CIGI_SCOPY2(CDta.s++, &Data->ParentID); CIGI_SCOPY4(CDta.f++, &Data->Opacity); CIGI_SCOPY4(CDta.f++, &Data->Temperature); CIGI_SCOPY4(CDta.f++, &Data->Roll); CIGI_SCOPY4(CDta.f++, &Data->Pitch); CIGI_SCOPY4(CDta.f++, &Data->Yaw); CIGI_SCOPY8(CDta.d++, &Data->AltOrZoff); CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_ENTITY_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; double DBuf[7]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; memcpy(tBuf,Buff,CIGI_ENTITY_CTRL_PACKET_SIZE_V2); CDta.c = tBuf; CDta.c += 2; CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c; AttachState = (AttachStateGrp)((HDta >> 5) &0x01); CollisionDetectEn = (CollisionDetectGrp)((HDta >> 4) & 0x01); EntityState = (EntityStateGrp)((HDta >> 6) & 0x03); EffectStV2Grp EffectStateIn = (EffectStV2Grp)((HDta >> 2) & 0x03); if((EffectStateIn >= 0)&&(EffectStateIn <= 2)) AnimationState = V2toV3[EffectStateIn]; else AnimationState = Play; PastAnimationState = (AnimationStateGrp)ATbl->GetPastAnimation(EntityID); ATbl->SetPastAnimation(EntityID,AnimationState); CDta.c += 4; CIGI_SCOPY2(&EntityType, CDta.s++); CIGI_SCOPY2(&ParentID, CDta.s++); CIGI_SCOPY4(&Opacity, CDta.f++); Alpha = (unsigned int)(Opacity * 2.55f); CIGI_SCOPY4(&Temperature, CDta.f++); CIGI_SCOPY4(&Roll, CDta.f++); CIGI_SCOPY4(&Pitch, CDta.f++); CIGI_SCOPY4(&Yaw, CDta.f++); CIGI_SCOPY8(&AltOrZoff, CDta.d++); CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetOpacity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV2::SetOpacity(const float OpacityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((OpacityIn < 0.0f)||(OpacityIn > 100.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Opacity",(double)OpacityIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Opacity = OpacityIn; Alpha = (unsigned int)(OpacityIn * 2.55f); return(CIGI_SUCCESS); } // ================================================ // SetHeading // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV2::SetHeading(const float Heading, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((Heading < 0.0f)||(Heading > 360.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Heading",(double)Heading,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = Heading; return(CIGI_SUCCESS); } // ================================================ // SetEntityState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV2::SetEntityState(const EntityStV2Grp EntityStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EntityStateIn < 0)||(EntityStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EntityState",EntityStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif EntityState = (EntityStateGrp)EntityStateIn; return(CIGI_SUCCESS); } // ================================================ // SetEffectState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV2::SetEffectState(const EffectStV2Grp EffectStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EffectStateIn < 0)||(EffectStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EffectState",EffectStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif if((EffectStateIn >= 0)&&(EffectStateIn <= 2)) AnimationState = V2toV3[EffectStateIn]; else AnimationState = Play; return(CIGI_SUCCESS); } // ================================================ // GetEffectState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV2::EffectStV2Grp CigiEntityCtrlV2::GetEffectState() const { EffectStV2Grp rslt; AnimationStateGrp tAState = AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV3[tAState]; else tAState = NoAction; if(tAState == NoAction) { unsigned int PastAState = PastAnimationState; if((PastAState == Stop) || (PastAState == Pause)) tAState = (AnimationStateGrp)PastAState; else tAState = Continue; } rslt = V3toV2[tAState]; return(rslt); } cigi-ccl-3.3.3a+svn818/source/CigiEntityCtrlV3.cpp000066400000000000000000000266251210750432300215200ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV1.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEntityCtrlV3.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include "CigiAnimationTable.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEntityCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV3::CigiEntityCtrlV3() { PacketID = CIGI_ENTITY_CTRL_PACKET_ID_V3; PacketSize = CIGI_ENTITY_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; EntityType = 0; ParentID = 0; Alpha = 255; Opacity = 100.0f; Temperature = 0.0f; Roll = 0.0f; Pitch = 0.0f; Yaw = 0.0f; LatOrXoff = 0.0f; LonOrYoff = 0.0f; AltOrZoff = 0.0f; EntityState = Standby; AttachState = Detach; CollisionDetectEn = Disable; InheritAlpha = NoInherit; GrndClamp = NoClamp; AnimationDir = Forward; AnimationLoopMode = OneShot; AnimationState = Stop; PastAnimationState = Stop; SmoothingEn = false; } // ================================================ // ~CigiEntityCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV3::~CigiEntityCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; CigiBaseEntityCtrl *Data = ( CigiBaseEntityCtrl *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; Cigi_uint8 HDta = (Cigi_uint8)((Data->EntityState & 0x03) | ((Data->AttachState << 2) & 0x04) | ((Data->CollisionDetectEn << 3) & 0x08) | ((Data->InheritAlpha << 4) & 0x10) | ((Data->GrndClamp << 5) & 0x60)); *CDta.c++ = HDta; AnimationStateGrp tAState = Data->AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV3[tAState]; else tAState = NoAction; if(tAState == NoAction) { unsigned int PastAState = ATbl->GetPastAnimation(Data->EntityID); if((PastAState == Stop) || (PastAState == Pause)) tAState = (AnimationStateGrp)PastAState; else tAState = Continue; } ATbl->SetPastAnimation(Data->EntityID,tAState); HDta = (Cigi_uint8)((Data->AnimationDir & 0x01) | ((Data->AnimationLoopMode << 1) & 0x02) | ((tAState << 2) & 0x0C)); *CDta.c++ = HDta; *CDta.c++ = Data->Alpha; *CDta.c++ = 0; *CDta.s++ = Data->EntityType; *CDta.s++ = Data->ParentID; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Yaw; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; Cigi_uint8 HDta1, HDta2; CDta.c = Buff; CDta.c += 2; if(!Swap) { EntityID = *CDta.s++; HDta1 = *CDta.c++; HDta2 = *CDta.c++; Alpha = *CDta.c++; Opacity = ((float)Alpha)/2.55f; CDta.c++; EntityType = *CDta.s++; ParentID = *CDta.s++; Roll = *CDta.f++; Pitch = *CDta.f++; Yaw = *CDta.f++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; } else { CigiSwap2(&EntityID, CDta.s++); HDta1 = *CDta.c++; HDta2 = *CDta.c++; Alpha = *CDta.c++; Opacity = ((float)Alpha)/2.55f; CDta.c++; CigiSwap2(&EntityType, CDta.s++); CigiSwap2(&ParentID, CDta.s++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Yaw, CDta.f++); CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); } EntityState = (EntityStateGrp)(HDta1 & 0x03); AttachState = (AttachStateGrp)((HDta1 >> 2) & 0x01); CollisionDetectEn = (CollisionDetectGrp)((HDta1 >> 3) & 0x01); InheritAlpha = (InheritAlphaGrp)((HDta1 >> 4) & 0x01); GrndClamp = (GrndClampGrp)((HDta1 >> 5) & 0x03); AnimationDir = (AnimationDirGrp)(HDta2 & 0x01); AnimationLoopMode = (AnimationLoopModeGrp)((HDta2 >> 1) & 0x01); AnimationState = (AnimationStateGrp)((HDta2 >> 2) & 0x03); PastAnimationState = (AnimationStateGrp)ATbl->GetPastAnimation(EntityID); ATbl->SetPastAnimation(EntityID,AnimationState); return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetYaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0f)||(YawIn > 360.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(double)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } // ================================================ // SetEntityState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetEntityState(const EntityStateGrp EntityStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EntityStateIn < 0)||(EntityStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EntityState",EntityStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif EntityState = EntityStateIn; return(CIGI_SUCCESS); } // ================================================ // SetGrndClamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetGrndClamp(const GrndClampGrp GrndClampIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GrndClampIn < 0)||(GrndClampIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GrndClamp",GrndClampIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GrndClamp = GrndClampIn; return(CIGI_SUCCESS); } // ================================================ // SetInheritAlpha // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetInheritAlpha(const InheritAlphaGrp InheritAlphaIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((InheritAlphaIn < 0)||(InheritAlphaIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("InheritAlpha",(int)InheritAlphaIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif InheritAlpha = InheritAlphaIn; return(CIGI_SUCCESS); } // ================================================ // SetAnimDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetAnimationDir(const AnimationDirGrp AnimationDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AnimationDirIn < 0)||(AnimationDirIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AnimationDir",AnimationDirIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationDir = AnimationDirIn; return(CIGI_SUCCESS); } // ================================================ // SetAnimLoopMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetAnimationLoopMode(const AnimationLoopModeGrp AnimationLoopModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AnimationLoopModeIn < 0)||(AnimationLoopModeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AnimationLoopMode",AnimationLoopModeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationLoopMode = AnimationLoopModeIn; return(CIGI_SUCCESS); } // ================================================ // SetAnimationState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3::SetAnimationState(const AnimationStateGrp AnimationStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AnimationStateIn < 0)||(AnimationStateIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AnimationState",AnimationStateIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationState = AnimationStateIn; return(CIGI_SUCCESS); } // ================================================ // GetAnimationState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEntityCtrl::AnimationStateGrp CigiEntityCtrlV3::GetAnimationState() const { AnimationStateGrp tAState = AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV3[tAState]; else tAState = NoAction; if(tAState == NoAction) { if((PastAnimationState == Stop) || (PastAnimationState == Pause)) tAState = (AnimationStateGrp)PastAnimationState; else tAState = Continue; } return(tAState); } cigi-ccl-3.3.3a+svn818/source/CigiEntityCtrlV3_3.cpp000066400000000000000000000257151210750432300217410ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEntityCtrlV3_3.h
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Initial Release for CIGI 3.3 compatibility.
 *  Based on CigiEntityCtrlV3.cpp"
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEntityCtrlV3_3.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include "CigiAnimationTable.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEntityCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV3_3::CigiEntityCtrlV3_3() { PacketID = CIGI_ENTITY_CTRL_PACKET_ID_V3; PacketSize = CIGI_ENTITY_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 3; EntityID = 0; EntityType = 0; ParentID = 0; Alpha = 255; Opacity = 100.0f; Temperature = 0.0f; Roll = 0.0f; Pitch = 0.0f; Yaw = 0.0f; LatOrXoff = 0.0f; LonOrYoff = 0.0f; AltOrZoff = 0.0f; EntityState = Standby; AttachState = Detach; CollisionDetectEn = Disable; InheritAlpha = NoInherit; GrndClamp = NoClamp; AnimationDir = Forward; AnimationLoopMode = OneShot; AnimationState = Stop; PastAnimationState = Stop; SmoothingEn = false; } // ================================================ // ~CigiEntityCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEntityCtrlV3_3::~CigiEntityCtrlV3_3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; CigiBaseEntityCtrl *Data = ( CigiBaseEntityCtrl *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; Cigi_uint8 HDta = (Cigi_uint8)((Data->EntityState & 0x03) | ((Data->AttachState << 2) & 0x04) | ((Data->CollisionDetectEn << 3) & 0x08) | ((Data->InheritAlpha << 4) & 0x10) | ((Data->GrndClamp << 5) & 0x60)); *CDta.c++ = HDta; AnimationStateGrp tAState = Data->AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV3[tAState]; else tAState = NoAction; if(tAState == NoAction) { unsigned int PastAState = ATbl->GetPastAnimation(Data->EntityID); if((PastAState == Stop) || (PastAState == Pause)) tAState = (AnimationStateGrp)PastAState; else tAState = Continue; } ATbl->SetPastAnimation(Data->EntityID,tAState); HDta = (Cigi_uint8)((Data->AnimationDir & 0x01) | ((Data->AnimationLoopMode << 1) & 0x02) | ((tAState << 2) & 0x0C)); HDta |= (Data->SmoothingEn) ? 0x10 : 0; *CDta.c++ = HDta; *CDta.c++ = Data->Alpha; *CDta.c++ = 0; *CDta.s++ = Data->EntityType; *CDta.s++ = Data->ParentID; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Yaw; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CigiAnimationTable *ATbl = (CigiAnimationTable *) Spec; Cigi_uint8 HDta1, HDta2; CDta.c = Buff; CDta.c += 2; if(!Swap) { EntityID = *CDta.s++; HDta1 = *CDta.c++; HDta2 = *CDta.c++; Alpha = *CDta.c++; Opacity = ((float)Alpha)/2.55f; CDta.c++; EntityType = *CDta.s++; ParentID = *CDta.s++; Roll = *CDta.f++; Pitch = *CDta.f++; Yaw = *CDta.f++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; } else { CigiSwap2(&EntityID, CDta.s++); HDta1 = *CDta.c++; HDta2 = *CDta.c++; Alpha = *CDta.c++; Opacity = ((float)Alpha)/2.55f; CDta.c++; CigiSwap2(&EntityType, CDta.s++); CigiSwap2(&ParentID, CDta.s++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Yaw, CDta.f++); CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); } EntityState = (EntityStateGrp)(HDta1 & 0x03); AttachState = (AttachStateGrp)((HDta1 >> 2) & 0x01); CollisionDetectEn = (CollisionDetectGrp)((HDta1 >> 3) & 0x01); InheritAlpha = (InheritAlphaGrp)((HDta1 >> 4) & 0x01); GrndClamp = (GrndClampGrp)((HDta1 >> 5) & 0x03); AnimationDir = (AnimationDirGrp)(HDta2 & 0x01); AnimationLoopMode = (AnimationLoopModeGrp)((HDta2 >> 1) & 0x01); AnimationState = (AnimationStateGrp)((HDta2 >> 2) & 0x03); SmoothingEn = ((HDta2 & 0x10) != 0); PastAnimationState = (AnimationStateGrp)ATbl->GetPastAnimation(EntityID); ATbl->SetPastAnimation(EntityID,AnimationState); return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetYaw // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetYaw(const float YawIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((YawIn < 0.0f)||(YawIn > 360.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Yaw",(double)YawIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Yaw = YawIn; return(CIGI_SUCCESS); } // ================================================ // SetEntityState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetEntityState(const EntityStateGrp EntityStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EntityStateIn < 0)||(EntityStateIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EntityState",EntityStateIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif EntityState = EntityStateIn; return(CIGI_SUCCESS); } // ================================================ // SetGrndClamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetGrndClamp(const GrndClampGrp GrndClampIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GrndClampIn < 0)||(GrndClampIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GrndClamp",GrndClampIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GrndClamp = GrndClampIn; return(CIGI_SUCCESS); } // ================================================ // SetInheritAlpha // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetInheritAlpha(const InheritAlphaGrp InheritAlphaIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((InheritAlphaIn < 0)||(InheritAlphaIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("InheritAlpha",(int)InheritAlphaIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif InheritAlpha = InheritAlphaIn; return(CIGI_SUCCESS); } // ================================================ // SetAnimDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetAnimationDir(const AnimationDirGrp AnimationDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AnimationDirIn < 0)||(AnimationDirIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AnimationDir",AnimationDirIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationDir = AnimationDirIn; return(CIGI_SUCCESS); } // ================================================ // SetAnimLoopMode // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetAnimationLoopMode(const AnimationLoopModeGrp AnimationLoopModeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AnimationLoopModeIn < 0)||(AnimationLoopModeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AnimationLoopMode",AnimationLoopModeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationLoopMode = AnimationLoopModeIn; return(CIGI_SUCCESS); } // ================================================ // SetAnimationState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEntityCtrlV3_3::SetAnimationState(const AnimationStateGrp AnimationStateIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((AnimationStateIn < 0)||(AnimationStateIn > 3))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("AnimationState",AnimationStateIn,0,3); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif AnimationState = AnimationStateIn; return(CIGI_SUCCESS); } // ================================================ // GetAnimationState // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseEntityCtrl::AnimationStateGrp CigiEntityCtrlV3_3::GetAnimationState() const { AnimationStateGrp tAState = AnimationState; if((tAState >= 0)&&(tAState <= 9)) tAState = ToV3[tAState]; else tAState = NoAction; if(tAState == NoAction) { if((PastAnimationState == Stop) || (PastAnimationState == Pause)) tAState = (AnimationStateGrp)PastAnimationState; else tAState = Continue; } return(tAState); } cigi-ccl-3.3.3a+svn818/source/CigiEnvCondReqV3.cpp000066400000000000000000000103541210750432300214130ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvCondReqV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  12/14/2007 Greg Basler                       Version 2.0.0
 *  Added the Request ID parameter.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEnvCondReqV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEnvCondReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvCondReqV3::CigiEnvCondReqV3() { PacketID = CIGI_ENV_COND_REQ_PACKET_ID_V3; PacketSize = CIGI_ENV_COND_REQ_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ReqType = Maritime; ReqID = 0; Lat = 0.0; Lon = 0.0; Alt = 0.0; } // ================================================ // ~CigiEnvCondReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvCondReqV3::~CigiEnvCondReqV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCondReqV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseEnvCondReq * Data = ( CigiBaseEnvCondReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->ReqType & 0x0f; *CDta.c++ = Data->ReqID; *CDta.l++ = 0; *CDta.d++ = Data->Lat; *CDta.d++ = Data->Lon; *CDta.d++ = Data->Alt; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCondReqV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size ReqType = (ReqTypeGrp)(*CDta.c++ & 0x0f); ReqID = *CDta.c++; CDta.l++; if(!Swap) { Lat = *CDta.d++; Lon = *CDta.d++; Alt = *CDta.d++; } else { CigiSwap8(&Lat, CDta.d++); CigiSwap8(&Lon, CDta.d++); CigiSwap8(&Alt, CDta.d++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiEnvCtrlV1.cpp000066400000000000000000000247471210750432300207750ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  10/16/2006 Greg Basler                       Version 1.7.4
 *  Changed the way some CIGI v3 enable flags are set during
 *  the version 1 unpacking
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEnvCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEnvCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvCtrlV1::CigiEnvCtrlV1() { PacketID = CIGI_ENV_CTRL_PACKET_ID_V1; PacketSize = CIGI_ENV_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; Hour = 0; Minute = 0; Month = 1; Day = 1; Year = 2000; StarInt = 0.0; EphemerisEn = false; SunEn = false; MoonEn = false; StarEn = false; DateVld = true; AtmosEn = false; Aerosol = 0.0; Humidity = 30; AirTemp = 0.0; Visibility = 64373.76f; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; } // ================================================ // ~CigiEnvCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvCtrlV1::~CigiEnvCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseEnvCtrl * Data = ( CigiBaseEnvCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->Hour; *CDta.c++ = Data->Minute; *CDta.c++ = ((Data->Humidity) & 0x7f) | ((Data->EphemerisEn) ? 0x80 : 0); *CDta.c++ = 0; *CDta.s++ = 0; // Determine date Cigi_uint32 date = ((Cigi_uint32)Data->Month * 1000000) + ((Cigi_uint32)Data->Day * 10000) + (Cigi_uint32)Data->Year; CIGI_SCOPY4(CDta.l++, &date); CIGI_SCOPY4(CDta.f++, &Data->AirTemp); CIGI_SCOPY4(CDta.f++, &Data->Visibility); CIGI_SCOPY4(CDta.f++, &Data->HorizWindSp); CIGI_SCOPY4(CDta.f++, &Data->WindDir); memcpy(Buff,tBuf,CIGI_ENV_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_ENV_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Hour = *CDta.c++; Minute = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; EphemerisEn = ((HDta & 0x80) != 0); Humidity = HDta & 0x7f; SunEn = MoonEn = StarEn = DateVld = EphemerisEn; CDta.c += 3; // Determine date Cigi_uint32 date; CIGI_SCOPY4(&date, CDta.l++); Month = (Cigi_uint8)(date / 1000000); date -= ((Cigi_uint32)Month * 1000000); Day = (Cigi_uint8)(date / 10000); date -= ((Cigi_uint32)Day * 10000); Year = (Cigi_uint16)date; CIGI_SCOPY4(&AirTemp, CDta.f++); CIGI_SCOPY4(&Visibility, CDta.f++); CIGI_SCOPY4(&HorizWindSp, CDta.f++); CIGI_SCOPY4(&WindDir, CDta.f++); return(PacketSize); } // ==================================================================== // Filling the Hold object // ==================================================================== // ================================================ // FillHold // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiEnvCtrlV1::FillHold(CigiBaseEnvCtrl * Hold) const { Hold->Hour = Hour; Hold->Minute = Minute; Hold->EphemerisEn = EphemerisEn; Hold->SunEn = SunEn; Hold->MoonEn = MoonEn; Hold->StarEn = StarEn; Hold->DateVld = DateVld; Hold->AtmosEn = AtmosEn; Hold->Humidity = Humidity; Hold->Month = Month; Hold->Day = Day; Hold->Year = Year; Hold->AirTemp = AirTemp; Hold->Visibility = Visibility; Hold->HorizWindSp = HorizWindSp; Hold->WindDir = WindDir; Hold->BaroPress = BaroPress; Hold->Aerosol = Aerosol; } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Hour // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetHour(const Cigi_uint8 HourIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HourIn < 0)||(HourIn > 23))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Hour",(Cigi_uint8)HourIn,0,23); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Hour = HourIn; return(CIGI_SUCCESS); } // ================================================ // Minute // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetMinute(const Cigi_uint8 MinuteIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MinuteIn < 0)||(MinuteIn > 59))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Minute",(Cigi_uint8)MinuteIn,0,59); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Minute = MinuteIn; return(CIGI_SUCCESS); } // ================================================ // Humidity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HumidityIn < 0)||(HumidityIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Humidity",(Cigi_uint8)HumidityIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Humidity = HumidityIn; return(CIGI_SUCCESS); } // ================================================ // Month // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetMonth(const Cigi_uint8 MonthIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MonthIn < 1)||(MonthIn > 12))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Month",(Cigi_uint8)MonthIn,1,12); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Month = MonthIn; return(CIGI_SUCCESS); } // ================================================ // Day // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetDay(const Cigi_uint8 DayIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DayIn < 1)||(DayIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Day",(Cigi_uint8)DayIn,1,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Day = DayIn; return(CIGI_SUCCESS); } // ================================================ // Visibility // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetVisibility(const float VisibilityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (VisibilityIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Visibility",(float)VisibilityIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Visibility = VisibilityIn; return(CIGI_SUCCESS); } // ================================================ // HorizWindSp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetHorizWindSp(const float HorizWindSpIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (HorizWindSpIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("HorizWindSp",(float)HorizWindSpIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif HorizWindSp = HorizWindSpIn; return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV1::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiEnvCtrlV2.cpp000066400000000000000000000271651210750432300207730ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  10/16/2006 Greg Basler                       Version 1.7.4
 *  Changed the way some CIGI v3 enable flags are set during
 *  the version 2 unpacking
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEnvCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEnvCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvCtrlV2::CigiEnvCtrlV2() { PacketID = CIGI_ENV_CTRL_PACKET_ID_V2; PacketSize = CIGI_ENV_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; Hour = 0; Minute = 0; Month = 1; Day = 1; Year = 2000; StarInt = 0.0; EphemerisEn = false; SunEn = false; MoonEn = false; StarEn = false; DateVld = true; AtmosEn = false; Aerosol = 0.0; Humidity = 30; AirTemp = 0.0; Visibility = 64373.76f; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; } // ================================================ // ~CigiEnvCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvCtrlV2::~CigiEnvCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseEnvCtrl * Data = ( CigiBaseEnvCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->Hour; *CDta.c++ = Data->Minute; *CDta.c++ = ((Data->Humidity) & 0x7f) | ((Data->EphemerisEn) ? 0x80 : 0); *CDta.c++ = (Data->AtmosEn) ? 0x80 : 0; *CDta.s++ = 0; // Determine date Cigi_uint32 date = ((Cigi_uint32)Data->Month * 1000000) + ((Cigi_uint32)Data->Day * 10000) + (Cigi_uint32)Data->Year; CIGI_SCOPY4(CDta.l++, &date); CIGI_SCOPY4(CDta.f++, &Data->AirTemp); CIGI_SCOPY4(CDta.f++, &Data->Visibility); CIGI_SCOPY4(CDta.f++, &Data->HorizWindSp); CIGI_SCOPY4(CDta.f++, &Data->WindDir); CIGI_SCOPY4(CDta.f++, &Data->BaroPress); CIGI_SCOPY4(CDta.f++, &Data->Aerosol); memcpy(Buff,tBuf,CIGI_ENV_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_ENV_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Hour = *CDta.c++; Minute = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; EphemerisEn = ((HDta & 0x80) != 0); Humidity = HDta & 0x7f; SunEn = MoonEn = StarEn = DateVld = EphemerisEn; AtmosEn = (*CDta.c++ != 0); CDta.s++; // Determine date Cigi_uint32 date; CIGI_SCOPY4(&date, CDta.l++); Month = (Cigi_uint8)(date / 1000000); date -= ((Cigi_uint32)Month * 1000000); Day = (Cigi_uint8)(date / 10000); date -= ((Cigi_uint32)Day * 10000); Year = (Cigi_uint16)date; CIGI_SCOPY4(&AirTemp, CDta.f++); CIGI_SCOPY4(&Visibility, CDta.f++); CIGI_SCOPY4(&HorizWindSp, CDta.f++); CIGI_SCOPY4(&WindDir, CDta.f++); CIGI_SCOPY4(&BaroPress, CDta.f++); CIGI_SCOPY4(&Aerosol, CDta.f++); return(PacketSize); } // ==================================================================== // Filling the Hold object // ==================================================================== // ================================================ // FillHold // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiEnvCtrlV2::FillHold(CigiBaseEnvCtrl * Hold) const { Hold->Hour = Hour; Hold->Minute = Minute; Hold->EphemerisEn = EphemerisEn; Hold->SunEn = SunEn; Hold->MoonEn = MoonEn; Hold->StarEn = StarEn; Hold->DateVld = DateVld; Hold->AtmosEn = AtmosEn; Hold->Humidity = Humidity; Hold->Month = Month; Hold->Day = Day; Hold->Year = Year; Hold->AirTemp = AirTemp; Hold->Visibility = Visibility; Hold->HorizWindSp = HorizWindSp; Hold->WindDir = WindDir; Hold->BaroPress = BaroPress; Hold->Aerosol = Aerosol; } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Hour // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetHour(const Cigi_uint8 HourIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HourIn < 0)||(HourIn > 23))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Hour",(Cigi_uint8)HourIn,0,23); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Hour = HourIn; return(CIGI_SUCCESS); } // ================================================ // Minute // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetMinute(const Cigi_uint8 MinuteIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MinuteIn < 0)||(MinuteIn > 59))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Minute",(Cigi_uint8)MinuteIn,0,59); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Minute = MinuteIn; return(CIGI_SUCCESS); } // ================================================ // Humidity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HumidityIn < 0)||(HumidityIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Humidity",(Cigi_uint8)HumidityIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Humidity = HumidityIn; return(CIGI_SUCCESS); } // ================================================ // Month // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetMonth(const Cigi_uint8 MonthIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((MonthIn < 1)||(MonthIn > 12))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Month",(Cigi_uint8)MonthIn,1,12); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Month = MonthIn; return(CIGI_SUCCESS); } // ================================================ // Day // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetDay(const Cigi_uint8 DayIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DayIn < 1)||(DayIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Day",(Cigi_uint8)DayIn,1,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Day = DayIn; return(CIGI_SUCCESS); } // ================================================ // Aerosol // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetAerosol(const float AerosolIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (AerosolIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Aerosol",(float)AerosolIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Aerosol = AerosolIn; return(CIGI_SUCCESS); } // ================================================ // Visibility // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetVisibility(const float VisibilityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (VisibilityIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Visibility",(float)VisibilityIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Visibility = VisibilityIn; return(CIGI_SUCCESS); } // ================================================ // HorizWindSp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetHorizWindSp(const float HorizWindSpIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (HorizWindSpIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("HorizWindSp",(float)HorizWindSpIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif HorizWindSp = HorizWindSpIn; return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } // ================================================ // BaroPress // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvCtrlV2::SetBaroPress(const float BaroPressIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && (BaroPressIn < 0.0)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("BaroPress",(float)BaroPressIn,">",0.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif BaroPress = BaroPressIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiEnvRgnCtrlV3.cpp000066400000000000000000000131311210750432300214270ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEnvRgnCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEnvRgnCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEnvRgnCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvRgnCtrlV3::CigiEnvRgnCtrlV3() { PacketID = CIGI_ENV_RGN_CTRL_PACKET_ID_V3; PacketSize = CIGI_ENV_RGN_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; RegionID = 0; RgnState = Inactive; WeatherProp = UseLast; Aerosol = UseLast; MaritimeSurface = UseLast; TerrestrialSurface = UseLast; Lat = 0.0; Lon = 0.0; XSize = 0.0; YSize = 0.0; CornerRadius = 0.0; Rotation = 0.0; Transition = 0.0; } // ================================================ // ~CigiEnvRgnCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEnvRgnCtrlV3::~CigiEnvRgnCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvRgnCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseEnvRgnCtrl * Data = ( CigiBaseEnvRgnCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->RegionID; Cigi_uint8 MDta = Data->RgnState & 0x03; MDta |= (Data->WeatherProp << 2) & 0x04; MDta |= (Data->Aerosol << 3) & 0x08; MDta |= (Data->MaritimeSurface << 4) & 0x10; MDta |= (Data->TerrestrialSurface << 5) & 0x20; *CDta.c++ = MDta; *CDta.c++ = 0; *CDta.s++ = 0; *CDta.d++ = Data->Lat; *CDta.d++ = Data->Lon; *CDta.f++ = Data->XSize; *CDta.f++ = Data->YSize; *CDta.f++ = Data->CornerRadius; *CDta.f++ = Data->Rotation; *CDta.f++ = Data->Transition; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEnvRgnCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { RegionID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; RgnState = (RgnStateGrp)(HDta & 0x03); WeatherProp = (MergeCtrlGrp)((HDta >> 2) & 0x01); Aerosol = (MergeCtrlGrp)((HDta >> 3) & 0x01); MaritimeSurface = (MergeCtrlGrp)((HDta >> 4) & 0x01); TerrestrialSurface = (MergeCtrlGrp)((HDta >> 5) & 0x01); CDta.c += 3; Lat = *CDta.d++; Lon = *CDta.d++; XSize = *CDta.f++; YSize = *CDta.f++; CornerRadius = *CDta.f++; Rotation = *CDta.f++; Transition = *CDta.f++; } else { CigiSwap2(&RegionID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; RgnState = (RgnStateGrp)(HDta & 0x03); WeatherProp = (MergeCtrlGrp)((HDta >> 2) & 0x01); Aerosol = (MergeCtrlGrp)((HDta >> 3) & 0x01); MaritimeSurface = (MergeCtrlGrp)((HDta >> 4) & 0x01); TerrestrialSurface = (MergeCtrlGrp)((HDta >> 5) & 0x01); CDta.c += 3; CigiSwap8(&Lat, CDta.d++); CigiSwap8(&Lon, CDta.d++); CigiSwap4(&XSize, CDta.f++); CigiSwap4(&YSize, CDta.f++); CigiSwap4(&CornerRadius, CDta.f++); CigiSwap4(&Rotation, CDta.f++); CigiSwap4(&Transition, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiEventNotificationV3.cpp000066400000000000000000000104001210750432300230270ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiEventNotificationV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiEventNotificationV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiEventNotificationV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEventNotificationV3::CigiEventNotificationV3() { PacketID = CIGI_EVENT_NOTIFICATION_PACKET_ID_V3; PacketSize = CIGI_EVENT_NOTIFICATION_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EventID = 0; EventData.ul[0] = 0; EventData.ul[1] = 0; EventData.ul[2] = 0; } // ================================================ // ~CigiEventNotificationV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiEventNotificationV3::~CigiEventNotificationV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEventNotificationV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseEventNotification * Data = ( CigiBaseEventNotification *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EventID; *CDta.l++ = Data->EventData.l[0]; *CDta.l++ = Data->EventData.l[1]; *CDta.l++ = Data->EventData.l[2]; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiEventNotificationV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EventID = *CDta.s++; EventData.l[0] = *CDta.l++; EventData.l[1] = *CDta.l++; EventData.l[2] = *CDta.l++; } else { CigiSwap2(&EventID, CDta.s++); CigiSwap4(&EventData.l[0], CDta.l++); CigiSwap4(&EventData.l[1], CDta.l++); CigiSwap4(&EventData.l[2], CDta.l++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiHatHotReqV3.cpp000066400000000000000000000157161210750432300212550ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotReqV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to update the UpdatePeriod variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatHotReqV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatHotReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotReqV3::CigiHatHotReqV3() { PacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; PacketSize = CIGI_HAT_HOT_REQ_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; HatHotID = 0; ReqType = HAT; SrcCoordSys = Geodetic; UpdatePeriod = 0; EntityID = 0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiHatHotReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotReqV3::~CigiHatHotReqV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseHatHotReq * Data = ( CigiBaseHatHotReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->HatHotID; Cigi_uint8 HDta = (Cigi_uint8)(Data->ReqType & 0x03); HDta |= (Cigi_uint8)((Data->SrcCoordSys << 2) & 0x04); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { HatHotID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x03); SrcCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); CDta.c++; EntityID = *CDta.s++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; } else { CigiSwap2(&HatHotID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x03); SrcCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); } IsValidV1or2 = (SrcCoordSys == Geodetic); UpdatePeriod = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V1; break; case 2: if(ReqType == CigiBaseHatHotReq::HAT) CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_HOT_REQ_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3::SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcCoordSysIn < 0)||(SrcCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcCoordSys",(CoordSysGrp)SrcCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcCoordSys = SrcCoordSysIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiHatHotReqV3_2.cpp000066400000000000000000000151521210750432300214700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotReqV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiHatHotReqV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatHotReqV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatHotReqV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotReqV3_2::CigiHatHotReqV3_2() { PacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3_2; PacketSize = CIGI_HAT_HOT_REQ_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; HatHotID = 0; ReqType = HAT; SrcCoordSys = Geodetic; UpdatePeriod = 0; EntityID = 0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiHatHotReqV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotReqV3_2::~CigiHatHotReqV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseHatHotReq * Data = ( CigiBaseHatHotReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->HatHotID; Cigi_uint8 HDta = (Cigi_uint8)(Data->ReqType & 0x03); HDta |= (Cigi_uint8)((Data->SrcCoordSys << 2) & 0x04); *CDta.c++ = HDta; *CDta.c++ = Data->UpdatePeriod; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { HatHotID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x03); SrcCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); UpdatePeriod = *CDta.c++; EntityID = *CDta.s++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; } else { CigiSwap2(&HatHotID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x03); SrcCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); UpdatePeriod = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); } IsValidV1or2 = (SrcCoordSys == Geodetic); return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3_2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V1; break; case 2: if(ReqType == CigiBaseHatHotReq::HAT) CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_HOT_REQ_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3_2::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotReqV3_2::SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcCoordSysIn < 0)||(SrcCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcCoordSys",(CoordSysGrp)SrcCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcCoordSys = SrcCoordSysIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiHatHotRespV3.cpp000066400000000000000000000170651210750432300214360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatHotRespV3.h" #include "CigiBaseHatHotReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatHotRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotRespV3::CigiHatHotRespV3() { PacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3; PacketSize = CIGI_HAT_HOT_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; HatHotID = 0; Valid = false; ReqType = HAT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHatHotRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotRespV3::~CigiHatHotRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->HatHotID; bool tValid = Data->Valid; ReqTypeGrp tReqType = Data->ReqType; if(tValid) { if(!((Data->VldHat && (tReqType == HAT)) || (Data->VldHot && (tReqType == HOT)))) { if(Data->VldHat) tReqType = HAT; else if(Data->VldHot) tReqType = HOT; else tValid = false; } } Cigi_uint8 HDta = (tValid) ? 0x01 : 0; HDta |= (Cigi_uint8)((tReqType << 1) & 0x02); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; if(tValid) { if(tReqType == HAT) *CDta.d++ = Data->Hat; else *CDta.d++ = Data->Hot; } else *CDta.d++ = 0.0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { HatHotID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); ReqType = (ReqTypeGrp)((HDta >> 1) & 0x01); CDta.c += 3; if(Valid) { if(ReqType == HAT) { Hat = *CDta.d++; Hot = 0.0; VldHat = true; VldHot = false; } else { Hat = 0.0; Hot = *CDta.d++; VldHat = false; VldHot = true; } } else { Hat = 0.0; Hot = 0.0; VldHat = false; VldHot = false; } } else { CigiSwap2(&HatHotID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); ReqType = (ReqTypeGrp)((HDta >> 1) & 0x01); CDta.c += 3; if(Valid) { if(ReqType == HAT) { CigiSwap8(&Hat, CDta.d++); Hot = 0.0; VldHat = true; VldHot = false; } else { Hat = 0.0; CigiSwap8(&Hot, CDta.d++); VldHat = false; VldHot = true; } } else { Hat = 0.0; Hot = 0.0; VldHat = false; VldHot = false; } } HostFrame = 0; Material = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: // Note: This will result in an incorrect value // if the V3 response is a HOT value. CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V1; break; case 2: if(ReqType == CigiBaseHatHotReq::HAT) CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_HOT_RESP_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotResp are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiHatHotRespV3_2.cpp000066400000000000000000000164671210750432300216640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotRespV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiHatHotRespV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatHotRespV3_2.h" #include "CigiBaseHatHotReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatHotRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotRespV3_2::CigiHatHotRespV3_2() { PacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3_2; PacketSize = CIGI_HAT_HOT_RESP_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; HatHotID = 0; Valid = false; ReqType = HAT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHatHotRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotRespV3_2::~CigiHatHotRespV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->HatHotID; bool tValid = Data->Valid; ReqTypeGrp tReqType = Data->ReqType; if(tValid) { if(!((Data->VldHat && (tReqType == HAT)) || (Data->VldHot && (tReqType == HOT)))) { if(Data->VldHat) tReqType = HAT; else if(Data->VldHot) tReqType = HOT; else tValid = false; } } Cigi_uint8 HDta = (tValid) ? 0x01 : 0; HDta |= (Cigi_uint8)((tReqType << 1) & 0x02); HDta |= (Data->HostFrame << 4) & 0xf0; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; if(tValid) { if(tReqType == HAT) *CDta.d++ = Data->Hat; else *CDta.d++ = Data->Hot; } else *CDta.d++ = 0.0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { HatHotID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); ReqType = (ReqTypeGrp)((HDta >> 1) & 0x01); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); CDta.c += 3; if(Valid) { if(ReqType == HAT) { Hat = *CDta.d++; Hot = 0.0; VldHat = true; VldHot = false; } else { Hat = 0.0; Hot = *CDta.d++; VldHat = false; VldHot = true; } } else { Hat = 0.0; Hot = 0.0; VldHat = false; VldHot = false; } } else { CigiSwap2(&HatHotID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); ReqType = (ReqTypeGrp)((HDta >> 1) & 0x01); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); CDta.c += 3; if(Valid) { if(ReqType == HAT) { CigiSwap8(&Hat, CDta.d++); Hot = 0.0; VldHat = true; VldHot = false; } else { Hat = 0.0; CigiSwap8(&Hot, CDta.d++); VldHat = false; VldHot = true; } } else { Hat = 0.0; Hot = 0.0; VldHat = false; VldHot = false; } } Material = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3_2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: // Note: This will result in an incorrect value // if the V3_2 response is a HOT value. CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V1; break; case 2: if(ReqType == CigiBaseHatHotReq::HAT) CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_HOT_RESP_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotRespV3_2::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiHatHotXRespV3.cpp000066400000000000000000000166371210750432300215720ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotXRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  01/22/2007 Greg Basler                       Version 1.7.5
 *  Set Request Type or Response Type (ReqType) to HAT in the Unpack()
 *  method for Cigi Version 1 and 2 compatibility.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatHotXRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatHotXRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotXRespV3::CigiHatHotXRespV3() { PacketID = CIGI_HAT_HOT_XRESP_PACKET_ID_V3; PacketSize = CIGI_HAT_HOT_XRESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; HatHotID = 0; Valid = false; ReqType = HAT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHatHotXRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotXRespV3::~CigiHatHotXRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->HatHotID; bool tValid = Data->Valid; if(!Data->VldHat && !Data->VldHot) tValid = false; *CDta.c++ = (tValid) ? 0x01 : 0; *CDta.c++ = 0; *CDta.s++ = 0; if(tValid) { if(Data->VldHat) *CDta.d++ = Data->Hat; else *CDta.d++ = 0.0; if(Data->VldHot) *CDta.d++ = Data->Hot; else *CDta.d++ = 0.0; *CDta.l++ = Data->Material; *CDta.f++ = Data->NormAz; *CDta.f++ = Data->NormEl; } else { *CDta.d++ = 0.0; *CDta.d++ = 0.0; *CDta.l++ = 0; *CDta.f++ = 0.0f; *CDta.f++ = 0.0f; } *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { HatHotID = *CDta.s++; Valid = (*CDta.c++ != 0); CDta.c += 3; Hat = *CDta.d++; Hot = *CDta.d++; Material = *CDta.l++; NormAz = *CDta.f++; NormEl = *CDta.f++; if(Valid) { VldHat = true; VldHot = true; } else { VldHat = false; VldHot = false; } } else { CigiSwap2(&HatHotID, CDta.s++); Valid = (*CDta.c++ != 0); CDta.c += 3; CigiSwap8(&Hat, CDta.d++); CigiSwap8(&Hot, CDta.d++); CigiSwap4(&Material, CDta.l++); CigiSwap4(&NormAz, CDta.f++); CigiSwap4(&NormEl, CDta.f++); if(Valid) { VldHat = true; VldHot = true; } else { VldHat = false; VldHot = false; } } ReqType = HAT; // For Cigi Version 1 and 2 compatibility HostFrame = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V1; break; case 2: CnvtInfo.CnvtPacketID = CIGI_HOT_RESP_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotXResp are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_XRESP_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // NormAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3::SetNormAz(const float NormAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormAzIn < -180.0)||(NormAzIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormAz",(float)NormAzIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormAz = NormAzIn; return(CIGI_SUCCESS); } // ================================================ // NormEl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3::SetNormEl(const float NormElIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormElIn < -90.0)||(NormElIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormEl",(float)NormElIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormEl = NormElIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiHatHotXRespV3_2.cpp000066400000000000000000000164151210750432300220050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatHotXRespV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiHatHotXRespV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  01/22/2007 Greg Basler                       Version 1.7.5
 *  Set Request Type or Response Type (ReqType) to HAT in the Unpack()
 *  method for Cigi Version 1 and 2 compatibility.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatHotXRespV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatHotXRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotXRespV3_2::CigiHatHotXRespV3_2() { PacketID = CIGI_HAT_HOT_XRESP_PACKET_ID_V3_2; PacketSize = CIGI_HAT_HOT_XRESP_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; HatHotID = 0; Valid = false; ReqType = HAT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHatHotXRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatHotXRespV3_2::~CigiHatHotXRespV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->HatHotID; bool tValid = Data->Valid; if(!Data->VldHat && !Data->VldHot) tValid = false; Cigi_uint8 HDta = (tValid) ? 0x01 : 0; HDta |= (Data->HostFrame << 4) & 0xf0; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; if(tValid) { if(Data->VldHat) *CDta.d++ = Data->Hat; else *CDta.d++ = 0.0; if(Data->VldHot) *CDta.d++ = Data->Hot; else *CDta.d++ = 0.0; *CDta.l++ = Data->Material; *CDta.f++ = Data->NormAz; *CDta.f++ = Data->NormEl; } else { *CDta.d++ = 0.0; *CDta.d++ = 0.0; *CDta.l++ = 0; *CDta.f++ = 0.0f; *CDta.f++ = 0.0f; } *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { HatHotID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); CDta.c += 3; Hat = *CDta.d++; Hot = *CDta.d++; Material = *CDta.l++; NormAz = *CDta.f++; NormEl = *CDta.f++; if(Valid) { VldHat = true; VldHot = true; } else { VldHat = false; VldHot = false; } } else { CigiSwap2(&HatHotID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); CDta.c += 3; CigiSwap8(&Hat, CDta.d++); CigiSwap8(&Hot, CDta.d++); CigiSwap4(&Material, CDta.l++); CigiSwap4(&NormAz, CDta.f++); CigiSwap4(&NormEl, CDta.f++); if(Valid) { VldHat = true; VldHot = true; } else { VldHat = false; VldHot = false; } } ReqType = HAT; // For Cigi Version 1 and 2 compatibility return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3_2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V1; break; case 2: CnvtInfo.CnvtPacketID = CIGI_HOT_RESP_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotXResp are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_XRESP_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // NormAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3_2::SetNormAz(const float NormAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormAzIn < -180.0)||(NormAzIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormAz",(float)NormAzIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormAz = NormAzIn; return(CIGI_SUCCESS); } // ================================================ // NormEl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatHotXRespV3_2::SetNormEl(const float NormElIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormElIn < -90.0)||(NormElIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormEl",(float)NormElIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormEl = NormElIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiHatReqV1.cpp000066400000000000000000000132071210750432300205710ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatReqV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the UpdatePeriod member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatReqV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatReqV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatReqV1::CigiHatReqV1() { PacketID = CIGI_HAT_REQ_PACKET_ID_V1; PacketSize = CIGI_HAT_REQ_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; HatHotID = 0; ReqType = HAT; SrcCoordSys = Geodetic; UpdatePeriod = 0; EntityID = 0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiHatReqV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatReqV1::~CigiHatReqV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatReqV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseHatHotReq * Data = ( CigiBaseHatHotReq *)Base; if(!Data->IsValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->HatHotID); float talt = (float)Data->AltOrZoff; CIGI_SCOPY4(CDta.f++, &talt); CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_HAT_REQ_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatReqV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_HAT_REQ_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&HatHotID, CDta.s++); float talt; CIGI_SCOPY4(&talt, CDta.f++); AltOrZoff = (double)talt; CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); SrcCoordSys = Geodetic; IsValidV1or2 = true; UpdatePeriod = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatReqV1::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V1; break; case 2: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiHatReqV2.cpp000066400000000000000000000131421210750432300205700ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatReqV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the UpdatePeriod member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatReqV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatReqV2::CigiHatReqV2() { PacketID = CIGI_HAT_REQ_PACKET_ID_V2; PacketSize = CIGI_HAT_REQ_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; HatHotID = 0; ReqType = HAT; SrcCoordSys = Geodetic; UpdatePeriod = 0; EntityID = 0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiHatReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatReqV2::~CigiHatReqV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatReqV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseHatHotReq * Data = ( CigiBaseHatHotReq *)Base; if(!Data->IsValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->HatHotID); *CDta.l++ = 0; CIGI_SCOPY8(CDta.d++, &Data->AltOrZoff); CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_HAT_REQ_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatReqV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_HAT_REQ_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&HatHotID, CDta.s++); CDta.l++; CIGI_SCOPY8(&AltOrZoff, CDta.d++); CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); SrcCoordSys = Geodetic; IsValidV1or2 = true; UpdatePeriod = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatReqV2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V1; break; case 2: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiHatRespV1.cpp000066400000000000000000000130361210750432300207530ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatRespV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatRespV1.h" #include "CigiBaseHatHotReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatRespV1::CigiHatRespV1() { PacketID = CIGI_HAT_RESP_PACKET_ID_V1; PacketSize = CIGI_HAT_RESP_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; HatHotID = 0; Valid = false; ReqType = HAT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHatRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatRespV1::~CigiHatRespV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatRespV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->HatHotID); float tHat; if(Data->Valid && Data->VldHat) { *CDta.c++ = 0x80; *CDta.c++ = 0; *CDta.s++ = 0; tHat = (float)Data->Hat; } else { *CDta.l++ = 0; tHat = 0.0f; } CIGI_SCOPY4(CDta.l++, &Data->Material); CIGI_SCOPY4(CDta.f++, &tHat); memcpy(Buff,tBuf,CIGI_HAT_RESP_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatRespV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_HAT_RESP_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&HatHotID, CDta.s++); Valid = (*CDta.c++ != 0); CDta.c += 3; CIGI_SCOPY4(&Material, CDta.l++); float tHat; CIGI_SCOPY4(&tHat, CDta.f++); Hat = (double) tHat; Hot = 0.0; VldHat = Valid; VldHot = false; HostFrame = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatRespV1::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: All HAT and HAT/HOT resp have the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiHatRespV2.cpp000066400000000000000000000127701210750432300207600ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHatRespV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHatRespV2.h" #include "CigiBaseHatHotReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHatRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatRespV2::CigiHatRespV2() { PacketID = CIGI_HAT_RESP_PACKET_ID_V2; PacketSize = CIGI_HAT_RESP_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; HatHotID = 0; Valid = false; ReqType = HAT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHatRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHatRespV2::~CigiHatRespV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatRespV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->HatHotID); double tHat; if(Data->Valid && Data->VldHat) { *CDta.c++ = 0x80; *CDta.c++ = 0; *CDta.s++ = 0; tHat = Data->Hat; } else { *CDta.l++ = 0; tHat = 0.0; } *CDta.l++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Material); CIGI_SCOPY8(CDta.d++, &tHat); memcpy(Buff,tBuf,CIGI_HAT_RESP_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatRespV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_HAT_RESP_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&HatHotID, CDta.s++); Valid = (*CDta.l++ != 0); CDta.l++; CIGI_SCOPY4(&Material, CDta.l++); CIGI_SCOPY8(&Hat, CDta.d++); Hot = 0.0; VldHat = Valid; VldHot = false; HostFrame = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHatRespV2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: All HAT and HAT/HOT resp have the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiHostSession.cpp000066400000000000000000000044561210750432300214650ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHostSession.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to set the CIGI minor version.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHostSession.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHostSession // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHostSession::CigiHostSession(const int NumInBuf, const int InBufLen, const int NumOutBuf, const int OutBufLen) : CigiSession(NumInBuf, InBufLen, NumOutBuf, OutBufLen, CigiSession::Host) { } // ================================================ // ~CigiHostSession // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHostSession::~CigiHostSession() { } cigi-ccl-3.3.3a+svn818/source/CigiHotReqV2.cpp000066400000000000000000000132421210750432300206070ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHotReqV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the UpdatePeriod member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Corrected an error with ReqType.  The request type should be HOT not HAT.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHotReqV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHotReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHotReqV2::CigiHotReqV2() { PacketID = CIGI_HOT_REQ_PACKET_ID_V2; PacketSize = CIGI_HOT_REQ_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; HatHotID = 0; ReqType = HOT; SrcCoordSys = Geodetic; UpdatePeriod = 0; EntityID = 0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; IsValidV1or2 = true; } // ================================================ // ~CigiHotReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHotReqV2::~CigiHotReqV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHotReqV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseHatHotReq * Data = ( CigiBaseHatHotReq *)Base; if(!Data->IsValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->HatHotID); *CDta.l++ = 0; CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_HOT_REQ_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHotReqV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_HOT_REQ_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&HatHotID, CDta.s++); CDta.l++; CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); SrcCoordSys = Geodetic; IsValidV1or2 = true; UpdatePeriod = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHotReqV2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: CnvtInfo.CnvtPacketID = CIGI_HAT_REQ_PACKET_ID_V1; break; case 2: CnvtInfo.CnvtPacketID = CIGI_HOT_REQ_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_REQ_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiHotRespV2.cpp000066400000000000000000000136231210750432300207740ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiHotRespV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to use the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiHotRespV2.h" #include "CigiBaseHatHotReq.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiHotRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHotRespV2::CigiHotRespV2() { PacketID = CIGI_HOT_RESP_PACKET_ID_V2; PacketSize = CIGI_HOT_RESP_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; HatHotID = 0; Valid = false; ReqType = HOT; HostFrame = 0; Hat = 0.0; Hot = 0.0; Material = 0; NormAz = 0.0; NormEl = 0.0; VldHat = false; VldHot = false; } // ================================================ // ~CigiHotRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiHotRespV2::~CigiHotRespV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHotRespV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseHatHotResp * Data = ( CigiBaseHatHotResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->HatHotID); double tHot; if(Data->Valid && Data->VldHot) { *CDta.c++ = 0x80; *CDta.c++ = 0; *CDta.s++ = 0; tHot = Data->Hot; } else { *CDta.l++ = 0; tHot = 0.0; } *CDta.l++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Material); CIGI_SCOPY8(CDta.d++, &tHot); memcpy(Buff,tBuf,CIGI_HOT_RESP_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHotRespV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_HOT_RESP_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&HatHotID, CDta.s++); Valid = (*CDta.l++ != 0); CDta.l++; CIGI_SCOPY4(&Material, CDta.l++); CIGI_SCOPY8(&Hot, CDta.d++); Hat = 0.0; VldHat = Valid; VldHot = false; HostFrame = 0; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiHotRespV2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; switch(CnvtVersion.CigiMajorVersion) { case 1: // Note: This does not provide a good conversion // This actually ends up being a HOT; however, // there is no way of actually providing a HAT. CnvtInfo.CnvtPacketID = CIGI_HAT_RESP_PACKET_ID_V1; break; case 2: CnvtInfo.CnvtPacketID = CIGI_HOT_RESP_PACKET_ID_V2; break; default: // The Packet ID for all V3 HatHotReq are the same ID CnvtInfo.CnvtPacketID = CIGI_HAT_HOT_RESP_PACKET_ID_V3; break; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiIGCtrlV1.cpp000066400000000000000000000143141210750432300205310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  LastRcvdIGFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the LastRcvdIGFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGCtrlV1.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV1::CigiIGCtrlV1() { PacketID = CIGI_IG_CTRL_PACKET_ID_V1; PacketSize = CIGI_IG_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV1 = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TrackDeviceEn = Disable; BoresightTrackDevice = false; TimestampValid = false; SmoothingEn = false; LastRcvdIGFrame = 0; } // ================================================ // ~CigiIGCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV1::~CigiIGCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseIGCtrl *Data = ( CigiBaseIGCtrl *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Version; *CDta.b++ = Data->DatabaseID; Cigi_uint8 HDta = (Data->BoresightTrackDevice) ? 0x10 : 0; HDta |= (Cigi_uint8)((Data->TrackDeviceEn << 5) & 0x20); HDta |= (Cigi_uint8)((Data->IGMode << 6) & 0xc0); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.l++, &Data->FrameCntr); CIGI_SCOPY4(CDta.l++, &Data->TimeStampV1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; Cigi_uint8 HDta = *CDta.c; IGMode = (IGModeGrp)((HDta >> 6) & 0x03); TrackDeviceEn = (TrackDeviceEnGrp)((HDta >> 5) & 0x01); BoresightTrackDevice = ((HDta & 0x10) != 0); CDta.l++; CIGI_SCOPY4(&FrameCntr,CDta.l++); CIGI_SCOPY4(&TimeStampV1,CDta.l++); TimeStampV2 = (float)TimeStampV1; TimeStampV3 = TimeStampV1 / 10; LastRcvdIGFrame = FrameCntr; Swap = false; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV1::SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk) { TimeStampV1 = TimeStamp; TimeStampV2 = (float)TimeStamp; TimeStampV3 = TimeStampV1 / 10; TimestampValid = true; return(CIGI_SUCCESS); } // ================================================ // SetTrackDeviceEn // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV1::SetTrackDeviceEn(const TrackDeviceEnGrp TrackDeviceEnIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TrackDeviceEnIn < 0)||(TrackDeviceEnIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TrackDeviceEn",TrackDeviceEnIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TrackDeviceEn = TrackDeviceEnIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGCtrlV2.cpp000066400000000000000000000143241210750432300205330ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  LastRcvdIGFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the LastRcvdIGFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGCtrlV2.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV2::CigiIGCtrlV2() { PacketID = CIGI_IG_CTRL_PACKET_ID_V2; PacketSize = CIGI_IG_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV1 = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TrackDeviceEn = Disable; BoresightTrackDevice = false; TimestampValid = false; SmoothingEn = false; LastRcvdIGFrame = 0; } // ================================================ // ~CigiIGCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV2::~CigiIGCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseIGCtrl *Data = ( CigiBaseIGCtrl *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Version; *CDta.b++ = Data->DatabaseID; Cigi_uint8 HDta = (Data->BoresightTrackDevice) ? 0x10 : 0; HDta |= (Cigi_uint8)((Data->TrackDeviceEn << 5) & 0x20); HDta |= (Cigi_uint8)((Data->IGMode << 6) & 0xc0); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.l++, &Data->FrameCntr); CIGI_SCOPY4(CDta.f++, &Data->TimeStampV2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; Cigi_uint8 HDta = *CDta.c; IGMode = (IGModeGrp)((HDta >> 6) & 0x03); TrackDeviceEn = (TrackDeviceEnGrp)((HDta >> 5) & 0x01); BoresightTrackDevice = ((HDta & 0x10) != 0); CDta.l++; CIGI_SCOPY4(&FrameCntr,CDta.l++); CIGI_SCOPY4(&TimeStampV2,CDta.f++); TimeStampV1 = (Cigi_uint32)TimeStampV2; TimeStampV3 = TimeStampV1 / 10; LastRcvdIGFrame = FrameCntr; Swap = false; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV2::SetTimeStamp(const float TimeStamp, bool bndchk) { TimeStampV2 = TimeStamp; TimeStampV1 = (Cigi_uint32)TimeStamp; TimeStampV3 = TimeStampV1 / 10; TimestampValid = true; return(CIGI_SUCCESS); } // ================================================ // SetTrackDeviceEn // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV2::SetTrackDeviceEn(const TrackDeviceEnGrp TrackDeviceEnIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TrackDeviceEnIn < 0)||(TrackDeviceEnIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TrackDeviceEn",TrackDeviceEnIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TrackDeviceEn = TrackDeviceEnIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGCtrlV3.cpp000066400000000000000000000125601210750432300205340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  LastRcvdIGFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the LastRcvdIGFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGCtrlV3.h" #include "CigiSwapping.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV3::CigiIGCtrlV3() { PacketID = CIGI_IG_CTRL_PACKET_ID_V3; PacketSize = CIGI_IG_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV1 = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TrackDeviceEn = Disable; BoresightTrackDevice = false; TimestampValid = false; SmoothingEn = false; LastRcvdIGFrame = 0; } // ================================================ // ~CigiIGCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV3::~CigiIGCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseIGCtrl *Data = ( CigiBaseIGCtrl *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Version; *CDta.b++ = Data->DatabaseID; Cigi_uint8 HDta = (Data->TimestampValid) ? 0x04 : 0; HDta |= (Cigi_uint8)(Data->IGMode & 0x03); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0x8000; // Byte Swap value *CDta.l++ = Data->FrameCntr; *CDta.l++ = Data->TimeStampV3; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)(HDta & 0x03); TimestampValid = ((HDta & 0x04) != 0); CDta.c++; ByteSwap = *CDta.s++; BSwapEn = (ByteSwap == 0x0080); if(!BSwapEn) { FrameCntr = *CDta.l++; TimeStampV3 = *CDta.l++; } else { CigiSwap4(&FrameCntr, CDta.l++); CigiSwap4(&TimeStampV3, CDta.l++); } TimeStampV1 = TimeStampV3 / 10; TimeStampV2 = (float)TimeStampV1; LastRcvdIGFrame = FrameCntr; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3::SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk) { TimeStampV3 = TimeStamp; TimeStampV1 = TimeStampV3 / 10; TimeStampV2 = (float)TimeStampV1; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGCtrlV3_2.cpp000066400000000000000000000126361210750432300207610ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiIGCtrlV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  08/11/2006 Greg Basler                       Version 1.7.3
 *  Corrected the packing routine so that the Minor Version number is
 *  is packed from the packing object (a CigiIGCtrlV3_2 object in this case)
 *  not the object with the user filled data.  This will put the correct
 *  Minor Version number in the host to ig message.
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added Extrapolation or Interpolation Smoothing flag and
 *  initialize it to false.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGCtrlV3_2.h" #include "CigiSwapping.h" #include "CigiVersionID.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGCtrlV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV3_2::CigiIGCtrlV3_2() { PacketID = CIGI_IG_CTRL_PACKET_ID_V3_2; PacketSize = CIGI_IG_CTRL_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV1 = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TrackDeviceEn = Disable; BoresightTrackDevice = false; TimestampValid = false; SmoothingEn = false; LastRcvdIGFrame = 0; } // ================================================ // ~CigiIGCtrlV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV3_2::~CigiIGCtrlV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiVersionID PackingVer = *((CigiVersionID *)Spec); CigiBaseIGCtrl *Data = ( CigiBaseIGCtrl *) Base; if(PackingVer.GetCombinedCigiVersion() < 0x0302) PackingVer.SetCigiVersion(3,2); CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = PackingVer.CigiMajorVersion; *CDta.b++ = Data->DatabaseID; Cigi_uint8 HDta = (PackingVer.CigiMinorVersion << 4) & 0xf0; HDta |= (Data->TimestampValid) ? 0x04 : 0; HDta |= (Cigi_uint8)(Data->IGMode & 0x03); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0x8000; // Byte Swap value *CDta.l++ = Data->FrameCntr; *CDta.l++ = Data->TimeStampV3; *CDta.l++ = Data->LastRcvdIGFrame; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)(HDta & 0x03); TimestampValid = ((HDta & 0x04) != 0); CDta.c++; ByteSwap = *CDta.s++; BSwapEn = (ByteSwap == 0x0080); if(!BSwapEn) { FrameCntr = *CDta.l++; TimeStampV3 = *CDta.l++; LastRcvdIGFrame = *CDta.l++; } else { CigiSwap4(&FrameCntr, CDta.l++); CigiSwap4(&TimeStampV3, CDta.l++); CigiSwap4(&LastRcvdIGFrame, CDta.l++); } TimeStampV1 = TimeStampV3 / 10; TimeStampV2 = (float)TimeStampV1; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3_2::SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk) { TimeStampV3 = TimeStamp; TimeStampV1 = TimeStampV3 / 10; TimeStampV2 = (float)TimeStampV1; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGCtrlV3_3.cpp000066400000000000000000000117061210750432300207570ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGCtrlV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Initial Release for CIGI 3.3 compatibility.
 *  Based on CigiIGCtrlV3_2.cpp"
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGCtrlV3_3.h" #include "CigiSwapping.h" #include "CigiVersionID.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV3_3::CigiIGCtrlV3_3() { PacketID = CIGI_IG_CTRL_PACKET_ID_V3_2; PacketSize = CIGI_IG_CTRL_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 3; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV1 = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TrackDeviceEn = Disable; BoresightTrackDevice = false; TimestampValid = false; SmoothingEn = false; LastRcvdIGFrame = 0; } // ================================================ // ~CigiIGCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGCtrlV3_3::~CigiIGCtrlV3_3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiVersionID PackingVer = *((CigiVersionID *)Spec); CigiBaseIGCtrl *Data = ( CigiBaseIGCtrl *) Base; if(PackingVer.GetCombinedCigiVersion() < 0x0303) PackingVer.SetCigiVersion(3,3); CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = PackingVer.CigiMajorVersion; *CDta.b++ = Data->DatabaseID; Cigi_uint8 HDta = (PackingVer.CigiMinorVersion << 4) & 0xf0; HDta |= (Data->SmoothingEn) ? 0x08 : 0; HDta |= (Data->TimestampValid) ? 0x04 : 0; HDta |= (Cigi_uint8)(Data->IGMode & 0x03); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0x8000; // Byte Swap value *CDta.l++ = Data->FrameCntr; *CDta.l++ = Data->TimeStampV3; *CDta.l++ = Data->LastRcvdIGFrame; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)(HDta & 0x03); TimestampValid = ((HDta & 0x04) != 0); SmoothingEn = ((HDta & 0x08) != 0); CDta.c++; ByteSwap = *CDta.s++; BSwapEn = (ByteSwap == 0x0080); if(!BSwapEn) { FrameCntr = *CDta.l++; TimeStampV3 = *CDta.l++; LastRcvdIGFrame = *CDta.l++; } else { CigiSwap4(&FrameCntr, CDta.l++); CigiSwap4(&TimeStampV3, CDta.l++); CigiSwap4(&LastRcvdIGFrame, CDta.l++); } TimeStampV1 = TimeStampV3 / 10; TimeStampV2 = (float)TimeStampV1; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGCtrlV3_3::SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk) { TimeStampV3 = TimeStamp; TimeStampV1 = TimeStampV3 / 10; TimeStampV2 = (float)TimeStampV1; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGMsgV2.cpp000066400000000000000000000130241210750432300203510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGMsgV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Corrected a few initialization and message setting problems.
 *  Added Variable length packet processing
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGMsgV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGMsgV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGMsgV2::CigiIGMsgV2() { PacketID = CIGI_IG_MSG_PACKET_ID_V2; PacketSize = 8; Version = 2; MinorVersion = 0; MsgID = 0; memset(Msg,0,4); VariableDataSize = MsgLen = 4; } // ================================================ // ~CigiIGMsgV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGMsgV2::~CigiIGMsgV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { Cigi_int16 tbuf; CigiBaseIGMsg * Data = ( CigiBaseIGMsg *)Base; Cigi_uint8 *CDta = Buff; *CDta++ = PacketID; *CDta++ = Data->PacketSize; CIGI_SCOPY2(&tbuf, &Data->MsgID); memcpy(CDta,&tbuf,2); CDta += 2; memcpy(CDta,Data->Msg,Data->MsgLen); return(Data->PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { Cigi_int16 tbuf; int tPktSz; Cigi_uint8 *CDta = Buff; CDta++; // Step over packet id tPktSz = *CDta++; // Get packet size memcpy(&tbuf,CDta,2); CIGI_SCOPY2(&MsgID, &tbuf); CDta += 2; if(tPktSz > 104) { PacketSize = 104; memcpy(&Msg,CDta,99); Msg[99] = 0; } else if(tPktSz <= 5) { PacketSize = tPktSz; Msg[0] = 0; } else { PacketSize = tPktSz; memcpy(&Msg,CDta,(tPktSz - 4)); Msg[(tPktSz - 5)] = 0; } MsgLen = PacketSize - 4; return(tPktSz); } // ================================================ // GetTruePacketSize // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV2::GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) { return(refPacket.GetVariableDataSize() + 4); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV2::SetMsg(const Cigi_Ascii *MsgIn, bool bndchk) { MsgLen = strlen(MsgIn); if(MsgLen == 0) { MsgLen = 4; memset(Msg,0,4); } else if(MsgLen >= 95) { MsgLen = 100; memcpy(Msg,MsgIn,95); memset(&Msg[MsgLen],0,5); Msg[99] = 0; } else { memcpy(Msg,MsgIn,MsgLen); int tadj = (MsgLen + 1) % 4; tadj = (tadj == 0) ? 1 : (5 - tadj); memset(&Msg[MsgLen],0,(tadj+4)); MsgLen += tadj; } VariableDataSize = MsgLen; PacketSize = VariableDataSize + 4; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGMsgV3.cpp000066400000000000000000000122601210750432300203530ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGMsgV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Corrected a few initialization and message setting problems.
 *  Added Variable length packet processing
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGMsgV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGMsgV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGMsgV3::CigiIGMsgV3() { PacketID = CIGI_IG_MSG_PACKET_ID_V3; Version = 3; MinorVersion = 0; MsgID = 0; VariableDataSize = MsgLen = 4; memset(Msg,0,4); PacketSize = 8; } // ================================================ // ~CigiIGMsgV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGMsgV3::~CigiIGMsgV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseIGMsg * Data = ( CigiBaseIGMsg *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = Data->PacketSize; *CDta.s++ = Data->MsgID; memcpy(CDta.c,Data->Msg,Data->MsgLen); return(Data->PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; int tPktSz; CDta.c = Buff; CDta.c++; // Step over packet id tPktSz = *CDta.c++; // Get packet size if(!Swap) MsgID = *CDta.s++; else CigiSwap2(&MsgID, CDta.s++); if(tPktSz > 104) { PacketSize = 104; memcpy(&Msg,CDta.c,99); Msg[99] = 0; } else if(tPktSz <= 5) { PacketSize = tPktSz; Msg[0] = 0; } else { PacketSize = tPktSz; memcpy(&Msg,CDta.c,(tPktSz - 4)); Msg[(tPktSz - 5)] = 0; } MsgLen = PacketSize - 4; return(tPktSz); } // ================================================ // GetTruePacketSize // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV3::GetTruePacketSize(CigiBaseVariableSizePckt &refPacket) { return(refPacket.GetVariableDataSize() + 4); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIGMsgV3::SetMsg(const Cigi_Ascii *MsgIn, bool bndchk) { MsgLen = strlen(MsgIn); if(MsgLen == 0) { MsgLen = 4; memset(Msg,0,4); } else if(MsgLen >= 99) { MsgLen = 100; memcpy(Msg,MsgIn,99); Msg[99] = 0; } else { memcpy(Msg,MsgIn,MsgLen); int tadj = (MsgLen + 5) % 8; tadj = (tadj == 0) ? 1 : (9 - tadj); memset(&Msg[MsgLen],0,tadj); MsgLen += tadj; } VariableDataSize = MsgLen; PacketSize = VariableDataSize + 4; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiIGSession.cpp000066400000000000000000000044261210750432300210440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIGSession.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to set the CIGI minor version.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIGSession.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIGSession // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGSession::CigiIGSession(const int NumInBuf, const int InBufLen, const int NumOutBuf, const int OutBufLen) : CigiSession(NumInBuf, InBufLen, NumOutBuf, OutBufLen, CigiSession::IG) { } // ================================================ // ~CigiIGSession // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIGSession::~CigiIGSession() { } cigi-ccl-3.3.3a+svn818/source/CigiIO.cpp000066400000000000000000000101471210750432300175050ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiIO.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *
 *  10/28/2005 Greg Basler                       Version 1.7
 *  Added a receive (Recv) member function that retreives and stores
 *    the incoming message but does not process it.
 *
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  06/10/2008 Greg Basler                       Version 2.2.0
 *  Corrected the Receive function to work with the new CigiIncomingMsg
 *  functionality.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIO.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIO // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIO::CigiIO(CigiIncomingMsg &InMsg, CigiOutgoingMsg &OutMsg) : MsgIn(InMsg), MsgOut(OutMsg) { int stat = CIGI_SUCCESS; stat = MsgOut.BeginMsg(); } // ================================================ // ~CigiIO // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIO::~CigiIO() { } // ==================================================================== // Processing // ==================================================================== // ================================================ // Send // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIO::Send() { Cigi_uint8 *buff; int len; int stat = CIGI_SUCCESS; stat = MsgOut.UpdateFrameCntr(); stat = MsgOut.LockMsg(); buff = MsgOut.GetMsg(len); Write(buff,len); stat = MsgOut.UnlockMsg(); stat = MsgOut.BeginMsg(); // prep for next message return(stat); } // ================================================ // Receive // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIO::Receive() { int stat = CIGI_SUCCESS; MsgIn.AdvanceCrntBuffer(); Cigi_uint8 *NextBuf = MsgIn.GetMsgBuffer(); int size = Read(NextBuf,MsgIn.GetMsgBufSize()); if(size > 0) { MsgIn.SetCrntMsgSize(size); MsgIn.ProcessIncomingMsg(); } else { size = 0; stat = CIGI_ERROR_MISCELLANEOUS; MsgIn.SetCrntMsgSize(size); } return(stat); } // ================================================ // Recv // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIO::Recv() { int stat = CIGI_SUCCESS; MsgIn.AdvanceCrntBuffer(); Cigi_uint8 *NextBuf = MsgIn.GetMsgBuffer(); int size = Read(NextBuf,MsgIn.GetMsgBufSize()); if(size > 0) { MsgIn.SetCrntMsgSize(size); } else { size = 0; stat = CIGI_ERROR_MISCELLANEOUS; MsgIn.SetCrntMsgSize(size); } return(stat); } cigi-ccl-3.3.3a+svn818/source/CigiIncomingMsg.cpp000066400000000000000000001563701210750432300214210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiIncomingMsg.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *
 *  04/06/2005 Greg Basler                       Version 1.5.2
 *  Fixed the GetFirstPacket function to use the correct start of frame and IG
 *  control opcode values.
 *
 *  07/05/2005 Greg Basler                       Version 1.5.4
 *  Modified the ProcessIncomingMsg function to check for and throw a buffer
 *  overrun exception when the actual data exists beyond the end of the
 *  incoming buffer.
 *
 *  08/11/2005 Greg Basler                       Version 1.5.5
 *  Modified the GetFirstPacket method to get the pointer to the correct
 *  SOF and IG Control handling objects.
 *
 *  10/06/2005 Greg Basler                       Version 1.5.6
 *  Fixed the ProcessIncomingMsg and GetFirstPacket methods to correctly
 *  handle frame counter synchronization.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the ProcessIncomingMsg method to use CIGI minor version numbers.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the GetFirstPacket and GetNextPacket methods to use CIGI minor
 *  version numbers.
 *
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and
 *  Cigi_uint8.
 *
 *  07/14/2006 Greg Basler                       Version 1.7.2
 *  Changed the constructor and GetFirstPacket so that the IterationVersion
 *  is properly initialized and set.  Changed ProcessIncomingMsg,
 *  GetFirstPacket, and GetNextPacket to set the Cigi Version with the
 *  correct version numbers.
 *
 *  03/11/2008 Greg Basler                       Version 2.0.0
 *  Completely rewrote the way conversions are handled.  Also, rewrote
 *    the message buffers and how they are handled.  Also, removed
 *    the VersionJmpTbl.
 *
 *  04/03/2008 Greg Basler                       Version 2.1.0
 *  Added CigiSymbolCloneV3_3 and fixed signals
 *
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added CigiIGCtrlV3_3
 *  Added CigiEntityCtrlV3_3
 *  Fixed the conversion process
 *  Fixed EnvCtrl/AtmosCtrl/CelestialCtrl conversion process
 *  Changed GetNextPacket to adjust to the Specialty
 *    conversion processors.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiIncomingMsg.h" #include "CigiExceptions.h" #include "CigiAllPackets.h" #include "CigiVersionID.h" #include "CigiSignalType.h" #include "CigiDefaultPacket.h" #include "CigiSession.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiIncomingMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIncomingMsg::CigiIncomingMsg() : Iteration(false) , CrntPacket(NULL) , ReadBufferPos(0) , Swap(false) , DefaultPckt(NULL) { DefaultPckt = new CigiDefaultPacket; for(int ndx=0;ndx<256;ndx++) IncomingHandlerTbl[ndx] = NULL; ClearTbls(true); for(int ndx=0;ndx<256;ndx++) SignalTbl[ndx] = CigiSignalType::SigNone; ReaderVersion.SetCigiVersion(0,0); ProcessingVersion.SetCigiVersion(0,0); MostMatureCigiVersionReceived.SetCigiVersion(0,0); } // ================================================ // ~CigiIncomingMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiIncomingMsg::~CigiIncomingMsg() { int ndx; ClearTbls(false); for(ndx=0;ndx<257;ndx++) { // Events EventList[ndx].clear(); // Call Backs CallBackList[ndx].clear(); } // Signals SignalList.clear(); // Default Packet if(DefaultPckt != NULL) delete DefaultPckt; } // ==================================================================== // Processing // ==================================================================== // ================================================ // ProcessIncomingMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::ProcessIncomingMsg(Cigi_uint8 *Buff, int Size) { if(Iteration) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } if(Size < 12) { #ifndef CIGI_NO_EXCEPT throw CigiImproperPacketException(); #endif return(CIGI_ERROR_IMPROPER_PACKET); } int stat = CheckFirstPacket(Buff); if(stat != CIGI_SUCCESS) return(stat); Cigi_uint8 *Dta = Buff; int ReadCnt = 0; Swap = false; // Process the message while(ReadCnt < Size) { Cigi_uint8 PacketID = *Dta; Cigi_uint8 PacketSize = *(Dta+1); if(PacketSize == 0) break; CigiBasePacket *tPckt = IncomingHandlerTbl[PacketID]; CigiCnvtInfoType::Type CnvtDta; tPckt->GetCnvt(ReaderVersion,CnvtDta); switch(CnvtDta.ProcID) { case CigiProcessType::ProcStd: // Most Packets case CigiProcessType::ProcVarSize: tPckt->Unpack(Dta,Swap,NULL); ProcessPacket(CnvtDta.CnvtPacketID,tPckt); break; case CigiProcessType::ProcEntity: // Entity Control Packets tPckt->Unpack(Dta,Swap,ATbl); ProcessPacket(CnvtDta.CnvtPacketID,tPckt); break; case CigiProcessType::ProcEnvCtrl: { // Environment Control Packets // Atmosphere Control Packets // & Celestial Sphere Control Packets tPckt->Unpack(Dta,Swap,&EnvHoldObj); CigiBaseEnvCtrl *pEnv = (CigiBaseEnvCtrl *)tPckt; pEnv->FillHold(&EnvHoldObj); if(ProcessingVersion.CigiMajorVersion >= 3) { // From V3 or above if(ReaderVersion.CigiMajorVersion >= 3) { // To V3 or above ProcessPacket(tPckt->GetPacketID(),tPckt); } else { // To V1 or V2 // V1 Env Ctrl & V2 Env Ctrl have the same ID number EnvHoldObj.SetPacketID(CIGI_ENV_CTRL_PACKET_ID_V2); if(ProcessingVersion.CigiMajorVersion == 1) { EnvHoldObj.SetPacketSize(CIGI_ENV_CTRL_PACKET_SIZE_V1); } else { EnvHoldObj.SetPacketSize(CIGI_ENV_CTRL_PACKET_SIZE_V2); } ProcessPacket(CIGI_ENV_CTRL_PACKET_ID_V2,&EnvHoldObj); } } else // V1 or V2 { if(ReaderVersion.CigiMajorVersion >= 3) { // To V3 or above EnvHoldObj.SetPacketID(CIGI_ATMOS_CTRL_PACKET_ID_V3); EnvHoldObj.SetPacketSize(CIGI_ATMOS_CTRL_PACKET_SIZE_V3); ProcessPacket(CIGI_ATMOS_CTRL_PACKET_ID_V3,&EnvHoldObj); EnvHoldObj.SetPacketID(CIGI_CELESTIAL_CTRL_PACKET_ID_V3); EnvHoldObj.SetPacketSize(CIGI_CELESTIAL_CTRL_PACKET_SIZE_V3); ProcessPacket(CIGI_CELESTIAL_CTRL_PACKET_ID_V3,&EnvHoldObj); } else { // To V1 or V2 // V1 Env Ctrl & V2 Env Ctrl have the same ID number EnvHoldObj.SetPacketID(CIGI_ENV_CTRL_PACKET_ID_V2); if(ProcessingVersion.CigiMajorVersion == 1) { EnvHoldObj.SetPacketSize(CIGI_ENV_CTRL_PACKET_SIZE_V1); } else { EnvHoldObj.SetPacketSize(CIGI_ENV_CTRL_PACKET_SIZE_V2); } ProcessPacket(CIGI_ENV_CTRL_PACKET_ID_V2,tPckt); } } } break; case CigiProcessType::ProcShortArtPartToArtPart: { // A special case of CIGI version 3 and later // Short Articulated Part being converted // to a CIGI Version 1 or 2 Articulated Part tPckt->Unpack(Dta,Swap,&EnvHoldObj); CigiBaseShortArtPartCtrl *pSArtPart = (CigiBaseShortArtPartCtrl *)tPckt; Cigi_uint8 ArtPartID1 = pSArtPart->GetArtPart1(); Cigi_uint8 ArtPartID2 = pSArtPart->GetArtPart2(); CigiArtPartCtrlV3 tArtPart; pSArtPart->SpecialConversion(ReaderVersion,ArtPartID1,&tArtPart); ProcessPacket(CnvtDta.CnvtPacketID,&tArtPart); if(ArtPartID2 != ArtPartID1) { CigiArtPartCtrlV3 tArtPart2; pSArtPart->SpecialConversion(ReaderVersion,ArtPartID2,&tArtPart2); ProcessPacket(CnvtDta.CnvtPacketID,&tArtPart2); } } break; case CigiProcessType::ProcIGCtrl: // IG Control Packets // If the Session is a Host session or // this is not the first packet to be // processed, an IG Control packet // should not be here and will skipped // and not processed. if(Session->IsIG() && (ReadCnt == 0)) { tPckt->Unpack(Dta,false,NULL); CigiBaseIGCtrl *tIGCtrl = (CigiBaseIGCtrl *)tPckt; Swap = tIGCtrl->GetSwap(); ProcessPacket(CnvtDta.CnvtPacketID,tPckt); } break; case CigiProcessType::ProcSOF: // Start Of Frame Packets // If the Session is an IG session or // this is not the first packet to be // processed, a Start-Of-Frame packet // should not be here and will skipped // and not processed. if(Session->IsHost() && (ReadCnt == 0)) { tPckt->Unpack(Dta,false,NULL); CigiBaseSOF *tSOF = (CigiBaseSOF *)tPckt; Swap = tSOF->GetSwap(); ProcessPacket(CnvtDta.CnvtPacketID,tPckt); } break; case CigiProcessType::TwoPassCnvtProcNone: case CigiProcessType::TwoPassCnvtProcStd: // Packets requiring unpacking to determine // final conversion method tPckt->Unpack(Dta,Swap,NULL); tPckt->GetCnvt(ReaderVersion,CnvtDta); if(CnvtDta.ProcID == CigiProcessType::TwoPassCnvtProcStd) ProcessPacket(CnvtDta.CnvtPacketID,tPckt); break; default: break; } // Go to the next packet Dta += PacketSize; ReadCnt += PacketSize; } return(CIGI_SUCCESS); } // ================================================ // CheckFirstPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::CheckFirstPacket(Cigi_uint8 *Buff) { // IG Ctrl for IGs & SOF or Hosts // Get version // verify valid version // switch version if needed // switch MostMatureCigiVersionReceived if needed Cigi_uint8 PacketID = *Buff; bool IsSOF = false; // Verify that this is a valid packet to receive if(Session->IsHost()) { if(PacketID != 101) { // A host must receive a SOF Packet #ifndef CIGI_NO_EXCEPT throw CigiMissingStartOfFrameException(); #endif return(CIGI_ERROR_MISSING_SOF_PACKET); } IsSOF = true; } else { if(PacketID != 1) { // An IG must receive an IG Control Packet #ifndef CIGI_NO_EXCEPT throw CigiMissingIgControlException(); #endif return(CIGI_ERROR_MISSING_IG_CONTROL_PACKET); } } // Get the CIGI version used by the message CigiVersionID tVer; // Get the Major CIGI version used by the message // The version ID is in the same location in all // IGCtrl & SOF packets. tVer.CigiMajorVersion = (int) *(Buff + 2); // CIGI versions 1 & 2 have minor versions of 0 // If the CIGI Major version is 3 or later, the // Minor version must be determined. if(tVer.CigiMajorVersion >= 3) { // Unfortunately The minor version ID is in different locations int Minor = 0; if(IsSOF) Minor = (int) *(Buff + 5); else Minor = (int) *(Buff + 4); tVer.CigiMinorVersion = (Minor >> 4) & 0x0000000f; } // Verify that the version is a known version bool ValidVer = tVer.IsKnownCigiVersion(); // if not valid determine best match version if(!ValidVer) tVer.BestCigiVersion(); // Check the version against the current processing version if(tVer != ProcessingVersion) { // Change processing to the new version ProcessingVersion = tVer; ClearTbls(false); if(Session->IsHost()) { if(tVer.CigiMajorVersion == 3) SetIncomingHostV3Tbls(); else if(tVer.CigiMajorVersion == 2) SetIncomingHostV2Tbls(); else if(tVer.CigiMajorVersion == 1) SetIncomingHostV1Tbls(); } else { if(tVer.CigiMajorVersion == 3) SetIncomingIGV3Tbls(); else if(tVer.CigiMajorVersion == 2) SetIncomingIGV2Tbls(); else if(tVer.CigiMajorVersion == 1) SetIncomingIGV1Tbls(); } } if(tVer.GetCombinedCigiVersion() > MostMatureCigiVersionReceived.GetCombinedCigiVersion()) { MostMatureCigiVersionReceived = tVer; Session->SetMostMatureReceivedCigiVersion(tVer); } return(CIGI_SUCCESS); } // ================================================ // ProcessPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::ProcessPacket(int PcktId, CigiBasePacket *Pckt) { #ifndef CIGI_NO_EVENT_PROCESSING // Process all Event handlers for this packet if(!EventList[PcktId].empty()) { list::iterator iEvent = EventList[PcktId].begin(); while(iEvent != EventList[PcktId].end()) { (*iEvent)->OnPacketReceived(Pckt); iEvent++; } } #endif #ifndef CIGI_NO_CALLBACK // Process all Callbacks for this packet if(!CallBackList[PcktId].empty()) { list::iterator iCB = CallBackList[PcktId].begin(); while(iCB != CallBackList[PcktId].end()) { (*iCB)(Pckt); iCB++; } } #endif #ifndef CIGI_NO_SIGNAL_PROCESSING // Process all Signal handlers SignalJump(PcktId,Pckt); #endif } // ================================================ // SignalJump // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool CigiIncomingMsg::SignalJump(const Cigi_uint8 PacketID, CigiBasePacket *Packet) { CigiSignalType::Type SignalId = SignalTbl[PacketID]; bool Processed = false; list::iterator iSig; for(iSig=SignalList.begin();iSig!=SignalList.end();iSig++) { Processed = true; switch(SignalId) { case CigiSignalType::SigIGCtrl: (*iSig)->OnIGCtrl(Packet); break; case CigiSignalType::SigEntityCtrl: (*iSig)->OnEntityCtrl(Packet); break; case CigiSignalType::SigViewDef: (*iSig)->OnViewDef(Packet); break; case CigiSignalType::SigViewCtrl: (*iSig)->OnViewCtrl(Packet); break; case CigiSignalType::SigRateCtrl: (*iSig)->OnRateCtrl(Packet); break; case CigiSignalType::SigSensorCtrl: (*iSig)->OnSensorCtrl(Packet); break; case CigiSignalType::SigTrajectory: (*iSig)->OnTrajectory(Packet); break; case CigiSignalType::SigWeatherCtrl: (*iSig)->OnWeatherCtrl(Packet); break; case CigiSignalType::SigCollDetSegDef: (*iSig)->OnCollDetSegDef(Packet); break; case CigiSignalType::SigLosSegReq: (*iSig)->OnLosSegReq(Packet); break; case CigiSignalType::SigLosVectReq: (*iSig)->OnLosVectReq(Packet); break; case CigiSignalType::SigHatReq: (*iSig)->OnHatReq(Packet); break; case CigiSignalType::SigHotReq: (*iSig)->OnHotReq(Packet); break; case CigiSignalType::SigHatHotReq: (*iSig)->OnHatHotReq(Packet); break; case CigiSignalType::SigEnvCtrl: (*iSig)->OnEnvCtrl(Packet); break; case CigiSignalType::SigSpecEffDef: (*iSig)->OnSpecEffDef(Packet); break; case CigiSignalType::SigArtPartCtrl: (*iSig)->OnArtPartCtrl(Packet); break; case CigiSignalType::SigCollDetVolDef: (*iSig)->OnCollDetVolDef(Packet); break; case CigiSignalType::SigShortArtPartCtrl: (*iSig)->OnShortArtPartCtrl(Packet); break; case CigiSignalType::SigConfClampEntityCtrl: (*iSig)->OnConfClampEntityCtrl(Packet); break; case CigiSignalType::SigMaritimeSurfaceCtrl: (*iSig)->OnMaritimeSurfaceCtrl(Packet); break; case CigiSignalType::SigEnvRgnCtrl: (*iSig)->OnEnvRgnCtrl(Packet); break; case CigiSignalType::SigTerrestrialSurfaceCtrl: (*iSig)->OnTerrestrialSurfaceCtrl(Packet); break; case CigiSignalType::SigMotionTrackCtrl: (*iSig)->OnMotionTrackCtrl(Packet); break; case CigiSignalType::SigEarthModelDef: (*iSig)->OnEarthModelDef(Packet); break; case CigiSignalType::SigPostionReq: (*iSig)->OnPostionReq(Packet); break; case CigiSignalType::SigEnvCondReq: (*iSig)->OnEnvCondReq(Packet); break; case CigiSignalType::SigWaveCtrl: (*iSig)->OnWaveCtrl(Packet); break; case CigiSignalType::SigCompCtrl: (*iSig)->OnCompCtrl(Packet); break; case CigiSignalType::SigShortCompCtrl: (*iSig)->OnShortCompCtrl(Packet); break; case CigiSignalType::SigSOF: (*iSig)->OnSOF(Packet); break; case CigiSignalType::SigCollDetSegResp: (*iSig)->OnCollDetSegResp(Packet); break; case CigiSignalType::SigSensorResp: (*iSig)->OnSensorResp(Packet); break; case CigiSignalType::SigSensorXResp: (*iSig)->OnSensorXResp(Packet); break; case CigiSignalType::SigLosResp: (*iSig)->OnLosResp(Packet); break; case CigiSignalType::SigLosXResp: (*iSig)->OnLosXResp(Packet); break; case CigiSignalType::SigHatResp: (*iSig)->OnHatResp(Packet); break; case CigiSignalType::SigHotResp: (*iSig)->OnHotResp(Packet); break; case CigiSignalType::SigHatHotResp: (*iSig)->OnHatHotResp(Packet); break; case CigiSignalType::SigHatHotXResp: (*iSig)->OnHatHotXResp(Packet); break; case CigiSignalType::SigCollDetVolResp: (*iSig)->OnCollDetVolResp(Packet); break; case CigiSignalType::SigPositionResp: (*iSig)->OnPositionResp(Packet); break; case CigiSignalType::SigWeatherCondResp: (*iSig)->OnWeatherCondResp(Packet); break; case CigiSignalType::SigAerosolResp: (*iSig)->OnAerosolResp(Packet); break; case CigiSignalType::SigMaritimeSurfaceResp: (*iSig)->OnMaritimeSurfaceResp(Packet); break; case CigiSignalType::SigTerrestrialSurfaceResp: (*iSig)->OnTerrestrialSurfaceResp(Packet); break; case CigiSignalType::SigAnimationStop: (*iSig)->OnAnimationStop(Packet); break; case CigiSignalType::SigEventNotification: (*iSig)->OnEventNotification(Packet); break; case CigiSignalType::SigIGMsg: (*iSig)->OnIGMsg(Packet); break; case CigiSignalType::SigAtmosCtrl: (*iSig)->OnAtmosCtrl(Packet); break; case CigiSignalType::SigCelestialCtrl: (*iSig)->OnCelestialCtrl(Packet); break; case CigiSignalType::SigSymbolSurfaceDef: (*iSig)->OnSymbolSurfaceDef(Packet); break; case CigiSignalType::SigSymbolCtrl: (*iSig)->OnSymbolCtrl(Packet); break; case CigiSignalType::SigShortSymbolCtrl: (*iSig)->OnShortSymbolCtrl(Packet); break; case CigiSignalType::SigSymbolTextDef: (*iSig)->OnSymbolTextDef(Packet); break; case CigiSignalType::SigSymbolCircleDef: (*iSig)->OnSymbolCircleDef(Packet); break; case CigiSignalType::SigSymbolLineDef: (*iSig)->OnSymbolLineDef(Packet); break; case CigiSignalType::SigSymbolClone: (*iSig)->OnSymbolClone(Packet); break; default: (*iSig)->OnUnrecognized(Packet); break; } } return(Processed); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // GetNextBuffToLoad // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 *CigiIncomingMsg::GetNextBuffToLoad(void) { if(AvailBuff.empty()) { CrntFillBuf = new CigiMessageBuffer(BufferSize); } else { CrntFillBuf = (*AvailBuff.begin()); AvailBuff.pop_front(); } if(CrntFillBuf != NULL) { Buffers.push_back(CrntFillBuf); CrntFillBuf->Active = true; CrntFillBuf->BufferFillCnt = 0; CrntFillBuf->DataPresent = false; CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer; CrntFillBuf->Locked = false; CrntFillBuf->ValidIGCtrlSOF = false; } return(CrntFillBuf->Buffer); } // ================================================ // AdvanceCrntBuffer // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::AdvanceCrntBuffer(void) { if(CrntMsgBuf != NULL) { if(!Buffers.empty()) { list::iterator iBuf = Buffers.begin(); while(iBuf!=Buffers.end()) { if(CrntMsgBuf == (*iBuf)) { AvailBuff.push_back(CrntMsgBuf); iBuf = Buffers.erase(iBuf); break; } iBuf++; } } } if(Buffers.empty()) { GetNextBuffToLoad(); } CrntMsgBuf = (*Buffers.begin()); } // ================================================ // GetFirstPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBasePacket * CigiIncomingMsg::GetFirstPacket() { bool Valid = true; CigiBasePacket *FirstPacket = NULL; if(!Iteration) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif Valid = false; } int Size = CrntMsgBuf->BufferFillCnt; if((CrntMsgBuf == NULL) || (Size < 12)) { #ifndef CIGI_NO_EXCEPT throw CigiImproperPacketException(); #endif Valid = false; } if(Valid) { int stat = CheckFirstPacket(CrntMsgBuf->Buffer); if(stat != CIGI_SUCCESS) Valid = false; } Cigi_uint8 PacketID = 0; Cigi_uint8 PacketSize = 0; if(Valid) { CrntPacket = CrntMsgBuf->Buffer; ReadBufferPos = 0; PacketID = *CrntPacket; PacketSize = *(CrntPacket+1); Swap = false; FirstPacket = IncomingHandlerTbl[PacketID]; CigiCnvtInfoType::Type CnvtDta; FirstPacket->GetCnvt(ReaderVersion,CnvtDta); if(Session->IsHost()) { if(CnvtDta.ProcID == CigiProcessType::ProcSOF) { FirstPacket->Unpack(CrntPacket,false,NULL); Swap = ((CigiBaseSOF *)FirstPacket)->GetSwap(); } else { #ifndef CIGI_NO_EXCEPT throw CigiImproperPacketException(); #endif Valid = false; } } else { if(CnvtDta.ProcID == CigiProcessType::ProcIGCtrl) { FirstPacket->Unpack(CrntPacket,false,NULL); Swap = ((CigiBaseIGCtrl *)FirstPacket)->GetSwap(); } else { #ifndef CIGI_NO_EXCEPT throw CigiImproperPacketException(); #endif Valid = false; } } } if(Valid) { CrntPacket += PacketSize; ReadBufferPos += PacketSize; } else FirstPacket = NULL; return(FirstPacket); } // ================================================ // GetNextPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBasePacket * CigiIncomingMsg::GetNextPacket() { CigiBasePacket *tPckt = NULL; bool Valid = true; if((!Iteration) || (ReadBufferPos <= 0)) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif Valid = false; } if(CrntMsgBuf == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiImproperPacketException(); #endif Valid = false; } while((Valid) && (tPckt == NULL)) { if(ReadBufferPos < CrntMsgBuf->BufferFillCnt) { Cigi_uint8 PacketID = *CrntPacket; Cigi_uint8 PacketSize = *(CrntPacket+1); tPckt = IncomingHandlerTbl[PacketID]; CigiCnvtInfoType::Type CnvtDta; tPckt->GetCnvt(ReaderVersion,CnvtDta); switch(CnvtDta.ProcID) { case CigiProcessType::ProcStd: // Most Packets case CigiProcessType::ProcVarSize: tPckt->Unpack(CrntPacket,Swap,NULL); break; case CigiProcessType::ProcEntity: // Entity Control Packets tPckt->Unpack(CrntPacket,Swap,ATbl); break; case CigiProcessType::ProcEnvCtrl: { // Environment Control Packets // Atmosphere Control Packets // & Celestial Sphere Control Packets // This will fill the Environment Control // Hold Ojbect and pass that as the packet // The user will have to process that to get // the needed data tPckt->Unpack(CrntPacket,Swap,&EnvHoldObj); CigiBaseEnvCtrl *pEnv = (CigiBaseEnvCtrl *)tPckt; pEnv->FillHold(&EnvHoldObj); tPckt = &EnvHoldObj; } break; case CigiProcessType::TwoPassCnvtProcNone: case CigiProcessType::TwoPassCnvtProcStd: // Packets requiring unpacking to determine // final conversion method tPckt->Unpack(CrntPacket,Swap,NULL); tPckt->GetCnvt(ReaderVersion,CnvtDta); if(CnvtDta.ProcID != CigiProcessType::TwoPassCnvtProcStd) tPckt = NULL; break; default: tPckt = NULL; break; } // Go to the next packet CrntPacket += PacketSize; ReadBufferPos += PacketSize; } else Valid = false; } return(tPckt); } // ================================================ // RegisterEventProcessor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::RegisterEventProcessor(int PacketID, CigiBaseEventProcessor *EventMgr) { if((PacketID < 0)||(PacketID > 256)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("PacketID",PacketID,0,256); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } if(EventMgr == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } EventList[PacketID].push_back(EventMgr); return(CIGI_SUCCESS); } // ================================================ // UnregisterEventProcessor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::UnregisterEventProcessor(int PacketID, CigiBaseEventProcessor *EventMgr) { if((PacketID < 0)||(PacketID > 256)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("PacketID",PacketID,0,256); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } if(EventMgr == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } list::iterator iEvent = EventList[PacketID].begin(); while(iEvent != EventList[PacketID].end()) { if((*iEvent) == EventMgr) { iEvent = EventList[PacketID].erase(iEvent); break; } else { iEvent++; } } return(CIGI_SUCCESS); } // ================================================ // RegisterCallBack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::RegisterCallBack(int PacketID, CigiCBProcessor CallBack) { if((PacketID < 0)||(PacketID > 256)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("PacketID",PacketID,0,256); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } if(CallBack == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } CallBackList[PacketID].push_back(CallBack); return(CIGI_SUCCESS); } // ================================================ // UnregisterCallBack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::UnregisterCallBack(int PacketID, CigiCBProcessor CallBack) { if((PacketID < 0)||(PacketID > 256)) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("PacketID",PacketID,0,256); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } if(CallBack == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } list::iterator iCB = CallBackList[PacketID].begin(); while(iCB != CallBackList[PacketID].end()) { if((*iCB) == CallBack) { iCB = CallBackList[PacketID].erase(iCB); break; } else { iCB++; } } return(CIGI_SUCCESS); } // ================================================ // RegisterSignalProcessor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::RegisterSignalProcessor(CigiBaseSignalProcessing *SignalMgr) { if(SignalMgr == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } SignalList.push_back(SignalMgr); return(CIGI_SUCCESS); } // ================================================ // UnregisterSignalProcessor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::UnregisterSignalProcessor(CigiBaseSignalProcessing *SignalMgr) { if(SignalMgr == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } list::iterator iSig = SignalList.begin(); while(iSig != SignalList.end()) { if((*iSig) == SignalMgr) { iSig = SignalList.erase(iSig); break; } else { iSig++; } } return(CIGI_SUCCESS); } // ================================================ // RegisterUserPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiIncomingMsg::RegisterUserPacket(CigiBasePacket *Packet, Cigi_uint8 PacketID, bool HostSend, bool IGSend) { int stat = CIGI_ERROR_INVALID_USER_PACKET; if(((PacketID > 199) && (PacketID <= 255)) && (Packet != NULL) && ((HostSend && Session->IsIG()) || (IGSend && Session->IsHost()))) { IncomingHandlerTbl[PacketID] = Packet; stat = CIGI_SUCCESS; } return(stat); } // ================================================ // Clear Tables // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::ClearTbls(bool Complete) { int ndx = 0; for(ndx=0;ndx<200;ndx++) { if(IncomingHandlerTbl[ndx] != (CigiBasePacket *)DefaultPckt) { delete IncomingHandlerTbl[ndx]; IncomingHandlerTbl[ndx] = (CigiBasePacket *)DefaultPckt; } } if(Complete) { for(ndx=200;ndx<256;ndx++) { if(IncomingHandlerTbl[ndx] != (CigiBasePacket *)DefaultPckt) { delete IncomingHandlerTbl[ndx]; IncomingHandlerTbl[ndx] = (CigiBasePacket *)DefaultPckt; } } } } // ================================================ // SetIncomingV1Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetIncomingIGV1Tbls(void) { IncomingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiIGCtrlV1; IncomingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiEntityCtrlV1; IncomingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiViewDefV1; IncomingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiViewCtrlV1; IncomingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiRateCtrlV1; IncomingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiSensorCtrlV1; IncomingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiTrajectoryDefV1; IncomingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiWeatherCtrlV1; IncomingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiCollDetSegDefV1; IncomingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosSegReqV1; IncomingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosVectReqV1; IncomingHandlerTbl[CIGI_HAT_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiHatReqV1; IncomingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiEnvCtrlV1; IncomingHandlerTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiSpecEffDefV1; IncomingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiArtPartCtrlV1; IncomingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiCompCtrlV1; } // ================================================ // SetIncomingV1Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetIncomingHostV1Tbls(void) { IncomingHandlerTbl[CIGI_SOF_PACKET_ID_V1] = (CigiBasePacket *) new CigiSOFV1; IncomingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiCollDetSegRespV1; IncomingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiSensorRespV1; IncomingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosRespV1; IncomingHandlerTbl[CIGI_HAT_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiHatRespV1; } // ================================================ // SetIncomingV2Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetIncomingIGV2Tbls(void) { IncomingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiIGCtrlV2; IncomingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiEntityCtrlV2; IncomingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiViewDefV2; IncomingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiViewCtrlV2; IncomingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiRateCtrlV2; IncomingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiSensorCtrlV2; IncomingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiTrajectoryDefV2; IncomingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiWeatherCtrlV2; IncomingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetSegDefV2; IncomingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosSegReqV2; IncomingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosVectReqV2; IncomingHandlerTbl[CIGI_HAT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiHatReqV2; IncomingHandlerTbl[CIGI_HOT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiHotReqV2; IncomingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiEnvCtrlV2; IncomingHandlerTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiSpecEffDefV2; IncomingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiArtPartCtrlV2; IncomingHandlerTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetVolDefV2; IncomingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiCompCtrlV2; } // ================================================ // SetIncomingV2Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetIncomingHostV2Tbls(void) { IncomingHandlerTbl[CIGI_SOF_PACKET_ID_V2] = (CigiBasePacket *) new CigiSOFV2; IncomingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetSegRespV2; IncomingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiSensorRespV2; IncomingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosRespV2; IncomingHandlerTbl[CIGI_HAT_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiHatRespV2; IncomingHandlerTbl[CIGI_HOT_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiHotRespV2; IncomingHandlerTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetVolRespV2; IncomingHandlerTbl[CIGI_IG_MSG_PACKET_ID_V2] = (CigiBasePacket *) new CigiIGMsgV2; } // ================================================ // SetIncomingV3Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetIncomingIGV3Tbls(void) { if(ProcessingVersion.CigiMinorVersion >= 2) { if(ProcessingVersion.CigiMinorVersion >= 3) { IncomingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiIGCtrlV3_3; IncomingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiEntityCtrlV3_3; IncomingHandlerTbl[CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolSurfaceDefV3_3; IncomingHandlerTbl[CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCtrlV3_3; IncomingHandlerTbl[CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiShortSymbolCtrlV3_3; IncomingHandlerTbl[CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolTextDefV3_3; IncomingHandlerTbl[CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCircleDefV3_3; IncomingHandlerTbl[CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolLineDefV3_3; IncomingHandlerTbl[CIGI_SYMBOL_CLONE_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCloneV3_3; IncomingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiCompCtrlV3_3; IncomingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiShortCompCtrlV3_3; } else { IncomingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3_2] = (CigiBasePacket *) new CigiIGCtrlV3_2; IncomingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEntityCtrlV3; IncomingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCompCtrlV3; IncomingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortCompCtrlV3; } IncomingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiRateCtrlV3_2; IncomingHandlerTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotReqV3_2; IncomingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosSegReqV3_2; IncomingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosVectReqV3_2; } else { IncomingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiIGCtrlV3; IncomingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEntityCtrlV3; IncomingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiRateCtrlV3; IncomingHandlerTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotReqV3; IncomingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosSegReqV3; IncomingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosVectReqV3; IncomingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCompCtrlV3; IncomingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortCompCtrlV3; } IncomingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiViewDefV3; IncomingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiViewCtrlV3; IncomingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorCtrlV3; IncomingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiTrajectoryDefV3; IncomingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiWeatherCtrlV3; IncomingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetSegDefV3; IncomingHandlerTbl[CIGI_ATMOS_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiAtmosCtrlV3; IncomingHandlerTbl[CIGI_CELESTIAL_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCelestialCtrlV3; IncomingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiArtPartCtrlV3; IncomingHandlerTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetVolDefV3; IncomingHandlerTbl[CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortArtPartCtrlV3; IncomingHandlerTbl[CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiConfClampEntityCtrlV3; IncomingHandlerTbl[CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiMaritimeSurfaceCtrlV3; IncomingHandlerTbl[CIGI_ENV_RGN_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEnvRgnCtrlV3; IncomingHandlerTbl[CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiTerrestrialSurfaceCtrlV3; IncomingHandlerTbl[CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiMotionTrackCtrlV3; IncomingHandlerTbl[CIGI_EARTH_MODEL_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiEarthModelDefV3; IncomingHandlerTbl[CIGI_POSITION_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiPositionReqV3; IncomingHandlerTbl[CIGI_ENV_COND_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiEnvCondReqV3; IncomingHandlerTbl[CIGI_WAVE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiWaveCtrlV3; } // ================================================ // SetIncomingV3Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetIncomingHostV3Tbls(void) { if(ProcessingVersion.CigiMinorVersion >= 2) { IncomingHandlerTbl[CIGI_SOF_PACKET_ID_V3] = (CigiBasePacket *) new CigiSOFV3_2; IncomingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosRespV3_2; IncomingHandlerTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosXRespV3_2; IncomingHandlerTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotRespV3_2; IncomingHandlerTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotXRespV3_2; } else { IncomingHandlerTbl[CIGI_SOF_PACKET_ID_V3] = (CigiBasePacket *) new CigiSOFV3; IncomingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosRespV3; IncomingHandlerTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosXRespV3; IncomingHandlerTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotRespV3; IncomingHandlerTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotXRespV3; } IncomingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetSegRespV3; IncomingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorRespV3; IncomingHandlerTbl[CIGI_SENSOR_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorXRespV3; IncomingHandlerTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetVolRespV3; IncomingHandlerTbl[CIGI_POSITION_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiPositionRespV3; IncomingHandlerTbl[CIGI_WEATHER_COND_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiWeatherCondRespV3; IncomingHandlerTbl[CIGI_AEROSOL_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiAerosolRespV3; IncomingHandlerTbl[CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiMaritimeSurfaceRespV3; IncomingHandlerTbl[CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiTerrestrialSurfaceRespV3; IncomingHandlerTbl[CIGI_ANIMATION_STOP_PACKET_ID_V3] = (CigiBasePacket *) new CigiAnimationStopV3; IncomingHandlerTbl[CIGI_EVENT_NOTIFICATION_PACKET_ID_V3] = (CigiBasePacket *) new CigiEventNotificationV3; IncomingHandlerTbl[CIGI_IG_MSG_PACKET_ID_V3] = (CigiBasePacket *) new CigiIGMsgV3; } // ================================================ // SetReaderVersion // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiIncomingMsg::SetReaderVersion(CigiVersionID &Version) { bool ChangeTbl = false; if((Version.CigiMajorVersion != ReaderVersion.CigiMajorVersion) || (Version.CigiMinorVersion != ReaderVersion.CigiMinorVersion)) { if(Version.IsKnownCigiVersion()) { // Due to the way the system is organized at this time, // the tables only need to change if the major version // is changed. if(Version.CigiMajorVersion != ReaderVersion.CigiMajorVersion) ChangeTbl = true; ReaderVersion = Version; } } if(ChangeTbl) { // Clear the Signal Table for(int ndx=0;ndx<256;ndx++) { SignalTbl[ndx] = CigiSignalType::SigNone; } // Set the correct table values if(ReaderVersion.CigiMajorVersion >= 3) { if(Session->IsHost()) { SignalTbl[CIGI_SOF_PACKET_ID_V3] = CigiSignalType::SigSOF; SignalTbl[CIGI_LOS_RESP_PACKET_ID_V3] = CigiSignalType::SigLosResp; SignalTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = CigiSignalType::SigLosXResp; SignalTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = CigiSignalType::SigHatHotResp; SignalTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = CigiSignalType::SigHatHotXResp; SignalTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3] = CigiSignalType::SigCollDetSegResp; SignalTbl[CIGI_SENSOR_RESP_PACKET_ID_V3] = CigiSignalType::SigSensorResp; SignalTbl[CIGI_SENSOR_XRESP_PACKET_ID_V3] = CigiSignalType::SigSensorXResp; SignalTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3] = CigiSignalType::SigCollDetVolResp; SignalTbl[CIGI_POSITION_RESP_PACKET_ID_V3] = CigiSignalType::SigPositionResp; SignalTbl[CIGI_WEATHER_COND_RESP_PACKET_ID_V3] = CigiSignalType::SigWeatherCondResp; SignalTbl[CIGI_AEROSOL_RESP_PACKET_ID_V3] = CigiSignalType::SigAerosolResp; SignalTbl[CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3] = CigiSignalType::SigMaritimeSurfaceResp; SignalTbl[CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3] = CigiSignalType::SigTerrestrialSurfaceResp; SignalTbl[CIGI_ANIMATION_STOP_PACKET_ID_V3] = CigiSignalType::SigAnimationStop; SignalTbl[CIGI_EVENT_NOTIFICATION_PACKET_ID_V3] = CigiSignalType::SigEventNotification; SignalTbl[CIGI_IG_MSG_PACKET_ID_V3] = CigiSignalType::SigIGMsg; } else { SignalTbl[CIGI_IG_CTRL_PACKET_ID_V3] = CigiSignalType::SigIGCtrl; SignalTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = CigiSignalType::SigRateCtrl; SignalTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = CigiSignalType::SigHatHotReq; SignalTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = CigiSignalType::SigLosSegReq; SignalTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = CigiSignalType::SigLosVectReq; SignalTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = CigiSignalType::SigEntityCtrl; SignalTbl[CIGI_VIEW_DEF_PACKET_ID_V3] = CigiSignalType::SigViewDef; SignalTbl[CIGI_VIEW_CTRL_PACKET_ID_V3] = CigiSignalType::SigViewCtrl; SignalTbl[CIGI_SENSOR_CTRL_PACKET_ID_V3] = CigiSignalType::SigSensorCtrl; SignalTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V3] = CigiSignalType::SigTrajectory; SignalTbl[CIGI_WEATHER_CTRL_PACKET_ID_V3] = CigiSignalType::SigWeatherCtrl; SignalTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3] = CigiSignalType::SigCollDetSegDef; SignalTbl[CIGI_ATMOS_CTRL_PACKET_ID_V3] = CigiSignalType::SigAtmosCtrl; SignalTbl[CIGI_CELESTIAL_CTRL_PACKET_ID_V3] = CigiSignalType::SigCelestialCtrl; SignalTbl[CIGI_ART_PART_CTRL_PACKET_ID_V3] = CigiSignalType::SigArtPartCtrl; SignalTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3] = CigiSignalType::SigCollDetVolDef; SignalTbl[CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3] = CigiSignalType::SigShortArtPartCtrl; SignalTbl[CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3] = CigiSignalType::SigConfClampEntityCtrl; SignalTbl[CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3] = CigiSignalType::SigMaritimeSurfaceCtrl; SignalTbl[CIGI_ENV_RGN_CTRL_PACKET_ID_V3] = CigiSignalType::SigEnvRgnCtrl; SignalTbl[CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3] = CigiSignalType::SigTerrestrialSurfaceCtrl; SignalTbl[CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3] = CigiSignalType::SigMotionTrackCtrl; SignalTbl[CIGI_EARTH_MODEL_DEF_PACKET_ID_V3] = CigiSignalType::SigEarthModelDef; SignalTbl[CIGI_POSITION_REQ_PACKET_ID_V3] = CigiSignalType::SigPostionReq; SignalTbl[CIGI_ENV_COND_REQ_PACKET_ID_V3] = CigiSignalType::SigEnvCondReq; SignalTbl[CIGI_WAVE_CTRL_PACKET_ID_V3] = CigiSignalType::SigWaveCtrl; SignalTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = CigiSignalType::SigCompCtrl; SignalTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = CigiSignalType::SigShortCompCtrl; SignalTbl[CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3] = CigiSignalType::SigSymbolSurfaceDef; SignalTbl[CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3] = CigiSignalType::SigSymbolCtrl; SignalTbl[CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3] = CigiSignalType::SigShortSymbolCtrl; SignalTbl[CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3] = CigiSignalType::SigSymbolTextDef; SignalTbl[CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3] = CigiSignalType::SigSymbolCircleDef; SignalTbl[CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3] = CigiSignalType::SigSymbolLineDef; SignalTbl[CIGI_SYMBOL_CLONE_PACKET_ID_V3_3] = CigiSignalType::SigSymbolClone; } } else if(ReaderVersion.CigiMajorVersion == 2) { if(Session->IsHost()) { SignalTbl[CIGI_SOF_PACKET_ID_V2] = CigiSignalType::SigSOF; SignalTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2] = CigiSignalType::SigCollDetSegResp; SignalTbl[CIGI_SENSOR_RESP_PACKET_ID_V2] = CigiSignalType::SigSensorResp; SignalTbl[CIGI_LOS_RESP_PACKET_ID_V2] = CigiSignalType::SigLosResp; SignalTbl[CIGI_HAT_RESP_PACKET_ID_V2] = CigiSignalType::SigHatResp; SignalTbl[CIGI_HOT_RESP_PACKET_ID_V2] = CigiSignalType::SigHotResp; SignalTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2] = CigiSignalType::SigCollDetVolResp; SignalTbl[CIGI_IG_MSG_PACKET_ID_V2] = CigiSignalType::SigIGMsg; } else { SignalTbl[CIGI_IG_CTRL_PACKET_ID_V1] = CigiSignalType::SigIGCtrl; SignalTbl[CIGI_ENTITY_CTRL_PACKET_ID_V2] = CigiSignalType::SigEntityCtrl; SignalTbl[CIGI_VIEW_DEF_PACKET_ID_V2] = CigiSignalType::SigViewDef; SignalTbl[CIGI_VIEW_CTRL_PACKET_ID_V2] = CigiSignalType::SigViewCtrl; SignalTbl[CIGI_RATE_CTRL_PACKET_ID_V2] = CigiSignalType::SigRateCtrl; SignalTbl[CIGI_SENSOR_CTRL_PACKET_ID_V2] = CigiSignalType::SigSensorCtrl; SignalTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V2] = CigiSignalType::SigTrajectory; SignalTbl[CIGI_WEATHER_CTRL_PACKET_ID_V2] = CigiSignalType::SigWeatherCtrl; SignalTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2] = CigiSignalType::SigCollDetSegDef; SignalTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V2] = CigiSignalType::SigLosSegReq; SignalTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V2] = CigiSignalType::SigLosVectReq; SignalTbl[CIGI_HAT_REQ_PACKET_ID_V2] = CigiSignalType::SigHatReq; SignalTbl[CIGI_HOT_REQ_PACKET_ID_V2] = CigiSignalType::SigHotReq; SignalTbl[CIGI_ENV_CTRL_PACKET_ID_V2] = CigiSignalType::SigEnvCtrl; SignalTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V2] = CigiSignalType::SigSpecEffDef; SignalTbl[CIGI_ART_PART_CTRL_PACKET_ID_V2] = CigiSignalType::SigArtPartCtrl; SignalTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2] = CigiSignalType::SigCollDetVolDef; SignalTbl[CIGI_COMP_CTRL_PACKET_ID_V2] = CigiSignalType::SigCompCtrl; } } else if(ReaderVersion.CigiMajorVersion == 1) { if(Session->IsHost()) { SignalTbl[CIGI_SOF_PACKET_ID_V1] = CigiSignalType::SigSOF; SignalTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1] = CigiSignalType::SigCollDetSegResp; SignalTbl[CIGI_SENSOR_RESP_PACKET_ID_V1] = CigiSignalType::SigSensorResp; SignalTbl[CIGI_LOS_RESP_PACKET_ID_V1] = CigiSignalType::SigLosResp; SignalTbl[CIGI_HAT_RESP_PACKET_ID_V1] = CigiSignalType::SigHatResp; } else { SignalTbl[CIGI_IG_CTRL_PACKET_ID_V1] = CigiSignalType::SigIGCtrl; SignalTbl[CIGI_ENTITY_CTRL_PACKET_ID_V1] = CigiSignalType::SigEntityCtrl; SignalTbl[CIGI_VIEW_DEF_PACKET_ID_V1] = CigiSignalType::SigViewDef; SignalTbl[CIGI_VIEW_CTRL_PACKET_ID_V1] = CigiSignalType::SigViewCtrl; SignalTbl[CIGI_RATE_CTRL_PACKET_ID_V1] = CigiSignalType::SigRateCtrl; SignalTbl[CIGI_SENSOR_CTRL_PACKET_ID_V1] = CigiSignalType::SigSensorCtrl; SignalTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V1] = CigiSignalType::SigTrajectory; SignalTbl[CIGI_WEATHER_CTRL_PACKET_ID_V1] = CigiSignalType::SigWeatherCtrl; SignalTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1] = CigiSignalType::SigCollDetSegDef; SignalTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V1] = CigiSignalType::SigLosSegReq; SignalTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V1] = CigiSignalType::SigLosVectReq; SignalTbl[CIGI_HAT_REQ_PACKET_ID_V1] = CigiSignalType::SigHatReq; SignalTbl[CIGI_ENV_CTRL_PACKET_ID_V1] = CigiSignalType::SigEnvCtrl; SignalTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V1] = CigiSignalType::SigSpecEffDef; SignalTbl[CIGI_ART_PART_CTRL_PACKET_ID_V1] = CigiSignalType::SigArtPartCtrl; SignalTbl[CIGI_COMP_CTRL_PACKET_ID_V1] = CigiSignalType::SigCompCtrl; } } } } cigi-ccl-3.3.3a+svn818/source/CigiLosRespV1.cpp000066400000000000000000000144271210750432300210010ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosRespV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV1::CigiLosRespV1() { PacketID = CIGI_LOS_RESP_PACKET_ID_V1; PacketSize = CIGI_LOS_RESP_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; LosID = 0; Valid = false; EntityIDValid = false; RangeValid = false; Visible = false; IntersectionCoordSys = Geodetic; HostFrame = 0; RespCount = 0; EntityID = 0; Range = 0.0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; Material = 0; NormalAz = 0.0; NormalEl = 0.0; ValidV1or2 = true; } // ================================================ // ~CigiLosRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV1::~CigiLosRespV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseLosResp * Data = ( CigiBaseLosResp *)Base; if(!Data->ValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->LosID); Cigi_uint8 HDta = (Data->Valid) ? 0x80 : 0x00; HDta |= (Data->Visible) ? 0x40 : 0x00; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; *CDta.l++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Material); float tflt = (float)Data->Range; CIGI_SCOPY4(CDta.f++, &tflt); tflt = (float)Data->AltOrZoff; CIGI_SCOPY4(CDta.f++, &tflt); CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_LOS_RESP_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_LOS_RESP_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&LosID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x80) != 0); Visible = ((HDta & 0x40) != 0); CDta.c += 7; CIGI_SCOPY4(&Material, CDta.l++); float tflt; CIGI_SCOPY4(&tflt, CDta.f++); Range = (double)tflt; CIGI_SCOPY4(&tflt, CDta.f++); AltOrZoff = (double)tflt; CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); HostFrame = 0; ValidV1or2 = true; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV1::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: // CIGI_LOS_RESP_PACKET_ID_V1 & // CIGI_LOS_RESP_PACKET_ID_V2 are the same // CIGI_LOS_RESP_PACKET_ID_V3 & // CIGI_LOS_RESP_PACKET_ID_V3_2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiLosRespV2.cpp000066400000000000000000000143231210750432300207750ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosRespV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV2::CigiLosRespV2() { PacketID = CIGI_LOS_RESP_PACKET_ID_V2; PacketSize = CIGI_LOS_RESP_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; LosID = 0; Valid = false; EntityIDValid = false; RangeValid = false; Visible = false; IntersectionCoordSys = Geodetic; HostFrame = 0; RespCount = 0; EntityID = 0; Range = 0.0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; Material = 0; NormalAz = 0.0; NormalEl = 0.0; ValidV1or2 = true; } // ================================================ // ~CigiLosRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV2::~CigiLosRespV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseLosResp * Data = ( CigiBaseLosResp *)Base; if(!Data->ValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->LosID); Cigi_uint8 HDta = (Data->Valid) ? 0x80 : 0x00; HDta |= (Data->Visible) ? 0x40 : 0x00; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.l++, &Data->Material); float tflt = (float)Data->Range; CIGI_SCOPY4(CDta.f++, &tflt); CIGI_SCOPY8(CDta.d++, &Data->AltOrZoff); CIGI_SCOPY8(CDta.d++, &Data->LatOrXoff); CIGI_SCOPY8(CDta.d++, &Data->LonOrYoff); memcpy(Buff,tBuf,CIGI_LOS_RESP_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_LOS_RESP_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&LosID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x80) != 0); Visible = ((HDta & 0x40) != 0); CDta.c += 3; CIGI_SCOPY4(&Material, CDta.l++); float tflt; CIGI_SCOPY4(&tflt, CDta.f++); Range = (double)tflt; CIGI_SCOPY8(&AltOrZoff, CDta.d++); CIGI_SCOPY8(&LatOrXoff, CDta.d++); CIGI_SCOPY8(&LonOrYoff, CDta.d++); HostFrame = 0; ValidV1or2 = true; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: // CIGI_LOS_RESP_PACKET_ID_V1 & // CIGI_LOS_RESP_PACKET_ID_V2 are the same // CIGI_LOS_RESP_PACKET_ID_V3 & // CIGI_LOS_RESP_PACKET_ID_V3_2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiLosRespV3.cpp000066400000000000000000000136631210750432300210040ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Corrected an error with ValidV1or2.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV3::CigiLosRespV3() { PacketID = CIGI_LOS_RESP_PACKET_ID_V3; PacketSize = CIGI_LOS_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; LosID = 0; Valid = false; EntityIDValid = false; RangeValid = false; Visible = false; IntersectionCoordSys = Geodetic; HostFrame = 0; RespCount = 0; EntityID = 0; Range = 0.0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; Material = 0; NormalAz = 0.0; NormalEl = 0.0; ValidV1or2 = false; } // ================================================ // ~CigiLosRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV3::~CigiLosRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosResp * Data = ( CigiBaseLosResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Data->Valid) ? 0x01 : 0x00; HDta |= (Data->EntityIDValid) ? 0x02 : 0x00; HDta |= (Data->Visible) ? 0x04 : 0x00; *CDta.c++ = HDta; *CDta.c++ = Data->RespCount; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->Range; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); Visible = ((HDta & 0x04) != 0); RespCount = *CDta.c++; EntityID = *CDta.s++; Range = *CDta.d++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); Visible = ((HDta & 0x04) != 0); RespCount = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&Range, CDta.d++); } HostFrame = 0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Material = 0; ValidV1or2 = false; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: // CIGI_LOS_RESP_PACKET_ID_V1 & // CIGI_LOS_RESP_PACKET_ID_V2 are the same // CIGI_LOS_RESP_PACKET_ID_V3 & // CIGI_LOS_RESP_PACKET_ID_V3_2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiLosRespV3_2.cpp000066400000000000000000000132601210750432300212160ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosRespV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosRespV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Corrected an error with ValidV1or2.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosRespV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV3_2::CigiLosRespV3_2() { PacketID = CIGI_LOS_RESP_PACKET_ID_V3_2; PacketSize = CIGI_LOS_RESP_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; LosID = 0; Valid = false; EntityIDValid = false; RangeValid = false; Visible = false; IntersectionCoordSys = Geodetic; HostFrame = 0; RespCount = 0; EntityID = 0; Range = 0.0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; Material = 0; NormalAz = 0.0; NormalEl = 0.0; ValidV1or2 = false; } // ================================================ // ~CigiLosRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosRespV3_2::~CigiLosRespV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosResp * Data = ( CigiBaseLosResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Data->Valid) ? 0x01 : 0x00; HDta |= (Data->EntityIDValid) ? 0x02 : 0x00; HDta |= (Data->Visible) ? 0x04 : 0x00; HDta |= (Data->HostFrame << 4) & 0xf0; *CDta.c++ = HDta; *CDta.c++ = Data->RespCount; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->Range; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); Visible = ((HDta & 0x04) != 0); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); RespCount = *CDta.c++; EntityID = *CDta.s++; Range = *CDta.d++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); Visible = ((HDta & 0x04) != 0); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); RespCount = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&Range, CDta.d++); } LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Material = 0; ValidV1or2 = false; return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosRespV3_2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: // CIGI_LOS_RESP_PACKET_ID_V1 & // CIGI_LOS_RESP_PACKET_ID_V2 are the same // CIGI_LOS_RESP_PACKET_ID_V3 & // CIGI_LOS_RESP_PACKET_ID_V3_2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiLosSegReqV1.cpp000066400000000000000000000135041210750432300212510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion, 
 *  DestEntityIDValid, UpdatePeriod, and DestEntityID member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the DestEntityIDValid, UpdatePeriod, and 
 *  DestEntityID member variables.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed the type of request from Basic to Extended.  The Extended
 *  Response in V3 and later has the needed data for V1 & V2 responses.
 *  The Basic responses do not.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosSegReqV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosSegReqV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV1::CigiLosSegReqV1() { PacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V1; PacketSize = CIGI_LOS_SEG_REQ_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; LosID = 0; ReqType = Extended; SrcCoordSys = Geodetic; DstCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; DstXLat = 0.0; DstYLon = 0.0; DstZAlt = 0.0; Mask = 0; DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosSegReqV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV1::~CigiLosSegReqV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseLosSegReq * Data = ( CigiBaseLosSegReq *)Base; // At this point return without unpacking if the // data is not valid for CIGI 1 or 2. if(!Data->ValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->LosID); float talt = (float)Data->SrcZAlt; CIGI_SCOPY4(CDta.f++, &talt); CIGI_SCOPY8(CDta.d++, &Data->SrcXLat); CIGI_SCOPY8(CDta.d++, &Data->SrcYLon); *CDta.l++ = 0; talt = (float)Data->DstZAlt; CIGI_SCOPY4(CDta.f++, &talt); CIGI_SCOPY8(CDta.d++, &Data->DstXLat); CIGI_SCOPY8(CDta.d++, &Data->DstYLon); memcpy(Buff,tBuf,CIGI_LOS_SEG_REQ_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; float talt; memcpy(tBuf,Buff,CIGI_LOS_SEG_REQ_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&LosID, CDta.s++); CIGI_SCOPY4(&talt, CDta.f++); SrcZAlt = (double)talt; CIGI_SCOPY8(&SrcXLat, CDta.d++); CIGI_SCOPY8(&SrcYLon, CDta.d++); CDta.c += 4; CIGI_SCOPY4(&talt, CDta.f++); DstZAlt = (double)talt; CIGI_SCOPY8(&DstXLat, CDta.d++); CIGI_SCOPY8(&DstYLon, CDta.d++); DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; ValidV1or2 = true; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiLosSegReqV2.cpp000066400000000000000000000133121210750432300212470ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion, 
 *  DestEntityIDValid, UpdatePeriod, and DestEntityID member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the DestEntityIDValid, UpdatePeriod, and 
 *  DestEntityID member variables.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed the type of request from Basic to Extended.  The Extended
 *  Response in V3 and later has the needed data for V1 & V2 responses.
 *  The Basic responses do not.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosSegReqV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosSegReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV2::CigiLosSegReqV2() { PacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V2; PacketSize = CIGI_LOS_SEG_REQ_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; LosID = 0; ReqType = Extended; SrcCoordSys = Geodetic; DstCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; DstXLat = 0.0; DstYLon = 0.0; DstZAlt = 0.0; Mask = 0; DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosSegReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV2::~CigiLosSegReqV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[7]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseLosSegReq * Data = ( CigiBaseLosSegReq *)Base; // At this point return without unpacking if the // data is not valid for CIGI 1 or 2. if(!Data->ValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->LosID); *CDta.l++ = 0; CIGI_SCOPY8(CDta.d++, &Data->SrcZAlt); CIGI_SCOPY8(CDta.d++, &Data->SrcXLat); CIGI_SCOPY8(CDta.d++, &Data->SrcYLon); CIGI_SCOPY8(CDta.d++, &Data->DstZAlt); CIGI_SCOPY8(CDta.d++, &Data->DstXLat); CIGI_SCOPY8(CDta.d++, &Data->DstYLon); memcpy(Buff,tBuf,CIGI_LOS_SEG_REQ_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[7]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_LOS_SEG_REQ_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&LosID, CDta.s++); CDta.c += 4; CIGI_SCOPY8(&SrcZAlt, CDta.d++); CIGI_SCOPY8(&SrcXLat, CDta.d++); CIGI_SCOPY8(&SrcYLon, CDta.d++); CIGI_SCOPY8(&DstZAlt, CDta.d++); CIGI_SCOPY8(&DstXLat, CDta.d++); CIGI_SCOPY8(&DstYLon, CDta.d++); DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; ValidV1or2 = true; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiLosSegReqV3.cpp000066400000000000000000000207321210750432300212540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion, 
 *  DestEntityIDValid, UpdatePeriod, and DestEntityID member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the DestEntityIDValid, UpdatePeriod, and 
 *  DestEntityID member variables.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosSegReqV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosSegReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV3::CigiLosSegReqV3() { PacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V3; PacketSize = CIGI_LOS_SEG_REQ_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; LosID = 0; ReqType = Basic; SrcCoordSys = Geodetic; DstCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; DstXLat = 0.0; DstYLon = 0.0; DstZAlt = 0.0; Mask = 0; DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosSegReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV3::~CigiLosSegReqV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosSegReq * Data = ( CigiBaseLosSegReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Data->ReqType == Basic) ? 0x00 : 0x01; HDta |= (Data->SrcCoordSys == Geodetic) ? 0x00 : 0x02; HDta |= (Data->DstCoordSys == Geodetic) ? 0x00 : 0x04; HDta |= (Data->ResponseCoordSys == Geodetic) ? 0x00 : 0x08; *CDta.c++ = HDta; *CDta.c++ = Data->AlphaThresh; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->SrcXLat; *CDta.d++ = Data->SrcYLon; *CDta.d++ = Data->SrcZAlt; *CDta.d++ = Data->DstXLat; *CDta.d++ = Data->DstYLon; *CDta.d++ = Data->DstZAlt; *CDta.l++ = Data->Mask; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); DstCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 3) & 0x01); AlphaThresh = *CDta.c++; EntityID = *CDta.s++; SrcXLat = *CDta.d++; SrcYLon = *CDta.d++; SrcZAlt = *CDta.d++; DstXLat = *CDta.d++; DstYLon = *CDta.d++; DstZAlt = *CDta.d++; Mask = *CDta.l++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); DstCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 3) & 0x01); AlphaThresh = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&SrcXLat, CDta.d++); CigiSwap8(&SrcYLon, CDta.d++); CigiSwap8(&SrcZAlt, CDta.d++); CigiSwap8(&DstXLat, CDta.d++); CigiSwap8(&DstYLon, CDta.d++); CigiSwap8(&DstZAlt, CDta.d++); CigiSwap4(&Mask, CDta.l++); } ValidV1or2 = ((SrcCoordSys == Geodetic)&& (DstCoordSys == Geodetic)); DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3::SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcCoordSysIn < 0)||(SrcCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcCoordSys",(CoordSysGrp)SrcCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcCoordSys = SrcCoordSysIn; ValidV1or2 = ((SrcCoordSys == Geodetic)&& (DstCoordSys == Geodetic)); return(CIGI_SUCCESS); } // ================================================ // DstCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3::SetDstCoordSys(const CoordSysGrp DstCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DstCoordSysIn < 0)||(DstCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DstCoordSys",(CoordSysGrp)DstCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DstCoordSys = DstCoordSysIn; ValidV1or2 = ((SrcCoordSys == Geodetic)&& (DstCoordSys == Geodetic)); return(CIGI_SUCCESS); } // ================================================ // ResponseCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3::SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ResponseCoordSysIn < 0)||(ResponseCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ResponseCoordSys",(CoordSysGrp)ResponseCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ResponseCoordSys = ResponseCoordSysIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosSegReqV3_2.cpp000066400000000000000000000203251210750432300214730ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosSegReqV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosSegReqV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version Number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosSegReqV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosSegReqV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV3_2::CigiLosSegReqV3_2() { PacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V3_2; PacketSize = CIGI_LOS_SEG_REQ_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; LosID = 0; ReqType = Basic; SrcCoordSys = Geodetic; DstCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; DstXLat = 0.0; DstYLon = 0.0; DstZAlt = 0.0; Mask = 0; DestEntityIDValid = false; UpdatePeriod = 0; DestEntityID = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosSegReqV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosSegReqV3_2::~CigiLosSegReqV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosSegReq * Data = ( CigiBaseLosSegReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Data->ReqType == Basic) ? 0x00 : 0x01; HDta |= (Data->SrcCoordSys == Geodetic) ? 0x00 : 0x02; HDta |= (Data->DstCoordSys == Geodetic) ? 0x00 : 0x04; HDta |= (Data->ResponseCoordSys == Geodetic) ? 0x00 : 0x08; HDta |= (Data->DestEntityIDValid) ? 0x10 : 0x00; *CDta.c++ = HDta; *CDta.c++ = Data->AlphaThresh; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->SrcXLat; *CDta.d++ = Data->SrcYLon; *CDta.d++ = Data->SrcZAlt; *CDta.d++ = Data->DstXLat; *CDta.d++ = Data->DstYLon; *CDta.d++ = Data->DstZAlt; *CDta.l++ = Data->Mask; *CDta.c++ = Data->UpdatePeriod; *CDta.c++ = 0; *CDta.s++ = Data->DestEntityID; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); DstCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 3) & 0x01); DestEntityIDValid = ((HDta & 0x10) != 0) ? true : false; AlphaThresh = *CDta.c++; EntityID = *CDta.s++; SrcXLat = *CDta.d++; SrcYLon = *CDta.d++; SrcZAlt = *CDta.d++; DstXLat = *CDta.d++; DstYLon = *CDta.d++; DstZAlt = *CDta.d++; Mask = *CDta.l++; UpdatePeriod = *CDta.c++; CDta.c++; DestEntityID = *CDta.s++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); DstCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 3) & 0x01); DestEntityIDValid = ((HDta & 0x10) != 0) ? true : false; AlphaThresh = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&SrcXLat, CDta.d++); CigiSwap8(&SrcYLon, CDta.d++); CigiSwap8(&SrcZAlt, CDta.d++); CigiSwap8(&DstXLat, CDta.d++); CigiSwap8(&DstYLon, CDta.d++); CigiSwap8(&DstZAlt, CDta.d++); CigiSwap4(&Mask, CDta.l++); UpdatePeriod = *CDta.c++; CDta.c++; CigiSwap2(&DestEntityID, CDta.s++); } ValidV1or2 = ((SrcCoordSys == Geodetic)&& (DstCoordSys == Geodetic)); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3_2::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3_2::SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcCoordSysIn < 0)||(SrcCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcCoordSys",(CoordSysGrp)SrcCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcCoordSys = SrcCoordSysIn; ValidV1or2 = ((SrcCoordSys == Geodetic)&& (DstCoordSys == Geodetic)); return(CIGI_SUCCESS); } // ================================================ // DstCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3_2::SetDstCoordSys(const CoordSysGrp DstCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((DstCoordSysIn < 0)||(DstCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("DstCoordSys",(CoordSysGrp)DstCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif DstCoordSys = DstCoordSysIn; ValidV1or2 = ((SrcCoordSys == Geodetic)&& (DstCoordSys == Geodetic)); return(CIGI_SUCCESS); } // ================================================ // ResponseCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosSegReqV3_2::SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ResponseCoordSysIn < 0)||(ResponseCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ResponseCoordSys",(CoordSysGrp)ResponseCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ResponseCoordSys = ResponseCoordSysIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosVectReqV1.cpp000066400000000000000000000140641210750432300214360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the UpdatePeriod member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed the type of request from Basic to Extended.  The Extended
 *  Response in V3 and later has the needed data for V1 & V2 responses.
 *  The Basic responses do not.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosVectReqV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosVectReqV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV1::CigiLosVectReqV1() { PacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V1; PacketSize = CIGI_LOS_VECT_REQ_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; LosID = 0; ReqType = Extended; SrcCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; VectAz = 0.0; VectEl = 0.0; MinRange = 0.0; MaxRange = 0.0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; Mask = 0; UpdatePeriod = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosVectReqV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV1::~CigiLosVectReqV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseLosVectReq * Data = ( CigiBaseLosVectReq *)Base; if(!Data->ValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = Data->PacketID; *CDta.c++ = Data->PacketSize; CIGI_SCOPY2(CDta.s++, &Data->LosID); *CDta.l++ = 0; if(Data->VectAz < 0.0f) Data->VectAz += 360.0f; CIGI_SCOPY4(CDta.f++, &Data->VectAz); CIGI_SCOPY4(CDta.f++, &Data->VectEl); CIGI_SCOPY4(CDta.f++, &Data->MaxRange); float tflt = (float)Data->SrcZAlt; CIGI_SCOPY4(CDta.f++, &tflt); CIGI_SCOPY8(CDta.d++, &Data->SrcXLat); CIGI_SCOPY8(CDta.d++, &Data->SrcYLon); memcpy(Buff,tBuf,CIGI_LOS_VECT_REQ_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_LOS_VECT_REQ_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&LosID, CDta.s++); CDta.l++; CIGI_SCOPY4(&VectAz, CDta.f++); CIGI_SCOPY4(&VectEl, CDta.f++); CIGI_SCOPY4(&MaxRange, CDta.f++); float tflt; CIGI_SCOPY4(&tflt, CDta.f++); SrcZAlt = (double)tflt; CIGI_SCOPY8(&SrcXLat, CDta.d++); CIGI_SCOPY8(&SrcYLon, CDta.d++); UpdatePeriod = 0; ValidV1or2 = true; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // VectAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV1::SetVectAz(const float VectAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VectAzIn < 0.0)||(VectAzIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VectAz",(float)VectAzIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VectAz = VectAzIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosVectReqV2.cpp000066400000000000000000000140611210750432300214340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the UpdatePeriod member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed the type of request from Basic to Extended.  The Extended
 *  Response in V3 and later has the needed data for V1 & V2 responses.
 *  The Basic responses do not.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosVectReqV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosVectReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV2::CigiLosVectReqV2() { PacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V2; PacketSize = CIGI_LOS_VECT_REQ_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; LosID = 0; ReqType = Extended; SrcCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; VectAz = 0.0; VectEl = 0.0; MinRange = 0.0; MaxRange = 0.0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; Mask = 0; UpdatePeriod = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosVectReqV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV2::~CigiLosVectReqV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseLosVectReq * Data = ( CigiBaseLosVectReq *)Base; if(!Data->ValidV1or2) return(0); CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->LosID); if(Data->VectAz < 0.0f) Data->VectAz += 360.0f; CIGI_SCOPY4(CDta.f++, &Data->VectAz); CIGI_SCOPY4(CDta.f++, &Data->VectEl); *CDta.l++ = 0; CIGI_SCOPY4(CDta.f++, &Data->MinRange); CIGI_SCOPY4(CDta.f++, &Data->MaxRange); CIGI_SCOPY8(CDta.d++, &Data->SrcZAlt); CIGI_SCOPY8(CDta.d++, &Data->SrcXLat); CIGI_SCOPY8(CDta.d++, &Data->SrcYLon); memcpy(Buff,tBuf,CIGI_LOS_VECT_REQ_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_LOS_VECT_REQ_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&LosID, CDta.s++); CIGI_SCOPY4(&VectAz, CDta.f++); CIGI_SCOPY4(&VectEl, CDta.f++); CDta.l++; CIGI_SCOPY4(&MinRange, CDta.f++); CIGI_SCOPY4(&MaxRange, CDta.f++); CIGI_SCOPY8(&SrcZAlt, CDta.d++); CIGI_SCOPY8(&SrcXLat, CDta.d++); CIGI_SCOPY8(&SrcYLon, CDta.d++); UpdatePeriod = 0; ValidV1or2 = true; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // VectAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV2::SetVectAz(const float VectAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VectAzIn < 0.0)||(VectAzIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VectAz",(float)VectAzIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VectAz = VectAzIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosVectReqV3.cpp000066400000000000000000000200161210750432300214320ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  UpdatePeriod member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the UpdatePeriod member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosVectReqV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosVectReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV3::CigiLosVectReqV3() { PacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V3; PacketSize = CIGI_LOS_VECT_REQ_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; LosID = 0; ReqType = Basic; SrcCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; VectAz = 0.0; VectEl = 0.0; MinRange = 0.0; MaxRange = 0.0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; Mask = 0; UpdatePeriod = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosVectReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV3::~CigiLosVectReqV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosVectReq * Data = ( CigiBaseLosVectReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Cigi_uint8)(Data->ReqType & 0x01); HDta |= (Cigi_uint8)((Data->SrcCoordSys << 1) & 0x02); HDta |= (Cigi_uint8)((Data->ResponseCoordSys << 2) & 0x04); *CDta.c++ = HDta; *CDta.c++ = Data->AlphaThresh; *CDta.s++ = Data->EntityID; if(Data->VectAz > 180.0f) Data->VectAz -= 360.0f; *CDta.f++ = Data->VectAz; *CDta.f++ = Data->VectEl; *CDta.f++ = Data->MinRange; *CDta.f++ = Data->MaxRange; *CDta.d++ = Data->SrcXLat; *CDta.d++ = Data->SrcYLon; *CDta.d++ = Data->SrcZAlt; *CDta.l++ = Data->Mask; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); AlphaThresh = *CDta.c++; EntityID = *CDta.s++; VectAz = *CDta.f++; VectEl = *CDta.f++; MinRange = *CDta.f++; MaxRange = *CDta.f++; SrcXLat = *CDta.d++; SrcYLon = *CDta.d++; SrcZAlt = *CDta.d++; Mask = *CDta.l++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); AlphaThresh = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap4(&VectAz, CDta.f++); CigiSwap4(&VectEl, CDta.f++); CigiSwap4(&MinRange, CDta.f++); CigiSwap4(&MaxRange, CDta.f++); CigiSwap8(&SrcXLat, CDta.d++); CigiSwap8(&SrcYLon, CDta.d++); CigiSwap8(&SrcZAlt, CDta.d++); CigiSwap4(&Mask, CDta.l++); } UpdatePeriod = 0; ValidV1or2 = (SrcCoordSys == Geodetic); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3::SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcCoordSysIn < 0)||(SrcCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcCoordSys",(CoordSysGrp)SrcCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcCoordSys = SrcCoordSysIn; return(CIGI_SUCCESS); } // ================================================ // ResponseCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3::SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ResponseCoordSysIn < 0)||(ResponseCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ResponseCoordSys",(CoordSysGrp)ResponseCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ResponseCoordSys = ResponseCoordSysIn; return(CIGI_SUCCESS); } // ================================================ // VectAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3::SetVectAz(const float VectAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VectAzIn < -180.0f)||(VectAzIn > 180.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VectAz",(float)VectAzIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VectAz = VectAzIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosVectReqV3_2.cpp000066400000000000000000000171361210750432300216640ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosVectReqV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosVectReqV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version number
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosVectReqV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosVectReqV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV3_2::CigiLosVectReqV3_2() { PacketID = CIGI_LOS_VECT_REQ_PACKET_ID_V3_2; PacketSize = CIGI_LOS_VECT_REQ_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; LosID = 0; ReqType = Basic; SrcCoordSys = Geodetic; ResponseCoordSys = Geodetic; AlphaThresh = 0; EntityID = 0; VectAz = 0.0; VectEl = 0.0; MinRange = 0.0; MaxRange = 0.0; SrcXLat = 0.0; SrcYLon = 0.0; SrcZAlt = 0.0; Mask = 0; UpdatePeriod = 0; ValidV1or2 = true; } // ================================================ // ~CigiLosVectReqV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosVectReqV3_2::~CigiLosVectReqV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosVectReq * Data = ( CigiBaseLosVectReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Cigi_uint8)(Data->ReqType & 0x01); HDta |= (Cigi_uint8)((Data->SrcCoordSys << 1) & 0x02); HDta |= (Cigi_uint8)((Data->ResponseCoordSys << 2) & 0x04); *CDta.c++ = HDta; *CDta.c++ = Data->AlphaThresh; *CDta.s++ = Data->EntityID; if(Data->VectAz > 180.0f) Data->VectAz -= 360.0f; *CDta.f++ = Data->VectAz; *CDta.f++ = Data->VectEl; *CDta.f++ = Data->MinRange; *CDta.f++ = Data->MaxRange; *CDta.d++ = Data->SrcXLat; *CDta.d++ = Data->SrcYLon; *CDta.d++ = Data->SrcZAlt; *CDta.l++ = Data->Mask; *CDta.c++ = Data->UpdatePeriod; *CDta.c++ = 0; *CDta.s++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); AlphaThresh = *CDta.c++; EntityID = *CDta.s++; VectAz = *CDta.f++; VectEl = *CDta.f++; MinRange = *CDta.f++; MaxRange = *CDta.f++; SrcXLat = *CDta.d++; SrcYLon = *CDta.d++; SrcZAlt = *CDta.d++; Mask = *CDta.l++; UpdatePeriod = *CDta.c++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint16 HDta = *CDta.c++; ReqType = (ReqTypeGrp)(HDta & 0x01); SrcCoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); ResponseCoordSys = (CoordSysGrp)((HDta >> 2) & 0x01); AlphaThresh = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap4(&VectAz, CDta.f++); CigiSwap4(&VectEl, CDta.f++); CigiSwap4(&MinRange, CDta.f++); CigiSwap4(&MaxRange, CDta.f++); CigiSwap8(&SrcXLat, CDta.d++); CigiSwap8(&SrcYLon, CDta.d++); CigiSwap8(&SrcZAlt, CDta.d++); CigiSwap4(&Mask, CDta.l++); UpdatePeriod = *CDta.c++; } ValidV1or2 = (SrcCoordSys == Geodetic); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ReqType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3_2::SetReqType(const ReqTypeGrp ReqTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ReqTypeIn < 0)||(ReqTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ReqType",(ReqTypeGrp)ReqTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ReqType = ReqTypeIn; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3_2::SetSrcCoordSys(const CoordSysGrp SrcCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((SrcCoordSysIn < 0)||(SrcCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("SrcCoordSys",(CoordSysGrp)SrcCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif SrcCoordSys = SrcCoordSysIn; return(CIGI_SUCCESS); } // ================================================ // ResponseCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3_2::SetResponseCoordSys(const CoordSysGrp ResponseCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ResponseCoordSysIn < 0)||(ResponseCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ResponseCoordSys",(CoordSysGrp)ResponseCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ResponseCoordSys = ResponseCoordSysIn; return(CIGI_SUCCESS); } // ================================================ // VectAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosVectReqV3_2::SetVectAz(const float VectAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((VectAzIn < -180.0f)||(VectAzIn > 180.0f))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VectAz",(float)VectAzIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif VectAz = VectAzIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosXRespV3.cpp000066400000000000000000000211631210750432300211260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosXRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  HostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the HostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosXRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosXRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosXRespV3::CigiLosXRespV3() { PacketID = CIGI_LOS_XRESP_PACKET_ID_V3; PacketSize = CIGI_LOS_XRESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; LosID = 0; Valid = false; EntityIDValid = false; RangeValid = false; Visible = false; IntersectionCoordSys = Geodetic; HostFrame = 0; RespCount = 0; EntityID = 0; Range = 0.0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; Material = 0; NormalAz = 0.0; NormalEl = 0.0; ValidV1or2 = true; } // ================================================ // ~CigiLosXRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosXRespV3::~CigiLosXRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosResp * Data = ( CigiBaseLosResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Data->Valid) ? 0x01 : 0x00; HDta |= (Data->EntityIDValid) ? 0x02 : 0x00; HDta |= (Data->RangeValid) ? 0x04 : 0x00; HDta |= (Data->Visible) ? 0x08 : 0x00; HDta |= (Cigi_uint8)((Data->IntersectionCoordSys << 4) & 0x10); *CDta.c++ = HDta; *CDta.c++ = Data->RespCount; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->Range; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; *CDta.c++ = Data->Red; *CDta.c++ = Data->Green; *CDta.c++ = Data->Blue; *CDta.c++ = Data->Alpha; *CDta.l++ = Data->Material; *CDta.f++ = Data->NormalAz; *CDta.f++ = Data->NormalEl; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); RangeValid = ((HDta & 0x04) != 0); Visible = ((HDta & 0x08) != 0); IntersectionCoordSys = (LOSCoordGrp)((HDta >> 4) & 0x01); RespCount = *CDta.c++; EntityID = *CDta.s++; Range = *CDta.d++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Alpha = *CDta.c++; Material = *CDta.l++; NormalAz = *CDta.f++; NormalEl = *CDta.f++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); RangeValid = ((HDta & 0x04) != 0); Visible = ((HDta & 0x08) != 0); IntersectionCoordSys = (LOSCoordGrp)((HDta >> 4) & 0x01); RespCount = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&Range, CDta.d++); CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Alpha = *CDta.c++; CigiSwap4(&Material, CDta.l++); CigiSwap4(&NormalAz, CDta.f++); CigiSwap4(&NormalEl, CDta.f++); } HostFrame = 0; ValidV1or2 = (IntersectionCoordSys == Geodetic); return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: // CIGI_LOS_RESP_PACKET_ID_V1 & // CIGI_LOS_RESP_PACKET_ID_V2 are the same // CIGI_LOS_XRESP_PACKET_ID_V3 & // CIGI_LOS_XRESP_PACKET_ID_V3_2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_XRESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // IntersectionCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3::SetIntersectionCoordSys(const LOSCoordGrp IntersectionCoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((IntersectionCoordSysIn < 0)||(IntersectionCoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("IntersectionCoordSys",(LOSCoordGrp)IntersectionCoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif IntersectionCoordSys = IntersectionCoordSysIn; ValidV1or2 = (IntersectionCoordSys == Geodetic); return(CIGI_SUCCESS); } // ================================================ // NormalAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3::SetNormalAz(const float NormalAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormalAzIn < -180.0)||(NormalAzIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormalAz",(float)NormalAzIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormalAz = NormalAzIn; return(CIGI_SUCCESS); } // ================================================ // NormalEl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3::SetNormalEl(const float NormalElIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormalElIn < -90.0)||(NormalElIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormalEl",(float)NormalElIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormalEl = NormalElIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiLosXRespV3_2.cpp000066400000000000000000000174411210750432300213530ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiLosXRespV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiLosXRespV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Changed the way ValidV1or2 and IntersectionCoordSys is calculated.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected Version number.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiLosXRespV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiLosXRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosXRespV3_2::CigiLosXRespV3_2() { PacketID = CIGI_LOS_XRESP_PACKET_ID_V3_2; PacketSize = CIGI_LOS_XRESP_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; LosID = 0; Valid = false; EntityIDValid = false; RangeValid = false; Visible = false; IntersectionCoordSys = Geodetic; HostFrame = 0; RespCount = 0; EntityID = 0; Range = 0.0; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; Material = 0; NormalAz = 0.0; NormalEl = 0.0; ValidV1or2 = true; } // ================================================ // ~CigiLosXRespV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiLosXRespV3_2::~CigiLosXRespV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseLosResp * Data = ( CigiBaseLosResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->LosID; Cigi_uint8 HDta = (Data->Valid) ? 0x01 : 0x00; HDta |= (Data->EntityIDValid) ? 0x02 : 0x00; HDta |= (Data->RangeValid) ? 0x04 : 0x00; HDta |= (Data->Visible) ? 0x08 : 0x00; HDta |= (Data->HostFrame << 4) & 0xf0; *CDta.c++ = HDta; *CDta.c++ = Data->RespCount; *CDta.s++ = Data->EntityID; *CDta.d++ = Data->Range; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; *CDta.c++ = Data->Red; *CDta.c++ = Data->Green; *CDta.c++ = Data->Blue; *CDta.c++ = Data->Alpha; *CDta.l++ = Data->Material; *CDta.f++ = Data->NormalAz; *CDta.f++ = Data->NormalEl; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { LosID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); RangeValid = ((HDta & 0x04) != 0); Visible = ((HDta & 0x08) != 0); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); RespCount = *CDta.c++; EntityID = *CDta.s++; Range = *CDta.d++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Alpha = *CDta.c++; Material = *CDta.l++; NormalAz = *CDta.f++; NormalEl = *CDta.f++; } else { CigiSwap2(&LosID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; Valid = ((HDta & 0x01) != 0); EntityIDValid = ((HDta & 0x02) != 0); RangeValid = ((HDta & 0x04) != 0); Visible = ((HDta & 0x08) != 0); HostFrame = (Cigi_uint8)((HDta >> 4) & 0x0f); RespCount = *CDta.c++; CigiSwap2(&EntityID, CDta.s++); CigiSwap8(&Range, CDta.d++); CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Alpha = *CDta.c++; CigiSwap4(&Material, CDta.l++); CigiSwap4(&NormalAz, CDta.f++); CigiSwap4(&NormalEl, CDta.f++); } if(EntityIDValid) { ValidV1or2 = false; IntersectionCoordSys = Entity; } else { ValidV1or2 = true; IntersectionCoordSys = Geodetic; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3_2::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: // CIGI_LOS_RESP_PACKET_ID_V1 & // CIGI_LOS_RESP_PACKET_ID_V2 are the same // CIGI_LOS_XRESP_PACKET_ID_V3 & // CIGI_LOS_XRESP_PACKET_ID_V3_2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_LOS_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_LOS_XRESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // NormalAz // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3_2::SetNormalAz(const float NormalAzIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormalAzIn < -180.0)||(NormalAzIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormalAz",(float)NormalAzIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormalAz = NormalAzIn; return(CIGI_SUCCESS); } // ================================================ // NormalEl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiLosXRespV3_2::SetNormalEl(const float NormalElIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((NormalElIn < -90.0)||(NormalElIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("NormalEl",(float)NormalElIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif NormalEl = NormalElIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiMaritimeSurfaceCtrlV3.cpp000066400000000000000000000120431210750432300233110ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMaritimeSurfaceCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiMaritimeSurfaceCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiMaritimeSurfaceCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMaritimeSurfaceCtrlV3::CigiMaritimeSurfaceCtrlV3() { PacketID = CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3; PacketSize = CIGI_MARITIME_SURFACE_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityRgnID = 0; SurfaceCondEn = false; WhitecapEn = false; Scope = Global; SurfaceHeight = 0.0; WaterTemp = 0.0; Clarity = 0.0; } // ================================================ // ~CigiMaritimeSurfaceCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMaritimeSurfaceCtrlV3::~CigiMaritimeSurfaceCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMaritimeSurfaceCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseMaritimeSurfaceCtrl * Data = ( CigiBaseMaritimeSurfaceCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityRgnID; Cigi_uint8 HDta = (Data->SurfaceCondEn) ? 0x01 : 0; HDta |= (Data->WhitecapEn) ? 0x02 : 0; HDta |= (Data->Scope << 2) & 0x0c; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; *CDta.f++ = Data->SurfaceHeight; *CDta.f++ = Data->WaterTemp; *CDta.f++ = Data->Clarity; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMaritimeSurfaceCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityRgnID = *CDta.s++; Cigi_uint16 HDta = *CDta.c++; SurfaceCondEn = ((HDta & 0x01) != 0); WhitecapEn = ((HDta & 0x02) != 0); Scope = (ScopeGrp)((HDta >> 2) & 0x03); CDta.c += 3; SurfaceHeight = *CDta.f++; WaterTemp = *CDta.f++; Clarity = *CDta.f++; } else { CigiSwap2(&EntityRgnID, CDta.s++); Cigi_uint16 HDta = *CDta.c++; SurfaceCondEn = ((HDta & 0x01) != 0); WhitecapEn = ((HDta & 0x02) != 0); Scope = (ScopeGrp)((HDta >> 2) & 0x03); CDta.c += 3; CigiSwap4(&SurfaceHeight, CDta.f++); CigiSwap4(&WaterTemp, CDta.f++); CigiSwap4(&Clarity, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiMaritimeSurfaceRespV3.cpp000066400000000000000000000103561210750432300233230ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMaritimeSurfaceRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiMaritimeSurfaceRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiMaritimeSurfaceRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMaritimeSurfaceRespV3::CigiMaritimeSurfaceRespV3() { PacketID = CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3; PacketSize = CIGI_MARITIME_SURFACE_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; RequestID = 0; SurfaceHeight = 0.0; WaterTemp = 0.0; Clarity = 0.0; } // ================================================ // ~CigiMaritimeSurfaceRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMaritimeSurfaceRespV3::~CigiMaritimeSurfaceRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMaritimeSurfaceRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseMaritimeSurfaceResp * Data = ( CigiBaseMaritimeSurfaceResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->RequestID; *CDta.c++ = 0; *CDta.f++ = Data->SurfaceHeight; *CDta.f++ = Data->WaterTemp; *CDta.f++ = Data->Clarity; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMaritimeSurfaceRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size RequestID = *CDta.c++; CDta.c++; if(!Swap) { SurfaceHeight = *CDta.f++; WaterTemp = *CDta.f++; Clarity = *CDta.f++; } else { CigiSwap4(&SurfaceHeight, CDta.f++); CigiSwap4(&WaterTemp, CDta.f++); CigiSwap4(&Clarity, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiMessage.cpp000066400000000000000000000071241210750432300205630ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiMessage.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the CreateBuffer method to add additional padding at the end of 
 *  the buffer when created to allow overruns due to version change problems.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiMessage.h" #include // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiMessage // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMessage::CigiMessage() : BufferSize(0) , CrntMsgBuf(NULL) , CrntFillBuf(NULL) , PackagedMsg(NULL) , ATbl(NULL) , Session(NULL) { } // ================================================ // ~CigiMessage // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMessage::~CigiMessage() { if(Buffers.size() > 0) { list::iterator iBuf; for(iBuf=Buffers.begin();iBuf!=Buffers.end();iBuf++) { delete (*iBuf); } Buffers.clear(); } if(AvailBuff.size() > 0) { list::iterator iBuf; for(iBuf=AvailBuff.begin();iBuf!=AvailBuff.end();iBuf++) { delete (*iBuf); } AvailBuff.clear(); } } // ==================================================================== // Processing // ==================================================================== // ================================================ // CreateBuffer // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMessage::CreateBuffer(const int NumBuf, const int BufLen) { if(BufferSize <= 0) BufferSize = BufLen; int BuffCnt = AvailBuff.size(); int AddBuff = 0; if(BuffCnt < NumBuf) AddBuff = NumBuf - BuffCnt; if(AddBuff > 0) { for(int ndx=0;ndx * The SDK is used to create and format CIGI compliant messages. * Copyright (c) 2001-2005 The Boeing Company * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at * your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * FILENAME: CigiMotionTrackCtrlV3.cpp * LANGUAGE: C++ * CLASS: UNCLASSIFIED * PROJECT: Common Image Generator Interface (CIGI) SDK * * PROGRAM DESCRIPTION: * ... * * MODIFICATION NOTES: * DATE NAME SCR NUMBER * DESCRIPTION OF CHANGE........................ * * 09/17/2003 Greg Basler CIGI_CR_DR_1 * Initial Release. * * 01/21/2005 Greg Basler Version 1.5 * Defined _EXPORT_CCL_ for exporting the class in a Windows DLL. * * 01/21/2005 Greg Basler Version 1.5 * Removed the inline defnitions for the PackedPointer union. * * 04/14/2006 Greg Basler Version 1.7.0 * Modified the class constructor to initialize the MinorVersion member * variable. * * 06/23/2006 Greg Basler Version 1.7.1 * Changed native char and unsigned char types to CIGI types Cigi_int8 and * Cigi_uint8. * * Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiMotionTrackCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiMotionTrackCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMotionTrackCtrlV3::CigiMotionTrackCtrlV3() { PacketID = CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3; PacketSize = CIGI_MOTION_TRACK_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ViewID = 0; TrackerID = 0; TrackerEn = false; BoresightEn = false; XEn = false; YEn = false; ZEn = false; RollEn = false; PitchEn = false; YawEn = false; Scope = View; } // ================================================ // ~CigiMotionTrackCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiMotionTrackCtrlV3::~CigiMotionTrackCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMotionTrackCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseMotionTrackCtrl * Data = ( CigiBaseMotionTrackCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ViewID; *CDta.c++ = Data->TrackerID; Cigi_uint8 HDta = (Data->TrackerEn) ? 0x01 : 0; HDta |= (Data->BoresightEn) ? 0x02 : 0; HDta |= (Data->XEn) ? 0x04 : 0; HDta |= (Data->YEn) ? 0x08 : 0; HDta |= (Data->ZEn) ? 0x10 : 0; HDta |= (Data->RollEn) ? 0x20 : 0; HDta |= (Data->PitchEn) ? 0x40 : 0; HDta |= (Data->YawEn) ? 0x80 : 0; *CDta.c++ = HDta; HDta = (Data->Scope) ? 0x01 : 0; *CDta.c++ = HDta; *CDta.c++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiMotionTrackCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) ViewID = *CDta.s++; else CigiSwap2(&ViewID, CDta.s++); TrackerID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; TrackerEn = ((HDta & 0x01) != 0); BoresightEn = ((HDta & 0x02) != 0); XEn = ((HDta & 0x04) != 0); YEn = ((HDta & 0x08) != 0); ZEn = ((HDta & 0x10) != 0); RollEn = ((HDta & 0x20) != 0); PitchEn = ((HDta & 0x40) != 0); YawEn = ((HDta & 0x80) != 0); HDta = *CDta.c++; Scope = (ScopeGrp)(HDta & 0x01); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiOutgoingMsg.cpp000066400000000000000000001461371210750432300214510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *
 *  This library is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or (at
 *  your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more
 *  details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software Foundation,
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  FILENAME:   CigiOutgoingMsg.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *
 *  PROGRAM DESCRIPTION:
 *  ...
 *
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *
 *  02/20/2006 Greg Basler                       Version 1.6.0
 *  Added the PackageMsg and FreeMsg methods to better update the frame
 *  the frame counter in the IG_Ctrl packet for hosts
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor and destructor methods to initialize
 *  (allocate) and destroy the CurrentIGCtrl and CurrentSOF member variables.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Updated the overloaded << operators for the CigiBaseIGCtrl parameter to set
 *  the CurrentIGCtrl member variable, and for the CigiBaseSOF parameter to set
 *  the CurrentSOF member variable.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Updated the UpdateFrameCntr methods to use minor version numbers and to add
 *  additional frame synchronization functionality.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the UpdateIGCtrl and UpdateSOF methods to use minor version
 *  numbers and to add additional frame synchronization functionality.
 *
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Implemented the Reset method.
 *
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and
 *  Cigi_uint8.
 *
 *  11/27/2006 Greg Basler                       Version 1.7.4
 *  Corrected UpdateIGCtrl so that it zeros the outgoing database id when the
 *    outgoing database id is negative or incoming database id is negative
 *    unless it is -128 or the outgoing database id is the same as the
 *    incoming database id.
 *    It does not zero the id if the incoming id is -128 because an incoming
 *    database id of -128 signifies a database not found condition.
 *
 *  04/24/2007 Greg Basler                       Version 1.7.5
 *  Corrected a problem with the database id adjustment code in UpdateIGCtrl.
 *    The user can disable database id adjustment by declaring
 *    _NO_DATABASE_ADJUSTMENT_. (note: the system will still 0 a negative
 *    database request.) The database adjustment code now will 0 the database
 *    request if the incoming database number is the same or the negative of
 *    database request. It does not 0 the database request if the incoming
 *    database number is -128.
 *
 *  03/11/2008 Greg Basler                       Version 2.0.0
 *  Completely rewrote the way conversions are handled.  Also, rewrote
 *    the message buffers and how they are handled.  Also, removed
 *    the VersionJmpTbl.
 *
 *  04/03/2008 Greg Basler                       Version 2.1.0
 *  Added CigiSymbolCloneV3_3
 *
 *  05/09/2008 Greg Basler                       Version 2.2.0
 *  Added CigiIGCtrlV3_3
 *  Added CigiEntityCtrlV3_3
 *  Fixed the conversion process
 *
 *  05/16/2008 Greg Basler                       Version 2.2.0
 *  Fixed the EnvCtrl conversion process
 *
 *  12/7/200 Greg Basler                         Version 3.3.2
 *  Removed automatic zeroing of the database id based on the SOF declared
 *  database id.  Now the UpdateIGCtrl method just bounds checks the
 *  database id and corrects it to zero if needed.
 *
 * 
* Author: The Boeing Company * */ #include #define _EXPORT_CCL_ #include "CigiOutgoingMsg.h" #include "CigiVersionID.h" #include "CigiAllPackets.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include "CigiSession.h" #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiOutgoingMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg::CigiOutgoingMsg() { pIGCtrlPck[0] = NULL; pIGCtrlPck[1] = new CigiIGCtrlV1; pIGCtrlPck[2] = new CigiIGCtrlV2; pIGCtrlPck[3] = new CigiIGCtrlV3; pIGCtrlPck[4] = new CigiIGCtrlV3_2; pIGCtrlPck[5] = new CigiIGCtrlV3_3; pSOFPck[0] = NULL; pSOFPck[1] = new CigiSOFV1; pSOFPck[2] = new CigiSOFV2; pSOFPck[3] = new CigiSOFV3; pSOFPck[4] = new CigiSOFV3_2; for(int ndx=0;ndx<256;ndx++) { OutgoingHandlerTbl[ndx] = (CigiBasePacket *)&DefaultPacket; VldSnd[ndx] = false; } CmdVersionChng = false; CmdVersion.SetCigiVersion(3,3); MostMatureVersionReceived.SetCigiVersion(0,0); FrameCnt = 0; LastRcvdFrame = 0; } // ================================================ // ~CigiOutgoingMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg::~CigiOutgoingMsg() { int ndx; for(ndx=1;ndx<6;ndx++) { delete pIGCtrlPck[ndx]; } for(ndx=1;ndx<5;ndx++) { delete pSOFPck[ndx]; } ClearHandlerTable(); } // ==================================================================== // Processing // ==================================================================== // ================================================ // IsSynchronous // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv bool CigiOutgoingMsg::IsSynchronous(void) const { if(Session != NULL) return(Session->IsSynchronous()); else return(true); // default response } // ================================================ // AdvanceBuffer // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::AdvanceBuffer(void) { if(AvailBuff.empty()) { // Create a new buffer CrntFillBuf = new CigiMessageBuffer(BufferSize); } else { // Get the first buffer in the Available Buffers list CrntFillBuf = (*AvailBuff.begin()); AvailBuff.pop_front(); } // Add the buffer to the Active Buffers list Buffers.push_back(CrntFillBuf); // Initialize the buffer CrntFillBuf->Active = true; CrntFillBuf->BufferFillCnt = 0; CrntFillBuf->DataPresent = false; CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer; CrntFillBuf->Locked = false; CrntFillBuf->ValidIGCtrlSOF = false; if(CmdVersionChng) { MostMatureVersionReceived.SetCigiVersion(0,0); ChangeOutgoingCigiVersion(CmdVersion); CmdVersionChng = false; } else if((OutgoingVersion != MostMatureVersionReceived) && (MostMatureVersionReceived.CigiMajorVersion > 0)) ChangeOutgoingCigiVersion(MostMatureVersionReceived); // Set the buffer's Cigi Version ChangeBufferCigiVersion(); } // ================================================ // ChangeOutgoingCigiVersion // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::ChangeOutgoingCigiVersion(CigiVersionID &Version) { // Determine the buffer's Cigi Version if((Session != NULL) && (Version.CigiMajorVersion > 0)) { OutgoingVersion = Version; ClearHandlerTable(); if(Session->IsHost()) { if(OutgoingVersion.CigiMajorVersion >= 3) SetOutgoingHostV3Tbls(); else if(OutgoingVersion.CigiMajorVersion == 2) SetOutgoingHostV2Tbls(); else if(OutgoingVersion.CigiMajorVersion == 1) SetOutgoingHostV1Tbls(); } else { if(OutgoingVersion.CigiMajorVersion >= 3) SetOutgoingIGV3Tbls(); else if(OutgoingVersion.CigiMajorVersion == 2) SetOutgoingIGV2Tbls(); else if(OutgoingVersion.CigiMajorVersion == 1) SetOutgoingIGV1Tbls(); } } } // ================================================ // SetMostMatureReceivedCigiVersion // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetMostMatureReceivedCigiVersion(CigiVersionID &Version) { if(Version.IsKnownCigiVersion()) { if(Version.GetCombinedCigiVersion() > MostMatureVersionReceived.GetCombinedCigiVersion()) { MostMatureVersionReceived = Version; if(CrntFillBuf != NULL) { if((CrntFillBuf->Active) && (!CrntFillBuf->DataPresent)) { // Set the buffer's Cigi Version ChangeBufferCigiVersion(); } } } } } // ================================================ // SetMostMatureReceivedCigiVersion // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::SetOutgoingCigiVersion(CigiVersionID &Version, bool bndchk) { int stat = CIGI_ERROR_WRONG_VERSION; if(Version.IsKnownCigiVersion()) { MostMatureVersionReceived.SetCigiVersion(0,0); CmdVersionChng = true; CmdVersion = Version; stat = CIGI_SUCCESS; if(CrntFillBuf != NULL) { if((CrntFillBuf->Active) && (!CrntFillBuf->DataPresent)) { ChangeOutgoingCigiVersion(Version); // Set the buffer's Cigi Version ChangeBufferCigiVersion(); CmdVersionChng = false; // Already changed } } } return(stat); } // ================================================ // SetMostMatureReceivedCigiVersion // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::ChangeBufferCigiVersion(void) { // Set the buffer's Cigi Version CrntFillBuf->CigiVersion = OutgoingVersion; if(Session->IsHost()) { if((OutgoingVersion.GetCombinedCigiVersion() >= 0x303)) CrntFillBuf->PackIGCtrl = pIGCtrlPck[5]; else if((OutgoingVersion.GetCombinedCigiVersion() == 0x302)) CrntFillBuf->PackIGCtrl = pIGCtrlPck[4]; else CrntFillBuf->PackIGCtrl = pIGCtrlPck[OutgoingVersion.CigiMajorVersion]; int pSize = CrntFillBuf->PackIGCtrl->GetPacketSize(); CrntFillBuf->BufferFillCnt = pSize; CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer + pSize; } else { CrntFillBuf->PackSOF = pSOFPck[OutgoingVersion.CigiMajorVersion]; if((OutgoingVersion.GetCombinedCigiVersion() >= 0x302)) CrntFillBuf->PackSOF = pSOFPck[4]; int pSize = CrntFillBuf->PackSOF->GetPacketSize(); CrntFillBuf->BufferFillCnt = pSize; CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer + pSize; } } // ================================================ // operator << - IG Control // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::operator <<(CigiBaseIGCtrl &refPacket) { CigiMessageBuffer *HostMsgBuf = NULL; if(Buffers.empty()) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } HostMsgBuf = *(Buffers.begin()); if(HostMsgBuf == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } if(!HostMsgBuf->Active || HostMsgBuf->Locked) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } if(Session->IsHost()) { if(HostMsgBuf->PackIGCtrl != NULL) { HostMsgBuf->PackIGCtrl->Pack(&refPacket, CrntFillBuf->Buffer, (void *)&OutgoingVersion); HostMsgBuf->ValidIGCtrlSOF = true; HostMsgBuf->DataPresent = true; } } return(*this); } // ================================================ // operator << - Start Of Frame // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::operator <<(CigiBaseSOF &refPacket) { CigiMessageBuffer *IgMsgBuf = NULL; if(Buffers.empty()) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } IgMsgBuf = *(Buffers.begin()); if(IgMsgBuf == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } if(!IgMsgBuf->Active || IgMsgBuf->Locked) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } if(Session->IsIG()) { if(IgMsgBuf->PackSOF != NULL) { IgMsgBuf->PackSOF->Pack(&refPacket, CrntFillBuf->Buffer, (void *)&OutgoingVersion); IgMsgBuf->ValidIGCtrlSOF = true; IgMsgBuf->DataPresent = true; } } return(*this); } // ================================================ // operator << - Entity Control // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::operator <<(CigiBaseEntityCtrl &refPacket) { CigiCnvtInfoType::Type Cnvt; refPacket.GetCnvt(OutgoingVersion,Cnvt); if(VldSnd[Cnvt.CnvtPacketID]) PackObj(refPacket,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],ATbl); return(*this); } // ================================================ // operator << - Environmental Control // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::operator <<(CigiBaseEnvCtrl &refPacket) { // Store data refPacket.FillHold(&EnvHoldObj); Cigi_uint8 FillVer = refPacket.GetVersion(); if(FillVer >= 3) { // From V3 or above if(OutgoingVersion.CigiMajorVersion >= 3) { // To V3 and above if(VldSnd[refPacket.GetPacketID()]) { PackObj(refPacket, *OutgoingHandlerTbl[refPacket.GetPacketID()], NULL); } } else { // To V1 or V2 // Note: V1 & V2 use the same packet id number if(VldSnd[CIGI_ENV_CTRL_PACKET_ID_V2]) { PackObj(EnvHoldObj, *OutgoingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V2], NULL); } } } else { // From V1 or V2 if(OutgoingVersion.CigiMajorVersion >= 3) { // To V3 or above // If CIGI_ATMOS_CTRL_PACKET_ID_V3 is valid to send // CIGI_CELESTIAL_CTRL_PACKET_ID_V3 is also valid to send. if(VldSnd[CIGI_ATMOS_CTRL_PACKET_ID_V3]) { PackObj(EnvHoldObj, *OutgoingHandlerTbl[CIGI_ATMOS_CTRL_PACKET_ID_V3], NULL); PackObj(EnvHoldObj, *OutgoingHandlerTbl[CIGI_CELESTIAL_CTRL_PACKET_ID_V3], NULL); } } else { // To V1 or V2 // Note: V1 & V2 use the same packet id number if(VldSnd[refPacket.GetPacketID()]) { PackObj(refPacket, *OutgoingHandlerTbl[refPacket.GetPacketID()], NULL); } } } return(*this); } // ================================================ // operator << - Variable Sized Packets // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::operator <<(CigiBaseVariableSizePckt &refPacket) { if(CrntFillBuf == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } if(!CrntFillBuf->Active || CrntFillBuf->Locked) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } CigiCnvtInfoType::Type Cnvt; refPacket.GetCnvt(OutgoingVersion,Cnvt); CigiBaseVariableSizePckt *PackingPacket = (CigiBaseVariableSizePckt *)OutgoingHandlerTbl[Cnvt.CnvtPacketID]; if(VldSnd[Cnvt.CnvtPacketID]) { // This gets the size of this variable sized packet int Size = PackingPacket->GetTruePacketSize(refPacket); if( Size > 0 ) { // Check room left in current buffer if((BufferSize - CrntFillBuf->BufferFillCnt) < Size) AdvanceBuffer(); int pSize = PackingPacket->Pack(&refPacket, CrntFillBuf->FillBufferPos, NULL); CrntFillBuf->BufferFillCnt += pSize; CrntFillBuf->FillBufferPos += pSize; CrntFillBuf->DataPresent = true; } } return(*this); } // ================================================ // operator << - Most Packets // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::operator <<(CigiBasePacket &refBasePacket) { CigiCnvtInfoType::Type Cnvt; refBasePacket.GetCnvt(OutgoingVersion,Cnvt); if((Cnvt.ProcID == CigiProcessType::ProcStd) || (Cnvt.ProcID == CigiProcessType::TwoPassCnvtProcStd)) { if(VldSnd[Cnvt.CnvtPacketID]) PackObj(refBasePacket,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],NULL); } else { CigiBaseEntityCtrl *pEnt; CigiBaseEnvCtrl *pEnv; CigiBaseIGCtrl *pIG; CigiBaseSOF *pSof; CigiBaseVariableSizePckt *pVSz; switch(Cnvt.ProcID) { case CigiProcessType::ProcShortArtPartToArtPart: if(VldSnd[Cnvt.CnvtPacketID]) { CigiBaseShortArtPartCtrl *pSArtPart = (CigiBaseShortArtPartCtrl *)&refBasePacket; Cigi_uint8 ArtPartID1 = pSArtPart->GetArtPart1(); Cigi_uint8 ArtPartID2 = pSArtPart->GetArtPart2(); CigiArtPartCtrlV3 tArtPart; pSArtPart->SpecialConversion(OutgoingVersion,ArtPartID1,&tArtPart); PackObj(tArtPart,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],NULL); if(ArtPartID2 != ArtPartID1) { CigiArtPartCtrlV3 tArtPart2; pSArtPart->SpecialConversion(OutgoingVersion,ArtPartID2,&tArtPart2); PackObj(tArtPart2,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],NULL); } } break; case CigiProcessType::ProcEntity: pEnt = (CigiBaseEntityCtrl *)&refBasePacket; operator<<(*pEnt); break; case CigiProcessType::ProcEnvCtrl: pEnv = (CigiBaseEnvCtrl *)&refBasePacket; operator<<(*pEnv); break; case CigiProcessType::ProcIGCtrl: pIG = (CigiBaseIGCtrl *)&refBasePacket; operator<<(*pIG); break; case CigiProcessType::ProcSOF: pSof = (CigiBaseSOF *)&refBasePacket; operator<<(*pSof); break; case CigiProcessType::ProcVarSize: pVSz = (CigiBaseVariableSizePckt *)&refBasePacket; operator<<(*pVSz); break; default: break; } } return(*this); } // ================================================ // PackObj // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiOutgoingMsg & CigiOutgoingMsg::PackObj(CigiBasePacket &DataPacket, CigiBasePacket &PackingPacket, void *Spec) { if(CrntFillBuf == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } if(!CrntFillBuf->Active || CrntFillBuf->Locked) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(*this); } int Size = PackingPacket.GetPacketSize(); if( Size > 0 ) { // Check room left in current buffer if((BufferSize - CrntFillBuf->BufferFillCnt) < Size) AdvanceBuffer(); int pSize = PackingPacket.Pack(&DataPacket, CrntFillBuf->FillBufferPos, Spec); CrntFillBuf->BufferFillCnt += pSize; CrntFillBuf->FillBufferPos += pSize; CrntFillBuf->DataPresent = true; } return(*this); } // ================================================ // UpdateFrameCntr // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::UpdateFrameCntr(void) { int stat = CIGI_ERROR_UNEXPECTED_NULL; if(CrntMsgBuf == NULL) { if(!Buffers.empty()) { CigiMessageBuffer *tBuf = *(Buffers.begin()); if(tBuf->IsValidIGCtrlSOF()) { Cigi_uint32 *tFrm = (Cigi_uint32 *)(tBuf->Buffer + 8); *tFrm = FrameCnt++; stat = CIGI_SUCCESS; } } } else stat = UpdateFrameCntr(CrntMsgBuf->Buffer); return(stat); } // ================================================ // UpdateFrameCntr // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::UpdateFrameCntr(Cigi_uint8 *OutgoingMsg, Cigi_uint8 *IncomingMsg) { if((OutgoingMsg == NULL) || (CrntMsgBuf == NULL) || (Session == NULL)) return(CIGI_ERROR_UNEXPECTED_NULL); if(!CrntMsgBuf->ValidIGCtrlSOF) { if(Session->IsHost()) { #ifndef CIGI_NO_EXCEPT throw CigiMissingIgControlException(); #endif return(CIGI_ERROR_MISSING_IG_CONTROL_PACKET); } else { #ifndef CIGI_NO_EXCEPT throw CigiMissingStartOfFrameException(); #endif return(CIGI_ERROR_MISSING_SOF_PACKET); } } // Note: For all current CIGI Versions in the // IG Control and Start-Of-Frame packets: // The Packet ID is in the same location in the packets. // The version ID is in the same location in the packets. // The database ID is in the same location in the packets. // The outgoing frame counter is in the same location in the packets. // Unfortunately The minor version ID is in different locations // How the frame counter fields are filled is dependant // on the cigi version of the outgoing message and the // whether the outgoing message is a host or ig message // and whether the system is running synchronized Cigi_uint32 *OutgoingMsgWord = (Cigi_uint32 *)OutgoingMsg; Cigi_uint32 *IncomingMsgWord = (Cigi_uint32 *)IncomingMsg; // Determine Outgoing CigiVersion // and frame adjustment method bool FrameIncr = false; bool FrameRcvd = false; CigiVersionID OutVer; OutVer.CigiMajorVersion = (int) *(OutgoingMsg + 2); if(OutVer.CigiMajorVersion < 3) { if((Session->IsHost()) && (Session->IsSynchronous())) FrameRcvd = true; else FrameIncr = true; } else { int tVer = 0; if(Session->IsHost()) { tVer = (int) *(OutgoingMsg + 4); if(Session->IsSynchronous()) FrameRcvd = true; else FrameIncr = true; } else { tVer = (int) *(OutgoingMsg + 5); FrameIncr = true; } OutVer.CigiMinorVersion = (tVer >> 4) & 0x0f; if(OutVer.GetCombinedCigiVersion() >= 0x0302) { FrameIncr = true; FrameRcvd = true; } } int NewFrame = FrameCnt; int RcvdFrame = -1; if(FrameRcvd) { if(IncomingMsg == NULL) RcvdFrame = LastRcvdFrame; else { int InVer = (int) *(IncomingMsg + 2); if(InVer >= 3) { // Get Byte Swap Cigi_uint16 *IncomingMsgShort = (Cigi_uint16 *)IncomingMsg; if(*(IncomingMsgShort + 3) == 0x8000) RcvdFrame = *(IncomingMsgWord + 2); else CigiSwap4(&RcvdFrame,(IncomingMsgWord + 2)); // Swap RcvFrame } else { CIGI_SCOPY4(&RcvdFrame,(IncomingMsgWord + 2)); } } if(!FrameIncr) NewFrame = RcvdFrame; } if(OutVer.CigiMajorVersion < 3) CIGI_SCOPY4((OutgoingMsgWord + 2),&NewFrame); else { *(OutgoingMsgWord + 2) = NewFrame; if(FrameIncr && FrameRcvd) *(OutgoingMsgWord + 4) = RcvdFrame; } FrameCnt++; // increment frame count return(CIGI_SUCCESS); } // ================================================ // UpdateIGCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::UpdateIGCtrl(Cigi_uint8 *OutgoingMsg, Cigi_uint8 *IncomingMsg) { Cigi_int8 *OBufr = NULL; Cigi_int8 *IBufr = NULL; if(OutgoingMsg == NULL) return(CIGI_ERROR_UNEXPECTED_NULL); // Note: For all current CIGI Versions in the // IG Control and Start-Of-Frame packets: // The Packet ID is in the same location in the packets. // The version ID is in the same location in the packets. // The database ID is in the same location in the packets. // The outgoing frame counter is in the same location in the packets. // Update the Frame Counter and possibly the Recieved Frame Counter UpdateFrameCntr(OutgoingMsg,IncomingMsg); // bounds check the Database ID OBufr = (Cigi_int8 *)(OutgoingMsg + 3); if(*OBufr < 0) { *OBufr = 0; // Host sent Database IDs should never be negative } return(CIGI_SUCCESS); } // ================================================ // LockMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::LockMsg() { // Check for a buffer in the Active Buffers list if(Buffers.empty()) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } // Verify there are no buffers locked for transmission if(CrntMsgBuf != NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } // Get the next buffer for transmission // And verify the Session is valid CigiMessageBuffer *ChkMsgBuf = *(Buffers.begin()); if((ChkMsgBuf == NULL) || (Session == NULL)) { #ifndef CIGI_NO_EXCEPT throw CigiNullPointerException(); #endif return(CIGI_ERROR_UNEXPECTED_NULL); } if(!ChkMsgBuf->ValidIGCtrlSOF) { if(Session->IsHost()) { #ifndef CIGI_NO_EXCEPT throw CigiMissingIgControlException(); #endif return(CIGI_ERROR_MISSING_IG_CONTROL_PACKET); } else { #ifndef CIGI_NO_EXCEPT throw CigiMissingStartOfFrameException(); #endif return(CIGI_ERROR_MISSING_SOF_PACKET); } } if( !ChkMsgBuf->Active || ChkMsgBuf->Locked ) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } CrntMsgBuf = ChkMsgBuf; CrntMsgBuf->Locked = true; // Set up next fill buffer the CrntFillBuf and the // CrntMsgBuf are the same. if(CrntFillBuf == CrntMsgBuf) AdvanceBuffer(); return(CIGI_SUCCESS); } // ================================================ // GetMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 * CigiOutgoingMsg::GetMsg(int &length) { Cigi_uint8 * Buff = NULL; length = 0; // Verify that a buffer is ready for transmission if(CrntMsgBuf != NULL) { if((CrntMsgBuf->Active) && (CrntMsgBuf->Locked)) { Buff = CrntMsgBuf->Buffer; length = CrntMsgBuf->BufferFillCnt; } } return(Buff); } // ================================================ // GetBuffer // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 * CigiOutgoingMsg::GetBuffer() { Cigi_uint8 * Buff = NULL; // Verify that a buffer is ready for transmission if(CrntMsgBuf != NULL) { if((CrntMsgBuf->Active) && (CrntMsgBuf->Locked)) Buff = CrntMsgBuf->Buffer; } return(Buff); } // ================================================ // GetMsgLength // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::GetMsgLength() { int length = 0; // Verify that a buffer is ready for transmission if(CrntMsgBuf != NULL) { if((CrntMsgBuf->Active) && (CrntMsgBuf->Locked)) length = CrntMsgBuf->BufferFillCnt; } return(length); } // ================================================ // GetBufferString // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv std::string CigiOutgoingMsg::GetBufferString(void) { Cigi_uint8 *buffer = this->GetBuffer(); int size = this->GetMsgLength(); return std::string(buffer,buffer+size); } // ================================================ // UnlockMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::UnlockMsg() { // Verify there is a current message buffer if(CrntMsgBuf == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } // Verify that the buffer is active and locked if(!CrntMsgBuf->Active || !CrntMsgBuf->Locked) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } // Reset and clear the current buffer CrntMsgBuf->Active = false; CrntMsgBuf->BufferFillCnt = 0; CrntMsgBuf->DataPresent = false; CrntMsgBuf->FillBufferPos = CrntMsgBuf->Buffer; CrntMsgBuf->Locked = false; CrntMsgBuf->ValidIGCtrlSOF = false; // Clear this buffer from the Active Buffers list if(!Buffers.empty()) { if(CrntMsgBuf == *(Buffers.begin())) Buffers.pop_front(); else { list::iterator iBuf; for(iBuf=Buffers.begin();iBuf!=Buffers.end();iBuf++) { if(*iBuf == CrntMsgBuf) { iBuf = Buffers.erase(iBuf); break; } } } } // Add this buffer to the Availible Buffers list AvailBuff.push_back(CrntMsgBuf); // Clear the Current Message Buffer CrntMsgBuf = NULL; return(CIGI_SUCCESS); } // ================================================ // PackageMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::PackageMsg(Cigi_uint8 **Msg, int &length) { *Msg = NULL; length = 0; if(PackagedMsg != NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } int stat = LockMsg(); if(stat == CIGI_SUCCESS) { *Msg = GetMsg(length); if(*Msg != NULL) PackagedMsg = CrntMsgBuf; else stat = CIGI_ERROR_CALLED_OUT_OF_SEQUENCE; } return(stat); } // ================================================ // FreeMsg // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::FreeMsg(void) { if(PackagedMsg == NULL) { #ifndef CIGI_NO_EXCEPT throw CigiCalledOutOfSequenceException(); #endif return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); } int stat = UnlockMsg(); PackagedMsg = NULL; return(stat); } // ================================================ // Reset // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::Reset(void) { CrntMsgBuf = NULL; PackagedMsg = NULL; CrntFillBuf = NULL; list::iterator iBuf; for(iBuf=Buffers.begin();iBuf!=Buffers.end();iBuf++) { (*iBuf)->Active = false; (*iBuf)->BufferFillCnt = 0; (*iBuf)->DataPresent = false; (*iBuf)->FillBufferPos = (*iBuf)->Buffer; (*iBuf)->Locked = false; (*iBuf)->ValidIGCtrlSOF = false; AvailBuff.push_back(*iBuf); } Buffers.clear(); return(CIGI_SUCCESS); } // ================================================ // RegisterUserPacket // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiOutgoingMsg::RegisterUserPacket(CigiBasePacket *Packet, Cigi_uint8 PacketID, bool HostSend, bool IGSend) { int stat = CIGI_ERROR_INVALID_USER_PACKET; if(((PacketID > 199) && (PacketID <= 255)) && (Packet != NULL) && ((HostSend && Session->IsHost()) || (IGSend && Session->IsIG()))) { OutgoingHandlerTbl[PacketID] = Packet; VldSnd[PacketID] = true; stat = CIGI_SUCCESS; } return(stat); } // ================================================ // ClearHandlerTable // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::ClearHandlerTable() { for(int ndx=0;ndx<200;ndx++) { if(OutgoingHandlerTbl[ndx] != (CigiBasePacket *)&DefaultPacket) { delete OutgoingHandlerTbl[ndx]; OutgoingHandlerTbl[ndx] = &DefaultPacket; } VldSnd[ndx] = false; } } // ================================================ // SetOutgoingV1Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetOutgoingHostV1Tbls(void) { OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiIGCtrlV1; VldSnd[CIGI_IG_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiEntityCtrlV1; VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiViewDefV1; VldSnd[CIGI_VIEW_DEF_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiViewCtrlV1; VldSnd[CIGI_VIEW_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiRateCtrlV1; VldSnd[CIGI_RATE_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiSensorCtrlV1; VldSnd[CIGI_SENSOR_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiTrajectoryDefV1; VldSnd[CIGI_TRAJECTORY_DEF_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiWeatherCtrlV1; VldSnd[CIGI_WEATHER_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiCollDetSegDefV1; VldSnd[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosSegReqV1; VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosVectReqV1; VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_HAT_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiHatReqV1; VldSnd[CIGI_HAT_REQ_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiEnvCtrlV1; VldSnd[CIGI_ENV_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiSpecEffDefV1; VldSnd[CIGI_SPEC_EFF_DEF_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiArtPartCtrlV1; VldSnd[CIGI_ART_PART_CTRL_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiCompCtrlV1; VldSnd[CIGI_COMP_CTRL_PACKET_ID_V1] = true; } // ================================================ // SetOutgoingV1Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetOutgoingIGV1Tbls(void) { OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V1] = (CigiBasePacket *) new CigiSOFV1; VldSnd[CIGI_SOF_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiCollDetSegRespV1; VldSnd[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiSensorRespV1; VldSnd[CIGI_SENSOR_RESP_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosRespV1; VldSnd[CIGI_LOS_RESP_PACKET_ID_V1] = true; OutgoingHandlerTbl[CIGI_HAT_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiHatRespV1; VldSnd[CIGI_HAT_RESP_PACKET_ID_V1] = true; } // ================================================ // SetOutgoingV2Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetOutgoingHostV2Tbls(void) { OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiIGCtrlV2; VldSnd[CIGI_IG_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiEntityCtrlV2; VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiViewDefV2; VldSnd[CIGI_VIEW_DEF_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiViewCtrlV2; VldSnd[CIGI_VIEW_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiRateCtrlV2; VldSnd[CIGI_RATE_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiSensorCtrlV2; VldSnd[CIGI_SENSOR_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiTrajectoryDefV2; VldSnd[CIGI_TRAJECTORY_DEF_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiWeatherCtrlV2; VldSnd[CIGI_WEATHER_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetSegDefV2; VldSnd[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosSegReqV2; VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosVectReqV2; VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_HAT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiHatReqV2; VldSnd[CIGI_HAT_REQ_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_HOT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiHotReqV2; VldSnd[CIGI_HOT_REQ_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiEnvCtrlV2; VldSnd[CIGI_ENV_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiSpecEffDefV2; VldSnd[CIGI_SPEC_EFF_DEF_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiArtPartCtrlV2; VldSnd[CIGI_ART_PART_CTRL_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetVolDefV2; VldSnd[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiCompCtrlV2; VldSnd[CIGI_COMP_CTRL_PACKET_ID_V2] = true; } // ================================================ // SetOutgoingV2Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetOutgoingIGV2Tbls(void) { OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V2] = (CigiBasePacket *) new CigiSOFV2; VldSnd[CIGI_SOF_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetSegRespV2; VldSnd[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiSensorRespV2; VldSnd[CIGI_SENSOR_RESP_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosRespV2; VldSnd[CIGI_LOS_RESP_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_HAT_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiHatRespV2; VldSnd[CIGI_HAT_RESP_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_HOT_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiHotRespV2; VldSnd[CIGI_HOT_RESP_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetVolRespV2; VldSnd[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2] = true; OutgoingHandlerTbl[CIGI_IG_MSG_PACKET_ID_V2] = (CigiBasePacket *) new CigiIGMsgV2; VldSnd[CIGI_IG_MSG_PACKET_ID_V2] = true; } // ================================================ // SetOutgoingV3Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetOutgoingHostV3Tbls(void) { if(OutgoingVersion.CigiMinorVersion >= 2) { if(OutgoingVersion.CigiMinorVersion >= 3) { OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiIGCtrlV3_3; VldSnd[CIGI_IG_CTRL_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiEntityCtrlV3_3; VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolSurfaceDefV3_3; VldSnd[CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCtrlV3_3; VldSnd[CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiShortSymbolCtrlV3_3; VldSnd[CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolTextDefV3_3; VldSnd[CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCircleDefV3_3; VldSnd[CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolLineDefV3_3; VldSnd[CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SYMBOL_CLONE_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCloneV3_3; VldSnd[CIGI_SYMBOL_CLONE_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiCompCtrlV3_3; VldSnd[CIGI_COMP_CTRL_PACKET_ID_V3_3] = true; OutgoingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiShortCompCtrlV3_3; VldSnd[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3] = true; } else { OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3_2] = (CigiBasePacket *) new CigiIGCtrlV3_2; VldSnd[CIGI_IG_CTRL_PACKET_ID_V3_2] = true; OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEntityCtrlV3; VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCompCtrlV3; VldSnd[CIGI_COMP_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortCompCtrlV3; VldSnd[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = true; } OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiRateCtrlV3_2; VldSnd[CIGI_RATE_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotReqV3_2; VldSnd[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosSegReqV3_2; VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosVectReqV3_2; VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = true; } else { OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiIGCtrlV3; VldSnd[CIGI_IG_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEntityCtrlV3; VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiRateCtrlV3; VldSnd[CIGI_RATE_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotReqV3; VldSnd[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosSegReqV3; VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosVectReqV3; VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCompCtrlV3; VldSnd[CIGI_COMP_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortCompCtrlV3; VldSnd[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = true; } OutgoingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiViewDefV3; VldSnd[CIGI_VIEW_DEF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiViewCtrlV3; VldSnd[CIGI_VIEW_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorCtrlV3; VldSnd[CIGI_SENSOR_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiTrajectoryDefV3; VldSnd[CIGI_TRAJECTORY_DEF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiWeatherCtrlV3; VldSnd[CIGI_WEATHER_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetSegDefV3; VldSnd[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_ATMOS_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiAtmosCtrlV3; VldSnd[CIGI_ATMOS_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_CELESTIAL_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCelestialCtrlV3; VldSnd[CIGI_CELESTIAL_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiArtPartCtrlV3; VldSnd[CIGI_ART_PART_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetVolDefV3; VldSnd[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortArtPartCtrlV3; VldSnd[CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiConfClampEntityCtrlV3; VldSnd[CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiMaritimeSurfaceCtrlV3; VldSnd[CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_ENV_RGN_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEnvRgnCtrlV3; VldSnd[CIGI_ENV_RGN_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiTerrestrialSurfaceCtrlV3; VldSnd[CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiMotionTrackCtrlV3; VldSnd[CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_EARTH_MODEL_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiEarthModelDefV3; VldSnd[CIGI_EARTH_MODEL_DEF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_POSITION_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiPositionReqV3; VldSnd[CIGI_POSITION_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_ENV_COND_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiEnvCondReqV3; VldSnd[CIGI_ENV_COND_REQ_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_WAVE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiWaveCtrlV3; VldSnd[CIGI_WAVE_CTRL_PACKET_ID_V3] = true; } // ================================================ // SetOutgoingV3Tbls // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv void CigiOutgoingMsg::SetOutgoingIGV3Tbls(void) { if(OutgoingVersion.CigiMinorVersion >= 2) { OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V3] = (CigiBasePacket *) new CigiSOFV3_2; VldSnd[CIGI_SOF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosRespV3_2; VldSnd[CIGI_LOS_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosXRespV3_2; VldSnd[CIGI_LOS_XRESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotRespV3_2; VldSnd[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotXRespV3_2; VldSnd[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = true; } else { OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V3] = (CigiBasePacket *) new CigiSOFV3; VldSnd[CIGI_SOF_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosRespV3; VldSnd[CIGI_LOS_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosXRespV3; VldSnd[CIGI_LOS_XRESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotRespV3; VldSnd[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotXRespV3; VldSnd[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = true; } OutgoingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetSegRespV3; VldSnd[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorRespV3; VldSnd[CIGI_SENSOR_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_SENSOR_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorXRespV3; VldSnd[CIGI_SENSOR_XRESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetVolRespV3; VldSnd[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_POSITION_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiPositionRespV3; VldSnd[CIGI_POSITION_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_WEATHER_COND_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiWeatherCondRespV3; VldSnd[CIGI_WEATHER_COND_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_AEROSOL_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiAerosolRespV3; VldSnd[CIGI_AEROSOL_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiMaritimeSurfaceRespV3; VldSnd[CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiTerrestrialSurfaceRespV3; VldSnd[CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_ANIMATION_STOP_PACKET_ID_V3] = (CigiBasePacket *) new CigiAnimationStopV3; VldSnd[CIGI_ANIMATION_STOP_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_EVENT_NOTIFICATION_PACKET_ID_V3] = (CigiBasePacket *) new CigiEventNotificationV3; VldSnd[CIGI_EVENT_NOTIFICATION_PACKET_ID_V3] = true; OutgoingHandlerTbl[CIGI_IG_MSG_PACKET_ID_V3] = (CigiBasePacket *) new CigiIGMsgV3; VldSnd[CIGI_IG_MSG_PACKET_ID_V3] = true; } cigi-ccl-3.3.3a+svn818/source/CigiPositionReqV3.cpp000066400000000000000000000103661210750432300216660ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiPositionReqV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiPositionReqV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiPositionReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiPositionReqV3::CigiPositionReqV3() { PacketID = CIGI_POSITION_REQ_PACKET_ID_V3; PacketSize = CIGI_POSITION_REQ_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ObjectID = 0; ArtPartID = 0; UpdateMode = OneShot; ObjectClass = Entity; CoordSys = Geodetic; } // ================================================ // ~CigiPositionReqV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiPositionReqV3::~CigiPositionReqV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiPositionReqV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBasePositionReq * Data = ( CigiBasePositionReq *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ObjectID; *CDta.c++ = Data->ArtPartID; Cigi_uint8 HDta = Data->UpdateMode & 0x01; HDta |= (Data->ObjectClass << 1) & 0x0e; HDta |= (Data->CoordSys << 4) & 0x30; *CDta.c++ = HDta; *CDta.s++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiPositionReqV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) ObjectID = *CDta.s++; else CigiSwap2(&ObjectID, CDta.s++); ArtPartID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; UpdateMode = (UpdateModeGrp)(HDta & 0x01); ObjectClass = (ObjectClassGrp)((HDta >> 1) & 0x07); CoordSys = (CoordSysGrp)((HDta >> 4) & 0x03); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiPositionRespV3.cpp000066400000000000000000000120351210750432300220430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiPositionRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiPositionRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiPositionRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiPositionRespV3::CigiPositionRespV3() { PacketID = CIGI_POSITION_RESP_PACKET_ID_V3; PacketSize = CIGI_POSITION_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ObjectID = 0; ArtPartID = 0; ObjectClass = Entity; CoordSys = Geodetic; LatOrXoff = 0.0; LonOrYoff = 0.0; AltOrZoff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiPositionRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiPositionRespV3::~CigiPositionRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiPositionRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBasePositionResp * Data = ( CigiBasePositionResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ObjectID; *CDta.c++ = Data->ArtPartID; Cigi_uint8 HDta = Data->ObjectClass & 0x07; HDta |= (Data->CoordSys << 3) & 0x18; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.d++ = Data->LatOrXoff; *CDta.d++ = Data->LonOrYoff; *CDta.d++ = Data->AltOrZoff; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Yaw; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiPositionRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { ObjectID = *CDta.s++; ArtPartID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; ObjectClass = (ObjectClassGrp)(HDta & 0x07); CoordSys = (CoordSysGrp)((HDta >> 3) & 0x03); CDta.s++; LatOrXoff = *CDta.d++; LonOrYoff = *CDta.d++; AltOrZoff = *CDta.d++; Roll = *CDta.f++; Pitch = *CDta.f++; Yaw = *CDta.f++; } else { CigiSwap2(&ObjectID, CDta.s++); ArtPartID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; ObjectClass = (ObjectClassGrp)(HDta & 0x07); CoordSys = (CoordSysGrp)((HDta >> 3) & 0x03); CDta.s++; CigiSwap8(&LatOrXoff, CDta.d++); CigiSwap8(&LonOrYoff, CDta.d++); CigiSwap8(&AltOrZoff, CDta.d++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Yaw, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiRateCtrlV1.cpp000066400000000000000000000136041210750432300211260ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  CoordSys member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the CoordSys member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiRateCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiRateCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV1::CigiRateCtrlV1() { PacketID = CIGI_RATE_CTRL_PACKET_ID_V1; PacketSize = CIGI_RATE_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ApplyToArtPart = false; CoordSys = Local; XRate = 0.0; YRate = 0.0; ZRate = 0.0; RollRate = 0.0; PitchRate = 0.0; YawRate = 0.0; } // ================================================ // ~CigiRateCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV1::~CigiRateCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseRateCtrl * Data = ( CigiBaseRateCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); *CDta.c++ = Data->ArtPartIDV1; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.f++, &Data->XRate); CIGI_SCOPY4(CDta.f++, &Data->YRate); CIGI_SCOPY4(CDta.f++, &Data->ZRate); CIGI_SCOPY4(CDta.f++, &Data->RollRate); CIGI_SCOPY4(CDta.f++, &Data->PitchRate); CIGI_SCOPY4(CDta.f++, &Data->YawRate); memcpy(Buff,tBuf,CIGI_RATE_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; PackPointer CDta; memcpy(tBuf,Buff,CIGI_RATE_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); ArtPartIDV1 = *CDta.c++; CDta.c += 3; CIGI_SCOPY4(&XRate, CDta.f++); CIGI_SCOPY4(&YRate, CDta.f++); CIGI_SCOPY4(&ZRate, CDta.f++); CIGI_SCOPY4(&RollRate, CDta.f++); CIGI_SCOPY4(&PitchRate, CDta.f++); CIGI_SCOPY4(&YawRate, CDta.f++); if(ArtPartIDV1 == -1) { ApplyToArtPart = false; ArtPartIDV3 = 0; } else { ApplyToArtPart = true; ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; } CoordSys = Local; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV1::SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV1 = ArtPartIDIn; if(ArtPartIDV1 == -1) { ApplyToArtPart = false; ArtPartIDV3 = 0; } else { ApplyToArtPart = true; ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; } return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiRateCtrlV2.cpp000066400000000000000000000136041210750432300211270ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  CoordSys member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the CoordSys member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiRateCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiRateCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV2::CigiRateCtrlV2() { PacketID = CIGI_RATE_CTRL_PACKET_ID_V2; PacketSize = CIGI_RATE_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ApplyToArtPart = false; CoordSys = Local; XRate = 0.0; YRate = 0.0; ZRate = 0.0; RollRate = 0.0; PitchRate = 0.0; YawRate = 0.0; } // ================================================ // ~CigiRateCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV2::~CigiRateCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseRateCtrl * Data = ( CigiBaseRateCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); *CDta.c++ = Data->ArtPartIDV1; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.f++, &Data->XRate); CIGI_SCOPY4(CDta.f++, &Data->YRate); CIGI_SCOPY4(CDta.f++, &Data->ZRate); CIGI_SCOPY4(CDta.f++, &Data->RollRate); CIGI_SCOPY4(CDta.f++, &Data->PitchRate); CIGI_SCOPY4(CDta.f++, &Data->YawRate); memcpy(Buff,tBuf,CIGI_RATE_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; PackPointer CDta; memcpy(tBuf,Buff,CIGI_RATE_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); ArtPartIDV1 = *CDta.c++; CDta.c += 3; CIGI_SCOPY4(&XRate, CDta.f++); CIGI_SCOPY4(&YRate, CDta.f++); CIGI_SCOPY4(&ZRate, CDta.f++); CIGI_SCOPY4(&RollRate, CDta.f++); CIGI_SCOPY4(&PitchRate, CDta.f++); CIGI_SCOPY4(&YawRate, CDta.f++); if(ArtPartIDV1 == -1) { ApplyToArtPart = false; ArtPartIDV3 = 0; } else { ApplyToArtPart = true; ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; } CoordSys = Local; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV2::SetArtPartID(const Cigi_int8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV1 = ArtPartIDIn; if(ArtPartIDV1 == -1) { ApplyToArtPart = false; ArtPartIDV3 = 0; } else { ApplyToArtPart = true; ArtC.c = ArtPartIDV1; ArtPartIDV3 = ArtC.uc; } return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiRateCtrlV3.cpp000066400000000000000000000144431210750432300211320ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  CoordSys member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the CoordSys member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiRateCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiRateCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV3::CigiRateCtrlV3() { PacketID = CIGI_RATE_CTRL_PACKET_ID_V3; PacketSize = CIGI_RATE_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ApplyToArtPart = false; CoordSys = Local; XRate = 0.0; YRate = 0.0; ZRate = 0.0; RollRate = 0.0; PitchRate = 0.0; YawRate = 0.0; } // ================================================ // ~CigiRateCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV3::~CigiRateCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseRateCtrl * Data = ( CigiBaseRateCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->ArtPartIDV3; Cigi_uint8 HDta = 0; if(Data->ApplyToArtPart) HDta = 0x01; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.f++ = Data->XRate; *CDta.f++ = Data->YRate; *CDta.f++ = Data->ZRate; *CDta.f++ = Data->RollRate; *CDta.f++ = Data->PitchRate; *CDta.f++ = Data->YawRate; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; ArtPartIDV3 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ApplyToArtPart = ((HDta & 0x01) != 0); CDta.s++; XRate = *CDta.f++; YRate = *CDta.f++; ZRate = *CDta.f++; RollRate = *CDta.f++; PitchRate = *CDta.f++; YawRate = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); ArtPartIDV3 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ApplyToArtPart = ((HDta & 0x01) != 0); CDta.s++; CigiSwap4(&XRate, CDta.f++); CigiSwap4(&YRate, CDta.f++); CigiSwap4(&ZRate, CDta.f++); CigiSwap4(&RollRate, CDta.f++); CigiSwap4(&PitchRate, CDta.f++); CigiSwap4(&YawRate, CDta.f++); } if(ApplyToArtPart) { ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; } else ArtPartIDV1 = -1; CoordSys = Local; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3::SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV3 = ArtPartIDIn; if(ApplyToArtPart) { ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; } else ArtPartIDV1 = -1; return(CIGI_SUCCESS); } // ================================================ // SetApplyToArtPart // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3::SetApplyToArtPart(const bool ApplyToArtPartIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ApplyToArtPart = ApplyToArtPartIn; if(ApplyToArtPart) { ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; } else ArtPartIDV1 = -1; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiRateCtrlV3_2.cpp000066400000000000000000000145401210750432300213510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiRateCtrlV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/14/2006 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Fixed Version Number.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiRateCtrlV3_2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiRateCtrlV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV3_2::CigiRateCtrlV3_2() { PacketID = CIGI_RATE_CTRL_PACKET_ID_V3_2; PacketSize = CIGI_RATE_CTRL_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; EntityID = 0; ArtPartIDV1 = 0; ArtPartIDV3 = 0; ApplyToArtPart = false; CoordSys = Local; XRate = 0.0; YRate = 0.0; ZRate = 0.0; RollRate = 0.0; PitchRate = 0.0; YawRate = 0.0; } // ================================================ // ~CigiRateCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiRateCtrlV3_2::~CigiRateCtrlV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseRateCtrl * Data = ( CigiBaseRateCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->ArtPartIDV3; Cigi_uint8 HDta = 0; if(Data->ApplyToArtPart) HDta = 0x01; if(Data->CoordSys == Local) HDta |= 0x02; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.f++ = Data->XRate; *CDta.f++ = Data->YRate; *CDta.f++ = Data->ZRate; *CDta.f++ = Data->RollRate; *CDta.f++ = Data->PitchRate; *CDta.f++ = Data->YawRate; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; ArtPartIDV3 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ApplyToArtPart = ((HDta & 0x01) != 0); CoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); CDta.s++; XRate = *CDta.f++; YRate = *CDta.f++; ZRate = *CDta.f++; RollRate = *CDta.f++; PitchRate = *CDta.f++; YawRate = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); ArtPartIDV3 = *CDta.c++; Cigi_uint16 HDta = *CDta.c++; ApplyToArtPart = ((HDta & 0x01) != 0); CoordSys = (CoordSysGrp)((HDta >> 1) & 0x01); CDta.s++; CigiSwap4(&XRate, CDta.f++); CigiSwap4(&YRate, CDta.f++); CigiSwap4(&ZRate, CDta.f++); CigiSwap4(&RollRate, CDta.f++); CigiSwap4(&PitchRate, CDta.f++); CigiSwap4(&YawRate, CDta.f++); } if(ApplyToArtPart) { ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; } else ArtPartIDV1 = -1; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetArtPartID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3_2::SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ArtPartIDV3 = ArtPartIDIn; if(ApplyToArtPart) { ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; } else ArtPartIDV1 = -1; return(CIGI_SUCCESS); } // ================================================ // SetApplyToArtPart // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3_2::SetApplyToArtPart(const bool ApplyToArtPartIn, bool bndchk) { union ArtPartConv { Cigi_uint8 uc; Cigi_int8 c; } ArtC; ApplyToArtPart = ApplyToArtPartIn; if(ApplyToArtPart) { ArtC.uc = ArtPartIDV3; ArtPartIDV1 = ArtC.c; } else ArtPartIDV1 = -1; return(CIGI_SUCCESS); } // ================================================ // SrcCoordSys // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiRateCtrlV3_2::SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CoordSysIn < 0)||(CoordSysIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CoordSys",(CoordSysGrp)CoordSysIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CoordSys = CoordSysIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSOFV1.cpp000066400000000000000000000110001210750432300200210ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  LastRcvdHostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the LastRcvdHostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSOFV1.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSOFV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV1::CigiSOFV1() { PacketID = CIGI_SOF_PACKET_ID_V1; PacketSize = CIGI_SOF_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TimestampValid = false; EarthRefModel = WGS84; LastRcvdHostFrame = 0; } // ================================================ // ~CigiSOFV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV1::~CigiSOFV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseSOF *Data = ( CigiBaseSOF *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Version; *CDta.b++ = Data->DatabaseID; *CDta.c++ = Data->IGStatus; Cigi_uint8 HDta = (Cigi_uint8)((Data->IGMode << 6) & 0xc0); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.l++, &Data->FrameCntr); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; IGStatus = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)((HDta >> 6) & 0x03); CDta.s++; CIGI_SCOPY4(&FrameCntr,CDta.l++); LastRcvdHostFrame = FrameCntr; // Timestamp & timestamp valid are not handled in this version. Swap = false; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSOFV2.cpp000066400000000000000000000122761210750432300200420ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  LastRcvdHostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the LastRcvdHostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSOFV2.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSOFV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV2::CigiSOFV2() { PacketID = CIGI_SOF_PACKET_ID_V2; PacketSize = CIGI_SOF_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TimestampValid = false; EarthRefModel = WGS84; LastRcvdHostFrame = 0; } // ================================================ // ~CigiSOFV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV2::~CigiSOFV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseSOF *Data = ( CigiBaseSOF *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Version; *CDta.b++ = Data->DatabaseID; *CDta.c++ = Data->IGStatus; Cigi_uint8 HDta = (Cigi_uint8)((Data->IGMode << 6) & 0xc0); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.l++, &Data->FrameCntr); CIGI_SCOPY4(CDta.f++, &Data->TimeStampV2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; IGStatus = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)((HDta >> 6) & 0x03); CDta.s++; CIGI_SCOPY4(&FrameCntr,CDta.l++); CIGI_SCOPY4(&TimeStampV2,CDta.f++); TimeStampV3 = ((Cigi_uint32)TimeStampV2) / 10; LastRcvdHostFrame = FrameCntr; Swap = false; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV2::SetTimeStamp(const float TimeStamp, bool bndchk) { TimeStampV2 = TimeStamp; TimeStampV3 = ((Cigi_uint32)TimeStampV2) / 10; TimestampValid = true; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSOFV3.cpp000066400000000000000000000143401210750432300200350ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion and 
 *  LastRcvdHostFrame member variables.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the Unpack method to set the LastRcvdHostFrame member variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  01/22/2007 Greg Basler                       Version 1.7.5
 *  Corrected a bug noted by C. Schroeder.  When byteswapping, the
 *  Unpack() method now unpacks the CIGI Version 3 timestamp not the
 *  version 2 timestamp.
 *  
 *  06/18/2008 Greg Basler                       Version 2.2.0
 *  Corrected a bug noted on SourceForge.  When byteswapping, the
 *  Unpack() method now unpacks on unsigned long CIGI Version 3
 *  timestamp not the float timestamp.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSOFV3.h" #include "CigiExceptions.h" #include "CigiSwapping.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSOFV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV3::CigiSOFV3() { PacketID = CIGI_SOF_PACKET_ID_V3; PacketSize = CIGI_SOF_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TimestampValid = false; EarthRefModel = WGS84; LastRcvdHostFrame = 0; } // ================================================ // ~CigiSOFV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV3::~CigiSOFV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseSOF *Data = ( CigiBaseSOF *) Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Version; *CDta.b++ = Data->DatabaseID; *CDta.c++ = Data->IGStatus; Cigi_uint8 HDta = (Data->TimestampValid) ? 0x04 : 0; HDta |= (Cigi_uint8)(Data->IGMode & 0x03); HDta |= (Cigi_uint8)((Data->EarthRefModel << 3) & 0x08); *CDta.c++ = HDta; *CDta.s++ = 0x8000; // Byte Swap *CDta.l++ = Data->FrameCntr; *CDta.l++ = Data->TimeStampV3; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; IGStatus = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)(HDta & 0x03); EarthRefModel = (EarthRefModelGrp)((HDta >> 3) & 0x01); TimestampValid = ((HDta & 0x04) != 0); ByteSwap = *CDta.s++; BSwapEn = (ByteSwap == 0x0080); if(!BSwapEn) { FrameCntr = *CDta.l++; TimeStampV3 = *CDta.l++; } else { CigiSwap4(&FrameCntr,CDta.l++); CigiSwap4(&TimeStampV3,CDta.l++); } TimeStampV2 = ((float)TimeStampV3) * 10.0f; LastRcvdHostFrame = FrameCntr; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3::SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk) { TimeStampV3 = TimeStamp; TimeStampV2 = ((float)TimeStampV3) * 10.0f; return(CIGI_SUCCESS); } // ================================================ // SetEarthRefModel // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3::SetEarthRefModel(const EarthRefModelGrp EarthRefModelIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EarthRefModelIn < 0)||(EarthRefModelIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EarthRefModel",EarthRefModelIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif EarthRefModel = EarthRefModelIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSOFV3_2.cpp000066400000000000000000000144101210750432300202540ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSOFV3_2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/14/2006 Greg Basler                       Version 1.7
 *  Initial Release for CIGI 3.2 compatibility.
 *  Based on CigiSOFV3.cpp"
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  08/11/2006 Greg Basler                       Version 1.7.3
 *  Corrected the packing routine so that the Minor Version number is
 *  is packed from the packing object (a CigiSOFV3_2 object in this case)
 *  not the object with the user filled data.  This will put the correct
 *  Minor Version number in the ig to host message.
 *  
 *  01/22/2007 Greg Basler                       Version 1.7.5
 *  Corrected a bug noted by C. Schroeder.  When byteswapping, the
 *  Unpack() method now unpacks the CIGI Version 3 timestamp not the
 *  version 2 timestamp.
 *  
 *  06/18/2008 Greg Basler                       Version 2.2.0
 *  Corrected a bug noted on SourceForge.  When byteswapping, the
 *  Unpack() method now unpacks on unsigned long CIGI Version 3
 *  timestamp not the float timestamp.
 *
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSOFV3_2.h" #include "CigiExceptions.h" #include "CigiSwapping.h" #include "CigiVersionID.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSOFV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV3_2::CigiSOFV3_2() { PacketID = CIGI_SOF_PACKET_ID_V3_2; PacketSize = CIGI_SOF_PACKET_SIZE_V3_2; Version = 3; MinorVersion = 2; BSwapEn = false; DatabaseID = 0; FrameCntr = 0; TimeStampV2 = 0.0f; TimeStampV3 = 0; ByteSwap = 0x8000; IGMode = Standby; TimestampValid = false; EarthRefModel = WGS84; LastRcvdHostFrame = 0; } // ================================================ // ~CigiSOFV3_2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSOFV3_2::~CigiSOFV3_2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3_2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiVersionID PackingVer = *((CigiVersionID *)Spec); CigiBaseSOF *Data = ( CigiBaseSOF *) Base; if(PackingVer.GetCombinedCigiVersion() < 0x0302) PackingVer.SetCigiVersion(3,2); CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = PackingVer.CigiMajorVersion; *CDta.b++ = Data->DatabaseID; *CDta.c++ = Data->IGStatus; Cigi_uint8 HDta = (PackingVer.CigiMinorVersion << 4) & 0xf0; HDta |= (Data->TimestampValid) ? 0x04 : 0; HDta |= (Cigi_uint8)(Data->IGMode & 0x03); HDta |= (Cigi_uint8)((Data->EarthRefModel << 3) & 0x08); *CDta.c++ = HDta; *CDta.s++ = 0x8000; // Byte Swap *CDta.l++ = Data->FrameCntr; *CDta.l++ = Data->TimeStampV3; *CDta.l++ = Data->LastRcvdHostFrame; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3_2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 3; DatabaseID = *CDta.b++; IGStatus = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; IGMode = (IGModeGrp)(HDta & 0x03); EarthRefModel = (EarthRefModelGrp)((HDta >> 3) & 0x01); TimestampValid = ((HDta & 0x04) != 0); ByteSwap = *CDta.s++; BSwapEn = (ByteSwap == 0x0080); if(!BSwapEn) { FrameCntr = *CDta.l++; TimeStampV3 = *CDta.l++; LastRcvdHostFrame = *CDta.l++; } else { CigiSwap4(&FrameCntr,CDta.l++); CigiSwap4(&TimeStampV3,CDta.l++); CigiSwap4(&LastRcvdHostFrame,CDta.l++); } TimeStampV2 = ((float)TimeStampV3) * 10.0f; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetTimeStamp // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3_2::SetTimeStamp(const Cigi_uint32 TimeStamp, bool bndchk) { TimeStampV3 = TimeStamp; TimeStampV2 = ((float)TimeStampV3) * 10.0f; return(CIGI_SUCCESS); } // ================================================ // SetEarthRefModel // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSOFV3_2::SetEarthRefModel(const EarthRefModelGrp EarthRefModelIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((EarthRefModelIn < 0)||(EarthRefModelIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("EarthRefModel",EarthRefModelIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif EarthRefModel = EarthRefModelIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSensorCtrlV1.cpp000066400000000000000000000156651210750432300215150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorCtrlV1::CigiSensorCtrlV1() { PacketID = CIGI_SENSOR_CTRL_PACKET_ID_V1; PacketSize = CIGI_SENSOR_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorOn = false; Polarity = WhiteHot; LineDropEn = false; TrackMode = TrackOff; AutoGainEn = false; TrackPolarity = TrackWhite; ResponseType = GatePos; Gain = 0.0; Level = 0.0; ACCoupling = 0.0; Noise = 0.0; } // ================================================ // ~CigiSensorCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorCtrlV1::~CigiSensorCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint16 tViewID; float tGain; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseSensorCtrl * Data = ( CigiBaseSensorCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; tViewID = Data->ViewID; if(tViewID > 31) tViewID = 31; Cigi_uint8 HDta = (Cigi_uint8)tViewID << 3; if(Data->SensorOn) HDta |= 0x04; if(Data->Polarity == BlackHot) HDta |= 0x02; if(Data->LineDropEn) HDta |= 0x01; *CDta.c++ = HDta; *CDta.c++ = Data->SensorID; HDta = (Cigi_uint8)(Data->TrackMode << 4); if(Data->AutoGainEn) HDta |= 0x08; if(Data->TrackPolarity == TrackBlack) HDta |= 0x04; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; tGain = 100.0f * Data->Gain; // convert from std gain to CIGI 1 gain. CIGI_SCOPY4(CDta.f++, &tGain); CIGI_SCOPY4(CDta.f++, &Data->Level); CIGI_SCOPY4(CDta.f++, &Data->ACCoupling); CIGI_SCOPY4(CDta.f++, &Data->Noise); memcpy(Buff,tBuf,CIGI_SENSOR_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; float tGain; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_SENSOR_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint8)((HDta >> 3) & 0x1f); SensorOn = ((HDta & 0x04) != 0); Polarity = (PolarityGrp)((HDta >> 1) & 0x01); LineDropEn = ((HDta & 0x01) != 0); SensorID = *CDta.c++; HDta = *CDta.c++; TrackMode = (TrackModeGrp)((HDta >> 4) & 0x0f); AutoGainEn = ((HDta & 0x08) != 0); TrackPolarity = (TrackPolarityGrp)((HDta >> 2) & 0x01); CDta.c += 3; CIGI_SCOPY4(&tGain, CDta.f++); Gain = tGain / 100.0f; // convert from CIGI 1 gain to standard gain. CIGI_SCOPY4(&Level, CDta.f++); CIGI_SCOPY4(&ACCoupling, CDta.f++); CIGI_SCOPY4(&Noise, CDta.f++); ResponseType = GatePos; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV1::SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = ViewIDIn; return(CIGI_SUCCESS); } // ================================================ // Gain // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV1::SetGain(const float GainIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GainIn < 0.0)||(GainIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Gain",(float)GainIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif // convert CIGI 1 gain to standard gain Gain = GainIn / 100.0f; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSensorCtrlV2.cpp000066400000000000000000000153161210750432300215070ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorCtrlV2::CigiSensorCtrlV2() { PacketID = CIGI_SENSOR_CTRL_PACKET_ID_V2; PacketSize = CIGI_SENSOR_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorOn = false; Polarity = WhiteHot; LineDropEn = false; TrackMode = TrackOff; AutoGainEn = false; TrackPolarity = TrackWhite; ResponseType = GatePos; Gain = 0.0; Level = 0.0; ACCoupling = 0.0; Noise = 0.0; } // ================================================ // ~CigiSensorCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorCtrlV2::~CigiSensorCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint16 tViewID; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseSensorCtrl * Data = ( CigiBaseSensorCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; tViewID = Data->ViewID; if(tViewID > 31) tViewID = 31; Cigi_uint8 HDta = (Cigi_uint8)tViewID << 3; if(Data->SensorOn) HDta |= 0x04; if(Data->Polarity == BlackHot) HDta |= 0x02; if(Data->LineDropEn) HDta |= 0x01; *CDta.c++ = HDta; *CDta.c++ = Data->SensorID; HDta = (Cigi_uint8)(Data->TrackMode << 4); if(Data->AutoGainEn) HDta |= 0x08; if(Data->TrackPolarity == TrackBlack) HDta |= 0x04; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.f++, &Data->Gain); CIGI_SCOPY4(CDta.f++, &Data->Level); CIGI_SCOPY4(CDta.f++, &Data->ACCoupling); CIGI_SCOPY4(CDta.f++, &Data->Noise); memcpy(Buff,tBuf,CIGI_SENSOR_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_SENSOR_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint8)((HDta >> 3) & 0x1f); SensorOn = ((HDta & 0x04) != 0); Polarity = (PolarityGrp)((HDta >> 1) & 0x01); LineDropEn = ((HDta & 0x01) != 0); SensorID = *CDta.c++; HDta = *CDta.c++; TrackMode = (TrackModeGrp)((HDta >> 4) & 0x0f); AutoGainEn = ((HDta & 0x08) != 0); TrackPolarity = (TrackPolarityGrp)((HDta >> 2) & 0x01); CDta.c += 3; CIGI_SCOPY4(&Gain, CDta.f++); CIGI_SCOPY4(&Level, CDta.f++); CIGI_SCOPY4(&ACCoupling, CDta.f++); CIGI_SCOPY4(&Noise, CDta.f++); ResponseType = GatePos; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // SetViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV2::SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = ViewIDIn; return(CIGI_SUCCESS); } // ================================================ // Gain // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV2::SetGain(const float GainIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GainIn < 0.0)||(GainIn > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Gain",(float)GainIn,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Gain = GainIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSensorCtrlV3.cpp000066400000000000000000000154201210750432300215040ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  02/20/2006 Greg Basler                       Version 1.6.0
 *  Corrected the unpacking of the polarity flag.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorCtrlV3::CigiSensorCtrlV3() { PacketID = CIGI_SENSOR_CTRL_PACKET_ID_V3; PacketSize = CIGI_SENSOR_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorOn = false; Polarity = WhiteHot; LineDropEn = false; TrackMode = TrackOff; AutoGainEn = false; TrackPolarity = TrackWhite; ResponseType = GatePos; Gain = 0.0; Level = 0.0; ACCoupling = 0.0; Noise = 0.0; } // ================================================ // ~CigiSensorCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorCtrlV3::~CigiSensorCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseSensorCtrl * Data = ( CigiBaseSensorCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ViewID; *CDta.c++ = Data->SensorID; Cigi_uint8 HDta = (Cigi_uint8)(Data->TrackMode << 5); if(Data->TrackPolarity == TrackBlack) HDta |= 0x10; if(Data->AutoGainEn) HDta |= 0x08; if(Data->LineDropEn) HDta |= 0x04; if(Data->Polarity == BlackHot) HDta |= 0x02; if(Data->SensorOn) HDta |= 0x01; *CDta.c++ = HDta; *CDta.c++ = (Cigi_uint8)(Data->ResponseType & 0x01); *CDta.c++ = 0; *CDta.f++ = Data->Gain; *CDta.f++ = Data->Level; *CDta.f++ = Data->ACCoupling; *CDta.f++ = Data->Noise; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { ViewID = *CDta.s++; SensorID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SensorOn = ((HDta & 0x01) != 0); Polarity = (PolarityGrp)((HDta >> 1) & 0x01); LineDropEn = ((HDta & 0x04) != 0); AutoGainEn = ((HDta & 0x08) != 0); TrackPolarity = (TrackPolarityGrp)((HDta >> 4) & 0x01); TrackMode = (TrackModeGrp)((HDta >> 5) & 0x07); HDta = *CDta.c++; ResponseType = (ResponseTypeGrp)(HDta & 0x01); CDta.c++; Gain = *CDta.f++; Level = *CDta.f++; ACCoupling = *CDta.f++; Noise = *CDta.f++; } else { CigiSwap2(&ViewID, CDta.s++); SensorID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SensorOn = ((HDta & 0x01) != 0); Polarity = (PolarityGrp)((HDta >> 1) & 0x01); LineDropEn = ((HDta & 0x04) != 0); AutoGainEn = ((HDta & 0x08) != 0); TrackPolarity = (TrackPolarityGrp)((HDta >> 4) & 0x01); TrackMode = (TrackModeGrp)((HDta >> 5) & 0x07); HDta = *CDta.c++; ResponseType = (ResponseTypeGrp)(HDta & 0x01); CDta.c++; CigiSwap4(&Gain, CDta.f++); CigiSwap4(&Level, CDta.f++); CigiSwap4(&ACCoupling, CDta.f++); CigiSwap4(&Noise, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ResponseType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV3::SetResponseType(const ResponseTypeGrp ResponseTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ResponseTypeIn < 0)||(ResponseTypeIn > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ResponseType",(ResponseTypeGrp)ResponseTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ResponseType = ResponseTypeIn; return(CIGI_SUCCESS); } // ================================================ // Gain // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorCtrlV3::SetGain(const float GainIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GainIn < 0.0)||(GainIn > 1.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Gain",(float)GainIn,0.0,1.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Gain = GainIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSensorRespV1.cpp000066400000000000000000000146661210750432300215220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorRespV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorRespV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorRespV1::CigiSensorRespV1() { PacketID = CIGI_SENSOR_RESP_PACKET_ID_V1; PacketSize = CIGI_SENSOR_RESP_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorStat = Searching; EntityTgt = false; EntityID = 0; GateSzX = 0; GateSzY = 0; GateXoff = 0.0; GateYoff = 0.0; FrameCntr = 0; TrackPntLat = 0.0; TrackPntLon = 0.0; TrackPntAlt = 0.0; } // ================================================ // ~CigiSensorRespV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorRespV1::~CigiSensorRespV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; Cigi_int16 tsCnvt; Cigi_int32 tlCnvt; double tdCnvt; union Conversion_short { Cigi_uint16 u; Cigi_int16 s; } tuCnvt; PackPointer CDta; CigiBaseSensorResp * Data = ( CigiBaseSensorResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; Cigi_uint8 HDta = (Cigi_uint8)((Data->ViewID << 3) & 0x00f8); HDta |= (Cigi_uint8)((Data->SensorStat << 1) & 0x06); *CDta.c++ = HDta; *CDta.c++ = Data->SensorID; tdCnvt = (double)Data->GateXoff; if(tdCnvt < 0.0) tdCnvt += 360.0; tlCnvt = CIGI_FLOAT_TO_BA(tdCnvt); if((tlCnvt > 65535)||(tlCnvt < 0)) tsCnvt = 0; else { tuCnvt.u = (Cigi_uint16)tlCnvt; tsCnvt = tuCnvt.s; } CIGI_SCOPY2(CDta.s++, &tsCnvt); tdCnvt = (double)Data->GateYoff; if(tdCnvt < 0.0) tdCnvt += 360.0; tlCnvt = CIGI_FLOAT_TO_BA(tdCnvt); if((tlCnvt > 65535)||(tlCnvt < 0)) tsCnvt = 0; else { tuCnvt.u = (Cigi_uint16)tlCnvt; tsCnvt = tuCnvt.s; } CIGI_SCOPY2(CDta.s++, &tsCnvt); CIGI_SCOPY2(CDta.s++, &Data->GateSzX); CIGI_SCOPY2(CDta.s++, &Data->GateSzY); memcpy(Buff,tBuf,CIGI_SENSOR_RESP_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; Cigi_int16 tsCnvt; PackPointer CDta; memcpy(tBuf,Buff,CIGI_SENSOR_RESP_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint16)((HDta >> 3) & 0x1f); SensorStat = (SensorStatGrp)((HDta >> 1) & 0x03); SensorID = *CDta.c++; CIGI_SCOPY2(&tsCnvt, CDta.s++); GateXoff = (float)CIGI_BA_TO_FLOAT(tsCnvt); if(GateXoff > 180.0) GateXoff -= 360.0; CIGI_SCOPY2(&tsCnvt, CDta.s++); GateYoff = (float)CIGI_BA_TO_FLOAT(tsCnvt); if(GateYoff > 180.0) GateYoff -= 360.0; CIGI_SCOPY2(&GateSzX, CDta.s++); CIGI_SCOPY2(&GateSzY, CDta.s++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV1::SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 32))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,32); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = ViewIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSensorRespV2.cpp000066400000000000000000000135671210750432300215220ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorRespV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorRespV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorRespV2::CigiSensorRespV2() { PacketID = CIGI_SENSOR_RESP_PACKET_ID_V2; PacketSize = CIGI_SENSOR_RESP_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorStat = Searching; EntityTgt = false; EntityID = 0; GateSzX = 0; GateSzY = 0; GateXoff = 0.0; GateYoff = 0.0; FrameCntr = 0; TrackPntLat = 0.0; TrackPntLon = 0.0; TrackPntAlt = 0.0; } // ================================================ // ~CigiSensorRespV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorRespV2::~CigiSensorRespV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseSensorResp * Data = ( CigiBaseSensorResp *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; Cigi_uint8 HDta = (Cigi_uint8)((Data->ViewID << 3) & 0x00f8); HDta |= (Cigi_uint8)((Data->SensorStat << 1) & 0x06); *CDta.c++ = HDta; *CDta.c++ = Data->SensorID; float tfoff = (float)Data->GateXoff / 0.015625f; Cigi_int16 tsoff = (Cigi_int16)tfoff; CIGI_SCOPY2(CDta.s++, &tsoff); tfoff = Data->GateYoff / 0.015625f; tsoff = (Cigi_int16)tfoff; CIGI_SCOPY2(CDta.s++, &tsoff); CIGI_SCOPY2(CDta.s++, &Data->GateSzX); CIGI_SCOPY2(CDta.s++, &Data->GateSzY); memcpy(Buff,tBuf,CIGI_SENSOR_RESP_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_SENSOR_RESP_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint16)((HDta >> 3) & 0x1f); SensorStat = (SensorStatGrp)((HDta >> 1) & 0x03); SensorID = *CDta.c++; Cigi_int16 tsoff; CIGI_SCOPY2(&tsoff, CDta.s++); float tfoff = (float)tsoff; GateXoff = tfoff * 0.015625f; CIGI_SCOPY2(&tsoff, CDta.s++); tfoff = (float)tsoff; GateYoff = tfoff * 0.015625f; CIGI_SCOPY2(&GateSzX, CDta.s++); CIGI_SCOPY2(&GateSzY, CDta.s++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV2::SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 32))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,32); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = ViewIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSensorRespV3.cpp000066400000000000000000000117161210750432300215150ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorRespV3::CigiSensorRespV3() { PacketID = CIGI_SENSOR_RESP_PACKET_ID_V3; PacketSize = CIGI_SENSOR_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorStat = Searching; EntityTgt = false; EntityID = 0; GateSzX = 0; GateSzY = 0; GateXoff = 0.0; GateYoff = 0.0; FrameCntr = 0; TrackPntLat = 0.0; TrackPntLon = 0.0; TrackPntAlt = 0.0; } // ================================================ // ~CigiSensorRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorRespV3::~CigiSensorRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseSensorResp * Data = ( CigiBaseSensorResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ViewID; *CDta.c++ = Data->SensorID; Cigi_uint8 HDta = (Data->EntityTgt) ? 0x04 : 0x00; HDta |= (Cigi_uint8)(Data->SensorStat & 0x03); *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.s++ = Data->GateSzX; *CDta.s++ = Data->GateSzY; *CDta.f++ = Data->GateXoff; *CDta.f++ = Data->GateYoff; *CDta.l++ = Data->FrameCntr; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { ViewID = *CDta.s++; SensorID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SensorStat = (SensorStatGrp)(HDta & 0x03); EntityTgt = ((HDta & 0x04) != 0); CDta.s++; GateSzX = *CDta.s++; GateSzY = *CDta.s++; GateXoff = *CDta.f++; GateYoff = *CDta.f++; FrameCntr = *CDta.l++; } else { CigiSwap2(&ViewID, CDta.s++); SensorID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SensorStat = (SensorStatGrp)(HDta & 0x03); EntityTgt = ((HDta & 0x04) != 0); CDta.s++; CigiSwap2(&GateSzX, CDta.s++); CigiSwap2(&GateSzY, CDta.s++); CigiSwap4(&GateXoff, CDta.f++); CigiSwap4(&GateYoff, CDta.f++); CigiSwap4(&FrameCntr, CDta.l++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiSensorXRespV3.cpp000066400000000000000000000161551210750432300216470ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSensorXRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSensorXRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSensorXRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorXRespV3::CigiSensorXRespV3() { PacketID = CIGI_SENSOR_XRESP_PACKET_ID_V3; PacketSize = CIGI_SENSOR_XRESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ViewID = 0; SensorID = 0; SensorStat = Searching; EntityTgt = false; EntityID = 0; GateSzX = 0; GateSzY = 0; GateXoff = 0.0; GateYoff = 0.0; FrameCntr = 0; TrackPntLat = 0.0; TrackPntLon = 0.0; TrackPntAlt = 0.0; } // ================================================ // ~CigiSensorXRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSensorXRespV3::~CigiSensorXRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorXRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseSensorResp * Data = ( CigiBaseSensorResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ViewID; *CDta.c++ = Data->SensorID; Cigi_uint8 HDta = (Data->EntityTgt) ? 0x04 : 0x00; HDta |= (Cigi_uint8)(Data->SensorStat & 0x03); *CDta.c++ = HDta; *CDta.s++ = Data->EntityID; *CDta.s++ = Data->GateSzX; *CDta.s++ = Data->GateSzY; *CDta.f++ = Data->GateXoff; *CDta.f++ = Data->GateYoff; *CDta.l++ = Data->FrameCntr; *CDta.d++ = Data->TrackPntLat; *CDta.d++ = Data->TrackPntLon; *CDta.d++ = Data->TrackPntAlt; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorXRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { ViewID = *CDta.s++; SensorID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SensorStat = (SensorStatGrp)(HDta & 0x03); EntityTgt = ((HDta & 0x04) != 0); EntityID = *CDta.s++; GateSzX = *CDta.s++; GateSzY = *CDta.s++; GateXoff = *CDta.f++; GateYoff = *CDta.f++; FrameCntr = *CDta.l++; TrackPntLat = *CDta.d++; TrackPntLon = *CDta.d++; TrackPntAlt = *CDta.d++; } else { CigiSwap2(&ViewID, CDta.s++); SensorID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; SensorStat = (SensorStatGrp)(HDta & 0x03); EntityTgt = ((HDta & 0x04) != 0); CigiSwap2(&EntityID, CDta.s++); CigiSwap2(&GateSzX, CDta.s++); CigiSwap2(&GateSzY, CDta.s++); CigiSwap4(&GateXoff, CDta.f++); CigiSwap4(&GateYoff, CDta.f++); CigiSwap4(&FrameCntr, CDta.l++); CigiSwap8(&TrackPntLat, CDta.d++); CigiSwap8(&TrackPntLon, CDta.d++); CigiSwap8(&TrackPntAlt, CDta.d++); } return(PacketSize); } // ==================================================================== // Conversion Control // ==================================================================== // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorXRespV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { CnvtInfo.ProcID = CigiProcessType::ProcStd; // Note: CIGI_SENSOR_RESP_PACKET_ID_V1 & // CIGI_SENSOR_RESP_PACKET_ID_V2 are the same if(CnvtVersion.CigiMajorVersion < 3) CnvtInfo.CnvtPacketID = CIGI_SENSOR_RESP_PACKET_ID_V2; else CnvtInfo.CnvtPacketID = CIGI_SENSOR_XRESP_PACKET_ID_V3; return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // TrackPntLat // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorXRespV3::SetTrackPntLat(const double TrackPntLatIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TrackPntLatIn < -90.0)||(TrackPntLatIn > 90.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TrackPntLat",(double)TrackPntLatIn,-90.0,90.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TrackPntLat = TrackPntLatIn; return(CIGI_SUCCESS); } // ================================================ // TrackPntLon // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSensorXRespV3::SetTrackPntLon(const double TrackPntLonIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((TrackPntLonIn < -180.0)||(TrackPntLonIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("TrackPntLon",(double)TrackPntLonIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif TrackPntLon = TrackPntLonIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiSession.cpp000066400000000000000000000053671210750432300206310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSession.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/15/2003 James Durtschy                    CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to set the outgoing message in the VJmp 
 *  member variable.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSession.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSession // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSession::CigiSession(const int NumInBuf, const int InBufLen, const int NumOutBuf, const int OutBufLen, SessionTypeEnum SessionTypeIn) : SessionType( SessionTypeIn ), Synchronous( true ), MostMatureKnownCigi(3,3) { CigiVersionID InitVersion = MostMatureKnownCigi; OutMsg.SetSession(this); OutMsg.ChangeOutgoingCigiVersion(InitVersion); InMsg.SetSession(this); InMsg.SetReaderVersion(InitVersion); // Default version initialization OutMsg.CreateBuffer(NumOutBuf, OutBufLen); InMsg.CreateBuffer(NumInBuf, InBufLen); OutMsg.SetAnimationTable(&ATbl); InMsg.SetAnimationTable(&ATbl); } // ================================================ // ~CigiSession // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSession::~CigiSession() { } cigi-ccl-3.3.3a+svn818/source/CigiShortArtPartCtrlV3.cpp000066400000000000000000000120061210750432300226250ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortArtPartCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiShortArtPartCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiShortArtPartCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3() { PacketID = CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3; PacketSize = CIGI_SHORT_ART_PART_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; ArtPart1 = 0; ArtPart2 = 0; DofSelect1 = NotUsed; DofSelect2 = NotUsed; ArtPart1En = false; ArtPart2En = false; Dof1 = 0.0; Dof2 = 0.0; } // ================================================ // ~CigiShortArtPartCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortArtPartCtrlV3::~CigiShortArtPartCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortArtPartCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseShortArtPartCtrl * Data = ( CigiBaseShortArtPartCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.c++ = Data->ArtPart1; *CDta.c++ = Data->ArtPart2; Cigi_uint8 HDta = Data->DofSelect1 & 0x07; HDta |= (Data->DofSelect2 << 3) & 0x38; HDta |= (Data->ArtPart1En) ? 0x40 : 0; HDta |= (Data->ArtPart2En) ? 0x80 : 0; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.f++ = Data->Dof1; *CDta.f++ = Data->Dof2; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortArtPartCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; ArtPart1 = *CDta.c++; ArtPart2 = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; DofSelect1 = (DofSelectGrp)(HDta & 0x07); DofSelect2 = (DofSelectGrp)((HDta >> 3) & 0x07); ArtPart1En = ((HDta & 0x40) != 0); ArtPart2En = ((HDta & 0x80) != 0); CDta.c++; Dof1 = *CDta.f++; Dof2 = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); ArtPart1 = *CDta.c++; ArtPart2 = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; DofSelect1 = (DofSelectGrp)(HDta & 0x07); DofSelect2 = (DofSelectGrp)((HDta >> 3) & 0x07); ArtPart1En = ((HDta & 0x40) != 0); ArtPart2En = ((HDta & 0x80) != 0); CDta.c++; CigiSwap4(&Dof1, CDta.f++); CigiSwap4(&Dof2, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiShortCompCtrlV3.cpp000066400000000000000000000533741210750432300221630ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortCompCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Added new version conversion method.
 *  
 *  05/14/2008 Greg Basler                       Version 2.2.0
 *  Fixed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Changed the Component class Conversion table sizing to a unified
 *   constant.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiShortCompCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // Component Class conversion Table const CigiBaseCompCtrl::CompAssocGrp CigiShortCompCtrlV3::CompClassV3xV1[CigiShortCompCtrlV3::CompClassCnvtSz] = { Entity, // EntityV3 View, // ViewV3 NoCnvtV1, // ViewGrpV3 NoCnvtV1, // SensorV3 NoCnvtV1, // RegionalSeaSurfaceV3 NoCnvtV1, // RegionalTerrainSurfaceV3 NoCnvtV1, // RegionalLayeredWeatherV3 NoCnvtV1, // GlobalSeaSurfaceV3 NoCnvtV1, // GlobalTerrainSurfaceV3 NoCnvtV1, // GlobalLayeredWeatherV3 Environment, // AtmosphereV3 Environment, // CelestialSphereV3 NoCnvtV1, // EventV3 NoCnvtV1 // SystemV3 }; const CigiBaseCompCtrl::CompClassV2Grp CigiShortCompCtrlV3::CompClassV3xV2[CigiShortCompCtrlV3::CompClassCnvtSz] = { EntityV2, // EntityV3 ViewV2, // ViewV3 ViewGrpV2, // ViewGrpV3 SensorV2, // SensorV3 NoCnvtV2, // RegionalSeaSurfaceV3 NoCnvtV2, // RegionalTerrainSurfaceV3 NoCnvtV2, // RegionalLayeredWeatherV3 NoCnvtV2, // GlobalSeaSurfaceV3 NoCnvtV2, // GlobalTerrainSurfaceV3 NoCnvtV2, // GlobalLayeredWeatherV3 EnvironmentV2, // AtmosphereV3 EnvironmentV2, // CelestialSphereV3 NoCnvtV2, // EventV3 SystemV2 // SystemV3 }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiShortCompCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortCompCtrlV3::CigiShortCompCtrlV3() { PacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; PacketSize = CIGI_SHORT_COMP_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; CompID = 0; InstanceID = 0; EntityID = 0; ViewID = 0; CompState = 0; CompAssoc = Entity; CompClassV2 = EntityV2; CompClassV3 = EntityV3; CompData[0] = 0; CompData[1] = 0; CompData[2] = 0; CompData[3] = 0; CompData[4] = 0; CompData[5] = 0; } // ================================================ // ~CigiShortCompCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortCompCtrlV3::~CigiShortCompCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCompCtrl * Data = ( CigiBaseCompCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->CompID; *CDta.s++ = Data->InstanceID; *CDta.c++ = Data->CompClassV3 & 0x0f; *CDta.c++ = (Cigi_uint8)((Data->CompState > 0x00ff) ? 0x00ff : Data->CompState); *CDta.l++ = Data->CompData[0]; *CDta.l++ = Data->CompData[1]; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { CompID = *CDta.s++; InstanceID = *CDta.s++; CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x0f); CompState = (Cigi_uint16)*CDta.c++; CompData[0] = *CDta.l++; CompData[1] = *CDta.l++; } else { CigiSwap2(&CompID, CDta.s++); CigiSwap2(&InstanceID, CDta.s++); CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x0f); CompState = (Cigi_uint16)*CDta.c++; CigiSwap4(&CompData[0], CDta.l++); CigiSwap4(&CompData[1], CDta.l++); } if((CompClassV3 >= CigiBaseCompCtrl::EntityV3) && (CompClassV3 <= CigiBaseCompCtrl::SystemV3)) { CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; } else { CompAssoc = CigiBaseCompCtrl::NoCnvtV1; CompClassV2 = CigiBaseCompCtrl::NoCnvtV2; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { // Do not convert unless a conversion is found CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcNone; CnvtInfo.CnvtPacketID = 0; if(CnvtVersion.CigiMajorVersion == 3) { // All Component control packets from version 3 and above // use the same packet id number if(CnvtVersion.CigiMinorVersion < 3) { if((CompClassV3 >= EntityV3)&&(CompClassV3 <= SystemV3)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; } } else { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; } } else if(CnvtVersion.CigiMajorVersion == 2) { if((CompClassV2 >= EntityV2)&&(CompClassV2 <= SystemV2)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V2; } } else if(CnvtVersion.CigiMajorVersion == 1) { if((CompAssoc >= Entity)&&(CompAssoc <= View)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V1; } } else { // All Component control packets from version 3 and above // use the same packet id number CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CompClassV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CompClassV3In < 0)||(CompClassV3In > 13))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CompClassV3",(CompClassV3Grp)CompClassV3In,0,13); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CompClassV3 = CompClassV3In; CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_int8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { union { Cigi_int8 sc; Cigi_uint8 uc; } bxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; bxfer.sc = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)bxfer.uc; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint16 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - short // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { union { Cigi_int16 s16; Cigi_uint16 u16; } sxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; sxfer.s16 = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)sxfer.u16; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint32 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } CompData[Word] = CompDataIn; return(CIGI_SUCCESS); } // ================================================ // SetCompData - long // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_uint32 u32; Cigi_int32 s32; } tDta; if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.s32 = CompDataIn; CompData[Word] = tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - float // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_uint32 u32; float f32; } tDta; if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.f32 = CompDataIn; CompData[Word] = tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint64 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((CompDataIn >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(CompDataIn & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // SetCompData - double // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3::SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint64 i; double d; } XDta; XDta.d = CompDataIn; int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((XDta.i >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(XDta.i & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // GetUCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 CigiShortCompCtrlV3::GetUCharCompData(const unsigned int Word, const BytePos Pos) { Cigi_uint8 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta = 0; } else tDta = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta); } // ================================================ // GetCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int8 CigiShortCompCtrlV3::GetCharCompData(const unsigned int Word, const BytePos Pos) { union { Cigi_int8 sc; Cigi_uint8 uc; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta.uc = 0; } else tDta.uc = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta.sc); } // ================================================ // GetUShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint16 CigiShortCompCtrlV3::GetUShortCompData(const unsigned int Word, const HalfWordPos Pos) { Cigi_uint16 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta = 0; } else tDta = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta); } // ================================================ // GetShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int16 CigiShortCompCtrlV3::GetShortCompData(const unsigned int Word, const HalfWordPos Pos) { union { Cigi_int16 s16; Cigi_uint16 u16; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta.u16 = 0; } else tDta.u16 = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta.s16); } // ================================================ // GetULongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiShortCompCtrlV3::GetULongCompData(const unsigned int Word) { Cigi_uint32 tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta = 0; } else tDta = CompData[Word]; return(tDta); } // ================================================ // GetLongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiShortCompCtrlV3::GetLongCompData(const unsigned int Word) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.s32); } // ================================================ // GetFloatCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiShortCompCtrlV3::GetFloatCompData(const unsigned int Word) { union { Cigi_uint32 u32; float f32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.f32); } // ================================================ // GetI64CompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint64 CigiShortCompCtrlV3::GetI64CompData(const unsigned int Pos) { Cigi_uint64 tDta; if(Pos > 0) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; } return(tDta); } // ================================================ // GetDoubleCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv double CigiShortCompCtrlV3::GetDoubleCompData(const unsigned int Pos) { union DtaXfer { Cigi_uint64 i; double d; } XDta; if(Pos > 0) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif XDta.d = 0.0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); XDta.i = tDtah | tDtal; } return(XDta.d); } cigi-ccl-3.3.3a+svn818/source/CigiShortCompCtrlV3_3.cpp000066400000000000000000000522301210750432300223730ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortCompCtrlV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  02/11/2008 Greg Basler                       Version 2.0.0
 *  Initial Release.
 *  Converted from CigiShortCompCtrlV3.cpp.
 *  Fixed the conversion process.
 *  
 *  05/15/2008 Greg Basler                       Version 2.2.0
 *  Corrected problem with conversion from V3_3 to V2 & V1
 *   involving Component Classes of SymbolSurfaceV3_3 &
 *   SymbolV3_3.
 *  Corrected Version Number.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiShortCompCtrlV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // Component Class conversion Table const CigiBaseCompCtrl::CompAssocGrp CigiShortCompCtrlV3_3::CompClassV3xV1[CigiShortCompCtrlV3_3::CompClassCnvtSz] = { Entity, // EntityV3 View, // ViewV3 NoCnvtV1, // ViewGrpV3 NoCnvtV1, // SensorV3 NoCnvtV1, // RegionalSeaSurfaceV3 NoCnvtV1, // RegionalTerrainSurfaceV3 NoCnvtV1, // RegionalLayeredWeatherV3 NoCnvtV1, // GlobalSeaSurfaceV3 NoCnvtV1, // GlobalTerrainSurfaceV3 NoCnvtV1, // GlobalLayeredWeatherV3 Environment, // AtmosphereV3 Environment, // CelestialSphereV3 NoCnvtV1, // EventV3 NoCnvtV1, // SystemV3 NoCnvtV1, // SymbolSurfaceV3_3 NoCnvtV1 // SymbolV3_3 }; const CigiBaseCompCtrl::CompClassV2Grp CigiShortCompCtrlV3_3::CompClassV3xV2[CigiShortCompCtrlV3_3::CompClassCnvtSz] = { EntityV2, // EntityV3 ViewV2, // ViewV3 ViewGrpV2, // ViewGrpV3 SensorV2, // SensorV3 NoCnvtV2, // RegionalSeaSurfaceV3 NoCnvtV2, // RegionalTerrainSurfaceV3 NoCnvtV2, // RegionalLayeredWeatherV3 NoCnvtV2, // GlobalSeaSurfaceV3 NoCnvtV2, // GlobalTerrainSurfaceV3 NoCnvtV2, // GlobalLayeredWeatherV3 EnvironmentV2, // AtmosphereV3 EnvironmentV2, // CelestialSphereV3 NoCnvtV2, // EventV3 SystemV2, // SystemV3 NoCnvtV2, // SymbolSurfaceV3_3 NoCnvtV2 // SymbolV3_3 }; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiShortCompCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortCompCtrlV3_3::CigiShortCompCtrlV3_3() { PacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3; PacketSize = CIGI_SHORT_COMP_CTRL_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; CompID = 0; InstanceID = 0; EntityID = 0; ViewID = 0; CompState = 0; CompAssoc = Entity; CompClassV2 = EntityV2; CompClassV3 = EntityV3; CompData[0] = 0; CompData[1] = 0; CompData[2] = 0; CompData[3] = 0; CompData[4] = 0; CompData[5] = 0; } // ================================================ // ~CigiShortCompCtrlV3_3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortCompCtrlV3_3::~CigiShortCompCtrlV3_3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseCompCtrl * Data = ( CigiBaseCompCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->CompID; *CDta.s++ = Data->InstanceID; *CDta.c++ = Data->CompClassV3 & 0x3f; *CDta.c++ = (Cigi_uint8)((Data->CompState > 0x00ff) ? 0x00ff : Data->CompState); *CDta.l++ = Data->CompData[0]; *CDta.l++ = Data->CompData[1]; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { CompID = *CDta.s++; InstanceID = *CDta.s++; CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x3f); CompState = (Cigi_uint16)*CDta.c++; CompData[0] = *CDta.l++; CompData[1] = *CDta.l++; } else { CigiSwap2(&CompID, CDta.s++); CigiSwap2(&InstanceID, CDta.s++); CompClassV3 = (CompClassV3Grp)(*CDta.c++ & 0x3f); CompState = (Cigi_uint16)*CDta.c++; CigiSwap4(&CompData[0], CDta.l++); CigiSwap4(&CompData[1], CDta.l++); } if((CompClassV3 >= CigiBaseCompCtrl::EntityV3) && (CompClassV3 <= CigiBaseCompCtrl::SymbolV3_3)) { CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; } else { CompAssoc = NoCnvtV1; CompClassV2 = NoCnvtV2; } return(PacketSize); } // ================================================ // GetCnvt // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::GetCnvt(CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) { // Do not convert unless a conversion is found CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcNone; CnvtInfo.CnvtPacketID = 0; if(CnvtVersion.CigiMajorVersion == 3) { // All Component control packets from version 3 and above // use the same packet id number if(CnvtVersion.CigiMinorVersion < 3) { if((CompClassV3 >= EntityV3)&&(CompClassV3 <= SystemV3)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3; } } else { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3; } } else if(CnvtVersion.CigiMajorVersion == 2) { if((CompClassV2 >= EntityV2)&&(CompClassV2 <= SystemV2)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V2; } } else if(CnvtVersion.CigiMajorVersion == 1) { if((CompAssoc >= Entity)&&(CompAssoc <= View)) { CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_COMP_CTRL_PACKET_ID_V1; } } else { // All Component control packets from version 3 and above // use the same packet id number CnvtInfo.ProcID = CigiProcessType::TwoPassCnvtProcStd; CnvtInfo.CnvtPacketID = CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3; } return(CIGI_SUCCESS); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // CompClassV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompClassV3(const CompClassV3Grp CompClassV3In, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CompClassV3In < 0)||(CompClassV3In > 15))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CompClassV3",(CompClassV3Grp)CompClassV3In,0,15); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CompClassV3 = CompClassV3In; CompAssoc = CompClassV3xV1[CompClassV3]; CompClassV2 = CompClassV3xV2[CompClassV3]; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_uint8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_int8 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_int8 CompDataIn, const unsigned int Word, const BytePos Pos, bool bndchk) { union { Cigi_int8 sc; Cigi_uint8 uc; } bxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 8; bxfer.sc = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)bxfer.uc; CompData[Word] &= ~(0x000000ff << bitPos); CompData[Word] |= ((tDta & 0x000000ff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint16 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_uint16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; Cigi_uint32 tDta = (Cigi_uint32)CompDataIn; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - short // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_int16 CompDataIn, const unsigned int Word, const HalfWordPos Pos, bool bndchk) { union { Cigi_int16 s16; Cigi_uint16 u16; } sxfer; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int bitPos = Pos * 16; sxfer.s16 = CompDataIn; Cigi_uint32 tDta = (Cigi_uint32)sxfer.u16; CompData[Word] &= ~(0x0000ffff << bitPos); CompData[Word] |= ((tDta & 0x0000ffff) << bitPos); return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint32 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_uint32 CompDataIn, const unsigned int Word, bool bndchk) { if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } CompData[Word] = CompDataIn; return(CIGI_SUCCESS); } // ================================================ // SetCompData - long // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_int32 CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_uint32 u32; Cigi_int32 s32; } tDta; if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.s32 = CompDataIn; CompData[Word] = tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - float // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const float CompDataIn, const unsigned int Word, bool bndchk) { union { Cigi_uint32 u32; float f32; } tDta; if(Word > 1) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } tDta.f32 = CompDataIn; CompData[Word] = tDta.u32; return(CIGI_SUCCESS); } // ================================================ // SetCompData - Cigi_uint64 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const Cigi_uint64 CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((CompDataIn >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(CompDataIn & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // SetCompData - double // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortCompCtrlV3_3::SetCompData(const double CompDataIn, const unsigned int Pos, bool bndchk) { if(Pos > 0) { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif } #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } union DtaXfer { Cigi_uint64 i; double d; } XDta; XDta.d = CompDataIn; int Word = Pos * 2; CompData[Word++] = (Cigi_uint32)((XDta.i >> 32) & 0x00000000ffffffff); CompData[Word] = (Cigi_uint32)(XDta.i & 0x00000000ffffffff); return(CIGI_SUCCESS); } // ================================================ // GetUCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint8 CigiShortCompCtrlV3_3::GetUCharCompData(const unsigned int Word, const BytePos Pos) { Cigi_uint8 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta = 0; } else tDta = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta); } // ================================================ // GetCharCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int8 CigiShortCompCtrlV3_3::GetCharCompData(const unsigned int Word, const BytePos Pos) { union { Cigi_int8 sc; Cigi_uint8 uc; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 3)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,3); #endif tDta.uc = 0; } else tDta.uc = (Cigi_uint8)((CompData[Word] >> (Pos * 8)) & 0x000000ff); return(tDta.sc); } // ================================================ // GetUShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint16 CigiShortCompCtrlV3_3::GetUShortCompData(const unsigned int Word, const HalfWordPos Pos) { Cigi_uint16 tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta = 0; } else tDta = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta); } // ================================================ // GetShortCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int16 CigiShortCompCtrlV3_3::GetShortCompData(const unsigned int Word, const HalfWordPos Pos) { union { Cigi_int16 s16; Cigi_uint16 u16; } tDta; int Err = 0; if(Word > 1) Err = 1; else if((Pos < 0) || (Pos > 1)) Err = 2; if(Err != 0) { #ifndef CIGI_NO_EXCEPT if(Err == 1) throw CigiValueOutOfRangeException("Word",Word,0,1); else throw CigiValueOutOfRangeException("Pos",Pos,0,1); #endif tDta.u16 = 0; } else tDta.u16 = (Cigi_uint16)((CompData[Word] >> (Pos * 16)) & 0x0000ffff); return(tDta.s16); } // ================================================ // GetULongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint32 CigiShortCompCtrlV3_3::GetULongCompData(const unsigned int Word) { Cigi_uint32 tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta = 0; } else tDta = CompData[Word]; return(tDta); } // ================================================ // GetLongCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_int32 CigiShortCompCtrlV3_3::GetLongCompData(const unsigned int Word) { union { Cigi_int32 s32; Cigi_uint32 u32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.s32); } // ================================================ // GetFloatCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv float CigiShortCompCtrlV3_3::GetFloatCompData(const unsigned int Word) { union { Cigi_uint32 u32; float f32; } tDta; if(Word > 1) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Word",Word,0,1); #endif tDta.u32 = 0; } else tDta.u32 = (Cigi_uint32)(CompData[Word]); return(tDta.f32); } // ================================================ // GetI64CompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Cigi_uint64 CigiShortCompCtrlV3_3::GetI64CompData(const unsigned int Pos) { Cigi_uint64 tDta; if(Pos > 0) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif tDta = 0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); tDta = tDtah | tDtal; } return(tDta); } // ================================================ // GetDoubleCompData // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv double CigiShortCompCtrlV3_3::GetDoubleCompData(const unsigned int Pos) { union DtaXfer { Cigi_uint64 i; double d; } XDta; if(Pos > 0) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Pos",Pos,0,0); #endif XDta.d = 0.0; } else { int Word = Pos * 2; Cigi_uint64 tDtah = (Cigi_uint64)(CompData[Word++]); tDtah = (tDtah << 32) & _I64_CONST_(0xffffffff00000000); Cigi_uint64 tDtal = (Cigi_uint64)(CompData[Word]); tDtal &= _I64_CONST_(0x00000000ffffffff); XDta.i = tDtah | tDtal; } return(XDta.d); } cigi-ccl-3.3.3a+svn818/source/CigiShortSymbolCtrlV3_3.cpp000066400000000000000000000112311210750432300227360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiShortSymbolCtrlV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 *  04/03/2008 Greg Basler                       2.1.0
 *  Corrected pointer incrementing.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiShortSymbolCtrlV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortSymbolCtrlV3_3::CigiShortSymbolCtrlV3_3(void) { PacketID = CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3; PacketSize = CIGI_SHORT_SYMBOL_CONTROL_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; SymbolID = 0; SymbolState = CigiBaseSymbolCtrl::Hidden; AttachState = CigiBaseSymbolCtrl::Detach; FlashCtrl = CigiBaseSymbolCtrl::Continue; InheritColor = CigiBaseSymbolCtrl::NotInherit; DatumType[0] = None; DatumType[1] = None; Datum[0].UIntValue = 0; Datum[1].UIntValue = 0; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiShortSymbolCtrlV3_3::~CigiShortSymbolCtrlV3_3(void) { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortSymbolCtrlV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiShortSymbolCtrlV3_3 * Data = ( CigiShortSymbolCtrlV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->SymbolID; unsigned char HDta = 0; HDta |= (Data->SymbolState & 0x03); HDta |= ((Data->AttachState << 2) & 0x04); HDta |= ((Data->FlashCtrl << 3) & 0x08); HDta |= ((Data->InheritColor << 4) & 0x10); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = Data->DatumType[0]; *CDta.c++ = Data->DatumType[1]; *CDta.l++ = Data->Datum[0].UIntValue; *CDta.l++ = Data->Datum[1].UIntValue; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiShortSymbolCtrlV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { SymbolID = *CDta.s++; HDta = *CDta.c++; CDta.c++; DatumType[0] = (DatumTypeGrp)*CDta.c++; DatumType[1] = (DatumTypeGrp)*CDta.c++; Datum[0].UIntValue = *CDta.l++; Datum[1].UIntValue = *CDta.l++; } else { CigiSwap2(&SymbolID, CDta.s++); HDta = *CDta.c++; CDta.c++; DatumType[0] = (DatumTypeGrp)*CDta.c++; DatumType[1] = (DatumTypeGrp)*CDta.c++; CigiSwap4(&Datum[0].UIntValue, CDta.l++); CigiSwap4(&Datum[1].UIntValue, CDta.l++); } SymbolState = (CigiBaseSymbolCtrl::SymbolStateGrp)(HDta & 0x03); AttachState = (CigiBaseSymbolCtrl::AttachStateGrp)((HDta >> 2) & 0x01); FlashCtrl = (CigiBaseSymbolCtrl::FlashCtrlGrp)((HDta >> 3) & 0x01); InheritColor = (CigiBaseSymbolCtrl::InheritColorGrp)((HDta >> 4) & 0x01); return(PacketSize); } cigi-ccl-3.3.3a+svn818/source/CigiSpecEffDefV1.cpp000066400000000000000000000141231210750432300213350ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSpecEffDefV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSpecEffDefV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSpecEffDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSpecEffDefV1::CigiSpecEffDefV1() { PacketID = CIGI_SPEC_EFF_DEF_PACKET_ID_V1; PacketSize = CIGI_SPEC_EFF_DEF_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; SeqDir = Forward; ColorEn = false; Red = 0; Green = 0; Blue = 0; XScale = 0.0; YScale = 0.0; ZScale = 0.0; TimeScale = 0.0; EffectCnt = 0; Separation = 0.0; BurstRate = 0.0; Duration = 0.0; } // ================================================ // ~CigiSpecEffDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSpecEffDefV1::~CigiSpecEffDefV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSpecEffDefV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseSpecEffDef * Data = ( CigiBaseSpecEffDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->SeqDir << 7) & 0x80; HDta |= (Data->ColorEn) ? 0x40 : 0; *CDta.c++ = HDta; *CDta.c++ = Data->Red; *CDta.c++ = Data->Green; *CDta.c++ = Data->Blue; float tfScl = (float)Data->XScale / 0.015625f; Cigi_int16 tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); tfScl = Data->YScale / 0.015625f; tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); tfScl = Data->ZScale / 0.015625f; tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); tfScl = Data->TimeScale / 0.015625f; tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); *CDta.s++ = 0; CIGI_SCOPY2(CDta.s++, &Data->EffectCnt); CIGI_SCOPY4(CDta.f++, &Data->Separation); CIGI_SCOPY4(CDta.f++, &Data->BurstRate); CIGI_SCOPY4(CDta.f++, &Data->Duration); memcpy(Buff,tBuf,CIGI_SPEC_EFF_DEF_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSpecEffDefV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_SPEC_EFF_DEF_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.h++); Cigi_uint8 HDta = *CDta.c++; SeqDir = (SeqDirGrp)((HDta >> 7) & 0x01); ColorEn = ((HDta & 0x40) != 0); Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Cigi_int16 tsScl; CIGI_SCOPY2(&tsScl, CDta.h++); float tfScl = (float)tsScl; XScale = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.h++); tfScl = (float)tsScl; YScale = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.h++); tfScl = (float)tsScl; ZScale = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.h++); tfScl = (float)tsScl; TimeScale = tfScl * 0.015625f; CDta.h++; CIGI_SCOPY2(&EffectCnt, CDta.h++); CIGI_SCOPY4(&Separation, CDta.f++); CIGI_SCOPY4(&BurstRate, CDta.f++); CIGI_SCOPY4(&Duration, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiSpecEffDefV2.cpp000066400000000000000000000141151210750432300213370ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSpecEffDefV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSpecEffDefV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiSpecEffDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSpecEffDefV2::CigiSpecEffDefV2() { PacketID = CIGI_SPEC_EFF_DEF_PACKET_ID_V2; PacketSize = CIGI_SPEC_EFF_DEF_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; SeqDir = Forward; ColorEn = false; Red = 0; Green = 0; Blue = 0; XScale = 0.0; YScale = 0.0; ZScale = 0.0; TimeScale = 0.0; EffectCnt = 0; Separation = 0.0; BurstRate = 0.0; Duration = 0.0; } // ================================================ // ~CigiSpecEffDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSpecEffDefV2::~CigiSpecEffDefV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSpecEffDefV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseSpecEffDef * Data = ( CigiBaseSpecEffDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.h++, &Data->EntityID); Cigi_uint8 HDta = (Data->SeqDir << 7) & 0x80; HDta |= (Data->ColorEn) ? 0x40 : 0; *CDta.c++ = HDta; *CDta.c++ = Data->Red; *CDta.c++ = Data->Green; *CDta.c++ = Data->Blue; float tfScl = (float)Data->XScale / 0.015625f; Cigi_int16 tsScl = (short)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); tfScl = Data->YScale / 0.015625f; tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); tfScl = Data->ZScale / 0.015625f; tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); tfScl = Data->TimeScale / 0.015625f; tsScl = (Cigi_int16)tfScl; CIGI_SCOPY2(CDta.h++, &tsScl); *CDta.h++ = 0; CIGI_SCOPY2(CDta.s++, &Data->EffectCnt); CIGI_SCOPY4(CDta.f++, &Data->Separation); CIGI_SCOPY4(CDta.f++, &Data->BurstRate); CIGI_SCOPY4(CDta.f++, &Data->Duration); memcpy(Buff,tBuf,CIGI_SPEC_EFF_DEF_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSpecEffDefV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_SPEC_EFF_DEF_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.h++); Cigi_uint8 HDta = *CDta.c++; SeqDir = (SeqDirGrp)((HDta >> 7) & 0x01); ColorEn = ((HDta & 0x40) != 0); Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Cigi_int16 tsScl; CIGI_SCOPY2(&tsScl, CDta.h++); float tfScl = (float)tsScl; XScale = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.h++); tfScl = (float)tsScl; YScale = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.h++); tfScl = (float)tsScl; ZScale = tfScl * 0.015625f; CIGI_SCOPY2(&tsScl, CDta.h++); tfScl = (float)tsScl; TimeScale = tfScl * 0.015625f; CDta.h++; CIGI_SCOPY2(&EffectCnt, CDta.h++); CIGI_SCOPY4(&Separation, CDta.f++); CIGI_SCOPY4(&BurstRate, CDta.f++); CIGI_SCOPY4(&Duration, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiSwapping.cpp000066400000000000000000000104341210750432300207650ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSwapping.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union and included the 
 *  CigiTypes.h header.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Added modifiers to export the CigiSwap2, CigiSwap4, and CigiSwap8 functions 
 *  when built as a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 *  11/20/2007 Greg Basler                       Version 2.0.0
 *  Changed CigiCopy8 to make sure that it works for big endian and non-intel
 *  machines.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiTypes.h" union _SWAP_UNION { Cigi_uint32 i; Cigi_uint8 b[4]; }; typedef union _SWAP_UNION SWAP_UNION; // ==================================================================== // CigiSwap2 // ==================================================================== CIGI_SPEC void CigiSwap2( void *dest, const void *src) { static Cigi_uint16 d, s; s = *( ( Cigi_uint16 *)src); d = s << 8; d |= s >> 8; *( ( Cigi_uint16 *)dest) = d; } // ==================================================================== // CigiSwap4 // ==================================================================== CIGI_SPEC void CigiSwap4( void *dest, const void *src) { static SWAP_UNION d, s; s.i = *( ( Cigi_uint32 *)src); d.b[0] = s.b[3]; d.b[1] = s.b[2]; d.b[2] = s.b[1]; d.b[3] = s.b[0]; *( ( Cigi_uint32 *)dest) = d.i; } // ==================================================================== // CigiSwap8 // ==================================================================== CIGI_SPEC void CigiSwap8( void *dest, const void *src) { static SWAP_UNION d1, s1; static SWAP_UNION d2, s2; /* Do each word separately. Each pair of variables should be enclosed within * braces to minimize the number of variables declared as "register." */ s1.i = *( ( Cigi_uint32 *)src); s2.i = *( ( Cigi_uint32 *)src + 1); d1.b[0] = s1.b[3]; d1.b[1] = s1.b[2]; d1.b[2] = s1.b[1]; d1.b[3] = s1.b[0]; d2.b[0] = s2.b[3]; d2.b[1] = s2.b[2]; d2.b[2] = s2.b[1]; d2.b[3] = s2.b[0]; *( ( Cigi_uint32 *)dest) = d2.i; *( ( Cigi_uint32 *)dest + 1) = d1.i; } // ==================================================================== // CigiSwap8 // ==================================================================== CIGI_SPEC void CigiCopy8( void *dest, const void *src) { Cigi_uint32 *tDest = (Cigi_uint32 *)dest; Cigi_uint32 *tSrc = (Cigi_uint32 *)src; *tDest++ = *tSrc++; *tDest = *tSrc; } cigi-ccl-3.3.3a+svn818/source/CigiSymbolCircleDefV3_3.cpp000066400000000000000000000227101210750432300226360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolCircleDefV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 *  04/03/2008 Greg Basler                       2.1.0
 *  Corrected pointer incrementing.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSymbolCircleDefV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(void) { PacketID = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; VariableDataSize = 0; SymbolID = 0; DrawingStyle = Line; StipplePattern = 0; LineWidth = 0.0f; StipplePatternLen = 0.0f; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCircleDefV3_3::~CigiSymbolCircleDefV3_3(void) { } // ================================================ // CigiSymbolCircleDefV3_3 - Copy constructor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(const CigiSymbolCircleDefV3_3 &BaseIn) : CigiBaseSymbolCircleDef((CigiBaseSymbolCircleDef &)BaseIn) { PacketID = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; VariableDataSize = 0; SymbolID = BaseIn.SymbolID; DrawingStyle = BaseIn.DrawingStyle; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; CigiCircleSymbolDataV3_3 *NewCircle = NULL; CigiCircleSymbolDataV3_3 *pCircle; vector::const_iterator iCircle; for(iCircle=BaseIn.Circles.begin();iCircle!=BaseIn.Circles.end();iCircle++) { pCircle = (CigiCircleSymbolDataV3_3 *)*iCircle; if(pCircle != NULL) { NewCircle = new CigiCircleSymbolDataV3_3; *NewCircle = *pCircle; Circles.push_back((CigiBaseCircleSymbolData *)NewCircle); VariableDataSize += CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3; } } } // ================================================ // Copy Operator // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCircleDefV3_3 & CigiSymbolCircleDefV3_3::operator=(const CigiSymbolCircleDefV3_3 &BaseIn) { PacketID = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; CigiBaseCircleSymbolData *pbCircle; vector::iterator ibCircle; for(ibCircle=Circles.begin();ibCircle!=Circles.end();ibCircle++) { pbCircle = *ibCircle; if(pbCircle != NULL) delete pbCircle; } Circles.clear(); VariableDataSize = 0; SymbolID = BaseIn.SymbolID; DrawingStyle = BaseIn.DrawingStyle; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; CigiCircleSymbolDataV3_3 *NewCircle = NULL; CigiCircleSymbolDataV3_3 *pCircle; vector::const_iterator iCircle; for(iCircle=BaseIn.Circles.begin();iCircle!=BaseIn.Circles.end();iCircle++) { pCircle = (CigiCircleSymbolDataV3_3 *)*iCircle; if(pCircle != NULL) { NewCircle = new CigiCircleSymbolDataV3_3; *NewCircle = *pCircle; Circles.push_back((CigiBaseCircleSymbolData *)NewCircle); VariableDataSize += CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3; } } return(*this); } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCircleDefV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiSymbolCircleDefV3_3 * Data = ( CigiSymbolCircleDefV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = (PacketSize + Data->VariableDataSize); *CDta.s++ = Data->SymbolID; *CDta.c++ = (Data->DrawingStyle != 0) ? 1 : 0; *CDta.c++ = 0; *CDta.s++ = Data->StipplePattern; *CDta.f++ = Data->LineWidth; *CDta.f++ = Data->StipplePatternLen; int Cnt; CigiCircleSymbolDataV3_3 *pCircle; vector::iterator iCircle; for(iCircle=Data->Circles.begin();iCircle!=Data->Circles.end();iCircle++) { pCircle = (CigiCircleSymbolDataV3_3 *)*iCircle; if(pCircle != NULL) { Cnt = pCircle->Pack((CigiBaseCircleSymbolData *)pCircle,CDta.c); CDta.c += Cnt; } } return(PacketSize + Data->VariableDataSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCircleDefV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; // Clear the current Circle Vector CigiBaseCircleSymbolData *pbCircle; vector::iterator ibCircle; for(ibCircle=Circles.begin();ibCircle!=Circles.end();ibCircle++) { pbCircle = *ibCircle; if(pbCircle != NULL) delete pbCircle; } Circles.clear(); VariableDataSize = 0; CDta.c++; // Step over packet id // Determine variable data size; int PcktRemain = *CDta.c++; PcktRemain -= CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_SIZE_V3_3; VariableDataSize = PcktRemain; if(!Swap) { SymbolID = *CDta.s++; HDta = *CDta.c++; CDta.c++; StipplePattern = *CDta.s++; LineWidth = *CDta.f++; StipplePatternLen = *CDta.f++; } else { CigiSwap2(&SymbolID, CDta.s++); HDta = *CDta.c++; CDta.c++; CigiSwap2(&StipplePattern, CDta.s++); CigiSwap4(&LineWidth, CDta.f++); CigiSwap4(&StipplePatternLen, CDta.f++); } DrawingStyle = (HDta != 0) ? Fill : Line ; // Unpack Circles int cnt = 0; CigiCircleSymbolDataV3_3 *pCircle; while(PcktRemain >= CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3) { pCircle = new CigiCircleSymbolDataV3_3; Circles.push_back((CigiBaseCircleSymbolData *)pCircle); cnt = pCircle->Unpack(CDta.c,Swap); PcktRemain -= cnt; CDta.c += cnt; } return(PacketSize + VariableDataSize); } // ==================================================================== // Circle Operation // ==================================================================== // ================================================ // AddCircle // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseCircleSymbolData * CigiSymbolCircleDefV3_3::AddCircle(void) { CigiCircleSymbolDataV3_3 *NewCircle = NULL; int Cnt = Circles.size(); if(Cnt < 10) { NewCircle = new CigiCircleSymbolDataV3_3; Circles.push_back((CigiBaseCircleSymbolData *)NewCircle); VariableDataSize += CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3; } return((CigiBaseCircleSymbolData *)NewCircle); } // ================================================ // RemoveCircle // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCircleDefV3_3::RemoveCircle(int CircleIndex, bool bndchk) { int stat = CIGI_SUCCESS; int Cnt = Circles.size(); if((CircleIndex >= 0) && (CircleIndex < Cnt)) { vector::iterator iCircle = Circles.begin(); iCircle += CircleIndex; CigiCircleSymbolDataV3_3 *pCircle = (CigiCircleSymbolDataV3_3 *)*iCircle; if(pCircle != NULL) delete pCircle; Circles.erase(iCircle); VariableDataSize -= CIGI_CIRCLE_SYMBOL_DATA_SIZE_V3_3; if(VariableDataSize < 0) VariableDataSize = 0; } else { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CircleIndex", (int)CircleIndex,0,Cnt); #endif stat = CIGI_ERROR_VALUE_OUT_OF_RANGE; } #endif } return(stat); } cigi-ccl-3.3.3a+svn818/source/CigiSymbolCloneV3_3.cpp000066400000000000000000000071001210750432300220520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolCloneV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  04/03/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSymbolCloneV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCloneV3_3::CigiSymbolCloneV3_3(void) { PacketID = CIGI_SYMBOL_CLONE_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_CLONE_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; SymbolID = 0; SourceType = CigiBaseSymbolClone::SymbolSrc; SourceID = 0; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCloneV3_3::~CigiSymbolCloneV3_3(void) { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCloneV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiSymbolCloneV3_3 * Data = ( CigiSymbolCloneV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->SymbolID; if(Data->SourceType == CigiBaseSymbolClone::SymbolTemplateSrc) *CDta.c++ = 0x01; else *CDta.c++ = 0; *CDta.c++ = 0; *CDta.s++ = Data->SourceID; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCloneV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { SymbolID = *CDta.s++; HDta = *CDta.c++; CDta.c++; SourceID = *CDta.s++; } else { CigiSwap2(&SymbolID, CDta.s++); HDta = *CDta.c++; CDta.c++; CigiSwap2(&SourceID, CDta.s++); } SourceType = (CigiBaseSymbolClone::SymbolSourceGrp)(HDta & 0x01); return(PacketSize); } cigi-ccl-3.3.3a+svn818/source/CigiSymbolCtrlV3_3.cpp000066400000000000000000000126451210750432300217300ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolCtrlV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 *  04/03/2008 Greg Basler                       2.1.0
 *  Corrected pointer incrementing.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSymbolCtrlV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCtrlV3_3::CigiSymbolCtrlV3_3(void) { PacketID = CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_CONTROL_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; SymbolID = 0; SymbolState = CigiBaseSymbolCtrl::Hidden; AttachState = CigiBaseSymbolCtrl::Detach; FlashCtrl = CigiBaseSymbolCtrl::Continue; InheritColor = CigiBaseSymbolCtrl::NotInherit; ParentSymbolID = 0; SurfaceID = 0; Layer = 0; FlashDutyCycle = 0; FlashPeriod = 0.0; UPosition = 0.0; VPosition = 0.0; Rotation = 0.0; Red = 0; Green = 0; Blue = 0; Alpha = 0; ScaleU = 0.0; ScaleV = 0.0; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolCtrlV3_3::~CigiSymbolCtrlV3_3(void) { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCtrlV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiSymbolCtrlV3_3 * Data = ( CigiSymbolCtrlV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->SymbolID; unsigned char HDta = 0; HDta |= (Data->SymbolState & 0x03); HDta |= ((Data->AttachState << 2) & 0x04); HDta |= ((Data->FlashCtrl << 3) & 0x08); HDta |= ((Data->InheritColor << 4) & 0x10); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = Data->ParentSymbolID; *CDta.s++ = Data->SurfaceID; *CDta.c++ = Data->Layer; *CDta.c++ = Data->FlashDutyCycle; *CDta.f++ = Data->FlashPeriod; *CDta.f++ = Data->UPosition; *CDta.f++ = Data->VPosition; *CDta.f++ = Data->Rotation; *CDta.c++ = Data->Red; *CDta.c++ = Data->Green; *CDta.c++ = Data->Blue; *CDta.c++ = Data->Alpha; *CDta.f++ = Data->ScaleU; *CDta.f++ = Data->ScaleV; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolCtrlV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { SymbolID = *CDta.s++; HDta = *CDta.c++; CDta.c++; ParentSymbolID = *CDta.s++; SurfaceID = *CDta.s++; Layer = *CDta.c++; FlashDutyCycle = *CDta.c++; FlashPeriod = *CDta.f++; UPosition = *CDta.f++; VPosition = *CDta.f++; Rotation = *CDta.f++; Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Alpha = *CDta.c++; ScaleU = *CDta.f++; ScaleV = *CDta.f++; } else { CigiSwap2(&SymbolID, CDta.s++); HDta = *CDta.c++; CDta.c++; CigiSwap2(&ParentSymbolID, CDta.s++); CigiSwap2(&SurfaceID, CDta.s++); Layer = *CDta.c++; FlashDutyCycle = *CDta.c++; CigiSwap4(&FlashPeriod, CDta.f++); CigiSwap4(&UPosition, CDta.f++); CigiSwap4(&VPosition, CDta.f++); CigiSwap4(&Rotation, CDta.f++); Red = *CDta.c++; Green = *CDta.c++; Blue = *CDta.c++; Alpha = *CDta.c++; CigiSwap4(&ScaleU, CDta.f++); CigiSwap4(&ScaleV, CDta.f++); } SymbolState = (SymbolStateGrp)(HDta & 0x03); AttachState = (AttachStateGrp)((HDta >> 2) & 0x01); FlashCtrl = (FlashCtrlGrp)((HDta >> 3) & 0x01); InheritColor = (InheritColorGrp)((HDta >> 4) & 0x01); return(PacketSize); } cigi-ccl-3.3.3a+svn818/source/CigiSymbolLineDefV3_3.cpp000066400000000000000000000222511210750432300223240ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolLineDefV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSymbolLineDefV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolLineDefV3_3::CigiSymbolLineDefV3_3(void) { PacketID = CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; VariableDataSize = 0; SymbolID = 0; Primitive = Points; StipplePattern = 0; LineWidth = 0.0f; StipplePatternLen = 0.0f; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolLineDefV3_3::~CigiSymbolLineDefV3_3(void) { } // ================================================ // CigiSymbolLineDefV3_3 - Copy constructor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolLineDefV3_3::CigiSymbolLineDefV3_3(const CigiSymbolLineDefV3_3 &BaseIn) : CigiBaseSymbolLineDef((CigiBaseSymbolLineDef &)BaseIn) { PacketID = CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; VariableDataSize = 0; SymbolID = BaseIn.SymbolID; Primitive = BaseIn.Primitive; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; CigiVertexSymbolDataV3_3 *NewVertex = NULL; CigiVertexSymbolDataV3_3 *pVtx; vector::const_iterator iVtx; for(iVtx=BaseIn.Vertices.begin();iVtx!=BaseIn.Vertices.end();iVtx++) { pVtx = (CigiVertexSymbolDataV3_3 *)*iVtx; if(pVtx != NULL) { NewVertex = new CigiVertexSymbolDataV3_3; *NewVertex = *pVtx; Vertices.push_back((CigiBaseVertexSymbolData *)NewVertex); VariableDataSize += CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3; } } } // ================================================ // Copy operator // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolLineDefV3_3 & CigiSymbolLineDefV3_3::operator=(const CigiSymbolLineDefV3_3 &BaseIn) { PacketID = CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; CigiBaseVertexSymbolData *pbVertex; vector::iterator ibVertex; for(ibVertex=Vertices.begin();ibVertex!=Vertices.end();ibVertex++) { pbVertex = *ibVertex; if(pbVertex != NULL) delete pbVertex; } Vertices.clear(); VariableDataSize = 0; SymbolID = BaseIn.SymbolID; Primitive = BaseIn.Primitive; StipplePattern = BaseIn.StipplePattern; LineWidth = BaseIn.LineWidth; StipplePatternLen = BaseIn.StipplePatternLen; CigiVertexSymbolDataV3_3 *NewVertex = NULL; CigiVertexSymbolDataV3_3 *pVtx; vector::const_iterator iVtx; for(iVtx=BaseIn.Vertices.begin();iVtx!=BaseIn.Vertices.end();iVtx++) { pVtx = (CigiVertexSymbolDataV3_3 *)*iVtx; if(pVtx != NULL) { NewVertex = new CigiVertexSymbolDataV3_3; *NewVertex = *pVtx; Vertices.push_back((CigiBaseVertexSymbolData *)NewVertex); VariableDataSize += CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3; } } return(*this); } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolLineDefV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiSymbolLineDefV3_3 * Data = ( CigiSymbolLineDefV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = (PacketSize + Data->VariableDataSize); *CDta.s++ = Data->SymbolID; *CDta.c++ = (Cigi_uint8)(Data->Primitive & 0x0f); *CDta.c++ = 0; *CDta.s++ = Data->StipplePattern; *CDta.f++ = Data->LineWidth; *CDta.f++ = Data->StipplePatternLen; int Cnt; CigiVertexSymbolDataV3_3 *pVtx; vector::iterator iVtx; for(iVtx=Data->Vertices.begin();iVtx!=Data->Vertices.end();iVtx++) { pVtx = (CigiVertexSymbolDataV3_3 *)*iVtx; if(pVtx != NULL) { Cnt = pVtx->Pack((CigiBaseVertexSymbolData *)pVtx,CDta.c); CDta.c += Cnt; } } return(PacketSize + Data->VariableDataSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolLineDefV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; // Clear the current Vertex Vector CigiBaseVertexSymbolData *pbVtx; vector::iterator ibVtx; for(ibVtx=Vertices.begin();ibVtx!=Vertices.end();ibVtx++) { pbVtx = *ibVtx; if(pbVtx != NULL) delete pbVtx; } Vertices.clear(); VariableDataSize = 0; CDta.c++; // Step over packet id // Determine variable data size; int PcktRemain = *CDta.c++; PcktRemain -= CIGI_SYMBOL_LINE_DEFINITION_PACKET_SIZE_V3_3; VariableDataSize = PcktRemain; if(!Swap) { SymbolID = *CDta.s++; HDta = *CDta.c++; CDta.c++; StipplePattern = *CDta.s++; LineWidth = *CDta.f++; StipplePatternLen = *CDta.f++; } else { CigiSwap2(&SymbolID, CDta.s++); HDta = *CDta.c++; CDta.c++; CigiSwap2(&StipplePattern, CDta.s++); CigiSwap4(&LineWidth, CDta.f++); CigiSwap4(&StipplePatternLen, CDta.f++); } Primitive = (PrimitiveGrp)(HDta & 0x0f); // Unpack Vertices int cnt = 0; CigiVertexSymbolDataV3_3 *pVtx; while(PcktRemain >= CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3) { pVtx = new CigiVertexSymbolDataV3_3; Vertices.push_back((CigiBaseVertexSymbolData *)pVtx); cnt = pVtx->Unpack(CDta.c,Swap); PcktRemain -= cnt; CDta.c += cnt; } return(PacketSize + VariableDataSize); } // ==================================================================== // Vertex Operation // ==================================================================== // ================================================ // AddVertex // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiBaseVertexSymbolData * CigiSymbolLineDefV3_3::AddVertex(void) { CigiVertexSymbolDataV3_3 *NewVertex = NULL; int Cnt = Vertices.size(); if(Cnt < 29) { NewVertex = new CigiVertexSymbolDataV3_3; Vertices.push_back((CigiBaseVertexSymbolData *)NewVertex); VariableDataSize += CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3; } return((CigiBaseVertexSymbolData *)NewVertex); } // ================================================ // RemoveVertex // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolLineDefV3_3::RemoveVertex(int VertexIndex, bool bndchk) { int stat = CIGI_SUCCESS; int Cnt = Vertices.size(); if((VertexIndex >= 0) && (VertexIndex < Cnt)) { vector::iterator iVtx = Vertices.begin(); iVtx += VertexIndex; CigiVertexSymbolDataV3_3 *pVtx = (CigiVertexSymbolDataV3_3 *)*iVtx; if(pVtx != NULL) delete pVtx; Vertices.erase(iVtx); VariableDataSize -= CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3; if(VariableDataSize < 0) VariableDataSize = 0; } else { #ifndef CIGI_NO_BND_CHK if(bndchk) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("VertexIndex", (int)VertexIndex,0,Cnt); #endif stat = CIGI_ERROR_VALUE_OUT_OF_RANGE; } #endif } return(stat); } cigi-ccl-3.3.3a+svn818/source/CigiSymbolSurfaceDefV3_3.cpp000066400000000000000000000136541210750432300230340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolSurfaceDefV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSymbolSurfaceDefV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolSurfaceDefV3_3::CigiSymbolSurfaceDefV3_3(void) { PacketID = CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_SURFACE_DEF_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; SurfaceID = 0; SurfaceState = CigiBaseSymbolSurfaceDef::Active; Attached = CigiBaseSymbolSurfaceDef::EntityAttached; BillboardState = CigiBaseSymbolSurfaceDef::NotBillboard; PerspectiveGrowth = CigiBaseSymbolSurfaceDef::Enable; EntityViewID = 0; XLeft = 0.0; YRight = 0.0; ZTop = 0.0; YawBottom = 0.0; Pitch = 0.0; Roll = 0.0; Width = 0.0; Height = 0.0; MinU = 0.0; MaxU = 0.0; MinV = 0.0; MaxV = 0.0; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolSurfaceDefV3_3::~CigiSymbolSurfaceDefV3_3(void) { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolSurfaceDefV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiSymbolSurfaceDefV3_3 * Data = ( CigiSymbolSurfaceDefV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->SurfaceID; unsigned char HDta = 0; HDta |= (Data->SurfaceState & 0x01); HDta |= ((Data->Attached << 1) & 0x02); HDta |= ((Data->BillboardState << 2) & 0x04); HDta |= ((Data->PerspectiveGrowth << 3) & 0x08); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = Data->EntityViewID; *CDta.f++ = Data->XLeft; *CDta.f++ = Data->YRight; *CDta.f++ = Data->ZTop; *CDta.f++ = Data->YawBottom; if(Attached == Data->EntityAttached) { *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Width; *CDta.f++ = Data->Height; } else { *CDta.l++ = 0; *CDta.l++ = 0; *CDta.l++ = 0; *CDta.l++ = 0; } *CDta.f++ = Data->MinU; *CDta.f++ = Data->MaxU; *CDta.f++ = Data->MinV; *CDta.f++ = Data->MaxV; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolSurfaceDefV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { SurfaceID = *CDta.s++; HDta = *CDta.c++; Attached = (AttachStateGrp)((HDta >> 1) & 0x01); CDta.c++; EntityViewID = *CDta.s++; XLeft = *CDta.f++; YRight = *CDta.f++; ZTop = *CDta.f++; YawBottom = *CDta.f++; if(Attached == EntityAttached) { Pitch = *CDta.f++; Roll = *CDta.f++; Width = *CDta.f++; Height = *CDta.f++; } else { CDta.l += 4; Pitch = 0.0f; Roll = 0.0f; Width = 0.0f; Height = 0.0f; } MinU = *CDta.f++; MaxU = *CDta.f++; MinV = *CDta.f++; MaxV = *CDta.f++; } else { CigiSwap2(&SurfaceID, CDta.s++); HDta = *CDta.c++; Attached = (AttachStateGrp)((HDta >> 1) & 0x01); CDta.c++; CigiSwap2(&EntityViewID, CDta.s++); CigiSwap4(&XLeft, CDta.f++); CigiSwap4(&YRight, CDta.f++); CigiSwap4(&ZTop, CDta.f++); CigiSwap4(&YawBottom, CDta.f++); if(Attached == EntityAttached) { CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Width, CDta.f++); CigiSwap4(&Height, CDta.f++); } else { CDta.l += 4; Pitch = 0.0f; Roll = 0.0f; Width = 0.0f; Height = 0.0f; } CigiSwap4(&MinU, CDta.f++); CigiSwap4(&MaxU, CDta.f++); CigiSwap4(&MinV, CDta.f++); CigiSwap4(&MaxV, CDta.f++); } SurfaceState = (StateGrp)(HDta & 0x01); BillboardState = (BillboardStateGrp)((HDta >> 2) & 0x01); PerspectiveGrowth = (PerspectiveGrowthStateGrp)((HDta >> 3) & 0x01); return(PacketSize); } cigi-ccl-3.3.3a+svn818/source/CigiSymbolTextDefV3_3.cpp000066400000000000000000000135031210750432300223610ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiSymbolTextDefV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  03/11/2008 Greg Basler                       CIGI_SYM_1
 *  Initial Release.
 *  
 *  04/03/2008 Greg Basler                       2.1.0
 *  Corrected pointer incrementing.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiSymbolTextDefV3_3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" using namespace std; // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolTextDefV3_3::CigiSymbolTextDefV3_3(void) { PacketID = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; VariableDataSize = 4; SymbolID = 0; Alignment = TopLeft; Orientation = LeftToRight; FontID = 0; FontSize = 10.0; Text.clear(); } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolTextDefV3_3::~CigiSymbolTextDefV3_3(void) { } // ================================================ // CigiSymbolTextDefV3_3 - Constructor with text // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolTextDefV3_3::CigiSymbolTextDefV3_3(const std::string &TextIn) { PacketID = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; VariableDataSize = 4; SymbolID = 0; Alignment = TopLeft; Orientation = LeftToRight; FontID = 0; FontSize = 10.0; SetText(TextIn,false); } // ================================================ // CigiSymbolTextDefV3_3 - Copy Constructor // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiSymbolTextDefV3_3::CigiSymbolTextDefV3_3(const CigiSymbolTextDefV3_3 &BaseIn) : CigiBaseSymbolTextDef((CigiBaseSymbolTextDef &)BaseIn) { PacketID = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3; PacketSize = CIGI_SYMBOL_TEXT_DEFINITION_PACKET_SIZE_V3_3; Version = 3; MinorVersion = 3; } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolTextDefV3_3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiSymbolTextDefV3_3 * Data = ( CigiSymbolTextDefV3_3 *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = (PacketSize + Data->VariableDataSize); *CDta.s++ = Data->SymbolID; unsigned char HDta = 0; HDta |= (Data->Alignment & 0x0F); HDta |= ((Data->Orientation << 4) & 0x30); *CDta.c++ = HDta; *CDta.c++ = Data->FontID; *CDta.s++ = 0; *CDta.f++ = Data->FontSize; int tSz = Data->Text.size(); memcpy(CDta.c,Data->Text.c_str(),tSz); CDta.c += tSz; memset(CDta.c,0,(Data->VariableDataSize - tSz)); return(PacketSize + Data->VariableDataSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiSymbolTextDefV3_3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; CDta.c++; // Step over packet id // Determine variable data size; VariableDataSize = *CDta.c - CIGI_SYMBOL_TEXT_DEFINITION_PACKET_SIZE_V3_3; CDta.c++; if(!Swap) { SymbolID = *CDta.s++; HDta = *CDta.c++; FontID = *CDta.c++; CDta.s++; FontSize = *CDta.f++; } else { CigiSwap2(&SymbolID, CDta.s++); HDta = *CDta.c++; FontID = *CDta.c++; CDta.s++; CigiSwap4(&FontSize, CDta.f++); } #ifdef WIN32 // this version will walk off the end of the array if the array is not // null-terminated Text = (char*)CDta.c; #elif defined( __GNUC__ ) // this version adds bogus nulls to the end // Text.assign( (char*)CDta.c, VariableDataSize ); // this version is correct, but traverses the string twice (once to // determine length, and again to copy) Text.assign( (char*)CDta.c, strnlen( (char*)CDta.c, VariableDataSize ) ); #else // unsafe version for unrecognized compilers // this version will walk off the end of the array if the array is not // null-terminated Text = (char*)CDta.c; #endif Alignment = (AlignmentGrp)(HDta & 0x0f); Orientation = (OrientationGrp)((HDta >> 4) & 0x03); return(PacketSize + VariableDataSize); } cigi-ccl-3.3.3a+svn818/source/CigiTerrestrialSurfaceCtrlV3.cpp000066400000000000000000000113101210750432300240360ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTerrestrialSurfaceCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiTerrestrialSurfaceCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiTerrestrialSurfaceCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTerrestrialSurfaceCtrlV3::CigiTerrestrialSurfaceCtrlV3() { PacketID = CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3; PacketSize = CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityRgnID = 0; SurfaceCondID = 0; SurfaceCondEn = false; Scope = Global; Severity = 0; Coverage = 0; } // ================================================ // ~CigiTerrestrialSurfaceCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTerrestrialSurfaceCtrlV3::~CigiTerrestrialSurfaceCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTerrestrialSurfaceCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseTerrestrialSurfaceCtrl * Data = ( CigiBaseTerrestrialSurfaceCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityRgnID; *CDta.s++ = Data->SurfaceCondID; Cigi_uint8 HDta = (Data->SurfaceCondEn) ? 0x01 : 0; HDta |= (Data->Scope << 1) & 0x06; HDta |= (Data->Severity << 3) & 0xf8; *CDta.c++ = HDta; *CDta.c++ = Data->Coverage; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTerrestrialSurfaceCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityRgnID = *CDta.s++; SurfaceCondID = *CDta.s++; Cigi_uint8 HDta = *CDta.c++; SurfaceCondEn = ((HDta & 0x01) != 0); Scope = (ScopeGrp)((HDta >> 1) & 0x03); Severity = (HDta >> 3) & 0x1f; Coverage = *CDta.c++; } else { CigiSwap2(&EntityRgnID, CDta.s++); CigiSwap2(&SurfaceCondID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; SurfaceCondEn = ((HDta & 0x01) != 0); Scope = (ScopeGrp)((HDta >> 1) & 0x03); Severity = (HDta >> 3) & 0x1f; Coverage = *CDta.c++; } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiTerrestrialSurfaceRespV3.cpp000066400000000000000000000100641210750432300240500ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTerrestrialSurfaceRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiTerrestrialSurfaceRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiTerrestrialSurfaceRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTerrestrialSurfaceRespV3::CigiTerrestrialSurfaceRespV3() { PacketID = CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3; PacketSize = CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; RequestID = 0; SurfaceConditionID = 0; } // ================================================ // ~CigiTerrestrialSurfaceRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTerrestrialSurfaceRespV3::~CigiTerrestrialSurfaceRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTerrestrialSurfaceRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseTerrestrialSurfaceResp * Data = ( CigiBaseTerrestrialSurfaceResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->RequestID; *CDta.c++ = 0; *CDta.l++ = Data->SurfaceConditionID; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTerrestrialSurfaceRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size RequestID = *CDta.c++; CDta.c++; if(!Swap) SurfaceConditionID = *CDta.l++; else CigiSwap4(&SurfaceConditionID, CDta.l++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiTrajectoryDefV1.cpp000066400000000000000000000116131210750432300221510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTrajectoryDefV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiTrajectoryDefV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiTrajectoryDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTrajectoryDefV1::CigiTrajectoryDefV1() { PacketID = CIGI_TRAJECTORY_DEF_PACKET_ID_V1; PacketSize = CIGI_TRAJECTORY_DEF_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; Accel = 0.0; RetardationRate = 0.0; TermVel = 0.0; Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; AccelX = 0.0; AccelY = 0.0; AccelZ = 0.0; } // ================================================ // ~CigiTrajectoryDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTrajectoryDefV1::~CigiTrajectoryDefV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseTrajectoryDef * Data = ( CigiBaseTrajectoryDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); CIGI_SCOPY4(CDta.f++, &Data->Accel); CIGI_SCOPY4(CDta.f++, &Data->RetardationRate); CIGI_SCOPY4(CDta.f++, &Data->TermVel); CIGI_SCOPY4(CDta.f++, &Data->Xoff); CIGI_SCOPY4(CDta.f++, &Data->Yoff); CIGI_SCOPY4(CDta.f++, &Data->Zoff); memcpy(Buff,tBuf,CIGI_TRAJECTORY_DEF_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_TRAJECTORY_DEF_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); CIGI_SCOPY4(&Accel, CDta.f++); CIGI_SCOPY4(&RetardationRate, CDta.f++); CIGI_SCOPY4(&TermVel, CDta.f++); CIGI_SCOPY4(&Xoff, CDta.f++); CIGI_SCOPY4(&Yoff, CDta.f++); CIGI_SCOPY4(&Zoff, CDta.f++); AccelX = 0.0f; AccelY = 0.0f; AccelZ = Accel; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiTrajectoryDefV2.cpp000066400000000000000000000113401210750432300221470ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTrajectoryDefV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiTrajectoryDefV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiTrajectoryDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTrajectoryDefV2::CigiTrajectoryDefV2() { PacketID = CIGI_TRAJECTORY_DEF_PACKET_ID_V2; PacketSize = CIGI_TRAJECTORY_DEF_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; Accel = 0.0; RetardationRate = 0.0; TermVel = 0.0; Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; AccelX = 0.0; AccelY = 0.0; AccelZ = 0.0; } // ================================================ // ~CigiTrajectoryDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTrajectoryDefV2::~CigiTrajectoryDefV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseTrajectoryDef * Data = ( CigiBaseTrajectoryDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); CIGI_SCOPY4(CDta.f++, &Data->Accel); CIGI_SCOPY4(CDta.f++, &Data->RetardationRate); CIGI_SCOPY4(CDta.f++, &Data->TermVel); memcpy(Buff,tBuf,CIGI_TRAJECTORY_DEF_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_TRAJECTORY_DEF_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); CIGI_SCOPY4(&Accel, CDta.f++); CIGI_SCOPY4(&RetardationRate, CDta.f++); CIGI_SCOPY4(&TermVel, CDta.f++); Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; AccelX = 0.0f; AccelY = 0.0f; AccelZ = Accel; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiTrajectoryDefV3.cpp000066400000000000000000000130171210750432300221530ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiTrajectoryDefV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #include #define _EXPORT_CCL_ #include "CigiTrajectoryDefV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiTrajectoryDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTrajectoryDefV3::CigiTrajectoryDefV3() { PacketID = CIGI_TRAJECTORY_DEF_PACKET_ID_V3; PacketSize = CIGI_TRAJECTORY_DEF_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; Accel = 0.0; RetardationRate = 0.0; TermVel = 0.0; Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; AccelX = 0.0f; AccelY = 0.0f; AccelZ = 0.0f; } // ================================================ // ~CigiTrajectoryDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiTrajectoryDefV3::~CigiTrajectoryDefV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseTrajectoryDef * Data = ( CigiBaseTrajectoryDef *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityID; *CDta.f++ = Data->AccelX; *CDta.f++ = Data->AccelY; *CDta.f++ = Data->AccelZ; *CDta.f++ = Data->RetardationRate; *CDta.f++ = Data->TermVel; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; AccelX = *CDta.f++; AccelY = *CDta.f++; AccelZ = *CDta.f++; RetardationRate = *CDta.f++; TermVel = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); CigiSwap4(&AccelX, CDta.f++); CigiSwap4(&AccelY, CDta.f++); CigiSwap4(&AccelZ, CDta.f++); CigiSwap4(&RetardationRate, CDta.f++); CigiSwap4(&TermVel, CDta.f++); } Accel = (float)sqrt((double)((AccelX*AccelX) + (AccelY*AccelY) + (AccelZ*AccelZ))); Xoff = 0.0; Yoff = 0.0; Zoff = 0.0; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // AccelX // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV3::SetAccelX(const float AccelIn, bool bndchk) { AccelX = AccelIn; Accel = (float)sqrt((double)((AccelX*AccelX) + (AccelY*AccelY) + (AccelZ*AccelZ))); return(CIGI_SUCCESS); } // ================================================ // AccelY // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV3::SetAccelY(const float AccelIn, bool bndchk) { AccelY = AccelIn; Accel = (float)sqrt((double)((AccelX*AccelX) + (AccelY*AccelY) + (AccelZ*AccelZ))); return(CIGI_SUCCESS); } // ================================================ // AccelZ // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiTrajectoryDefV3::SetAccelZ(const float AccelIn, bool bndchk) { AccelZ = AccelIn; Accel = (float)sqrt((double)((AccelX*AccelX) + (AccelY*AccelY) + (AccelZ*AccelZ))); return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiVertexSymbolDataV3_3.cpp000066400000000000000000000061031210750432300230630ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiVertexSymbolDataV3_3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  01/17/2008 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiVertexSymbolDataV3_3.h" #include "CigiExceptions.h" #include "CigiSwapping.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiVertexSymbolDataV3_3::CigiVertexSymbolDataV3_3(void) { VertexU = 0.0f; VertexV = 0.0f; } // ================================================ // ~CigiBaseEntityCtrl // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiVertexSymbolDataV3_3::~CigiVertexSymbolDataV3_3(void) { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiVertexSymbolDataV3_3::Pack(CigiBaseVertexSymbolData * Base, Cigi_uint8 * Buff) const { PackPointer CDta; CigiVertexSymbolDataV3_3 * Data = ( CigiVertexSymbolDataV3_3 *)Base; CDta.c = Buff; *CDta.f++ = Data->VertexU; *CDta.f++ = Data->VertexV; return(CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiVertexSymbolDataV3_3::Unpack(Cigi_uint8 * Buff, bool Swap) { PackPointer CDta; unsigned char HDta = 0; CDta.c = Buff; if(!Swap) { VertexU = *CDta.f++; VertexV = *CDta.f++; } else { CigiSwap4(&VertexU, CDta.f++); CigiSwap4(&VertexV, CDta.f++); } return(CIGI_VERTEX_SYMBOL_DATA_SIZE_V3_3); } cigi-ccl-3.3.3a+svn818/source/CigiViewCtrlV1.cpp000066400000000000000000000146021210750432300211440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiViewCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiViewCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewCtrlV1::CigiViewCtrlV1() { PacketID = CIGI_VIEW_CTRL_PACKET_ID_V1; PacketSize = CIGI_VIEW_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; ViewID = 0; GroupID = 0; XOffEn = true; YOffEn = true; ZOffEn = true; RollEn = true; PitchEn = true; YawEn = true; XOff = 0.0; YOff = 0.0; ZOff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiViewCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewCtrlV1::~CigiViewCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseViewCtrl * Data = ( CigiBaseViewCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = 0; if(Data->ViewID < 32) HDta = (Cigi_uint8)((Data->ViewID << 3) & 0xf8); else HDta = (Cigi_uint8)0xf8; if(Data->GroupID < 8) HDta |= (Cigi_uint8)(Data->GroupID & 0x07); else HDta |= (Cigi_uint8)0x07; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.f++, &Data->XOff); CIGI_SCOPY4(CDta.f++, &Data->YOff); CIGI_SCOPY4(CDta.f++, &Data->ZOff); CIGI_SCOPY4(CDta.f++, &Data->Roll); CIGI_SCOPY4(CDta.f++, &Data->Pitch); CIGI_SCOPY4(CDta.f++, &Data->Yaw); memcpy(Buff,tBuf,CIGI_VIEW_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_VIEW_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint16)((HDta >> 3) & 0x1f); GroupID = (Cigi_uint8)(HDta & 0x07); CDta.c += 3; CIGI_SCOPY4(&XOff, CDta.f++); CIGI_SCOPY4(&YOff, CDta.f++); CIGI_SCOPY4(&ZOff, CDta.f++); CIGI_SCOPY4(&Roll, CDta.f++); CIGI_SCOPY4(&Pitch, CDta.f++); CIGI_SCOPY4(&Yaw, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV1::SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = (Cigi_uint16)ViewIDIn; return(CIGI_SUCCESS); } // ================================================ // GroupID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV1::SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GroupIDIn < 0)||(GroupIDIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GroupID",(Cigi_uint8)GroupIDIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GroupID = GroupIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiViewCtrlV2.cpp000066400000000000000000000155701210750432300211520ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiViewCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiViewCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewCtrlV2::CigiViewCtrlV2() { PacketID = CIGI_VIEW_CTRL_PACKET_ID_V2; PacketSize = CIGI_VIEW_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; ViewID = 0; GroupID = 0; XOffEn = false; YOffEn = false; ZOffEn = false; RollEn = false; PitchEn = false; YawEn = false; XOff = 0.0; YOff = 0.0; ZOff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiViewCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewCtrlV2::~CigiViewCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseViewCtrl * Data = ( CigiBaseViewCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = 0; if(Data->ViewID < 32) HDta = (Cigi_uint8)((Data->ViewID << 3) & 0xf8); else HDta = (Cigi_uint8)0xf8; if(Data->GroupID < 8) HDta |= (Cigi_uint8)(Data->GroupID & 0x07); else HDta |= (Cigi_uint8)0x07; *CDta.c++ = HDta; HDta = 0; if(Data->XOffEn) HDta |= 0x80; if(Data->YOffEn) HDta |= 0x40; if(Data->ZOffEn) HDta |= 0x20; if(Data->RollEn) HDta |= 0x10; if(Data->PitchEn) HDta |= 0x08; if(Data->YawEn) HDta |= 0x04; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.f++, &Data->XOff); CIGI_SCOPY4(CDta.f++, &Data->YOff); CIGI_SCOPY4(CDta.f++, &Data->ZOff); CIGI_SCOPY4(CDta.f++, &Data->Roll); CIGI_SCOPY4(CDta.f++, &Data->Pitch); CIGI_SCOPY4(CDta.f++, &Data->Yaw); memcpy(Buff,tBuf,CIGI_VIEW_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_VIEW_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint16)((HDta >> 3) & 0x1f); GroupID = (Cigi_uint8)(HDta & 0x07); HDta = *CDta.c++; XOffEn = ((HDta & 0x80) != 0); YOffEn = ((HDta & 0x40) != 0); ZOffEn = ((HDta & 0x20) != 0); RollEn = ((HDta & 0x10) != 0); PitchEn = ((HDta & 0x08) != 0); YawEn = ((HDta & 0x04) != 0); CDta.c += 2; CIGI_SCOPY4(&XOff, CDta.f++); CIGI_SCOPY4(&YOff, CDta.f++); CIGI_SCOPY4(&ZOff, CDta.f++); CIGI_SCOPY4(&Roll, CDta.f++); CIGI_SCOPY4(&Pitch, CDta.f++); CIGI_SCOPY4(&Yaw, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ViewID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV2::SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = (Cigi_uint16)ViewIDIn; return(CIGI_SUCCESS); } // ================================================ // GroupID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV2::SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GroupIDIn < 0)||(GroupIDIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GroupID",(Cigi_uint8)GroupIDIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GroupID = GroupIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiViewCtrlV3.cpp000066400000000000000000000124321210750432300211450ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiViewCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiViewCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewCtrlV3::CigiViewCtrlV3() { PacketID = CIGI_VIEW_CTRL_PACKET_ID_V3; PacketSize = CIGI_VIEW_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; ViewID = 0; GroupID = 0; XOffEn = false; YOffEn = false; ZOffEn = false; RollEn = false; PitchEn = false; YawEn = false; XOff = 0.0; YOff = 0.0; ZOff = 0.0; Roll = 0.0; Pitch = 0.0; Yaw = 0.0; } // ================================================ // ~CigiViewCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewCtrlV3::~CigiViewCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseViewCtrl * Data = ( CigiBaseViewCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ViewID; *CDta.c++ = Data->GroupID; Cigi_uint8 HDta = 0; if(Data->XOffEn) HDta |= 0x01; if(Data->YOffEn) HDta |= 0x02; if(Data->ZOffEn) HDta |= 0x04; if(Data->RollEn) HDta |= 0x08; if(Data->PitchEn) HDta |= 0x10; if(Data->YawEn) HDta |= 0x20; *CDta.c++ = HDta; *CDta.s++ = Data->EntityID; *CDta.f++ = Data->XOff; *CDta.f++ = Data->YOff; *CDta.f++ = Data->ZOff; *CDta.f++ = Data->Roll; *CDta.f++ = Data->Pitch; *CDta.f++ = Data->Yaw; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { ViewID = *CDta.s++; GroupID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; XOffEn = ((HDta & 0x01) != 0); YOffEn = ((HDta & 0x02) != 0); ZOffEn = ((HDta & 0x04) != 0); RollEn = ((HDta & 0x08) != 0); PitchEn = ((HDta & 0x10) != 0); YawEn = ((HDta & 0x20) != 0); EntityID = *CDta.s++; XOff = *CDta.f++; YOff = *CDta.f++; ZOff = *CDta.f++; Roll = *CDta.f++; Pitch = *CDta.f++; Yaw = *CDta.f++; } else { CigiSwap2(&ViewID, CDta.s++); GroupID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; XOffEn = ((HDta & 0x01) != 0); YOffEn = ((HDta & 0x02) != 0); ZOffEn = ((HDta & 0x04) != 0); RollEn = ((HDta & 0x08) != 0); PitchEn = ((HDta & 0x10) != 0); YawEn = ((HDta & 0x20) != 0); CigiSwap2(&EntityID, CDta.s++); CigiSwap4(&XOff, CDta.f++); CigiSwap4(&YOff, CDta.f++); CigiSwap4(&ZOff, CDta.f++); CigiSwap4(&Roll, CDta.f++); CigiSwap4(&Pitch, CDta.f++); CigiSwap4(&Yaw, CDta.f++); } return(PacketSize); } cigi-ccl-3.3.3a+svn818/source/CigiViewDefV1.cpp000066400000000000000000000157241210750432300207440ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewDefV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiViewDefV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiViewDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewDefV1::CigiViewDefV1() { PacketID = CIGI_VIEW_DEF_PACKET_ID_V1; PacketSize = CIGI_VIEW_DEF_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; ViewID = 0; GroupID = 0; FOVNearEn = true; FOVFarEn = true; FOVLeftEn = true; FOVRightEn = true; FOVTopEn = true; FOVBottomEn = true; MirrorMode = MirrorNone; PixelReplicateMode = ReplicateNone; ProjectionType = Perspective; Reorder = false; ViewType = 0; TrackerAssigned = false; FOVNear = 0.0; FOVFar = 0.0; FOVLeft = 0.0; FOVRight = 0.0; FOVTop = 0.0; FOVBottom = 0.0; } // ================================================ // ~CigiViewDefV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewDefV1::~CigiViewDefV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseViewDef * Data = ( CigiBaseViewDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; Cigi_uint8 HDta = 0; if(Data->ViewID < 32) HDta = (Cigi_uint8)(Data->ViewID << 3); else HDta = (Cigi_uint8)0xf8; if(Data->GroupID < 8) HDta |= (Cigi_uint8)Data->GroupID; else HDta |= 7; *CDta.c++ = HDta; HDta = (Data->ViewType << 5) & 0xe0; HDta |= (Cigi_uint8)((Data->PixelReplicateMode << 2) & 0x1c); HDta |= (Cigi_uint8)(Data->MirrorMode & 0x03); *CDta.c++ = HDta; HDta = 0; if(Data->TrackerAssigned) HDta = 0x80; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.s++ = 0; CIGI_SCOPY4(CDta.f++, &Data->FOVNear); CIGI_SCOPY4(CDta.f++, &Data->FOVFar); CIGI_SCOPY4(CDta.f++, &Data->FOVLeft); CIGI_SCOPY4(CDta.f++, &Data->FOVRight); CIGI_SCOPY4(CDta.f++, &Data->FOVTop); CIGI_SCOPY4(CDta.f++, &Data->FOVBottom); memcpy(Buff,tBuf,CIGI_VIEW_DEF_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_VIEW_DEF_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint8)((HDta >> 3) & 0x1f); GroupID = (Cigi_uint8)(HDta & 0x07); HDta = *CDta.c++; ViewType = (Cigi_uint8)((HDta >> 5) & 0x07); PixelReplicateMode = (PixelReplicateModeGrp)((HDta >> 2) & 0x07); MirrorMode = (MirrorModeGrp)(HDta & 0x03); HDta = *CDta.c ++ & 0x80; TrackerAssigned = (HDta == 0) ? false : true; CDta.c += 3; CIGI_SCOPY4(&FOVNear, CDta.f++); CIGI_SCOPY4(&FOVFar, CDta.f++); CIGI_SCOPY4(&FOVLeft, CDta.f++); CIGI_SCOPY4(&FOVRight, CDta.f++); CIGI_SCOPY4(&FOVTop, CDta.f++); CIGI_SCOPY4(&FOVBottom, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // View ID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV1::SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = (Cigi_uint16)ViewIDIn; return(CIGI_SUCCESS); } // ================================================ // Group ID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV1::SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GroupIDIn < 0)||(GroupIDIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GroupID",(Cigi_uint16)GroupIDIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GroupID = GroupIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiViewDefV2.cpp000066400000000000000000000166731210750432300207510ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewDefV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiViewDefV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiViewDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewDefV2::CigiViewDefV2() { PacketID = CIGI_VIEW_DEF_PACKET_ID_V2; PacketSize = CIGI_VIEW_DEF_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; ViewID = 0; GroupID = 0; FOVNearEn = false; FOVFarEn = false; FOVLeftEn = false; FOVRightEn = false; FOVTopEn = false; FOVBottomEn = false; MirrorMode = MirrorNone; PixelReplicateMode = ReplicateNone; ProjectionType = Perspective; Reorder = false; ViewType = 0; TrackerAssigned = false; FOVNear = 0.0; FOVFar = 0.0; FOVLeft = 0.0; FOVRight = 0.0; FOVTop = 0.0; FOVBottom = 0.0; } // ================================================ // ~CigiViewDefV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewDefV2::~CigiViewDefV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseViewDef * Data = ( CigiBaseViewDef *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; Cigi_uint8 HDta = 0; if(Data->ViewID < 32) HDta = (Cigi_uint8)(Data->ViewID << 3); else HDta = (Cigi_uint8)0xf8; if(Data->GroupID < 8) HDta |= (Cigi_uint8)Data->GroupID; else HDta |= 7; *CDta.c++ = HDta; HDta = (Data->ViewType << 5) & 0xe0; HDta |= (Cigi_uint8)((Data->PixelReplicateMode << 2) & 0x1c); HDta |= (Cigi_uint8)(Data->MirrorMode & 0x03); *CDta.c++ = HDta; HDta = (Data->TrackerAssigned) ? 0x80 : 0; if(Data->FOVNearEn) HDta |= 0x40; if(Data->FOVFarEn) HDta |= 0x20; if(Data->FOVLeftEn) HDta |= 0x10; if(Data->FOVRightEn) HDta |= 0x08; if(Data->FOVTopEn) HDta |= 0x04; if(Data->FOVBottomEn) HDta |= 0x02; *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.c++ = 0; *CDta.c++ = 0; CIGI_SCOPY4(CDta.f++, &Data->FOVNear); CIGI_SCOPY4(CDta.f++, &Data->FOVFar); CIGI_SCOPY4(CDta.f++, &Data->FOVLeft); CIGI_SCOPY4(CDta.f++, &Data->FOVRight); CIGI_SCOPY4(CDta.f++, &Data->FOVTop); CIGI_SCOPY4(CDta.f++, &Data->FOVBottom); memcpy(Buff,tBuf,CIGI_VIEW_DEF_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; memcpy(tBuf,Buff,CIGI_VIEW_DEF_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size Cigi_uint8 HDta = *CDta.c++; ViewID = (Cigi_uint8)((HDta >> 3) & 0x1f); GroupID = (Cigi_uint8)(HDta & 0x07); HDta = *CDta.c++; ViewType = (Cigi_uint8)((HDta >> 5) & 0x07); PixelReplicateMode = (PixelReplicateModeGrp)((HDta >> 2) & 0x07); MirrorMode = (MirrorModeGrp)(HDta & 0x03); HDta = *CDta.c++; TrackerAssigned = ((HDta & 0x80) != 0); FOVNearEn = ((HDta & 0x40) != 0); FOVFarEn = ((HDta & 0x20) != 0); FOVLeftEn = ((HDta & 0x10) != 0); FOVRightEn = ((HDta & 0x08) != 0); FOVTopEn = ((HDta & 0x04) != 0); FOVBottomEn = ((HDta & 0x02) != 0); CDta.c += 3; CIGI_SCOPY4(&FOVNear, CDta.f++); CIGI_SCOPY4(&FOVFar, CDta.f++); CIGI_SCOPY4(&FOVLeft, CDta.f++); CIGI_SCOPY4(&FOVRight, CDta.f++); CIGI_SCOPY4(&FOVTop, CDta.f++); CIGI_SCOPY4(&FOVBottom, CDta.f++); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // View ID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV2::SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ViewIDIn < 0)||(ViewIDIn > 31))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ViewID",(Cigi_uint16)ViewIDIn,0,31); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ViewID = (Cigi_uint16)ViewIDIn; return(CIGI_SUCCESS); } // ================================================ // Group ID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV2::SetGroupID(const Cigi_uint8 GroupIDIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((GroupIDIn < 0)||(GroupIDIn > 7))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("GroupID",(Cigi_uint16)GroupIDIn,0,7); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif GroupID = GroupIDIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiViewDefV3.cpp000066400000000000000000000147311210750432300207430ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiViewDefV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiViewDefV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiViewDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewDefV3::CigiViewDefV3() { PacketID = CIGI_VIEW_DEF_PACKET_ID_V3; PacketSize = CIGI_VIEW_DEF_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; ViewID = 0; GroupID = 0; FOVNearEn = false; FOVFarEn = false; FOVLeftEn = false; FOVRightEn = false; FOVTopEn = false; FOVBottomEn = false; MirrorMode = MirrorNone; PixelReplicateMode = ReplicateNone; ProjectionType = Perspective; Reorder = false; ViewType = 0; TrackerAssigned = false; FOVNear = 0.0; FOVFar = 0.0; FOVLeft = 0.0; FOVRight = 0.0; FOVTop = 0.0; FOVBottom = 0.0; } // ================================================ // ~CigiViewDefV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiViewDefV3::~CigiViewDefV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseViewDef * Data = ( CigiBaseViewDef *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->ViewID; *CDta.c++ = Data->GroupID; Cigi_uint8 HDta = (Cigi_uint8)((Data->MirrorMode << 6) & 0xc0); if(Data->FOVBottomEn) HDta |= 0x20; if(Data->FOVTopEn) HDta |= 0x10; if(Data->FOVRightEn) HDta |= 0x08; if(Data->FOVLeftEn) HDta |= 0x04; if(Data->FOVFarEn) HDta |= 0x02; if(Data->FOVNearEn) HDta |= 0x01; *CDta.c++ = HDta; HDta = (Cigi_uint8)((Data->ViewType << 5) & 0xe0); if(Data->Reorder) HDta |= 0x10; if(Data->ProjectionType == Orthographic) HDta |= 0x08; HDta |= (Cigi_uint8)(Data->PixelReplicateMode & 0x07); *CDta.c++ = HDta; *CDta.c++ = 0; *CDta.f++ = Data->FOVNear; *CDta.f++ = Data->FOVFar; *CDta.f++ = Data->FOVLeft; *CDta.f++ = Data->FOVRight; *CDta.f++ = Data->FOVTop; *CDta.f++ = Data->FOVBottom; return(CIGI_VIEW_DEF_PACKET_SIZE_V3); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Skip over packet id and size; if(!Swap) ViewID = *CDta.s++; else CigiSwap2(&ViewID, CDta.s++); GroupID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; MirrorMode = (MirrorModeGrp)((HDta >> 6) & 0x03); FOVBottomEn = ((HDta & 0x20) != 0); FOVTopEn = ((HDta & 0x10) != 0); FOVRightEn = ((HDta & 0x08) != 0); FOVLeftEn = ((HDta & 0x04) != 0); FOVFarEn = ((HDta & 0x02) != 0); FOVNearEn = ((HDta & 0x01) != 0); HDta = *CDta.c++; ViewType = (HDta >> 5) & 0x07; Reorder = ((HDta & 0x10) != 0); ProjectionType = (ProjectionTypeGrp)((HDta >> 3) & 0x01); PixelReplicateMode = (PixelReplicateModeGrp)(HDta & 0x07); CDta.c++; if(!Swap) { FOVNear = *CDta.f++; FOVFar = *CDta.f++; FOVLeft = *CDta.f++; FOVRight = *CDta.f++; FOVTop = *CDta.f++; FOVBottom = *CDta.f++; } else { CigiSwap4(&FOVNear, CDta.f++); CigiSwap4(&FOVFar, CDta.f++); CigiSwap4(&FOVLeft, CDta.f++); CigiSwap4(&FOVRight, CDta.f++); CigiSwap4(&FOVTop, CDta.f++); CigiSwap4(&FOVBottom, CDta.f++); } return(CIGI_VIEW_DEF_PACKET_SIZE_V3); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // ProjectionType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiViewDefV3::SetProjectionType(const ProjectionTypeGrp ProjectionTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ProjectionType < 0)||(ProjectionType > 1))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("ProjectionType",(ProjectionTypeGrp)ProjectionTypeIn,0,1); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif ProjectionType = ProjectionTypeIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiWaveCtrlV3.cpp000066400000000000000000000121171210750432300211350ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWaveCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiWaveCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiWaveCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWaveCtrlV3::CigiWaveCtrlV3() { PacketID = CIGI_WAVE_CTRL_PACKET_ID_V3; PacketSize = CIGI_WAVE_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityRgnID = 0; WaveID = 0; WaveEn = false; Scope = Global; Breaker = Plunging; WaveHt = 0.0; WaveLen = 0.0; Period = 0.0; Direction = 0.0; PhaseOff = 0.0; Leading = 0.0; } // ================================================ // ~CigiWaveCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWaveCtrlV3::~CigiWaveCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWaveCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseWaveCtrl * Data = ( CigiBaseWaveCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.s++ = Data->EntityRgnID; *CDta.c++ = Data->WaveID; Cigi_uint8 HDta = (Data->WaveEn) ? 0x01 : 0; HDta |= (Data->Scope<< 1) & 0x06; HDta |= (Data->Breaker << 3) & 0x18; *CDta.c++ = HDta; *CDta.s++ = 0; *CDta.f++ = Data->WaveHt; *CDta.f++ = Data->WaveLen; *CDta.f++ = Data->Period; *CDta.f++ = Data->Direction; *CDta.f++ = Data->PhaseOff; *CDta.f++ = Data->Leading; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWaveCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityRgnID = *CDta.s++; WaveID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; WaveEn = ((HDta & 0x01) != 0); Scope = (ScopeGrp)((HDta >> 1) & 0x03); Breaker = (BreakerGrp)((HDta >> 3) & 0x03); CDta.s++; WaveHt = *CDta.f++; WaveLen = *CDta.f++; Period = *CDta.f++; Direction = *CDta.f++; PhaseOff = *CDta.f++; Leading = *CDta.f++; } else { CigiSwap2(&EntityRgnID, CDta.s++); WaveID = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; WaveEn = ((HDta & 0x01) != 0); Scope = (ScopeGrp)((HDta >> 1) & 0x03); Breaker = (BreakerGrp)((HDta >> 3) & 0x03); CDta.s++; CigiSwap4(&WaveHt, CDta.f++); CigiSwap4(&WaveLen, CDta.f++); CigiSwap4(&Period, CDta.f++); CigiSwap4(&Direction, CDta.f++); CigiSwap4(&PhaseOff, CDta.f++); CigiSwap4(&Leading, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiWeatherCondRespV3.cpp000066400000000000000000000111201210750432300224340ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCondRespV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiWeatherCondRespV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiWeatherCondRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCondRespV3::CigiWeatherCondRespV3() { PacketID = CIGI_WEATHER_COND_RESP_PACKET_ID_V3; PacketSize = CIGI_WEATHER_COND_RESP_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; RequestID = 0; Humidity = 0; AirTemp = 0.0; Visibility = 0.0; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 0.0; } // ================================================ // ~CigiWeatherCondRespV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCondRespV3::~CigiWeatherCondRespV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCondRespV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseWeatherCondResp * Data = ( CigiBaseWeatherCondResp *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; *CDta.c++ = Data->RequestID; *CDta.c++ = Data->Humidity; *CDta.f++ = Data->AirTemp; *CDta.f++ = Data->Visibility; *CDta.f++ = Data->HorizWindSp; *CDta.f++ = Data->VertWindSp; *CDta.f++ = Data->WindDir; *CDta.f++ = Data->BaroPress; *CDta.l++ = 0; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCondRespV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; CDta.c = Buff; CDta.c += 2; // Step over packet id and size RequestID = *CDta.c++; Humidity = *CDta.c++; if(!Swap) { AirTemp = *CDta.f++; Visibility = *CDta.f++; HorizWindSp = *CDta.f++; VertWindSp = *CDta.f++; WindDir = *CDta.f++; BaroPress = *CDta.f++; } else { CigiSwap4(&AirTemp, CDta.f++); CigiSwap4(&Visibility, CDta.f++); CigiSwap4(&HorizWindSp, CDta.f++); CigiSwap4(&VertWindSp, CDta.f++); CigiSwap4(&WindDir, CDta.f++); CigiSwap4(&BaroPress, CDta.f++); } return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== cigi-ccl-3.3.3a+svn818/source/CigiWeatherCtrlV1.cpp000066400000000000000000000215411210750432300216310ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCtrlV1.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiWeatherCtrlV1.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiWeatherCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCtrlV1::CigiWeatherCtrlV1() { PacketID = CIGI_WEATHER_CTRL_PACKET_ID_V1; PacketSize = CIGI_WEATHER_CTRL_PACKET_SIZE_V1; Version = 1; MinorVersion = 0; EntityID = 0; RegionID = 0; LayerID = 0; Humidity = 0; PhenomenonType = 0; WeatherEn = false; ScudEn = false; RandomWindsEn = false; RandomLightningEn = false; CloudType = None; Scope = Global; Severity = 0; AirTemp = 0.0; VisibilityRng = 0.0; Opacity = 0.0; ScudFreq = 0.0; Coverage = 0.0; BaseElev = 0.0; Thickness = 0.0; Transition = 0.0; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; Aerosol = 0.0; } // ================================================ // ~CigiWeatherCtrlV1 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCtrlV1::~CigiWeatherCtrlV1() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV1::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseWeatherCtrl * Data = ( CigiBaseWeatherCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->WeatherEn) ? 0x80 : 0x00; HDta |= (Data->ScudEn) ? 0x40 : 0x00; HDta |= (Data->RandomWindsEn) ? 0x20 : 0x00; HDta |= (Data->Severity << 2) & 0x1c; *CDta.c++ = HDta; *CDta.c++ = 0x00; Cigi_uint16 tType = 0; if(Data->Version <= 2) tType = Data->PhenomenonType; else { if(Data->Scope == CigiBaseWeatherCtrl::Entity) tType = 0; else { tType = (Cigi_uint16)Data->LayerID; if(tType == 0) tType = 3; } } CIGI_SCOPY2(CDta.s++, &tType); CIGI_SCOPY4(CDta.f++, &Data->AirTemp); if(Data->PhenomenonType == 3) CIGI_SCOPY4(CDta.f++, &Data->VisibilityRng); else CIGI_SCOPY4(CDta.f++, &Data->Opacity); CIGI_SCOPY4(CDta.f++, &Data->ScudFreq); CIGI_SCOPY4(CDta.f++, &Data->Coverage); CIGI_SCOPY4(CDta.f++, &Data->BaseElev); CIGI_SCOPY4(CDta.f++, &Data->Thickness); CIGI_SCOPY4(CDta.f++, &Data->Transition); CIGI_SCOPY4(CDta.f++, &Data->HorizWindSp); float Wndir = Data->WindDir; if(Wndir < 0.0f) Wndir += 360.0; CIGI_SCOPY4(CDta.f++, &Wndir); memcpy(Buff,tBuf,CIGI_WEATHER_CTRL_PACKET_SIZE_V1); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV1::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; Cigi_uint16 LayerTbl[7] = { 1,1,2,0,4,5,8 }; memcpy(tBuf,Buff,CIGI_WEATHER_CTRL_PACKET_SIZE_V1); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; WeatherEn = ((HDta & 0x80) != 0); ScudEn = ((HDta & 0x40) != 0); RandomWindsEn = ((HDta & 0x20) != 0); Severity = (HDta >> 2) & 0x07; CDta.c++; CIGI_SCOPY2(&PhenomenonType, CDta.s++); CIGI_SCOPY4(&AirTemp, CDta.f++); if(PhenomenonType == 3) { CIGI_SCOPY4(&VisibilityRng, CDta.f++); Opacity = ((VisibilityRng/70000.0f)*100.0f); } else { CIGI_SCOPY4(&Opacity, CDta.f++); VisibilityRng = ((Opacity/100.0f)*70000.0f); } CIGI_SCOPY4(&ScudFreq, CDta.f++); CIGI_SCOPY4(&Coverage, CDta.f++); CIGI_SCOPY4(&BaseElev, CDta.f++); CIGI_SCOPY4(&Thickness, CDta.f++); CIGI_SCOPY4(&Transition, CDta.f++); CIGI_SCOPY4(&HorizWindSp, CDta.f++); CIGI_SCOPY4(&WindDir, CDta.f++); RegionID = 0; Humidity = 0; RandomLightningEn = false; CloudType = None; if(PhenomenonType == 0) { LayerID = 1; Scope = Entity; } else { Scope = Global; if(PhenomenonType < 7) LayerID = (Cigi_uint8)LayerTbl[PhenomenonType]; else if(PhenomenonType < 256) LayerID = (Cigi_uint8)PhenomenonType; else LayerID = 255; } VertWindSp = 0.0f; BaroPress = 1013.25f; Aerosol = 0.0f; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Phenomenon Type // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV1::SetPhenomenonType(const Cigi_uint16 PhenomenonTypeIn, bool bndchk) { Cigi_uint16 LayerTbl[7] = { 1,1,2,0,4,5,8 }; PhenomenonType = PhenomenonTypeIn; if(PhenomenonType == 0) { LayerID = 1; Scope = Entity; } else { Scope = Global; if(PhenomenonType < 7) LayerID = (Cigi_uint8)LayerTbl[PhenomenonType]; else if(PhenomenonType < 256) LayerID = (Cigi_uint8)PhenomenonType; else LayerID = 255; } return(CIGI_SUCCESS); } // ================================================ // Opacity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV1::SetOpacity(const float OpacityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((OpacityIn < 0.0)||(OpacityIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Opacity",(float)OpacityIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Opacity = OpacityIn; VisibilityRng = ((Opacity/100.0f)*70000.0f); return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV1::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiWeatherCtrlV2.cpp000066400000000000000000000215411210750432300216320ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCtrlV2.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Changed native C++ types to use CCL-defined types instead where appropriate.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiWeatherCtrlV2.h" #include "CigiSwapping.h" #include "CigiExceptions.h" #include #ifdef CIGI_LITTLE_ENDIAN #define CIGI_SCOPY2 CigiSwap2 #define CIGI_SCOPY4 CigiSwap4 #define CIGI_SCOPY8 CigiSwap8 #else #define CIGI_SCOPY2 CigiCopy2 #define CIGI_SCOPY4 CigiCopy4 #define CIGI_SCOPY8 CigiCopy8 #endif // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiWeatherCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCtrlV2::CigiWeatherCtrlV2() { PacketID = CIGI_WEATHER_CTRL_PACKET_ID_V2; PacketSize = CIGI_WEATHER_CTRL_PACKET_SIZE_V2; Version = 2; MinorVersion = 0; EntityID = 0; RegionID = 0; LayerID = 0; Humidity = 0; PhenomenonType = 0; WeatherEn = false; ScudEn = false; RandomWindsEn = false; RandomLightningEn = false; CloudType = None; Scope = Global; Severity = 0; AirTemp = 0.0; VisibilityRng = 0.0; Opacity = 0.0; ScudFreq = 0.0; Coverage = 0.0; BaseElev = 0.0; Thickness = 0.0; Transition = 0.0; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; Aerosol = 0.0; } // ================================================ // ~CigiWeatherCtrlV2 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCtrlV2::~CigiWeatherCtrlV2() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV2::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; CigiBaseWeatherCtrl * Data = ( CigiBaseWeatherCtrl *)Base; CDta.d = DBuf; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; CIGI_SCOPY2(CDta.s++, &Data->EntityID); Cigi_uint8 HDta = (Data->WeatherEn) ? 0x80 : 0x00; HDta |= (Data->ScudEn) ? 0x40 : 0x00; HDta |= (Data->RandomWindsEn) ? 0x20 : 0x00; HDta |= (Data->Severity << 2) & 0x1c; *CDta.c++ = HDta; *CDta.c++ = 0x00; Cigi_uint16 tType = 0; if(Data->Version <= 2) tType = Data->PhenomenonType; else { if(Data->Scope == CigiBaseWeatherCtrl::Entity) tType = 0; else { tType = (Cigi_uint16)Data->LayerID; if(tType == 0) tType = 3; } } CIGI_SCOPY2(CDta.s++, &tType); CIGI_SCOPY4(CDta.f++, &Data->AirTemp); if(Data->PhenomenonType == 3) CIGI_SCOPY4(CDta.f++, &Data->VisibilityRng); else CIGI_SCOPY4(CDta.f++, &Data->Opacity); CIGI_SCOPY4(CDta.f++, &Data->ScudFreq); CIGI_SCOPY4(CDta.f++, &Data->Coverage); CIGI_SCOPY4(CDta.f++, &Data->BaseElev); CIGI_SCOPY4(CDta.f++, &Data->Thickness); CIGI_SCOPY4(CDta.f++, &Data->Transition); CIGI_SCOPY4(CDta.f++, &Data->HorizWindSp); float Wndir = Data->WindDir; if(Wndir < 0.0f) Wndir += 360.0; CIGI_SCOPY4(CDta.f++, &Wndir); memcpy(Buff,tBuf,CIGI_WEATHER_CTRL_PACKET_SIZE_V2); return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV2::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { double DBuf[6]; Cigi_uint8 *tBuf = (Cigi_uint8 *)DBuf; PackPointer CDta; Cigi_uint16 LayerTbl[7] = { 1,1,2,0,4,5,8 }; memcpy(tBuf,Buff,CIGI_WEATHER_CTRL_PACKET_SIZE_V2); CDta.d = DBuf; CDta.c += 2; // Step over packet id and size CIGI_SCOPY2(&EntityID, CDta.s++); Cigi_uint8 HDta = *CDta.c++; WeatherEn = ((HDta & 0x80) != 0); ScudEn = ((HDta & 0x40) != 0); RandomWindsEn = ((HDta & 0x20) != 0); Severity = (HDta >> 2) & 0x07; CDta.c++; CIGI_SCOPY2(&PhenomenonType, CDta.s++); CIGI_SCOPY4(&AirTemp, CDta.f++); if(PhenomenonType == 3) { CIGI_SCOPY4(&VisibilityRng, CDta.f++); Opacity = ((VisibilityRng/70000.0f)*100.0f); } else { CIGI_SCOPY4(&Opacity, CDta.f++); VisibilityRng = ((Opacity/100.0f)*70000.0f); } CIGI_SCOPY4(&ScudFreq, CDta.f++); CIGI_SCOPY4(&Coverage, CDta.f++); CIGI_SCOPY4(&BaseElev, CDta.f++); CIGI_SCOPY4(&Thickness, CDta.f++); CIGI_SCOPY4(&Transition, CDta.f++); CIGI_SCOPY4(&HorizWindSp, CDta.f++); CIGI_SCOPY4(&WindDir, CDta.f++); RegionID = 0; Humidity = 0; RandomLightningEn = false; CloudType = None; if(PhenomenonType == 0) { LayerID = 1; Scope = Entity; } else { Scope = Global; if(PhenomenonType < 7) LayerID = (Cigi_uint8)LayerTbl[PhenomenonType]; else if(PhenomenonType < 256) LayerID = (Cigi_uint8)PhenomenonType; else LayerID = 255; } VertWindSp = 0.0f; BaroPress = 1013.25f; Aerosol = 0.0f; return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Phenomenon Type // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV2::SetPhenomenonType(const Cigi_uint16 PhenomenonTypeIn, bool bndchk) { Cigi_uint16 LayerTbl[7] = { 1,1,2,0,4,5,8 }; PhenomenonType = PhenomenonTypeIn; if(PhenomenonType == 0) { LayerID = 1; Scope = Entity; } else { Scope = Global; if(PhenomenonType < 7) LayerID = (Cigi_uint8)LayerTbl[PhenomenonType]; else if(PhenomenonType < 256) LayerID = (Cigi_uint8)PhenomenonType; else LayerID = 255; } return(CIGI_SUCCESS); } // ================================================ // Opacity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV2::SetOpacity(const float OpacityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((OpacityIn < 0.0)||(OpacityIn > 100.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Opacity",(float)OpacityIn,0.0,100.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Opacity = OpacityIn; VisibilityRng = ((Opacity/100.0f)*70000.0f); return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV2::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/CigiWeatherCtrlV3.cpp000066400000000000000000000225061210750432300216350ustar00rootroot00000000000000/**
 *  The SDK is used to create and format CIGI compliant messages.
 *  Copyright (c) 2001-2005 The Boeing Company
 *  
 *  This library is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU Lesser General Public License as published by 
 *  the Free Software Foundation; either version 2.1 of the License, or (at 
 *  your option) any later version.
 *  
 *  This library is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 *  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more 
 *  details.
 *  
 *  You should have received a copy of the GNU Lesser General Public License 
 *  along with this library; if not, write to the Free Software Foundation, 
 *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *  
 *  FILENAME:   CigiWeatherCtrlV3.cpp
 *  LANGUAGE:   C++
 *  CLASS:      UNCLASSIFIED
 *  PROJECT:    Common Image Generator Interface (CIGI) SDK
 *  
 *  PROGRAM DESCRIPTION: 
 *  ...
 *  
 *  MODIFICATION NOTES:
 *  DATE     NAME                                SCR NUMBER
 *  DESCRIPTION OF CHANGE........................
 *  
 *  09/17/2003 Greg Basler                       CIGI_CR_DR_1
 *  Initial Release.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Defined _EXPORT_CCL_ for exporting the class in a Windows DLL.
 *  
 *  01/21/2005 Greg Basler                       Version 1.5
 *  Removed the inline defnitions for the PackedPointer union.
 *  
 *  04/14/2006 Greg Basler                       Version 1.7.0
 *  Modified the class constructor to initialize the MinorVersion member 
 *  variable.
 *  
 *  06/23/2006 Greg Basler                       Version 1.7.1
 *  Changed native char and unsigned char types to CIGI types Cigi_int8 and 
 *  Cigi_uint8.
 * 
* Author: The Boeing Company * */ #define _EXPORT_CCL_ #include "CigiWeatherCtrlV3.h" #include "CigiSwapping.h" #include "CigiExceptions.h" // ==================================================================== // Construction/Destruction // ==================================================================== // ================================================ // CigiWeatherCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCtrlV3::CigiWeatherCtrlV3() { PacketID = CIGI_WEATHER_CTRL_PACKET_ID_V3; PacketSize = CIGI_WEATHER_CTRL_PACKET_SIZE_V3; Version = 3; MinorVersion = 0; EntityID = 0; RegionID = 0; LayerID = 0; Humidity = 0; PhenomenonType = 0; WeatherEn = false; ScudEn = false; RandomWindsEn = false; RandomLightningEn = false; CloudType = None; Scope = Global; Severity = 0; AirTemp = 0.0; VisibilityRng = 0.0; Opacity = 0.0; ScudFreq = 0.0; Coverage = 0.0; BaseElev = 0.0; Thickness = 0.0; Transition = 0.0; HorizWindSp = 0.0; VertWindSp = 0.0; WindDir = 0.0; BaroPress = 1013.25; Aerosol = 0.0; } // ================================================ // ~CigiWeatherCtrlV3 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv CigiWeatherCtrlV3::~CigiWeatherCtrlV3() { } // ==================================================================== // Pack and Unpack // ==================================================================== // ================================================ // Pack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const { PackPointer CDta; CigiBaseWeatherCtrl * Data = ( CigiBaseWeatherCtrl *)Base; CDta.c = Buff; *CDta.c++ = PacketID; *CDta.c++ = PacketSize; if(Data->Scope == Global) *CDta.s++ = 0; else if(Data->Scope == Regional) *CDta.s++ = Data->RegionID; else *CDta.s++ = Data->EntityID; *CDta.c++ = Data->LayerID; *CDta.c++ = Data->Humidity; Cigi_uint8 HDta = (Data->WeatherEn) ? 0x01 : 0x00; HDta |= (Data->ScudEn) ? 0x02 : 0x00; HDta |= (Data->RandomWindsEn) ? 0x04 : 0x00; HDta |= (Data->RandomLightningEn) ? 0x08 : 0x00; HDta |= (Data->CloudType << 4) & 0xf0; *CDta.c++ = HDta; HDta = Data->Scope & 0x03; HDta |= (Data->Severity << 2) & 0x1c; *CDta.c++ = HDta; *CDta.f++ = Data->AirTemp; *CDta.f++ = Data->VisibilityRng; *CDta.f++ = Data->ScudFreq; *CDta.f++ = Data->Coverage; *CDta.f++ = Data->BaseElev; *CDta.f++ = Data->Thickness; *CDta.f++ = Data->Transition; *CDta.f++ = Data->HorizWindSp; *CDta.f++ = Data->VertWindSp; float Wndir = Data->WindDir; if(Wndir > 180.0) Wndir -= 360.0; *CDta.f++ = Wndir; *CDta.f++ = Data->BaroPress; *CDta.f++ = Data->Aerosol; return(PacketSize); } // ================================================ // Unpack // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) { PackPointer CDta; static Cigi_uint8 PhenTbl[10] = { 3,1,2,2,4,5,5,5,6,6 }; CDta.c = Buff; CDta.c += 2; // Step over packet id and size if(!Swap) { EntityID = *CDta.s++; LayerID = *CDta.c++; Humidity = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; WeatherEn = ((HDta & 0x01) != 0); ScudEn = ((HDta & 0x02) != 0); RandomWindsEn = ((HDta & 0x04) != 0); RandomLightningEn = ((HDta & 0x08) != 0); CloudType = (CloudTypeGrp)((HDta >> 4) & 0x0f); HDta = *CDta.c++; Scope = (ScopeGrp)(HDta & 0x03); Severity = (HDta >> 2) & 0x07; AirTemp = *CDta.f++; VisibilityRng = *CDta.f++; ScudFreq = *CDta.f++; Coverage = *CDta.f++; BaseElev = *CDta.f++; Thickness = *CDta.f++; Transition = *CDta.f++; HorizWindSp = *CDta.f++; VertWindSp = *CDta.f++; WindDir = *CDta.f++; BaroPress = *CDta.f++; Aerosol = *CDta.f++; } else { CigiSwap2(&EntityID, CDta.s++); LayerID = *CDta.c++; Humidity = *CDta.c++; Cigi_uint8 HDta = *CDta.c++; WeatherEn = ((HDta & 0x01) != 0); ScudEn = ((HDta & 0x02) != 0); RandomWindsEn = ((HDta & 0x04) != 0); RandomLightningEn = ((HDta & 0x08) != 0); CloudType = (CloudTypeGrp)((HDta >> 4) & 0x0f); HDta = *CDta.c++; Scope = (ScopeGrp)(HDta & 0x03); Severity = (HDta >> 2) & 0x07; CigiSwap4(&AirTemp, CDta.f++); CigiSwap4(&VisibilityRng, CDta.f++); CigiSwap4(&ScudFreq, CDta.f++); CigiSwap4(&Coverage, CDta.f++); CigiSwap4(&BaseElev, CDta.f++); CigiSwap4(&Thickness, CDta.f++); CigiSwap4(&Transition, CDta.f++); CigiSwap4(&HorizWindSp, CDta.f++); CigiSwap4(&VertWindSp, CDta.f++); CigiSwap4(&WindDir, CDta.f++); CigiSwap4(&BaroPress, CDta.f++); CigiSwap4(&Aerosol, CDta.f++); } RegionID = EntityID; if(Scope == Entity) PhenomenonType = 0; else if(LayerID < 10) { PhenomenonType = PhenTbl[LayerID]; } else PhenomenonType = LayerID; Opacity = ((VisibilityRng/70000.0f)*100.0f); return(PacketSize); } // ==================================================================== // Accessors // ==================================================================== // ================================================ // Layer ID // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::SetLayerID(const Cigi_uint8 LayerIDIn, bool bndchk) { LayerID = LayerIDIn; return(CIGI_SUCCESS); } // ================================================ // Humidity // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::SetHumidity(const Cigi_uint8 HumidityIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((HumidityIn < 0)||(HumidityIn > 100))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Humidity",(Cigi_uint8)HumidityIn,0,100); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Humidity = HumidityIn; return(CIGI_SUCCESS); } // ================================================ // CloudType // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::SetCloudType(const CloudTypeGrp CloudTypeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((CloudTypeIn < 0)||(CloudTypeIn > 15))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("CloudType",(CloudTypeGrp)CloudTypeIn,0,15); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif CloudType = CloudTypeIn; return(CIGI_SUCCESS); } // ================================================ // Scope // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::SetScope(const ScopeGrp ScopeIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((ScopeIn < 0)||(ScopeIn > 2))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,2); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif Scope = ScopeIn; return(CIGI_SUCCESS); } // ================================================ // WindDir // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv int CigiWeatherCtrlV3::SetWindDir(const float WindDirIn, bool bndchk) { #ifndef CIGI_NO_BND_CHK if(bndchk && ((WindDirIn < -180.0)||(WindDirIn > 180.0))) { #ifndef CIGI_NO_EXCEPT throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,-180.0,180.0); #endif return(CIGI_ERROR_VALUE_OUT_OF_RANGE); } #endif WindDir = WindDirIn; return(CIGI_SUCCESS); } cigi-ccl-3.3.3a+svn818/source/Makefile.am000066400000000000000000000105401210750432300177270ustar00rootroot00000000000000lib_LTLIBRARIES = libcigicl.la # all of the source files needed to compile the lib libcigicl_la_SOURCES = \ CigiAerosolRespV3.cpp\ CigiAnimationStopV3.cpp\ CigiAnimationTable.cpp\ CigiArtPartCtrlV1.cpp\ CigiArtPartCtrlV2.cpp\ CigiArtPartCtrlV3.cpp\ CigiAtmosCtrl.cpp\ CigiBaseAerosolResp.cpp\ CigiBaseArtPartCtrl.cpp\ CigiBaseCircleSymbolData.cpp\ CigiBaseCollDetSegResp.cpp\ CigiBaseCollDetVolDef.cpp\ CigiBaseCollDetVolResp.cpp\ CigiBaseConfClampEntityCtrl.cpp\ CigiBaseEntityCtrl.cpp\ CigiBaseEnvCondReq.cpp\ CigiBaseEnvCtrl.cpp\ CigiBaseEnvRgnCtrl.cpp\ CigiBaseEventNotification.cpp\ CigiBaseHatHotReq.cpp\ CigiBaseIGCtrl.cpp\ CigiBaseLosResp.cpp\ CigiBaseLosSegReq.cpp\ CigiBaseLosVectReq.cpp\ CigiBaseMaritimeSurfaceCtrl.cpp\ CigiBaseMaritimeSurfaceResp.cpp\ CigiBaseMotionTrackCtrl.cpp\ CigiBasePositionReq.cpp\ CigiBasePositionResp.cpp\ CigiBaseSOF.cpp\ CigiBaseSensorCtrl.cpp\ CigiBaseSensorResp.cpp\ CigiBaseShortArtPartCtrl.cpp\ CigiBaseShortSymbolCtrl.cpp\ CigiBaseSpecEffDef.cpp\ CigiBaseSymbolCircleDef.cpp\ CigiBaseSymbolClone.cpp\ CigiBaseSymbolCtrl.cpp\ CigiBaseSymbolLineDef.cpp\ CigiBaseSymbolSurfaceDef.cpp\ CigiBaseSymbolTextDef.cpp\ CigiBaseTerrestrialSurfaceCtrl.cpp\ CigiBaseTrajectoryDef.cpp\ CigiBaseViewCtrl.cpp\ CigiBaseViewDef.cpp\ CigiBaseWaveCtrl.cpp\ CigiBaseWeatherCondResp.cpp\ CigiBaseWeatherCtrl.cpp\ CigiCelestialCtrl.cpp\ CigiCircleSymbolDataV3_3.cpp\ CigiCollDetSegDefV1.cpp\ CigiCollDetSegDefV2.cpp\ CigiCollDetSegDefV3.cpp\ CigiCollDetSegRespV1.cpp\ CigiCollDetSegRespV2.cpp\ CigiCollDetSegRespV3.cpp\ CigiCollDetVolDefV2.cpp\ CigiCollDetVolDefV3.cpp\ CigiCollDetVolRespV2.cpp\ CigiCollDetVolRespV3.cpp\ CigiCompCtrlV1.cpp\ CigiCompCtrlV2.cpp\ CigiCompCtrlV3.cpp\ CigiCompCtrlV3_3.cpp\ CigiConfClampEntityCtrlV3.cpp\ CigiDefaultPacket.cpp\ CigiEarthModelDefV3.cpp\ CigiEntityCtrlV1.cpp\ CigiEntityCtrlV2.cpp\ CigiEntityCtrlV3.cpp\ CigiEntityCtrlV3_3.cpp\ CigiEnvCondReqV3.cpp\ CigiEnvCtrlV1.cpp\ CigiEnvCtrlV2.cpp\ CigiEnvRgnCtrlV3.cpp\ CigiEventNotificationV3.cpp\ CigiHatHotReqV3.cpp\ CigiHatHotReqV3_2.cpp\ CigiHatHotRespV3.cpp\ CigiHatHotRespV3_2.cpp\ CigiHatHotXRespV3.cpp\ CigiHatHotXRespV3_2.cpp\ CigiHatReqV1.cpp\ CigiHatReqV2.cpp\ CigiHatRespV1.cpp\ CigiHatRespV2.cpp\ CigiHostSession.cpp\ CigiHotReqV2.cpp\ CigiHotRespV2.cpp\ CigiIGCtrlV1.cpp\ CigiIGCtrlV2.cpp\ CigiIGCtrlV3.cpp\ CigiIGCtrlV3_2.cpp\ CigiIGCtrlV3_3.cpp\ CigiIGMsgV2.cpp\ CigiIGMsgV3.cpp\ CigiIGSession.cpp\ CigiIO.cpp\ CigiIncomingMsg.cpp\ CigiLosRespV1.cpp\ CigiLosRespV2.cpp\ CigiLosRespV3.cpp\ CigiLosRespV3_2.cpp\ CigiLosSegReqV1.cpp\ CigiLosSegReqV2.cpp\ CigiLosSegReqV3.cpp\ CigiLosSegReqV3_2.cpp\ CigiLosVectReqV1.cpp\ CigiLosVectReqV2.cpp\ CigiLosVectReqV3.cpp\ CigiLosVectReqV3_2.cpp\ CigiLosXRespV3.cpp\ CigiLosXRespV3_2.cpp\ CigiMaritimeSurfaceCtrlV3.cpp\ CigiMaritimeSurfaceRespV3.cpp\ CigiMessage.cpp\ CigiMotionTrackCtrlV3.cpp\ CigiOutgoingMsg.cpp\ CigiPositionReqV3.cpp\ CigiPositionRespV3.cpp\ CigiRateCtrlV1.cpp\ CigiRateCtrlV2.cpp\ CigiRateCtrlV3.cpp\ CigiRateCtrlV3_2.cpp\ CigiSOFV1.cpp\ CigiSOFV2.cpp\ CigiSOFV3.cpp\ CigiSOFV3_2.cpp\ CigiSensorCtrlV1.cpp\ CigiSensorCtrlV2.cpp\ CigiSensorCtrlV3.cpp\ CigiSensorRespV1.cpp\ CigiSensorRespV2.cpp\ CigiSensorRespV3.cpp\ CigiSensorXRespV3.cpp\ CigiSession.cpp\ CigiShortArtPartCtrlV3.cpp\ CigiShortCompCtrlV3.cpp\ CigiShortCompCtrlV3_3.cpp\ CigiShortSymbolCtrlV3_3.cpp\ CigiSpecEffDefV1.cpp\ CigiSpecEffDefV2.cpp\ CigiSwapping.cpp\ CigiSymbolCircleDefV3_3.cpp\ CigiSymbolCloneV3_3.cpp\ CigiSymbolCtrlV3_3.cpp\ CigiSymbolLineDefV3_3.cpp\ CigiSymbolSurfaceDefV3_3.cpp\ CigiSymbolTextDefV3_3.cpp\ CigiTerrestrialSurfaceCtrlV3.cpp\ CigiTerrestrialSurfaceRespV3.cpp\ CigiTrajectoryDefV1.cpp\ CigiTrajectoryDefV2.cpp\ CigiTrajectoryDefV3.cpp\ CigiVertexSymbolDataV3_3.cpp\ CigiViewCtrlV1.cpp\ CigiViewCtrlV2.cpp\ CigiViewCtrlV3.cpp\ CigiViewDefV1.cpp\ CigiViewDefV2.cpp\ CigiViewDefV3.cpp\ CigiWaveCtrlV3.cpp\ CigiWeatherCondRespV3.cpp\ CigiWeatherCtrlV1.cpp\ CigiWeatherCtrlV2.cpp\ CigiWeatherCtrlV3.cpp INCLUDES = \ -I$(top_srcdir)/include # The arguments below will be passed to libtool (a linker wrapper) and # are very necessary. Particularly, the "-no-undefined" flag is required for # building DLLs on cygwin/win32 platforms. libcigicl_la_LDFLAGS = \ -no-undefined\ -version-info 0:0:0