#include <CigiBaseShortArtPartCtrl.h>
Inheritance diagram for CigiBaseShortArtPartCtrl:
Public Types | |
NotUsed = 0 | |
Xoff = 1 | |
Yoff = 2 | |
Zoff = 3 | |
Yaw = 4 | |
Pitch = 5 | |
Roll = 6 | |
enum | DofSelectGrp { NotUsed = 0, Xoff = 1, Yoff = 2, Zoff = 3, Yaw = 4, Pitch = 5, Roll = 6 } |
Public Member Functions | |
CigiBaseShortArtPartCtrl () | |
virtual | ~CigiBaseShortArtPartCtrl () |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const =0 |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec)=0 |
virtual int | GetCnvt (CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) |
int | SpecialConversion (CigiVersionID &CnvtVersion, Cigi_uint8 ArtPartID, CigiArtPartCtrlV3 *ArtPart) |
int | SetEntityID (const Cigi_uint16 EntityIDIn, bool bndchk=true) |
Cigi_uint16 | GetEntityID (void) const |
int | SetArtPart1 (const Cigi_uint8 ArtPart1In, bool bndchk=true) |
Cigi_uint8 | GetArtPart1 (void) const |
int | SetArtPart2 (const Cigi_uint8 ArtPart2In, bool bndchk=true) |
Cigi_uint8 | GetArtPart2 (void) const |
int | SetDofSelect1 (const DofSelectGrp DofSelect1In, bool bndchk=true) |
DofSelectGrp | GetDofSelect1 (void) const |
int | SetDofSelect2 (const DofSelectGrp DofSelect2In, bool bndchk=true) |
DofSelectGrp | GetDofSelect2 (void) const |
int | SetArtPart1En (const bool ArtPart1EnIn, bool bndchk=true) |
bool | GetArtPart1En (void) const |
int | SetArtPart2En (const bool ArtPart2EnIn, bool bndchk=true) |
bool | GetArtPart2En (void) const |
int | SetDof1 (const float Dof1In, bool bndchk=true) |
float | GetDof1 (void) const |
int | SetDof2 (const float Dof2In, bool bndchk=true) |
float | GetDof2 (void) const |
Protected Attributes | |
Cigi_uint16 | EntityID |
Cigi_uint8 | ArtPart1 |
Cigi_uint8 | ArtPart2 |
DofSelectGrp | DofSelect1 |
DofSelectGrp | DofSelect2 |
bool | ArtPart1En |
bool | ArtPart2En |
float | Dof1 |
float | Dof2 |
Friends | |
class | CigiShortArtPartCtrlV3 |
Definition at line 72 of file CigiBaseShortArtPartCtrl.h.
The enumeration for the CigiBaseShortArtPartCtrl Group
Definition at line 82 of file CigiBaseShortArtPartCtrl.h.
00083 { 00084 NotUsed=0, 00085 Xoff=1, 00086 Yoff=2, 00087 Zoff=3, 00088 Yaw=4, 00089 Pitch=5, 00090 Roll=6 00091 };
CigiBaseShortArtPartCtrl::CigiBaseShortArtPartCtrl | ( | ) |
CigiBaseShortArtPartCtrl::~CigiBaseShortArtPartCtrl | ( | ) | [virtual] |
Cigi_uint8 CigiBaseShortArtPartCtrl::GetArtPart1 | ( | void | ) | const [inline] |
Gets the ArtPart1 value.
Definition at line 213 of file CigiBaseShortArtPartCtrl.h.
References ArtPart1.
Referenced by CigiOutgoingMsg::operator<<(), and CigiIncomingMsg::ProcessIncomingMsg().
00213 { return(ArtPart1); }
bool CigiBaseShortArtPartCtrl::GetArtPart1En | ( | void | ) | const [inline] |
Gets the ArtPart1En value.
Definition at line 303 of file CigiBaseShortArtPartCtrl.h.
References ArtPart1En.
00303 { return(ArtPart1En); }
Cigi_uint8 CigiBaseShortArtPartCtrl::GetArtPart2 | ( | void | ) | const [inline] |
Gets the ArtPart2 value.
Definition at line 234 of file CigiBaseShortArtPartCtrl.h.
References ArtPart2.
Referenced by CigiOutgoingMsg::operator<<(), and CigiIncomingMsg::ProcessIncomingMsg().
00234 { return(ArtPart2); }
bool CigiBaseShortArtPartCtrl::GetArtPart2En | ( | void | ) | const [inline] |
Gets the ArtPart2En value.
Definition at line 324 of file CigiBaseShortArtPartCtrl.h.
References ArtPart2En.
00324 { return(ArtPart2En); }
int CigiBaseShortArtPartCtrl::GetCnvt | ( | CigiVersionID & | CnvtVersion, | |
CigiCnvtInfoType::Type & | CnvtInfo | |||
) | [virtual] |
A virtual Conversion Information function. This function provides conversion information for this packet.
CnvtVersion | - The CIGI version to which this packet is being converted. | |
CnvtInfo | - The information needed for conversion |
Reimplemented from CigiBasePacket.
Definition at line 85 of file CigiBaseShortArtPartCtrl.cpp.
References CIGI_ART_PART_CTRL_PACKET_ID_V2, CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3, CIGI_SUCCESS, CigiVersionID::CigiMajorVersion, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, CigiProcessType::ProcShortArtPartToArtPart, and CigiProcessType::ProcStd.
00087 { 00088 if(CnvtVersion.CigiMajorVersion < 3) 00089 { 00090 // V1 & V2 of the Art Part packet 00091 // uses the same packet id number 00092 CnvtInfo.ProcID = CigiProcessType::ProcShortArtPartToArtPart; 00093 CnvtInfo.CnvtPacketID = CIGI_ART_PART_CTRL_PACKET_ID_V2; 00094 } 00095 else 00096 { 00097 CnvtInfo.ProcID = CigiProcessType::ProcStd; 00098 CnvtInfo.CnvtPacketID = CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3; 00099 } 00100 00101 return(CIGI_SUCCESS); 00102 }
float CigiBaseShortArtPartCtrl::GetDof1 | ( | void | ) | const [inline] |
Gets the Dof1 value.
Definition at line 345 of file CigiBaseShortArtPartCtrl.h.
References Dof1.
00345 { return(Dof1); }
float CigiBaseShortArtPartCtrl::GetDof2 | ( | void | ) | const [inline] |
Gets the Dof2 value.
Definition at line 366 of file CigiBaseShortArtPartCtrl.h.
References Dof2.
00366 { return(Dof2); }
DofSelectGrp CigiBaseShortArtPartCtrl::GetDofSelect1 | ( | void | ) | const [inline] |
Gets the DofSelect1 value.
Definition at line 258 of file CigiBaseShortArtPartCtrl.h.
References DofSelect1.
00258 { return(DofSelect1); }
DofSelectGrp CigiBaseShortArtPartCtrl::GetDofSelect2 | ( | void | ) | const [inline] |
Gets the DofSelect2 value.
Definition at line 282 of file CigiBaseShortArtPartCtrl.h.
References DofSelect2.
00282 { return(DofSelect2); }
Cigi_uint16 CigiBaseShortArtPartCtrl::GetEntityID | ( | void | ) | const [inline] |
Gets the EntityID value.
Definition at line 192 of file CigiBaseShortArtPartCtrl.h.
References EntityID.
00192 { return(EntityID); }
virtual int CigiBaseShortArtPartCtrl::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [pure virtual] |
A pure virtual Pack function. This function is not implemented in this class.
Base | - A pointer to the instance of the packet to be packed. (Downcast to CigiBasePacket) | |
Buff | - A pointer to the current pack point. | |
Spec | - A pointer to special data. |
Implements CigiBasePacket.
Implemented in CigiShortArtPartCtrlV3.
int CigiBaseShortArtPartCtrl::SetArtPart1 | ( | const Cigi_uint8 | ArtPart1In, | |
bool | bndchk = true | |||
) | [inline] |
Sets the ArtPart1 with bound checking control
ArtPart1In | - Articulated Part 1 ID | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 204 of file CigiBaseShortArtPartCtrl.h.
References ArtPart1, and CIGI_SUCCESS.
00205 { 00206 ArtPart1 = ArtPart1In; 00207 return(CIGI_SUCCESS); 00208 }
int CigiBaseShortArtPartCtrl::SetArtPart1En | ( | const bool | ArtPart1EnIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the ArtPart1En with bound checking control
ArtPart1EnIn | - Articulated part 1 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 294 of file CigiBaseShortArtPartCtrl.h.
References ArtPart1En, and CIGI_SUCCESS.
00295 { 00296 ArtPart1En = ArtPart1EnIn; 00297 return(CIGI_SUCCESS); 00298 }
int CigiBaseShortArtPartCtrl::SetArtPart2 | ( | const Cigi_uint8 | ArtPart2In, | |
bool | bndchk = true | |||
) | [inline] |
Sets the ArtPart2 with bound checking control
ArtPart2In | - Articulated Part 2 ID | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 225 of file CigiBaseShortArtPartCtrl.h.
References ArtPart2, and CIGI_SUCCESS.
00226 { 00227 ArtPart2 = ArtPart2In; 00228 return(CIGI_SUCCESS); 00229 }
int CigiBaseShortArtPartCtrl::SetArtPart2En | ( | const bool | ArtPart2EnIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the ArtPart2En with bound checking control
ArtPart2EnIn | - Articulated part 2 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 315 of file CigiBaseShortArtPartCtrl.h.
References ArtPart2En, and CIGI_SUCCESS.
00316 { 00317 ArtPart2En = ArtPart2EnIn; 00318 return(CIGI_SUCCESS); 00319 }
int CigiBaseShortArtPartCtrl::SetDof1 | ( | const float | Dof1In, | |
bool | bndchk = true | |||
) | [inline] |
Sets the Dof1 with bound checking control
Dof1In | - Dof value for Articulated part 1 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 336 of file CigiBaseShortArtPartCtrl.h.
References CIGI_SUCCESS, and Dof1.
00337 { 00338 Dof1 = Dof1In; 00339 return(CIGI_SUCCESS); 00340 }
int CigiBaseShortArtPartCtrl::SetDof2 | ( | const float | Dof2In, | |
bool | bndchk = true | |||
) | [inline] |
Sets the Dof2 with bound checking control
Dof2In | - Dof value for Articulated part 2 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 357 of file CigiBaseShortArtPartCtrl.h.
References CIGI_SUCCESS, and Dof2.
00358 { 00359 Dof2 = Dof2In; 00360 return(CIGI_SUCCESS); 00361 }
int CigiBaseShortArtPartCtrl::SetDofSelect1 | ( | const DofSelectGrp | DofSelect1In, | |
bool | bndchk = true | |||
) |
Sets the DofSelect1 with bound checking control
DofSelect1In | - Dof selection for articulated part 1 NotUsed=0 Xoff=1 Yoff=2 Zoff=3 Yaw=4 Pitch=5 Roll=6 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 202 of file CigiBaseShortArtPartCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and DofSelect1.
00203 { 00204 00205 #ifndef CIGI_NO_BND_CHK 00206 if(bndchk && ((DofSelect1In < 0)||(DofSelect1In > 6))) 00207 { 00208 #ifndef CIGI_NO_EXCEPT 00209 throw CigiValueOutOfRangeException("DofSelect1",(DofSelectGrp)DofSelect1In,0,6); 00210 #endif 00211 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00212 } 00213 #endif 00214 00215 DofSelect1 = DofSelect1In; 00216 return(CIGI_SUCCESS); 00217 00218 }
int CigiBaseShortArtPartCtrl::SetDofSelect2 | ( | const DofSelectGrp | DofSelect2In, | |
bool | bndchk = true | |||
) |
Sets the DofSelect2 with bound checking control
DofSelect2In | - Dof selection for articulated part 2 NotUsed=0 Xoff=1 Yoff=2 Zoff=3 Yaw=4 Pitch=5 Roll=6 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 224 of file CigiBaseShortArtPartCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and DofSelect2.
00225 { 00226 00227 #ifndef CIGI_NO_BND_CHK 00228 if(bndchk && ((DofSelect2In < 0)||(DofSelect2In > 6))) 00229 { 00230 #ifndef CIGI_NO_EXCEPT 00231 throw CigiValueOutOfRangeException("DofSelect2",(DofSelectGrp)DofSelect2In,0,6); 00232 #endif 00233 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00234 } 00235 #endif 00236 00237 DofSelect2 = DofSelect2In; 00238 return(CIGI_SUCCESS); 00239 00240 }
int CigiBaseShortArtPartCtrl::SetEntityID | ( | const Cigi_uint16 | EntityIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the EntityID with bound checking control
EntityIDIn | - Enitity ID | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 183 of file CigiBaseShortArtPartCtrl.h.
References CIGI_SUCCESS, and EntityID.
00184 { 00185 EntityID = EntityIDIn; 00186 return(CIGI_SUCCESS); 00187 }
int CigiBaseShortArtPartCtrl::SpecialConversion | ( | CigiVersionID & | CnvtVersion, | |
Cigi_uint8 | ArtPartID, | |||
CigiArtPartCtrlV3 * | ArtPart | |||
) |
A virtual Conversion Information function. This function provides conversion information for this packet.
CnvtVersion | - The CIGI version to which this packet is being converted. | |
ArtPartID | - The ID of the Articulated Part to process. | |
ArtPart | - The Articulated Part Control Packet object to fill. |
Definition at line 108 of file CigiBaseShortArtPartCtrl.cpp.
References ArtPart1, ArtPart1En, ArtPart2, ArtPart2En, CIGI_ERROR_UNEXPECTED_NULL, CIGI_SUCCESS, Dof1, Dof2, DofSelect1, DofSelect2, EntityID, Pitch, Roll, CigiBaseArtPartCtrl::SetArtPartEn(), CigiArtPartCtrlV3::SetArtPartID(), CigiBaseArtPartCtrl::SetEntityID(), CigiBaseArtPartCtrl::SetPitch(), CigiBaseArtPartCtrl::SetPitchEn(), CigiBaseArtPartCtrl::SetRoll(), CigiBaseArtPartCtrl::SetRollEn(), CigiBaseArtPartCtrl::SetXOff(), CigiBaseArtPartCtrl::SetXOffEn(), CigiBaseArtPartCtrl::SetYaw(), CigiBaseArtPartCtrl::SetYawEn(), CigiBaseArtPartCtrl::SetYOff(), CigiBaseArtPartCtrl::SetYOffEn(), CigiBaseArtPartCtrl::SetZOff(), CigiBaseArtPartCtrl::SetZOffEn(), Xoff, Yaw, Yoff, and Zoff.
Referenced by CigiOutgoingMsg::operator<<(), and CigiIncomingMsg::ProcessIncomingMsg().
00110 { 00111 if(ArtPart == NULL) 00112 { 00113 #ifndef CIGI_NO_EXCEPT 00114 throw CigiNullPointerException(); 00115 #endif 00116 return(CIGI_ERROR_UNEXPECTED_NULL); 00117 } 00118 00119 ArtPart->SetArtPartID(ArtPartID); 00120 ArtPart->SetEntityID(EntityID); 00121 00122 if((ArtPart1 == ArtPartID) && ArtPart1En) 00123 { 00124 ArtPart->SetArtPartEn(true); 00125 switch(DofSelect1) 00126 { 00127 case Xoff: 00128 ArtPart->SetXOff(Dof1); 00129 ArtPart->SetXOffEn(true); 00130 break; 00131 case Yoff: 00132 ArtPart->SetYOff(Dof1); 00133 ArtPart->SetYOffEn(true); 00134 break; 00135 case Zoff: 00136 ArtPart->SetZOff(Dof1); 00137 ArtPart->SetZOffEn(true); 00138 break; 00139 case Yaw: 00140 ArtPart->SetYaw(Dof1); 00141 ArtPart->SetYawEn(true); 00142 break; 00143 case Pitch: 00144 ArtPart->SetPitch(Dof1); 00145 ArtPart->SetPitchEn(true); 00146 break; 00147 case Roll: 00148 ArtPart->SetRoll(Dof1); 00149 ArtPart->SetRollEn(true); 00150 break; 00151 default: 00152 break; 00153 } 00154 } 00155 00156 if((ArtPart2 == ArtPartID) && ArtPart2En) 00157 { 00158 ArtPart->SetArtPartEn(true); 00159 switch(DofSelect2) 00160 { 00161 case Xoff: 00162 ArtPart->SetXOff(Dof2); 00163 ArtPart->SetXOffEn(true); 00164 break; 00165 case Yoff: 00166 ArtPart->SetYOff(Dof2); 00167 ArtPart->SetYOffEn(true); 00168 break; 00169 case Zoff: 00170 ArtPart->SetZOff(Dof2); 00171 ArtPart->SetZOffEn(true); 00172 break; 00173 case Yaw: 00174 ArtPart->SetYaw(Dof2); 00175 ArtPart->SetYawEn(true); 00176 break; 00177 case Pitch: 00178 ArtPart->SetPitch(Dof2); 00179 ArtPart->SetPitchEn(true); 00180 break; 00181 case Roll: 00182 ArtPart->SetRoll(Dof2); 00183 ArtPart->SetRollEn(true); 00184 break; 00185 default: 00186 break; 00187 } 00188 } 00189 00190 return(CIGI_SUCCESS); 00191 }
virtual int CigiBaseShortArtPartCtrl::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [pure virtual] |
A pure virtual Unpack function. This function is not implemented in this class.
Buff | - A pointer to the current pack point. | |
Swap | - N/A for V1 & V2 | |
Spec | - A pointer to special data. |
Implements CigiBasePacket.
Implemented in CigiShortArtPartCtrlV3.
friend class CigiShortArtPartCtrlV3 [friend] |
Definition at line 75 of file CigiBaseShortArtPartCtrl.h.
Cigi_uint8 CigiBaseShortArtPartCtrl::ArtPart1 [protected] |
ArtPart1
Articulated part 1 ID
Definition at line 384 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetArtPart1(), CigiShortArtPartCtrlV3::Pack(), SetArtPart1(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
bool CigiBaseShortArtPartCtrl::ArtPart1En [protected] |
ArtPart1En
Articulated part 1 enable
Definition at line 424 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetArtPart1En(), CigiShortArtPartCtrlV3::Pack(), SetArtPart1En(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
Cigi_uint8 CigiBaseShortArtPartCtrl::ArtPart2 [protected] |
ArtPart2
Articulated part 2 ID
Definition at line 390 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetArtPart2(), CigiShortArtPartCtrlV3::Pack(), SetArtPart2(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
bool CigiBaseShortArtPartCtrl::ArtPart2En [protected] |
ArtPart2En
Articulated part 2 enable
Definition at line 430 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetArtPart2En(), CigiShortArtPartCtrlV3::Pack(), SetArtPart2En(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
float CigiBaseShortArtPartCtrl::Dof1 [protected] |
Dof1
Position value for the selected DOF of articulated part 1
Definition at line 436 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetDof1(), CigiShortArtPartCtrlV3::Pack(), SetDof1(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
float CigiBaseShortArtPartCtrl::Dof2 [protected] |
Dof2
Position value for the selected DOF of articulated part 2
Definition at line 442 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetDof2(), CigiShortArtPartCtrlV3::Pack(), SetDof2(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
DofSelectGrp CigiBaseShortArtPartCtrl::DofSelect1 [protected] |
DofSelect1
Dof selection for articulated part 1
0-NotUsed
1-Xoff
2-Yoff
3-Zoff
4-Yaw
5-Pitch
6-Roll
Definition at line 404 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetDofSelect1(), CigiShortArtPartCtrlV3::Pack(), SetDofSelect1(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
DofSelectGrp CigiBaseShortArtPartCtrl::DofSelect2 [protected] |
DofSelect2
Dof selection for articulated part 2
0-NotUsed
1-Xoff
2-Yoff
3-Zoff
4-Yaw
5-Pitch
6-Roll
Definition at line 418 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetDofSelect2(), CigiShortArtPartCtrlV3::Pack(), SetDofSelect2(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().
Cigi_uint16 CigiBaseShortArtPartCtrl::EntityID [protected] |
EntityID
Entity ID
Definition at line 378 of file CigiBaseShortArtPartCtrl.h.
Referenced by CigiShortArtPartCtrlV3::CigiShortArtPartCtrlV3(), GetEntityID(), CigiShortArtPartCtrlV3::Pack(), SetEntityID(), SpecialConversion(), and CigiShortArtPartCtrlV3::Unpack().