#include <CigiOutgoingMsg.h>
Inheritance diagram for CigiOutgoingMsg:
Definition at line 92 of file CigiOutgoingMsg.h.
CigiOutgoingMsg::CigiOutgoingMsg | ( | ) |
General Constructor
Definition at line 139 of file CigiOutgoingMsg.cpp.
References CmdVersion, CmdVersionChng, DefaultPacket, FrameCnt, LastRcvdFrame, MostMatureVersionReceived, OutgoingHandlerTbl, pIGCtrlPck, pSOFPck, CigiVersionID::SetCigiVersion(), and VldSnd.
00140 { 00141 00142 pIGCtrlPck[0] = NULL; 00143 pIGCtrlPck[1] = new CigiIGCtrlV1; 00144 pIGCtrlPck[2] = new CigiIGCtrlV2; 00145 pIGCtrlPck[3] = new CigiIGCtrlV3; 00146 pIGCtrlPck[4] = new CigiIGCtrlV3_2; 00147 pIGCtrlPck[5] = new CigiIGCtrlV3_3; 00148 00149 pSOFPck[0] = NULL; 00150 pSOFPck[1] = new CigiSOFV1; 00151 pSOFPck[2] = new CigiSOFV2; 00152 pSOFPck[3] = new CigiSOFV3; 00153 pSOFPck[4] = new CigiSOFV3_2; 00154 00155 for(int ndx=0;ndx<256;ndx++) 00156 { 00157 OutgoingHandlerTbl[ndx] = (CigiBasePacket *)&DefaultPacket; 00158 VldSnd[ndx] = false; 00159 } 00160 00161 CmdVersionChng = false; 00162 CmdVersion.SetCigiVersion(3,3); 00163 MostMatureVersionReceived.SetCigiVersion(0,0); 00164 00165 FrameCnt = 0; 00166 LastRcvdFrame = 0; 00167 00168 }
CigiOutgoingMsg::~CigiOutgoingMsg | ( | ) | [virtual] |
General Destructor
Definition at line 173 of file CigiOutgoingMsg.cpp.
References ClearHandlerTable(), pIGCtrlPck, and pSOFPck.
00174 { 00175 int ndx; 00176 for(ndx=1;ndx<6;ndx++) 00177 { 00178 delete pIGCtrlPck[ndx]; 00179 } 00180 for(ndx=1;ndx<5;ndx++) 00181 { 00182 delete pSOFPck[ndx]; 00183 } 00184 00185 ClearHandlerTable(); 00186 00187 }
void CigiOutgoingMsg::AdvanceBuffer | ( | void | ) | [protected] |
Inserts a new buffer into the active buffer list and initiates it as the buffer currently being filled.
Definition at line 211 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessage::AvailBuff, CigiMessageBuffer::Buffer, CigiMessageBuffer::BufferFillCnt, CigiMessage::Buffers, CigiMessage::BufferSize, ChangeBufferCigiVersion(), ChangeOutgoingCigiVersion(), CigiVersionID::CigiMajorVersion, CmdVersion, CmdVersionChng, CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiMessageBuffer::FillBufferPos, CigiMessageBuffer::Locked, MostMatureVersionReceived, OutgoingVersion, CigiVersionID::SetCigiVersion(), and CigiMessageBuffer::ValidIGCtrlSOF.
Referenced by LockMsg(), operator<<(), and PackObj().
00212 { 00213 if(AvailBuff.empty()) 00214 { 00215 // Create a new buffer 00216 CrntFillBuf = new CigiMessageBuffer(BufferSize); 00217 } 00218 else 00219 { 00220 // Get the first buffer in the Available Buffers list 00221 CrntFillBuf = (*AvailBuff.begin()); 00222 AvailBuff.pop_front(); 00223 } 00224 00225 // Add the buffer to the Active Buffers list 00226 Buffers.push_back(CrntFillBuf); 00227 00228 // Initialize the buffer 00229 CrntFillBuf->Active = true; 00230 CrntFillBuf->BufferFillCnt = 0; 00231 CrntFillBuf->DataPresent = false; 00232 CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer; 00233 CrntFillBuf->Locked = false; 00234 CrntFillBuf->ValidIGCtrlSOF = false; 00235 00236 if(CmdVersionChng) 00237 { 00238 MostMatureVersionReceived.SetCigiVersion(0,0); 00239 ChangeOutgoingCigiVersion(CmdVersion); 00240 CmdVersionChng = false; 00241 } 00242 else if((OutgoingVersion != MostMatureVersionReceived) && 00243 (MostMatureVersionReceived.CigiMajorVersion > 0)) 00244 ChangeOutgoingCigiVersion(MostMatureVersionReceived); 00245 00246 // Set the buffer's Cigi Version 00247 ChangeBufferCigiVersion(OutgoingVersion); 00248 00249 }
int CigiOutgoingMsg::BeginMsg | ( | void | ) | [inline] |
Alerts the system that a message is being started.
Definition at line 355 of file CigiOutgoingMsg.h.
References CIGI_SUCCESS.
Referenced by CigiIO::CigiIO(), and CigiIO::Send().
00356 { 00357 if(Buffers.empty()) 00358 AdvanceBuffer(); 00359 return(CIGI_SUCCESS); 00360 }
void CigiOutgoingMsg::ChangeBufferCigiVersion | ( | CigiVersionID & | Version | ) | [protected] |
Sets the buffer's complete Cigi Version.
CigiVersionIn | - The Buffer's Cigi Version |
Definition at line 350 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Buffer, CigiMessageBuffer::BufferFillCnt, CigiVersionID::CigiMajorVersion, CigiMessageBuffer::CigiVersion, CigiMessage::CrntFillBuf, CigiMessageBuffer::FillBufferPos, CigiVersionID::GetCombinedCigiVersion(), CigiBasePacket::GetPacketSize(), CigiSession::IsHost(), OutgoingVersion, CigiMessageBuffer::PackIGCtrl, CigiMessageBuffer::PackSOF, pIGCtrlPck, pSOFPck, and CigiMessage::Session.
Referenced by AdvanceBuffer(), SetMostMatureReceivedCigiVersion(), and SetOutgoingCigiVersion().
00351 { 00352 // Set the buffer's Cigi Version 00353 CrntFillBuf->CigiVersion = OutgoingVersion; 00354 00355 if(Session->IsHost()) 00356 { 00357 if((OutgoingVersion.GetCombinedCigiVersion() >= 0x303)) 00358 CrntFillBuf->PackIGCtrl = pIGCtrlPck[5]; 00359 else if((OutgoingVersion.GetCombinedCigiVersion() == 0x301)) 00360 CrntFillBuf->PackIGCtrl = pIGCtrlPck[4]; 00361 else 00362 CrntFillBuf->PackIGCtrl = 00363 pIGCtrlPck[OutgoingVersion.CigiMajorVersion]; 00364 00365 int pSize = CrntFillBuf->PackIGCtrl->GetPacketSize(); 00366 CrntFillBuf->BufferFillCnt = pSize; 00367 CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer + pSize; 00368 00369 } 00370 else 00371 { 00372 CrntFillBuf->PackSOF = 00373 pSOFPck[OutgoingVersion.CigiMajorVersion]; 00374 if((OutgoingVersion.GetCombinedCigiVersion() >= 0x302)) 00375 CrntFillBuf->PackSOF = pSOFPck[4]; 00376 00377 int pSize = CrntFillBuf->PackSOF->GetPacketSize(); 00378 CrntFillBuf->BufferFillCnt = pSize; 00379 CrntFillBuf->FillBufferPos = CrntFillBuf->Buffer + pSize; 00380 00381 } 00382 }
void CigiOutgoingMsg::ChangeOutgoingCigiVersion | ( | CigiVersionID & | Version | ) | [protected] |
Changes the outgoing cigi version.
Version | - The CIGI version to which to change. |
Definition at line 255 of file CigiOutgoingMsg.cpp.
References CigiVersionID::CigiMajorVersion, ClearHandlerTable(), CigiSession::IsHost(), OutgoingVersion, CigiMessage::Session, SetOutgoingHostV1Tbls(), SetOutgoingHostV2Tbls(), SetOutgoingHostV3Tbls(), SetOutgoingIGV1Tbls(), SetOutgoingIGV2Tbls(), and SetOutgoingIGV3Tbls().
Referenced by AdvanceBuffer(), CigiSession::CigiSession(), and SetOutgoingCigiVersion().
00256 { 00257 // Determine the buffer's Cigi Version 00258 if((Session != NULL) && 00259 (Version.CigiMajorVersion > 0)) 00260 { 00261 OutgoingVersion = Version; 00262 00263 ClearHandlerTable(); 00264 00265 if(Session->IsHost()) 00266 { 00267 if(OutgoingVersion.CigiMajorVersion >= 3) 00268 SetOutgoingHostV3Tbls(); 00269 else if(OutgoingVersion.CigiMajorVersion == 2) 00270 SetOutgoingHostV2Tbls(); 00271 else if(OutgoingVersion.CigiMajorVersion == 1) 00272 SetOutgoingHostV1Tbls(); 00273 } 00274 else 00275 { 00276 if(OutgoingVersion.CigiMajorVersion >= 3) 00277 SetOutgoingIGV3Tbls(); 00278 else if(OutgoingVersion.CigiMajorVersion == 2) 00279 SetOutgoingIGV2Tbls(); 00280 else if(OutgoingVersion.CigiMajorVersion == 1) 00281 SetOutgoingIGV1Tbls(); 00282 } 00283 } 00284 }
void CigiOutgoingMsg::ClearHandlerTable | ( | void | ) | [protected] |
Deletes the contents of OutgoingHandlerTbl and sets entries in VldSnd accordingly.
Definition at line 1257 of file CigiOutgoingMsg.cpp.
References DefaultPacket, OutgoingHandlerTbl, and VldSnd.
Referenced by ChangeOutgoingCigiVersion(), and ~CigiOutgoingMsg().
01258 { 01259 for(int ndx=0;ndx<200;ndx++) 01260 { 01261 if(OutgoingHandlerTbl[ndx] != (CigiBasePacket *)&DefaultPacket) 01262 { 01263 delete OutgoingHandlerTbl[ndx]; 01264 OutgoingHandlerTbl[ndx] = &DefaultPacket; 01265 } 01266 VldSnd[ndx] = false; 01267 } 01268 }
int CigiOutgoingMsg::FreeMsg | ( | void | ) |
Frees the last packaged message buffer for use.
Definition at line 1183 of file CigiOutgoingMsg.cpp.
References CIGI_ERROR_CALLED_OUT_OF_SEQUENCE, CigiMessage::PackagedMsg, and UnlockMsg().
01184 { 01185 if(PackagedMsg == NULL) 01186 { 01187 #ifndef CIGI_NO_EXCEPT 01188 throw CigiCalledOutOfSequenceException(); 01189 #endif 01190 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 01191 } 01192 01193 int stat = UnlockMsg(); 01194 01195 PackagedMsg = NULL; 01196 01197 return(stat); 01198 }
Cigi_uint8 * CigiOutgoingMsg::GetBuffer | ( | void | ) |
Gets a pointer to the beginning of the buffer.
Definition at line 1044 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessageBuffer::Buffer, CigiMessage::CrntMsgBuf, and CigiMessageBuffer::Locked.
Referenced by GetBufferString().
01045 { 01046 Cigi_uint8 * Buff = NULL; 01047 01048 // Verify that a buffer is ready for transmission 01049 if(CrntMsgBuf != NULL) 01050 { 01051 if((CrntMsgBuf->Active) && (CrntMsgBuf->Locked)) 01052 Buff = CrntMsgBuf->Buffer; 01053 } 01054 01055 return(Buff); 01056 }
std::string CigiOutgoingMsg::GetBufferString | ( | 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.
Definition at line 1080 of file CigiOutgoingMsg.cpp.
References GetBuffer(), and GetMsgLength().
01081 { 01082 Cigi_uint8 *buffer = this->GetBuffer(); 01083 int size = this->GetMsgLength(); 01084 return std::string(buffer,buffer+size); 01085 }
int CigiOutgoingMsg::GetCurrentlyPackagedMsg | ( | Cigi_uint8 ** | Msg, | |
int & | length | |||
) | [inline] |
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.
Msg | - A pointer to a pointer to the beginning of the message. | |
length | - A reference to place the length of the message. |
Definition at line 478 of file CigiOutgoingMsg.h.
References CIGI_ERROR_UNEXPECTED_NULL, and CIGI_SUCCESS.
00479 { 00480 if(PackagedMsg != NULL) 00481 { 00482 *Msg = PackagedMsg->Buffer; 00483 length = PackagedMsg->BufferFillCnt; 00484 return(CIGI_SUCCESS); 00485 } 00486 else 00487 { 00488 *Msg = (Cigi_uint8 *)0; // equivalent to NULL 00489 length = 0; 00490 return(CIGI_ERROR_UNEXPECTED_NULL); 00491 } 00492 }
Cigi_uint32 CigiOutgoingMsg::GetFrameCnt | ( | void | ) | const [inline] |
Gets the current Frame Count.
Definition at line 514 of file CigiOutgoingMsg.h.
00514 { return(FrameCnt); }
Cigi_uint8 * CigiOutgoingMsg::GetMsg | ( | int & | length | ) |
Definition at line 1022 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessageBuffer::Buffer, CigiMessageBuffer::BufferFillCnt, CigiMessage::CrntMsgBuf, and CigiMessageBuffer::Locked.
Referenced by PackageMsg(), and CigiIO::Send().
01023 { 01024 Cigi_uint8 * Buff = NULL; 01025 length = 0; 01026 01027 // Verify that a buffer is ready for transmission 01028 if(CrntMsgBuf != NULL) 01029 { 01030 if((CrntMsgBuf->Active) && (CrntMsgBuf->Locked)) 01031 { 01032 Buff = CrntMsgBuf->Buffer; 01033 length = CrntMsgBuf->BufferFillCnt; 01034 } 01035 } 01036 01037 return(Buff); 01038 }
int CigiOutgoingMsg::GetMsgLength | ( | void | ) |
Gets the length of the message in bytes.
Definition at line 1062 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessageBuffer::BufferFillCnt, CigiMessage::CrntMsgBuf, and CigiMessageBuffer::Locked.
Referenced by GetBufferString().
01063 { 01064 int length = 0; 01065 01066 // Verify that a buffer is ready for transmission 01067 if(CrntMsgBuf != NULL) 01068 { 01069 if((CrntMsgBuf->Active) && (CrntMsgBuf->Locked)) 01070 length = CrntMsgBuf->BufferFillCnt; 01071 } 01072 01073 return(length); 01074 }
CigiVersionID CigiOutgoingMsg::GetOutgoingCigiVersion | ( | void | ) | [inline, protected] |
Sets the complete outgoing external interface Cigi Version with bound checking control
CigiVersionIn | - Sets the Cigi Version of the outgoing message interface | |
bndchk | - Enables (true) or disables (false) bounds checking |
Definition at line 605 of file CigiOutgoingMsg.h.
00606 { 00607 return(OutgoingVersion); 00608 }
int CigiOutgoingMsg::InitMsg | ( | void | ) | [inline, protected] |
Prepairs a message buffer for packet insertion.
Definition at line 576 of file CigiOutgoingMsg.h.
References CIGI_SUCCESS.
00577 { 00578 AdvanceBuffer(); 00579 return(CIGI_SUCCESS); 00580 }
bool CigiOutgoingMsg::IsSynchronous | ( | void | ) | const |
Gets the synchronous/asynchronous mode of operation.
Definition at line 199 of file CigiOutgoingMsg.cpp.
References CigiSession::IsSynchronous(), and CigiMessage::Session.
00200 { 00201 if(Session != NULL) 00202 return(Session->IsSynchronous()); 00203 else 00204 return(true); // default response 00205 }
int CigiOutgoingMsg::LockMsg | ( | void | ) |
Locks the message for sending
Definition at line 950 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, AdvanceBuffer(), CigiMessage::Buffers, CIGI_ERROR_CALLED_OUT_OF_SEQUENCE, CIGI_ERROR_MISSING_IG_CONTROL_PACKET, CIGI_ERROR_MISSING_SOF_PACKET, CIGI_ERROR_UNEXPECTED_NULL, CIGI_SUCCESS, CigiMessage::CrntFillBuf, CigiMessage::CrntMsgBuf, CigiSession::IsHost(), CigiMessageBuffer::Locked, CigiMessage::Session, and CigiMessageBuffer::ValidIGCtrlSOF.
Referenced by PackageMsg(), and CigiIO::Send().
00951 { 00952 // Check for a buffer in the Active Buffers list 00953 if(Buffers.empty()) 00954 { 00955 #ifndef CIGI_NO_EXCEPT 00956 throw CigiCalledOutOfSequenceException(); 00957 #endif 00958 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 00959 } 00960 00961 // Verify there are no buffers locked for transmission 00962 if(CrntMsgBuf != NULL) 00963 { 00964 #ifndef CIGI_NO_EXCEPT 00965 throw CigiCalledOutOfSequenceException(); 00966 #endif 00967 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 00968 } 00969 00970 // Get the next buffer for transmission 00971 // And verify the Session is valid 00972 CrntMsgBuf = *(Buffers.begin()); 00973 if((CrntMsgBuf == NULL) || (Session == NULL)) 00974 { 00975 #ifndef CIGI_NO_EXCEPT 00976 throw CigiNullPointerException(); 00977 #endif 00978 return(CIGI_ERROR_UNEXPECTED_NULL); 00979 } 00980 00981 if(!CrntMsgBuf->ValidIGCtrlSOF) 00982 { 00983 if(Session->IsHost()) 00984 { 00985 #ifndef CIGI_NO_EXCEPT 00986 throw CigiMissingIgControlException(); 00987 #endif 00988 return(CIGI_ERROR_MISSING_IG_CONTROL_PACKET); 00989 } 00990 else 00991 { 00992 #ifndef CIGI_NO_EXCEPT 00993 throw CigiMissingStartOfFrameException(); 00994 #endif 00995 return(CIGI_ERROR_MISSING_SOF_PACKET); 00996 } 00997 } 00998 00999 if( !CrntMsgBuf->Active || CrntMsgBuf->Locked ) 01000 { 01001 #ifndef CIGI_NO_EXCEPT 01002 throw CigiCalledOutOfSequenceException(); 01003 #endif 01004 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 01005 } 01006 01007 CrntMsgBuf->Locked = true; 01008 01009 // Set up next fill buffer the CrntFillBuf and the 01010 // CrntMsgBuf are the same. 01011 if(CrntFillBuf == CrntMsgBuf) 01012 AdvanceBuffer(); 01013 01014 return(CIGI_SUCCESS); 01015 01016 }
CigiOutgoingMsg& CigiOutgoingMsg::operator<< | ( | CigiBasePacket * | refBasePacket | ) | [inline] |
Packs the buffer with the pointer to the specifed packet.
refBasePacket | - A pointer to a base packet. |
Definition at line 330 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::operator<< | ( | CigiBaseVariableSizePckt * | refPacket | ) | [inline] |
Packs the buffer with the specifed packet.
refPacket | - A pointer to a variable size packet |
Definition at line 310 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::operator<< | ( | CigiBaseEnvCtrl * | refPacket | ) | [inline] |
Packs the buffer with the pointer to the specifed packet.
refPacket | - A pointer to an Enviroment type Control packet. This includes Celestial and Atmosphere Ctrl |
Definition at line 289 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::operator<< | ( | CigiBaseEntityCtrl * | refPacket | ) | [inline] |
Packs the buffer with the pointer to the specifed Entity Control packet.
refPacket | - A pointer to an Entity Control packet. |
Definition at line 268 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::operator<< | ( | CigiBaseSOF * | refPacket | ) | [inline] |
Packs the buffer with the pointer to the specifed Start Of Frame packet.
refPacket | - A pointer to an Start Of Frame packet. |
Definition at line 248 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::operator<< | ( | CigiBaseIGCtrl * | refPacket | ) | [inline] |
Packs the buffer with the pointer to the specifed IG Control packet.
refPacket | - A pointer to an IG Control packet. |
Definition at line 228 of file CigiOutgoingMsg.h.
CigiOutgoingMsg & CigiOutgoingMsg::operator<< | ( | CigiBasePacket & | refBasePacket | ) |
Packs the buffer with the pointer to the specifed packet.
refBasePacket | - A reference to a base packet. |
Definition at line 628 of file CigiOutgoingMsg.cpp.
References CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiBaseShortArtPartCtrl::GetArtPart1(), CigiBaseShortArtPartCtrl::GetArtPart2(), CigiBasePacket::GetCnvt(), operator<<(), OutgoingHandlerTbl, OutgoingVersion, PackObj(), CigiProcessType::ProcEntity, CigiProcessType::ProcEnvCtrl, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, CigiProcessType::ProcIGCtrl, CigiProcessType::ProcShortArtPartToArtPart, CigiProcessType::ProcSOF, CigiProcessType::ProcStd, CigiProcessType::ProcVarSize, CigiBaseShortArtPartCtrl::SpecialConversion(), CigiProcessType::TwoPassCnvtProcStd, and VldSnd.
00629 { 00630 CigiCnvtInfoType::Type Cnvt; 00631 refBasePacket.GetCnvt(OutgoingVersion,Cnvt); 00632 00633 if((Cnvt.ProcID == CigiProcessType::ProcStd) || 00634 (Cnvt.ProcID == CigiProcessType::TwoPassCnvtProcStd)) 00635 { 00636 if(VldSnd[Cnvt.CnvtPacketID]) 00637 PackObj(refBasePacket,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],NULL); 00638 } 00639 else 00640 { 00641 CigiBaseEntityCtrl *pEnt; 00642 CigiBaseEnvCtrl *pEnv; 00643 CigiBaseIGCtrl *pIG; 00644 CigiBaseSOF *pSof; 00645 CigiBaseVariableSizePckt *pVSz; 00646 00647 switch(Cnvt.ProcID) 00648 { 00649 case CigiProcessType::ProcShortArtPartToArtPart: 00650 if(VldSnd[Cnvt.CnvtPacketID]) 00651 { 00652 CigiBaseShortArtPartCtrl *pSArtPart = 00653 (CigiBaseShortArtPartCtrl *)&refBasePacket; 00654 Cigi_uint8 ArtPartID1 = pSArtPart->GetArtPart1(); 00655 Cigi_uint8 ArtPartID2 = pSArtPart->GetArtPart2(); 00656 CigiArtPartCtrlV3 tArtPart; 00657 pSArtPart->SpecialConversion(OutgoingVersion,ArtPartID1,&tArtPart); 00658 PackObj(tArtPart,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],NULL); 00659 if(ArtPartID2 != ArtPartID1) 00660 { 00661 CigiArtPartCtrlV3 tArtPart2; 00662 pSArtPart->SpecialConversion(OutgoingVersion,ArtPartID2,&tArtPart2); 00663 PackObj(tArtPart2,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],NULL); 00664 } 00665 } 00666 break; 00667 case CigiProcessType::ProcEntity: 00668 pEnt = (CigiBaseEntityCtrl *)&refBasePacket; 00669 operator<<(*pEnt); 00670 break; 00671 case CigiProcessType::ProcEnvCtrl: 00672 pEnv = (CigiBaseEnvCtrl *)&refBasePacket; 00673 operator<<(*pEnv); 00674 break; 00675 case CigiProcessType::ProcIGCtrl: 00676 pIG = (CigiBaseIGCtrl *)&refBasePacket; 00677 operator<<(*pIG); 00678 break; 00679 case CigiProcessType::ProcSOF: 00680 pSof = (CigiBaseSOF *)&refBasePacket; 00681 operator<<(*pSof); 00682 break; 00683 case CigiProcessType::ProcVarSize: 00684 pVSz = (CigiBaseVariableSizePckt *)&refBasePacket; 00685 operator<<(*pVSz); 00686 break; 00687 default: 00688 break; 00689 } 00690 } 00691 00692 return(*this); 00693 00694 }
CigiOutgoingMsg & CigiOutgoingMsg::operator<< | ( | CigiBaseVariableSizePckt & | refPacket | ) |
Packs the buffer with the specifed packet.
refPacket | - A reference to a variable size packet |
Definition at line 576 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, AdvanceBuffer(), CigiMessageBuffer::BufferFillCnt, CigiMessage::BufferSize, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiMessageBuffer::FillBufferPos, CigiBasePacket::GetCnvt(), CigiBaseVariableSizePckt::GetTruePacketSize(), CigiMessageBuffer::Locked, OutgoingHandlerTbl, OutgoingVersion, CigiBaseVariableSizePckt::Pack(), and VldSnd.
00577 { 00578 if(CrntFillBuf == NULL) 00579 { 00580 #ifndef CIGI_NO_EXCEPT 00581 throw CigiCalledOutOfSequenceException(); 00582 #endif 00583 return(*this); 00584 } 00585 00586 00587 if(!CrntFillBuf->Active || CrntFillBuf->Locked) 00588 { 00589 #ifndef CIGI_NO_EXCEPT 00590 throw CigiCalledOutOfSequenceException(); 00591 #endif 00592 return(*this); 00593 } 00594 00595 CigiCnvtInfoType::Type Cnvt; 00596 refPacket.GetCnvt(OutgoingVersion,Cnvt); 00597 CigiBaseVariableSizePckt *PackingPacket = 00598 (CigiBaseVariableSizePckt *)OutgoingHandlerTbl[Cnvt.CnvtPacketID]; 00599 00600 if(VldSnd[Cnvt.CnvtPacketID]) 00601 { 00602 // This gets the size of this variable sized packet 00603 int Size = PackingPacket->GetTruePacketSize(refPacket); 00604 00605 if( Size > 0 ) 00606 { 00607 // Check room left in current buffer 00608 if((BufferSize - CrntFillBuf->BufferFillCnt) < Size) 00609 AdvanceBuffer(); 00610 00611 int pSize = PackingPacket->Pack(&refPacket, CrntFillBuf->FillBufferPos, NULL); 00612 CrntFillBuf->BufferFillCnt += pSize; 00613 CrntFillBuf->FillBufferPos += pSize; 00614 CrntFillBuf->DataPresent = true; 00615 00616 } 00617 } 00618 00619 return(*this); 00620 00621 }
CigiOutgoingMsg & CigiOutgoingMsg::operator<< | ( | CigiBaseEnvCtrl & | refPacket | ) |
Packs the buffer with the specifed packet.
refPacket | - A reference to an Enviroment type Control packet. This includes Celestial and Atmosphere Ctrl |
Definition at line 505 of file CigiOutgoingMsg.cpp.
References CIGI_ATMOS_CTRL_PACKET_ID_V3, CIGI_CELESTIAL_CTRL_PACKET_ID_V3, CIGI_ENV_CTRL_PACKET_ID_V2, CigiVersionID::CigiMajorVersion, CigiMessage::EnvHoldObj, CigiBaseEnvCtrl::FillHold(), CigiBasePacket::GetPacketID(), CigiBasePacket::GetVersion(), OutgoingHandlerTbl, OutgoingVersion, PackObj(), and VldSnd.
00506 { 00507 // Store data 00508 refPacket.FillHold(&EnvHoldObj); 00509 00510 Cigi_uint8 FillVer = refPacket.GetVersion(); 00511 00512 if(FillVer >= 3) 00513 { 00514 // From V3 or above 00515 if(OutgoingVersion.CigiMajorVersion >= 3) 00516 { 00517 // To V3 and above 00518 if(VldSnd[refPacket.GetPacketID()]) 00519 { 00520 PackObj(refPacket, 00521 *OutgoingHandlerTbl[refPacket.GetPacketID()], 00522 NULL); 00523 } 00524 } 00525 else 00526 { 00527 // To V1 or V2 00528 // Note: V1 & V2 use the same packet id number 00529 if(VldSnd[CIGI_ENV_CTRL_PACKET_ID_V2]) 00530 { 00531 PackObj(EnvHoldObj, 00532 *OutgoingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V2], 00533 NULL); 00534 } 00535 } 00536 } 00537 else 00538 { 00539 // From V1 or V2 00540 if(OutgoingVersion.CigiMajorVersion >= 3) 00541 { 00542 // To V3 or above 00543 // If CIGI_ATMOS_CTRL_PACKET_ID_V3 is valid to send 00544 // CIGI_CELESTIAL_CTRL_PACKET_ID_V3 is also valid to send. 00545 if(VldSnd[CIGI_ATMOS_CTRL_PACKET_ID_V3]) 00546 { 00547 PackObj(EnvHoldObj, 00548 *OutgoingHandlerTbl[CIGI_ATMOS_CTRL_PACKET_ID_V3], 00549 NULL); 00550 PackObj(EnvHoldObj, 00551 *OutgoingHandlerTbl[CIGI_CELESTIAL_CTRL_PACKET_ID_V3], 00552 NULL); 00553 } 00554 } 00555 else 00556 { 00557 // To V1 or V2 00558 // Note: V1 & V2 use the same packet id number 00559 if(VldSnd[refPacket.GetPacketID()]) 00560 { 00561 PackObj(refPacket, 00562 *OutgoingHandlerTbl[refPacket.GetPacketID()], 00563 NULL); 00564 } 00565 } 00566 } 00567 00568 return(*this); 00569 00570 }
CigiOutgoingMsg & CigiOutgoingMsg::operator<< | ( | CigiBaseEntityCtrl & | refPacket | ) |
Packs the buffer with the specifed Entity Control packet.
refPacket | - A reference to an Entity Control packet. |
Definition at line 488 of file CigiOutgoingMsg.cpp.
References CigiMessage::ATbl, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiBaseEntityCtrl::GetCnvt(), OutgoingHandlerTbl, OutgoingVersion, PackObj(), and VldSnd.
00489 { 00490 CigiCnvtInfoType::Type Cnvt; 00491 refPacket.GetCnvt(OutgoingVersion,Cnvt); 00492 00493 if(VldSnd[Cnvt.CnvtPacketID]) 00494 PackObj(refPacket,*OutgoingHandlerTbl[Cnvt.CnvtPacketID],ATbl); 00495 00496 return(*this); 00497 00498 }
CigiOutgoingMsg & CigiOutgoingMsg::operator<< | ( | CigiBaseSOF & | refPacket | ) |
Packs the buffer with the specifed Start Of Frame packet.
refPacket | - A reference to an Start Of Frame packet. |
Definition at line 437 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessageBuffer::Buffer, CigiMessage::Buffers, CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiSession::IsIG(), CigiMessageBuffer::Locked, OutgoingVersion, CigiBaseSOF::Pack(), CigiMessageBuffer::PackSOF, CigiMessage::Session, and CigiMessageBuffer::ValidIGCtrlSOF.
00438 { 00439 CigiMessageBuffer *IgMsgBuf = NULL; 00440 00441 if(Buffers.empty()) 00442 { 00443 #ifndef CIGI_NO_EXCEPT 00444 throw CigiCalledOutOfSequenceException(); 00445 #endif 00446 return(*this); 00447 } 00448 00449 IgMsgBuf = *(Buffers.begin()); 00450 00451 if(IgMsgBuf == NULL) 00452 { 00453 #ifndef CIGI_NO_EXCEPT 00454 throw CigiCalledOutOfSequenceException(); 00455 #endif 00456 return(*this); 00457 } 00458 00459 00460 if(!IgMsgBuf->Active || IgMsgBuf->Locked) 00461 { 00462 #ifndef CIGI_NO_EXCEPT 00463 throw CigiCalledOutOfSequenceException(); 00464 #endif 00465 return(*this); 00466 } 00467 00468 if(Session->IsIG()) 00469 { 00470 if(IgMsgBuf->PackSOF != NULL) 00471 { 00472 IgMsgBuf->PackSOF->Pack(&refPacket, 00473 CrntFillBuf->Buffer, 00474 (void *)&OutgoingVersion); 00475 IgMsgBuf->ValidIGCtrlSOF = true; 00476 IgMsgBuf->DataPresent = true; 00477 } 00478 } 00479 00480 return(*this); 00481 00482 }
CigiOutgoingMsg & CigiOutgoingMsg::operator<< | ( | CigiBaseIGCtrl & | refPacket | ) |
Packs the buffer with the specifed IG Control packet.
refPacket | - A reference to an IG Control packet. |
Definition at line 388 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessageBuffer::Buffer, CigiMessage::Buffers, CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiSession::IsHost(), CigiMessageBuffer::Locked, OutgoingVersion, CigiBaseIGCtrl::Pack(), CigiMessageBuffer::PackIGCtrl, CigiMessage::Session, and CigiMessageBuffer::ValidIGCtrlSOF.
Referenced by operator<<().
00389 { 00390 CigiMessageBuffer *HostMsgBuf = NULL; 00391 00392 if(Buffers.empty()) 00393 { 00394 #ifndef CIGI_NO_EXCEPT 00395 throw CigiCalledOutOfSequenceException(); 00396 #endif 00397 return(*this); 00398 } 00399 00400 HostMsgBuf = *(Buffers.begin()); 00401 if(HostMsgBuf == NULL) 00402 { 00403 #ifndef CIGI_NO_EXCEPT 00404 throw CigiCalledOutOfSequenceException(); 00405 #endif 00406 return(*this); 00407 } 00408 00409 if(!HostMsgBuf->Active || HostMsgBuf->Locked) 00410 { 00411 #ifndef CIGI_NO_EXCEPT 00412 throw CigiCalledOutOfSequenceException(); 00413 #endif 00414 return(*this); 00415 } 00416 00417 if(Session->IsHost()) 00418 { 00419 if(HostMsgBuf->PackIGCtrl != NULL) 00420 { 00421 HostMsgBuf->PackIGCtrl->Pack(&refPacket, 00422 CrntFillBuf->Buffer, 00423 (void *)&OutgoingVersion); 00424 HostMsgBuf->ValidIGCtrlSOF = true; 00425 HostMsgBuf->DataPresent = true; 00426 } 00427 } 00428 00429 return(*this); 00430 00431 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBasePacket * | refBasePacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refBasePacket | - A pointer to a base packet. |
Definition at line 340 of file CigiOutgoingMsg.h.
00341 { 00342 return this->pack(*refBasePacket); 00343 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseVariableSizePckt * | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A pointer to a variable size packet |
Definition at line 320 of file CigiOutgoingMsg.h.
00321 { 00322 return this->pack(*refPacket); 00323 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseEnvCtrl * | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A pointer to an Enviroment type Control packet. This includes Celestial and Atmosphere Ctrl |
Definition at line 300 of file CigiOutgoingMsg.h.
00301 { 00302 return this->pack(*refPacket); 00303 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseEntityCtrl * | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A pointer to an Entity Control packet. |
Definition at line 278 of file CigiOutgoingMsg.h.
00279 { 00280 return this->pack(*refPacket); 00281 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseSOF * | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A pointer to an Start Of Frame packet. |
Definition at line 258 of file CigiOutgoingMsg.h.
00259 { 00260 return this->pack(*refPacket); 00261 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseIGCtrl * | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A pointer to an IG Control packet. |
Definition at line 238 of file CigiOutgoingMsg.h.
00239 { 00240 return this->pack(*refPacket); 00241 }
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBasePacket & | refBasePacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refBasePacket | - A reference to a base packet. |
Definition at line 215 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseVariableSizePckt & | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A reference to a variable size packet |
Definition at line 198 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseEnvCtrl & | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A reference to an Enviroment type Control packet. This includes Celestial and Atmosphere Ctrl |
Definition at line 181 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseEntityCtrl & | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A reference to an Entity Control packet. |
Definition at line 162 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseSOF & | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A reference to an Start Of Frame packet. |
Definition at line 145 of file CigiOutgoingMsg.h.
CigiOutgoingMsg& CigiOutgoingMsg::pack | ( | CigiBaseIGCtrl & | refPacket | ) | [inline] |
Non operator-overloaded pack method for scripting.
refPacket | - A reference to an IG Control packet. |
Definition at line 128 of file CigiOutgoingMsg.h.
int CigiOutgoingMsg::PackageMsg | ( | Cigi_uint8 ** | Msg, | |
int & | length | |||
) |
Packages the current message. Sets up the next buffer for packing. and returns a pointer to the message to be sent and the length.
Msg | - A pointer to a pointer to the beginning of the message. | |
length | - A reference to place the length of the message. |
Definition at line 1152 of file CigiOutgoingMsg.cpp.
References CIGI_ERROR_CALLED_OUT_OF_SEQUENCE, CIGI_SUCCESS, CigiMessage::CrntMsgBuf, GetMsg(), LockMsg(), and CigiMessage::PackagedMsg.
01153 { 01154 *Msg = NULL; 01155 length = 0; 01156 01157 if(PackagedMsg != NULL) 01158 { 01159 #ifndef CIGI_NO_EXCEPT 01160 throw CigiCalledOutOfSequenceException(); 01161 #endif 01162 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 01163 } 01164 01165 int stat = LockMsg(); 01166 01167 if(stat == CIGI_SUCCESS) 01168 { 01169 *Msg = GetMsg(length); 01170 if(*Msg != NULL) 01171 PackagedMsg = CrntMsgBuf; 01172 else 01173 stat = CIGI_ERROR_CALLED_OUT_OF_SEQUENCE; 01174 } 01175 01176 return(stat); 01177 01178 }
CigiOutgoingMsg & CigiOutgoingMsg::PackObj | ( | CigiBasePacket & | DataPacket, | |
CigiBasePacket & | PackingPacket, | |||
void * | Spec | |||
) | [protected] |
Packs the buffer with the pointer to the specifed packet.
DataPacket | - A packet object containing the data. | |
PackingPacket | - A packet object that will pack the data from the DataPacket. | |
Spec | - A pointer to special data |
Definition at line 701 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, AdvanceBuffer(), CigiMessageBuffer::BufferFillCnt, CigiMessage::BufferSize, CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiMessageBuffer::FillBufferPos, CigiBasePacket::GetPacketSize(), CigiMessageBuffer::Locked, and CigiBasePacket::Pack().
Referenced by operator<<().
00703 { 00704 if(CrntFillBuf == NULL) 00705 { 00706 #ifndef CIGI_NO_EXCEPT 00707 throw CigiCalledOutOfSequenceException(); 00708 #endif 00709 return(*this); 00710 } 00711 00712 00713 if(!CrntFillBuf->Active || CrntFillBuf->Locked) 00714 { 00715 #ifndef CIGI_NO_EXCEPT 00716 throw CigiCalledOutOfSequenceException(); 00717 #endif 00718 return(*this); 00719 } 00720 00721 int Size = PackingPacket.GetPacketSize(); 00722 00723 if( Size > 0 ) 00724 { 00725 // Check room left in current buffer 00726 if((BufferSize - CrntFillBuf->BufferFillCnt) < Size) 00727 AdvanceBuffer(); 00728 00729 int pSize = PackingPacket.Pack(&DataPacket, CrntFillBuf->FillBufferPos, Spec); 00730 CrntFillBuf->BufferFillCnt += pSize; 00731 CrntFillBuf->FillBufferPos += pSize; 00732 CrntFillBuf->DataPresent = true; 00733 00734 } 00735 00736 return(*this); 00737 00738 }
int CigiOutgoingMsg::RegisterUserPacket | ( | CigiBasePacket * | Packet, | |
Cigi_uint8 | PacketID, | |||
bool | HostSend, | |||
bool | IGSend | |||
) |
Register a user packet for use.
Packet | - A pointer to the packet manager object | |
PacketID | - The packet id | |
HostSend | - A flag specifying whether the host can send this packet. | |
IGSend | - A flag specifying whether the IG can send this packet. |
Definition at line 1234 of file CigiOutgoingMsg.cpp.
References CIGI_ERROR_INVALID_USER_PACKET, CIGI_SUCCESS, CigiSession::IsHost(), CigiSession::IsIG(), OutgoingHandlerTbl, CigiMessage::Session, and VldSnd.
01238 { 01239 int stat = CIGI_ERROR_INVALID_USER_PACKET; 01240 if(((PacketID > 199) && (PacketID <= 255)) && 01241 (Packet != NULL) && 01242 ((HostSend && Session->IsHost()) || 01243 (IGSend && Session->IsIG()))) 01244 { 01245 OutgoingHandlerTbl[PacketID] = Packet; 01246 VldSnd[PacketID] = true; 01247 stat = CIGI_SUCCESS; 01248 } 01249 01250 return(stat); 01251 }
int CigiOutgoingMsg::Reset | ( | void | ) | [protected] |
Resets the buffer system.
Definition at line 1205 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessage::AvailBuff, CigiMessage::Buffers, CIGI_SUCCESS, CigiMessage::CrntFillBuf, CigiMessage::CrntMsgBuf, and CigiMessage::PackagedMsg.
01206 { 01207 CrntMsgBuf = NULL; 01208 PackagedMsg = NULL; 01209 CrntFillBuf = NULL; 01210 01211 list<CigiMessageBuffer *>::iterator iBuf; 01212 for(iBuf=Buffers.begin();iBuf!=Buffers.end();iBuf++) 01213 { 01214 (*iBuf)->Active = false; 01215 (*iBuf)->BufferFillCnt = 0; 01216 (*iBuf)->DataPresent = false; 01217 (*iBuf)->FillBufferPos = (*iBuf)->Buffer; 01218 (*iBuf)->Locked = false; 01219 (*iBuf)->ValidIGCtrlSOF = false; 01220 01221 AvailBuff.push_back(*iBuf); 01222 } 01223 01224 Buffers.clear(); 01225 01226 return(CIGI_SUCCESS); 01227 01228 }
void CigiOutgoingMsg::SetFrameCnt | ( | const Cigi_uint32 | FrameCntIn | ) | [inline] |
Sets the current Frame Count
FrameCntIn | - Sets the frame count of the session. |
Definition at line 508 of file CigiOutgoingMsg.h.
00508 { FrameCnt = FrameCntIn; }
void CigiOutgoingMsg::SetLastRcvdFrame | ( | Cigi_uint32 | LastRcvdFrameIn | ) | [inline, protected] |
Sets the count of the last frame received.
LastRcvdFrame | - The count of the last frame received. |
Definition at line 628 of file CigiOutgoingMsg.h.
00629 { 00630 LastRcvdFrame = LastRcvdFrameIn; 00631 }
void CigiOutgoingMsg::SetMostMatureReceivedCigiVersion | ( | CigiVersionID & | Version | ) | [protected] |
Sets the complete Cigi Version value of the most mature.
CigiVersionIn | - The most mature Cigi Version of the incoming message interface |
Definition at line 290 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, ChangeBufferCigiVersion(), CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiVersionID::GetCombinedCigiVersion(), CigiVersionID::IsKnownCigiVersion(), MostMatureVersionReceived, and OutgoingVersion.
00291 { 00292 if(Version.IsKnownCigiVersion()) 00293 { 00294 if(Version.GetCombinedCigiVersion() > 00295 MostMatureVersionReceived.GetCombinedCigiVersion()) 00296 { 00297 MostMatureVersionReceived = Version; 00298 00299 if(CrntFillBuf != NULL) 00300 { 00301 if((CrntFillBuf->Active) && 00302 (!CrntFillBuf->DataPresent)) 00303 { 00304 // Set the buffer's Cigi Version 00305 ChangeBufferCigiVersion(OutgoingVersion); 00306 } 00307 } 00308 } 00309 } 00310 }
int CigiOutgoingMsg::SetOutgoingCigiVersion | ( | CigiVersionID & | Version, | |
bool | bndchk = true | |||
) | [protected] |
Sets the complete outgoing external interface Cigi Version with bound checking control
CigiVersionIn | - Sets the Cigi Version of the outgoing message interface | |
bndchk | - Enables (true) or disables (false) bounds checking |
Definition at line 316 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, ChangeBufferCigiVersion(), ChangeOutgoingCigiVersion(), CIGI_ERROR_WRONG_VERSION, CIGI_SUCCESS, CmdVersion, CmdVersionChng, CigiMessage::CrntFillBuf, CigiMessageBuffer::DataPresent, CigiVersionID::IsKnownCigiVersion(), MostMatureVersionReceived, OutgoingVersion, and CigiVersionID::SetCigiVersion().
00318 { 00319 int stat = CIGI_ERROR_WRONG_VERSION; 00320 00321 if(Version.IsKnownCigiVersion()) 00322 { 00323 MostMatureVersionReceived.SetCigiVersion(0,0); 00324 CmdVersionChng = true; 00325 CmdVersion = Version; 00326 stat = CIGI_SUCCESS; 00327 00328 if(CrntFillBuf != NULL) 00329 { 00330 if((CrntFillBuf->Active) && 00331 (!CrntFillBuf->DataPresent)) 00332 { 00333 ChangeOutgoingCigiVersion(Version); 00334 00335 // Set the buffer's Cigi Version 00336 ChangeBufferCigiVersion(OutgoingVersion); 00337 00338 CmdVersionChng = false; // Already changed 00339 } 00340 } 00341 } 00342 00343 return(stat); 00344 }
void CigiOutgoingMsg::SetOutgoingHostV1Tbls | ( | void | ) | [protected] |
Sets the external interface tables to Host output with Cigi Version 1 packets
Definition at line 1274 of file CigiOutgoingMsg.cpp.
References CIGI_ART_PART_CTRL_PACKET_ID_V1, CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1, CIGI_COMP_CTRL_PACKET_ID_V1, CIGI_ENTITY_CTRL_PACKET_ID_V1, CIGI_ENV_CTRL_PACKET_ID_V1, CIGI_HAT_REQ_PACKET_ID_V1, CIGI_IG_CTRL_PACKET_ID_V1, CIGI_LOS_SEG_REQ_PACKET_ID_V1, CIGI_LOS_VECT_REQ_PACKET_ID_V1, CIGI_RATE_CTRL_PACKET_ID_V1, CIGI_SENSOR_CTRL_PACKET_ID_V1, CIGI_SPEC_EFF_DEF_PACKET_ID_V1, CIGI_TRAJECTORY_DEF_PACKET_ID_V1, CIGI_VIEW_CTRL_PACKET_ID_V1, CIGI_VIEW_DEF_PACKET_ID_V1, CIGI_WEATHER_CTRL_PACKET_ID_V1, OutgoingHandlerTbl, and VldSnd.
Referenced by ChangeOutgoingCigiVersion().
01275 { 01276 01277 OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiIGCtrlV1; 01278 VldSnd[CIGI_IG_CTRL_PACKET_ID_V1] = true; 01279 OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiEntityCtrlV1; 01280 VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V1] = true; 01281 OutgoingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiViewDefV1; 01282 VldSnd[CIGI_VIEW_DEF_PACKET_ID_V1] = true; 01283 OutgoingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiViewCtrlV1; 01284 VldSnd[CIGI_VIEW_CTRL_PACKET_ID_V1] = true; 01285 OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiRateCtrlV1; 01286 VldSnd[CIGI_RATE_CTRL_PACKET_ID_V1] = true; 01287 OutgoingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiSensorCtrlV1; 01288 VldSnd[CIGI_SENSOR_CTRL_PACKET_ID_V1] = true; 01289 OutgoingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiTrajectoryDefV1; 01290 VldSnd[CIGI_TRAJECTORY_DEF_PACKET_ID_V1] = true; 01291 OutgoingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiWeatherCtrlV1; 01292 VldSnd[CIGI_WEATHER_CTRL_PACKET_ID_V1] = true; 01293 OutgoingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiCollDetSegDefV1; 01294 VldSnd[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V1] = true; 01295 OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosSegReqV1; 01296 VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V1] = true; 01297 OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosVectReqV1; 01298 VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V1] = true; 01299 OutgoingHandlerTbl[CIGI_HAT_REQ_PACKET_ID_V1] = (CigiBasePacket *) new CigiHatReqV1; 01300 VldSnd[CIGI_HAT_REQ_PACKET_ID_V1] = true; 01301 OutgoingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiEnvCtrlV1; 01302 VldSnd[CIGI_ENV_CTRL_PACKET_ID_V1] = true; 01303 OutgoingHandlerTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V1] = (CigiBasePacket *) new CigiSpecEffDefV1; 01304 VldSnd[CIGI_SPEC_EFF_DEF_PACKET_ID_V1] = true; 01305 OutgoingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiArtPartCtrlV1; 01306 VldSnd[CIGI_ART_PART_CTRL_PACKET_ID_V1] = true; 01307 OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V1] = (CigiBasePacket *) new CigiCompCtrlV1; 01308 VldSnd[CIGI_COMP_CTRL_PACKET_ID_V1] = true; 01309 01310 }
void CigiOutgoingMsg::SetOutgoingHostV2Tbls | ( | void | ) | [protected] |
Sets the external interface tables to Host output with Cigi Version 2 packets
Definition at line 1336 of file CigiOutgoingMsg.cpp.
References CIGI_ART_PART_CTRL_PACKET_ID_V2, CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2, CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2, CIGI_COMP_CTRL_PACKET_ID_V2, CIGI_ENTITY_CTRL_PACKET_ID_V2, CIGI_ENV_CTRL_PACKET_ID_V2, CIGI_HAT_REQ_PACKET_ID_V2, CIGI_HOT_REQ_PACKET_ID_V2, CIGI_IG_CTRL_PACKET_ID_V2, CIGI_LOS_SEG_REQ_PACKET_ID_V2, CIGI_LOS_VECT_REQ_PACKET_ID_V2, CIGI_RATE_CTRL_PACKET_ID_V2, CIGI_SENSOR_CTRL_PACKET_ID_V2, CIGI_SPEC_EFF_DEF_PACKET_ID_V2, CIGI_TRAJECTORY_DEF_PACKET_ID_V2, CIGI_VIEW_CTRL_PACKET_ID_V2, CIGI_VIEW_DEF_PACKET_ID_V2, CIGI_WEATHER_CTRL_PACKET_ID_V2, OutgoingHandlerTbl, and VldSnd.
Referenced by ChangeOutgoingCigiVersion().
01337 { 01338 01339 OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiIGCtrlV2; 01340 VldSnd[CIGI_IG_CTRL_PACKET_ID_V2] = true; 01341 OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiEntityCtrlV2; 01342 VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V2] = true; 01343 OutgoingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiViewDefV2; 01344 VldSnd[CIGI_VIEW_DEF_PACKET_ID_V2] = true; 01345 OutgoingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiViewCtrlV2; 01346 VldSnd[CIGI_VIEW_CTRL_PACKET_ID_V2] = true; 01347 OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiRateCtrlV2; 01348 VldSnd[CIGI_RATE_CTRL_PACKET_ID_V2] = true; 01349 OutgoingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiSensorCtrlV2; 01350 VldSnd[CIGI_SENSOR_CTRL_PACKET_ID_V2] = true; 01351 OutgoingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiTrajectoryDefV2; 01352 VldSnd[CIGI_TRAJECTORY_DEF_PACKET_ID_V2] = true; 01353 OutgoingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiWeatherCtrlV2; 01354 VldSnd[CIGI_WEATHER_CTRL_PACKET_ID_V2] = true; 01355 OutgoingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetSegDefV2; 01356 VldSnd[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V2] = true; 01357 OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosSegReqV2; 01358 VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V2] = true; 01359 OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosVectReqV2; 01360 VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V2] = true; 01361 OutgoingHandlerTbl[CIGI_HAT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiHatReqV2; 01362 VldSnd[CIGI_HAT_REQ_PACKET_ID_V2] = true; 01363 OutgoingHandlerTbl[CIGI_HOT_REQ_PACKET_ID_V2] = (CigiBasePacket *) new CigiHotReqV2; 01364 VldSnd[CIGI_HOT_REQ_PACKET_ID_V2] = true; 01365 OutgoingHandlerTbl[CIGI_ENV_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiEnvCtrlV2; 01366 VldSnd[CIGI_ENV_CTRL_PACKET_ID_V2] = true; 01367 OutgoingHandlerTbl[CIGI_SPEC_EFF_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiSpecEffDefV2; 01368 VldSnd[CIGI_SPEC_EFF_DEF_PACKET_ID_V2] = true; 01369 OutgoingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiArtPartCtrlV2; 01370 VldSnd[CIGI_ART_PART_CTRL_PACKET_ID_V2] = true; 01371 OutgoingHandlerTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetVolDefV2; 01372 VldSnd[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2] = true; 01373 OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V2] = (CigiBasePacket *) new CigiCompCtrlV2; 01374 VldSnd[CIGI_COMP_CTRL_PACKET_ID_V2] = true; 01375 01376 }
void CigiOutgoingMsg::SetOutgoingHostV3Tbls | ( | void | ) | [protected] |
Sets the external interface tables to Host output with Cigi Version 3 packets
Definition at line 1408 of file CigiOutgoingMsg.cpp.
References CIGI_ART_PART_CTRL_PACKET_ID_V3, CIGI_ATMOS_CTRL_PACKET_ID_V3, CIGI_CELESTIAL_CTRL_PACKET_ID_V3, CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3, CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3, CIGI_COMP_CTRL_PACKET_ID_V3, CIGI_COMP_CTRL_PACKET_ID_V3_3, CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3, CIGI_EARTH_MODEL_DEF_PACKET_ID_V3, CIGI_ENTITY_CTRL_PACKET_ID_V3, CIGI_ENTITY_CTRL_PACKET_ID_V3_3, CIGI_ENV_COND_REQ_PACKET_ID_V3, CIGI_ENV_RGN_CTRL_PACKET_ID_V3, CIGI_HAT_HOT_REQ_PACKET_ID_V3, CIGI_IG_CTRL_PACKET_ID_V3, CIGI_IG_CTRL_PACKET_ID_V3_2, CIGI_IG_CTRL_PACKET_ID_V3_3, CIGI_LOS_SEG_REQ_PACKET_ID_V3, CIGI_LOS_VECT_REQ_PACKET_ID_V3, CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3, CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3, CIGI_POSITION_REQ_PACKET_ID_V3, CIGI_RATE_CTRL_PACKET_ID_V3, CIGI_SENSOR_CTRL_PACKET_ID_V3, CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3, CIGI_SHORT_COMP_CTRL_PACKET_ID_V3, CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3, CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3, CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3, CIGI_SYMBOL_CLONE_PACKET_ID_V3_3, CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3, CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3, CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3, CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3, CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3, CIGI_TRAJECTORY_DEF_PACKET_ID_V3, CIGI_VIEW_CTRL_PACKET_ID_V3, CIGI_VIEW_DEF_PACKET_ID_V3, CIGI_WAVE_CTRL_PACKET_ID_V3, CIGI_WEATHER_CTRL_PACKET_ID_V3, CigiVersionID::CigiMinorVersion, OutgoingHandlerTbl, OutgoingVersion, and VldSnd.
Referenced by ChangeOutgoingCigiVersion().
01409 { 01410 01411 if(OutgoingVersion.CigiMinorVersion >= 2) 01412 { 01413 if(OutgoingVersion.CigiMinorVersion >= 3) 01414 { 01415 OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiIGCtrlV3_3; 01416 VldSnd[CIGI_IG_CTRL_PACKET_ID_V3_3] = true; 01417 OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiEntityCtrlV3_3; 01418 VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V3_3] = true; 01419 OutgoingHandlerTbl[CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolSurfaceDefV3_3; 01420 VldSnd[CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3] = true; 01421 OutgoingHandlerTbl[CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCtrlV3_3; 01422 VldSnd[CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3] = true; 01423 OutgoingHandlerTbl[CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiShortSymbolCtrlV3_3; 01424 VldSnd[CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3] = true; 01425 OutgoingHandlerTbl[CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolTextDefV3_3; 01426 VldSnd[CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3] = true; 01427 OutgoingHandlerTbl[CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCircleDefV3_3; 01428 VldSnd[CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3] = true; 01429 OutgoingHandlerTbl[CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolLineDefV3_3; 01430 VldSnd[CIGI_SYMBOL_LINE_DEFINITION_PACKET_ID_V3_3] = true; 01431 OutgoingHandlerTbl[CIGI_SYMBOL_CLONE_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiSymbolCloneV3_3; 01432 VldSnd[CIGI_SYMBOL_CLONE_PACKET_ID_V3_3] = true; 01433 OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiCompCtrlV3_3; 01434 VldSnd[CIGI_COMP_CTRL_PACKET_ID_V3_3] = true; 01435 OutgoingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3] = (CigiBasePacket *) new CigiShortCompCtrlV3_3; 01436 VldSnd[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3] = true; 01437 } 01438 else 01439 { 01440 OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3_2] = (CigiBasePacket *) new CigiIGCtrlV3_2; 01441 VldSnd[CIGI_IG_CTRL_PACKET_ID_V3_2] = true; 01442 OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEntityCtrlV3; 01443 VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V3] = true; 01444 OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCompCtrlV3; 01445 VldSnd[CIGI_COMP_CTRL_PACKET_ID_V3] = true; 01446 OutgoingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortCompCtrlV3; 01447 VldSnd[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = true; 01448 } 01449 OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiRateCtrlV3_2; 01450 VldSnd[CIGI_RATE_CTRL_PACKET_ID_V3] = true; 01451 OutgoingHandlerTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotReqV3_2; 01452 VldSnd[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = true; 01453 OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosSegReqV3_2; 01454 VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = true; 01455 OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosVectReqV3_2; 01456 VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = true; 01457 } 01458 else 01459 { 01460 OutgoingHandlerTbl[CIGI_IG_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiIGCtrlV3; 01461 VldSnd[CIGI_IG_CTRL_PACKET_ID_V3] = true; 01462 OutgoingHandlerTbl[CIGI_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEntityCtrlV3; 01463 VldSnd[CIGI_ENTITY_CTRL_PACKET_ID_V3] = true; 01464 OutgoingHandlerTbl[CIGI_RATE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiRateCtrlV3; 01465 VldSnd[CIGI_RATE_CTRL_PACKET_ID_V3] = true; 01466 OutgoingHandlerTbl[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotReqV3; 01467 VldSnd[CIGI_HAT_HOT_REQ_PACKET_ID_V3] = true; 01468 OutgoingHandlerTbl[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosSegReqV3; 01469 VldSnd[CIGI_LOS_SEG_REQ_PACKET_ID_V3] = true; 01470 OutgoingHandlerTbl[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosVectReqV3; 01471 VldSnd[CIGI_LOS_VECT_REQ_PACKET_ID_V3] = true; 01472 OutgoingHandlerTbl[CIGI_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCompCtrlV3; 01473 VldSnd[CIGI_COMP_CTRL_PACKET_ID_V3] = true; 01474 OutgoingHandlerTbl[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortCompCtrlV3; 01475 VldSnd[CIGI_SHORT_COMP_CTRL_PACKET_ID_V3] = true; 01476 } 01477 01478 OutgoingHandlerTbl[CIGI_VIEW_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiViewDefV3; 01479 VldSnd[CIGI_VIEW_DEF_PACKET_ID_V3] = true; 01480 OutgoingHandlerTbl[CIGI_VIEW_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiViewCtrlV3; 01481 VldSnd[CIGI_VIEW_CTRL_PACKET_ID_V3] = true; 01482 OutgoingHandlerTbl[CIGI_SENSOR_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorCtrlV3; 01483 VldSnd[CIGI_SENSOR_CTRL_PACKET_ID_V3] = true; 01484 OutgoingHandlerTbl[CIGI_TRAJECTORY_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiTrajectoryDefV3; 01485 VldSnd[CIGI_TRAJECTORY_DEF_PACKET_ID_V3] = true; 01486 OutgoingHandlerTbl[CIGI_WEATHER_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiWeatherCtrlV3; 01487 VldSnd[CIGI_WEATHER_CTRL_PACKET_ID_V3] = true; 01488 OutgoingHandlerTbl[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetSegDefV3; 01489 VldSnd[CIGI_COLL_DET_SEG_DEF_PACKET_ID_V3] = true; 01490 OutgoingHandlerTbl[CIGI_ATMOS_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiAtmosCtrlV3; 01491 VldSnd[CIGI_ATMOS_CTRL_PACKET_ID_V3] = true; 01492 OutgoingHandlerTbl[CIGI_CELESTIAL_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiCelestialCtrlV3; 01493 VldSnd[CIGI_CELESTIAL_CTRL_PACKET_ID_V3] = true; 01494 OutgoingHandlerTbl[CIGI_ART_PART_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiArtPartCtrlV3; 01495 VldSnd[CIGI_ART_PART_CTRL_PACKET_ID_V3] = true; 01496 OutgoingHandlerTbl[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetVolDefV3; 01497 VldSnd[CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3] = true; 01498 OutgoingHandlerTbl[CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiShortArtPartCtrlV3; 01499 VldSnd[CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3] = true; 01500 OutgoingHandlerTbl[CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiConfClampEntityCtrlV3; 01501 VldSnd[CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3] = true; 01502 OutgoingHandlerTbl[CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiMaritimeSurfaceCtrlV3; 01503 VldSnd[CIGI_MARITIME_SURFACE_CTRL_PACKET_ID_V3] = true; 01504 OutgoingHandlerTbl[CIGI_ENV_RGN_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiEnvRgnCtrlV3; 01505 VldSnd[CIGI_ENV_RGN_CTRL_PACKET_ID_V3] = true; 01506 OutgoingHandlerTbl[CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiTerrestrialSurfaceCtrlV3; 01507 VldSnd[CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3] = true; 01508 OutgoingHandlerTbl[CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiMotionTrackCtrlV3; 01509 VldSnd[CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3] = true; 01510 OutgoingHandlerTbl[CIGI_EARTH_MODEL_DEF_PACKET_ID_V3] = (CigiBasePacket *) new CigiEarthModelDefV3; 01511 VldSnd[CIGI_EARTH_MODEL_DEF_PACKET_ID_V3] = true; 01512 OutgoingHandlerTbl[CIGI_POSITION_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiPositionReqV3; 01513 VldSnd[CIGI_POSITION_REQ_PACKET_ID_V3] = true; 01514 OutgoingHandlerTbl[CIGI_ENV_COND_REQ_PACKET_ID_V3] = (CigiBasePacket *) new CigiEnvCondReqV3; 01515 VldSnd[CIGI_ENV_COND_REQ_PACKET_ID_V3] = true; 01516 OutgoingHandlerTbl[CIGI_WAVE_CTRL_PACKET_ID_V3] = (CigiBasePacket *) new CigiWaveCtrlV3; 01517 VldSnd[CIGI_WAVE_CTRL_PACKET_ID_V3] = true; 01518 01519 }
void CigiOutgoingMsg::SetOutgoingIGV1Tbls | ( | void | ) | [protected] |
Sets the external interface tables to IG output with Cigi Version 1 packets
Definition at line 1316 of file CigiOutgoingMsg.cpp.
References CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1, CIGI_HAT_RESP_PACKET_ID_V1, CIGI_LOS_RESP_PACKET_ID_V1, CIGI_SENSOR_RESP_PACKET_ID_V1, CIGI_SOF_PACKET_ID_V1, OutgoingHandlerTbl, and VldSnd.
Referenced by ChangeOutgoingCigiVersion().
01317 { 01318 01319 OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V1] = (CigiBasePacket *) new CigiSOFV1; 01320 VldSnd[CIGI_SOF_PACKET_ID_V1] = true; 01321 OutgoingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiCollDetSegRespV1; 01322 VldSnd[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1] = true; 01323 OutgoingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiSensorRespV1; 01324 VldSnd[CIGI_SENSOR_RESP_PACKET_ID_V1] = true; 01325 OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiLosRespV1; 01326 VldSnd[CIGI_LOS_RESP_PACKET_ID_V1] = true; 01327 OutgoingHandlerTbl[CIGI_HAT_RESP_PACKET_ID_V1] = (CigiBasePacket *) new CigiHatRespV1; 01328 VldSnd[CIGI_HAT_RESP_PACKET_ID_V1] = true; 01329 01330 }
void CigiOutgoingMsg::SetOutgoingIGV2Tbls | ( | void | ) | [protected] |
Sets the external interface tables to IG output with Cigi Version 2 packets
Definition at line 1382 of file CigiOutgoingMsg.cpp.
References CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2, CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2, CIGI_HAT_RESP_PACKET_ID_V2, CIGI_HOT_RESP_PACKET_ID_V2, CIGI_IG_MSG_PACKET_ID_V2, CIGI_LOS_RESP_PACKET_ID_V2, CIGI_SENSOR_RESP_PACKET_ID_V2, CIGI_SOF_PACKET_ID_V2, OutgoingHandlerTbl, and VldSnd.
Referenced by ChangeOutgoingCigiVersion().
01383 { 01384 01385 OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V2] = (CigiBasePacket *) new CigiSOFV2; 01386 VldSnd[CIGI_SOF_PACKET_ID_V2] = true; 01387 OutgoingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetSegRespV2; 01388 VldSnd[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2] = true; 01389 OutgoingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiSensorRespV2; 01390 VldSnd[CIGI_SENSOR_RESP_PACKET_ID_V2] = true; 01391 OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiLosRespV2; 01392 VldSnd[CIGI_LOS_RESP_PACKET_ID_V2] = true; 01393 OutgoingHandlerTbl[CIGI_HAT_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiHatRespV2; 01394 VldSnd[CIGI_HAT_RESP_PACKET_ID_V2] = true; 01395 OutgoingHandlerTbl[CIGI_HOT_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiHotRespV2; 01396 VldSnd[CIGI_HOT_RESP_PACKET_ID_V2] = true; 01397 OutgoingHandlerTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2] = (CigiBasePacket *) new CigiCollDetVolRespV2; 01398 VldSnd[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V2] = true; 01399 OutgoingHandlerTbl[CIGI_IG_MSG_PACKET_ID_V2] = (CigiBasePacket *) new CigiIGMsgV2; 01400 VldSnd[CIGI_IG_MSG_PACKET_ID_V2] = true; 01401 01402 }
void CigiOutgoingMsg::SetOutgoingIGV3Tbls | ( | void | ) | [protected] |
Sets the external interface tables to IG output with Cigi Version 3 packets
Definition at line 1525 of file CigiOutgoingMsg.cpp.
References CIGI_AEROSOL_RESP_PACKET_ID_V3, CIGI_ANIMATION_STOP_PACKET_ID_V3, CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3, CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3, CIGI_EVENT_NOTIFICATION_PACKET_ID_V3, CIGI_HAT_HOT_RESP_PACKET_ID_V3, CIGI_HAT_HOT_XRESP_PACKET_ID_V3, CIGI_IG_MSG_PACKET_ID_V3, CIGI_LOS_RESP_PACKET_ID_V3, CIGI_LOS_XRESP_PACKET_ID_V3, CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3, CIGI_POSITION_RESP_PACKET_ID_V3, CIGI_SENSOR_RESP_PACKET_ID_V3, CIGI_SENSOR_XRESP_PACKET_ID_V3, CIGI_SOF_PACKET_ID_V3, CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3, CIGI_WEATHER_COND_RESP_PACKET_ID_V3, CigiVersionID::CigiMinorVersion, OutgoingHandlerTbl, OutgoingVersion, and VldSnd.
Referenced by ChangeOutgoingCigiVersion().
01526 { 01527 01528 if(OutgoingVersion.CigiMinorVersion >= 2) 01529 { 01530 OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V3] = (CigiBasePacket *) new CigiSOFV3_2; 01531 VldSnd[CIGI_SOF_PACKET_ID_V3] = true; 01532 OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosRespV3_2; 01533 VldSnd[CIGI_LOS_RESP_PACKET_ID_V3] = true; 01534 OutgoingHandlerTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosXRespV3_2; 01535 VldSnd[CIGI_LOS_XRESP_PACKET_ID_V3] = true; 01536 OutgoingHandlerTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotRespV3_2; 01537 VldSnd[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = true; 01538 OutgoingHandlerTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotXRespV3_2; 01539 VldSnd[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = true; 01540 } 01541 else 01542 { 01543 OutgoingHandlerTbl[CIGI_SOF_PACKET_ID_V3] = (CigiBasePacket *) new CigiSOFV3; 01544 VldSnd[CIGI_SOF_PACKET_ID_V3] = true; 01545 OutgoingHandlerTbl[CIGI_LOS_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosRespV3; 01546 VldSnd[CIGI_LOS_RESP_PACKET_ID_V3] = true; 01547 OutgoingHandlerTbl[CIGI_LOS_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiLosXRespV3; 01548 VldSnd[CIGI_LOS_XRESP_PACKET_ID_V3] = true; 01549 OutgoingHandlerTbl[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotRespV3; 01550 VldSnd[CIGI_HAT_HOT_RESP_PACKET_ID_V3] = true; 01551 OutgoingHandlerTbl[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiHatHotXRespV3; 01552 VldSnd[CIGI_HAT_HOT_XRESP_PACKET_ID_V3] = true; 01553 } 01554 01555 OutgoingHandlerTbl[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetSegRespV3; 01556 VldSnd[CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3] = true; 01557 OutgoingHandlerTbl[CIGI_SENSOR_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorRespV3; 01558 VldSnd[CIGI_SENSOR_RESP_PACKET_ID_V3] = true; 01559 OutgoingHandlerTbl[CIGI_SENSOR_XRESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiSensorXRespV3; 01560 VldSnd[CIGI_SENSOR_XRESP_PACKET_ID_V3] = true; 01561 OutgoingHandlerTbl[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiCollDetVolRespV3; 01562 VldSnd[CIGI_COLL_DET_VOL_RESP_PACKET_ID_V3] = true; 01563 OutgoingHandlerTbl[CIGI_POSITION_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiPositionRespV3; 01564 VldSnd[CIGI_POSITION_RESP_PACKET_ID_V3] = true; 01565 OutgoingHandlerTbl[CIGI_WEATHER_COND_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiWeatherCondRespV3; 01566 VldSnd[CIGI_WEATHER_COND_RESP_PACKET_ID_V3] = true; 01567 OutgoingHandlerTbl[CIGI_AEROSOL_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiAerosolRespV3; 01568 VldSnd[CIGI_AEROSOL_RESP_PACKET_ID_V3] = true; 01569 OutgoingHandlerTbl[CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiMaritimeSurfaceRespV3; 01570 VldSnd[CIGI_MARITIME_SURFACE_RESP_PACKET_ID_V3] = true; 01571 OutgoingHandlerTbl[CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3] = (CigiBasePacket *) new CigiTerrestrialSurfaceRespV3; 01572 VldSnd[CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3] = true; 01573 OutgoingHandlerTbl[CIGI_ANIMATION_STOP_PACKET_ID_V3] = (CigiBasePacket *) new CigiAnimationStopV3; 01574 VldSnd[CIGI_ANIMATION_STOP_PACKET_ID_V3] = true; 01575 OutgoingHandlerTbl[CIGI_EVENT_NOTIFICATION_PACKET_ID_V3] = (CigiBasePacket *) new CigiEventNotificationV3; 01576 VldSnd[CIGI_EVENT_NOTIFICATION_PACKET_ID_V3] = true; 01577 OutgoingHandlerTbl[CIGI_IG_MSG_PACKET_ID_V3] = (CigiBasePacket *) new CigiIGMsgV3; 01578 VldSnd[CIGI_IG_MSG_PACKET_ID_V3] = true; 01579 01580 }
void CigiOutgoingMsg::SetSynchronous | ( | const bool | Sync | ) | [inline] |
Deprecated:
This member function nolonger does anything.
Sync | - Sets the synchronous/asynchronous mode of operation. true - Synchronous operation. false - Asynchronous operation. |
Definition at line 526 of file CigiOutgoingMsg.h.
int CigiOutgoingMsg::UnlockMsg | ( | void | ) |
Unlocks the message after sending
Definition at line 1091 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Active, CigiMessage::AvailBuff, CigiMessageBuffer::Buffer, CigiMessageBuffer::BufferFillCnt, CigiMessage::Buffers, CIGI_ERROR_CALLED_OUT_OF_SEQUENCE, CIGI_SUCCESS, CigiMessage::CrntMsgBuf, CigiMessageBuffer::DataPresent, CigiMessageBuffer::FillBufferPos, CigiMessageBuffer::Locked, and CigiMessageBuffer::ValidIGCtrlSOF.
Referenced by FreeMsg(), and CigiIO::Send().
01092 { 01093 // Verify there is a current message buffer 01094 if(CrntMsgBuf == NULL) 01095 { 01096 #ifndef CIGI_NO_EXCEPT 01097 throw CigiCalledOutOfSequenceException(); 01098 #endif 01099 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 01100 } 01101 01102 // Verify that the buffer is active and locked 01103 if(!CrntMsgBuf->Active || !CrntMsgBuf->Locked) 01104 { 01105 #ifndef CIGI_NO_EXCEPT 01106 throw CigiCalledOutOfSequenceException(); 01107 #endif 01108 return(CIGI_ERROR_CALLED_OUT_OF_SEQUENCE); 01109 } 01110 01111 // Reset and clear the current buffer 01112 CrntMsgBuf->Active = false; 01113 CrntMsgBuf->BufferFillCnt = 0; 01114 CrntMsgBuf->DataPresent = false; 01115 CrntMsgBuf->FillBufferPos = CrntMsgBuf->Buffer; 01116 CrntMsgBuf->Locked = false; 01117 CrntMsgBuf->ValidIGCtrlSOF = false; 01118 01119 // Clear this buffer from the Active Buffers list 01120 if(!Buffers.empty()) 01121 { 01122 if(CrntMsgBuf == *(Buffers.begin())) 01123 Buffers.pop_front(); 01124 else 01125 { 01126 list<CigiMessageBuffer *>::iterator iBuf; 01127 for(iBuf=Buffers.begin();iBuf!=Buffers.end();iBuf++) 01128 { 01129 if(*iBuf == CrntMsgBuf) 01130 { 01131 iBuf = Buffers.erase(iBuf); 01132 break; 01133 } 01134 } 01135 } 01136 } 01137 01138 // Add this buffer to the Availible Buffers list 01139 AvailBuff.push_back(CrntMsgBuf); 01140 01141 // Clear the Current Message Buffer 01142 CrntMsgBuf = NULL; 01143 01144 return(CIGI_SUCCESS); 01145 01146 }
int CigiOutgoingMsg::UpdateFrameCntr | ( | Cigi_uint8 * | OutgoingMsg, | |
Cigi_uint8 * | IncomingMsg = NULL | |||
) |
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.
OutgoingMsg | - A pointer to the outgoing msg buffer | |
IncomingMsg | - A pointer to the incoming msg buffer |
Definition at line 770 of file CigiOutgoingMsg.cpp.
References CIGI_ERROR_MISSING_IG_CONTROL_PACKET, CIGI_ERROR_MISSING_SOF_PACKET, CIGI_ERROR_UNEXPECTED_NULL, CIGI_SCOPY4, CIGI_SUCCESS, CigiVersionID::CigiMajorVersion, CigiVersionID::CigiMinorVersion, CigiSwap4(), CigiMessage::CrntMsgBuf, FrameCnt, CigiVersionID::GetCombinedCigiVersion(), CigiSession::IsHost(), CigiSession::IsSynchronous(), LastRcvdFrame, CigiMessage::Session, and CigiMessageBuffer::ValidIGCtrlSOF.
00771 { 00772 if((OutgoingMsg == NULL) || 00773 (CrntMsgBuf == NULL) || 00774 (Session == NULL)) 00775 return(CIGI_ERROR_UNEXPECTED_NULL); 00776 00777 if(!CrntMsgBuf->ValidIGCtrlSOF) 00778 { 00779 if(Session->IsHost()) 00780 { 00781 #ifndef CIGI_NO_EXCEPT 00782 throw CigiMissingIgControlException(); 00783 #endif 00784 return(CIGI_ERROR_MISSING_IG_CONTROL_PACKET); 00785 } 00786 else 00787 { 00788 #ifndef CIGI_NO_EXCEPT 00789 throw CigiMissingStartOfFrameException(); 00790 #endif 00791 return(CIGI_ERROR_MISSING_SOF_PACKET); 00792 } 00793 } 00794 00795 // Note: For all current CIGI Versions in the 00796 // IG Control and Start-Of-Frame packets: 00797 // The Packet ID is in the same location in the packets. 00798 // The version ID is in the same location in the packets. 00799 // The database ID is in the same location in the packets. 00800 // The outgoing frame counter is in the same location in the packets. 00801 // Unfortunately The minor version ID is in different locations 00802 00803 // How the frame counter fields are filled is dependant 00804 // on the cigi version of the outgoing message and the 00805 // whether the outgoing message is a host or ig message 00806 // and whether the system is running synchronized 00807 00808 Cigi_uint32 *OutgoingMsgWord = (Cigi_uint32 *)OutgoingMsg; 00809 Cigi_uint32 *IncomingMsgWord = (Cigi_uint32 *)IncomingMsg; 00810 00811 // Determine Outgoing CigiVersion 00812 // and frame adjustment method 00813 bool FrameIncr = false; 00814 bool FrameRcvd = false; 00815 CigiVersionID OutVer; 00816 OutVer.CigiMajorVersion = (int) *(OutgoingMsg + 2); 00817 if(OutVer.CigiMajorVersion < 3) 00818 { 00819 if((Session->IsHost()) && (Session->IsSynchronous())) 00820 FrameRcvd = true; 00821 else 00822 FrameIncr = true; 00823 } 00824 else 00825 { 00826 int tVer = 0; 00827 if(Session->IsHost()) 00828 { 00829 tVer = (int) *(OutgoingMsg + 4); 00830 if(Session->IsSynchronous()) 00831 FrameRcvd = true; 00832 else 00833 FrameIncr = true; 00834 } 00835 else 00836 { 00837 tVer = (int) *(OutgoingMsg + 5); 00838 FrameIncr = true; 00839 } 00840 00841 OutVer.CigiMinorVersion = (tVer >> 4) & 0x0f; 00842 00843 if(OutVer.GetCombinedCigiVersion() >= 0x0302) 00844 { 00845 FrameIncr = true; 00846 FrameRcvd = true; 00847 } 00848 } 00849 00850 int NewFrame = FrameCnt; 00851 int RcvdFrame = -1; 00852 if(FrameRcvd) 00853 { 00854 if(IncomingMsg == NULL) 00855 RcvdFrame = LastRcvdFrame; 00856 else 00857 { 00858 int InVer = (int) *(IncomingMsg + 2); 00859 if(InVer >= 3) 00860 { 00861 // Get Byte Swap 00862 Cigi_uint16 *IncomingMsgShort = (Cigi_uint16 *)IncomingMsg; 00863 if(*(IncomingMsgShort + 3) == 0x8000) 00864 RcvdFrame = *(IncomingMsgWord + 2); 00865 else 00866 CigiSwap4(&RcvdFrame,(IncomingMsgWord + 2)); // Swap RcvFrame 00867 } 00868 } 00869 00870 if(!FrameIncr) 00871 NewFrame = RcvdFrame; 00872 } 00873 00874 if(OutVer.CigiMajorVersion < 3) 00875 CIGI_SCOPY4((OutgoingMsgWord + 2),&NewFrame); 00876 else 00877 { 00878 *(OutgoingMsgWord + 2) = NewFrame; 00879 if(FrameIncr && FrameRcvd) 00880 *(OutgoingMsgWord + 4) = RcvdFrame; 00881 } 00882 00883 FrameCnt++; // increment frame count 00884 00885 return(CIGI_SUCCESS); 00886 00887 }
int CigiOutgoingMsg::UpdateFrameCntr | ( | void | ) |
Updates the Frame Counter in the IG Control or SOF packet of the current message.
Definition at line 744 of file CigiOutgoingMsg.cpp.
References CigiMessageBuffer::Buffer, CigiMessage::Buffers, CIGI_ERROR_UNEXPECTED_NULL, CIGI_SUCCESS, CigiMessage::CrntMsgBuf, and FrameCnt.
Referenced by CigiIO::Send(), and UpdateIGCtrl().
00745 { 00746 int stat = CIGI_ERROR_UNEXPECTED_NULL; 00747 00748 if(CrntMsgBuf == NULL) 00749 { 00750 if(!Buffers.empty()) 00751 { 00752 CigiMessageBuffer *tBuf = *(Buffers.begin()); 00753 if(tBuf->IsValidIGCtrlSOF()) 00754 { 00755 Cigi_uint32 *tFrm = (Cigi_uint32 *)(tBuf->Buffer + 8); 00756 *tFrm = FrameCnt++; 00757 stat = CIGI_SUCCESS; 00758 } 00759 } 00760 } 00761 else 00762 stat = UpdateFrameCntr(CrntMsgBuf->Buffer); 00763 00764 return(stat); 00765 }
int CigiOutgoingMsg::UpdateIGCtrl | ( | Cigi_uint8 * | OutgoingMsg, | |
Cigi_uint8 * | IncomingMsg | |||
) |
Updates the IG Control's Frame Counter and Database ID if needed
OutgoingMsg | - A pointer to the outgoing msg buffer | |
IncomingMsg | - A pointer to the incoming msg buffer |
Definition at line 893 of file CigiOutgoingMsg.cpp.
References CIGI_ERROR_UNEXPECTED_NULL, CIGI_SUCCESS, and UpdateFrameCntr().
00894 { 00895 00896 Cigi_int8 *OBufr = NULL; 00897 Cigi_int8 *IBufr = NULL; 00898 00899 if(OutgoingMsg == NULL) 00900 return(CIGI_ERROR_UNEXPECTED_NULL); 00901 00902 00903 // Note: For all current CIGI Versions in the 00904 // IG Control and Start-Of-Frame packets: 00905 // The Packet ID is in the same location in the packets. 00906 // The version ID is in the same location in the packets. 00907 // The database ID is in the same location in the packets. 00908 // The outgoing frame counter is in the same location in the packets. 00909 00910 00911 // Update the Frame Counter and possibly the Recieved Frame Counter 00912 UpdateFrameCntr(OutgoingMsg,IncomingMsg); 00913 00914 00915 // check and adjust the Database IDs for 00916 OBufr = (Cigi_int8 *)(OutgoingMsg + 3); 00917 if(*OBufr != 0) 00918 { 00919 if(*OBufr < 0) 00920 { 00921 *OBufr = 0; // Host sent Database IDs should never be negative 00922 } 00923 #if !defined(_NO_DATABASE_ADJUSTMENT_) 00924 else if(IncomingMsg != NULL) 00925 { 00926 // If *IBufr is -128, the IG did not find that database 00927 // so the host should send a corrected database id 00928 // However, if the *OBufr is the same as the *IBufr or 00929 // the *IBufr is the negative of *OBufr, 00930 // (specifically excluding -128) the outgoing 00931 // database id should be 0 00932 IBufr = (Cigi_int8 *)(IncomingMsg + 3); 00933 if((*IBufr != -128) && 00934 ((*OBufr == *IBufr) || (*OBufr == (*IBufr * (-1))))) 00935 { 00936 *OBufr = 0; 00937 } 00938 } 00939 #endif 00940 } 00941 00942 return(CIGI_SUCCESS); 00943 00944 }
int CigiOutgoingMsg::UpdateSOF | ( | Cigi_uint8 * | OutgoingMsg, | |
Cigi_uint8 * | IncomingMsg = NULL | |||
) | [inline] |
Updates SOF's Frame Counter
OutgoingMsg | - A pointer to the outgoing msg buffer | |
IncomingMsg | - A pointer to the incoming msg buffer |
Definition at line 401 of file CigiOutgoingMsg.h.
00402 { 00403 return(UpdateFrameCntr(OutgoingMsg,IncomingMsg)); 00404 }
friend class CigiSession [friend] |
CigiVersionID CigiOutgoingMsg::CmdVersion [protected] |
The Commanded Version of Cigi
Definition at line 717 of file CigiOutgoingMsg.h.
Referenced by AdvanceBuffer(), CigiOutgoingMsg(), and SetOutgoingCigiVersion().
bool CigiOutgoingMsg::CmdVersionChng [protected] |
There is a change in the Commanded Version of Cigi
Definition at line 712 of file CigiOutgoingMsg.h.
Referenced by AdvanceBuffer(), CigiOutgoingMsg(), and SetOutgoingCigiVersion().
CigiDefaultPacket CigiOutgoingMsg::DefaultPacket [protected] |
A default packet manager
Definition at line 727 of file CigiOutgoingMsg.h.
Referenced by CigiOutgoingMsg(), and ClearHandlerTable().
Cigi_uint32 CigiOutgoingMsg::FrameCnt [protected] |
The current frame count
Definition at line 742 of file CigiOutgoingMsg.h.
Referenced by CigiOutgoingMsg(), and UpdateFrameCntr().
Cigi_uint32 CigiOutgoingMsg::LastRcvdFrame [protected] |
The count of the last received frame
Definition at line 747 of file CigiOutgoingMsg.h.
Referenced by CigiOutgoingMsg(), and UpdateFrameCntr().
The most mature version of CIGI received
Definition at line 722 of file CigiOutgoingMsg.h.
Referenced by AdvanceBuffer(), CigiOutgoingMsg(), SetMostMatureReceivedCigiVersion(), and SetOutgoingCigiVersion().
CigiBasePacket* CigiOutgoingMsg::OutgoingHandlerTbl[256] [protected] |
The Conversion Table for managers of outgoing packets
Definition at line 732 of file CigiOutgoingMsg.h.
Referenced by CigiOutgoingMsg(), ClearHandlerTable(), operator<<(), RegisterUserPacket(), SetOutgoingHostV1Tbls(), SetOutgoingHostV2Tbls(), SetOutgoingHostV3Tbls(), SetOutgoingIGV1Tbls(), SetOutgoingIGV2Tbls(), and SetOutgoingIGV3Tbls().
CigiVersionID CigiOutgoingMsg::OutgoingVersion [protected] |
The Version of CIGI being sent out
Definition at line 707 of file CigiOutgoingMsg.h.
Referenced by AdvanceBuffer(), ChangeBufferCigiVersion(), ChangeOutgoingCigiVersion(), operator<<(), SetMostMatureReceivedCigiVersion(), SetOutgoingCigiVersion(), SetOutgoingHostV3Tbls(), and SetOutgoingIGV3Tbls().
CigiBaseIGCtrl* CigiOutgoingMsg::pIGCtrlPck[6] [protected] |
An Array of IGCtrl packers
Definition at line 752 of file CigiOutgoingMsg.h.
Referenced by ChangeBufferCigiVersion(), CigiOutgoingMsg(), and ~CigiOutgoingMsg().
CigiBaseSOF* CigiOutgoingMsg::pSOFPck[5] [protected] |
An Array of SOF packers
Definition at line 757 of file CigiOutgoingMsg.h.
Referenced by ChangeBufferCigiVersion(), CigiOutgoingMsg(), and ~CigiOutgoingMsg().
bool CigiOutgoingMsg::VldSnd[256] [protected] |
The Packet valid to send Table
Definition at line 737 of file CigiOutgoingMsg.h.
Referenced by CigiOutgoingMsg(), ClearHandlerTable(), operator<<(), RegisterUserPacket(), SetOutgoingHostV1Tbls(), SetOutgoingHostV2Tbls(), SetOutgoingHostV3Tbls(), SetOutgoingIGV1Tbls(), SetOutgoingIGV2Tbls(), and SetOutgoingIGV3Tbls().