CigiBasePositionResp Class Reference

#include <CigiBasePositionResp.h>

Inheritance diagram for CigiBasePositionResp:

CigiBasePacket CigiPositionRespV3 List of all members.

Public Types

 Entity = 0
 ArtPart = 1
 View = 2
 ViewGrp = 3
 MotionTracker = 4
 Geodetic = 0
 ParentEntity = 1
 Submodel = 2
enum  ObjectClassGrp {
  Entity = 0, ArtPart = 1, View = 2, ViewGrp = 3,
  MotionTracker = 4
}
enum  CoordSysGrp { Geodetic = 0, ParentEntity = 1, Submodel = 2 }

Public Member Functions

 CigiBasePositionResp ()
virtual ~CigiBasePositionResp ()
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 SetObjectID (const Cigi_uint16 ObjectIDIn, bool bndchk=true)
Cigi_uint16 GetObjectID (void) const
int SetArtPartID (const Cigi_uint8 ArtPartIDIn, bool bndchk=true)
Cigi_uint8 GetArtPartID (void) const
int SetObjectClass (const ObjectClassGrp ObjectClassIn, bool bndchk=true)
ObjectClassGrp GetObjectClass (void) const
int SetCoordSys (const CoordSysGrp CoordSysIn, bool bndchk=true)
CoordSysGrp GetCoordSys (void) const
int SetLatOrXoff (const double LatOrXoffIn, bool bndchk=true)
double GetLatOrXoff (void) const
int SetLonOrYoff (const double LonOrYoffIn, bool bndchk=true)
double GetLonOrYoff (void) const
int SetAltOrZoff (const double AltOrZoffIn, bool bndchk=true)
double GetAltOrZoff (void) const
int SetRoll (const float RollIn, bool bndchk=true)
float GetRoll (void) const
int SetPitch (const float PitchIn, bool bndchk=true)
float GetPitch (void) const
int SetYaw (const float YawIn, bool bndchk=true)
float GetYaw (void) const

Protected Attributes

Cigi_uint16 ObjectID
Cigi_uint8 ArtPartID
ObjectClassGrp ObjectClass
CoordSysGrp CoordSys
double LatOrXoff
double LonOrYoff
double AltOrZoff
float Roll
float Pitch
float Yaw

Friends

class CigiPositionRespV1
class CigiPositionRespV2
class CigiPositionRespV3

Detailed Description

Definition at line 73 of file CigiBasePositionResp.h.


Member Enumeration Documentation

enum CigiBasePositionResp::CoordSysGrp

The enumeration for the CigiBasePositionResp Group

Enumerator:
Geodetic 
ParentEntity 
Submodel 

Definition at line 97 of file CigiBasePositionResp.h.

00098    {
00099       Geodetic=0,
00100       ParentEntity=1,
00101       Submodel=2
00102    };

enum CigiBasePositionResp::ObjectClassGrp

The enumeration for the CigiBasePositionResp Group

Enumerator:
Entity 
ArtPart 
View 
ViewGrp 
MotionTracker 

Definition at line 85 of file CigiBasePositionResp.h.

00086    {
00087       Entity=0,
00088       ArtPart=1,
00089       View=2,
00090       ViewGrp=3,
00091       MotionTracker=4
00092    };


Constructor & Destructor Documentation

CigiBasePositionResp::CigiBasePositionResp (  ) 

General Constructor

Definition at line 60 of file CigiBasePositionResp.cpp.

00061 {
00062 
00063 }

CigiBasePositionResp::~CigiBasePositionResp (  )  [virtual]

General Destructor

Definition at line 70 of file CigiBasePositionResp.cpp.

00071 {
00072 
00073 }


Member Function Documentation

double CigiBasePositionResp::GetAltOrZoff ( void   )  const [inline]

Gets the AltOrZoff value.

Returns:
the current AltOrZoff.

Definition at line 311 of file CigiBasePositionResp.h.

References AltOrZoff.

00311 { return(AltOrZoff); }

Cigi_uint8 CigiBasePositionResp::GetArtPartID ( void   )  const [inline]

Gets the ArtPartID value.

Returns:
the current ArtPartID.

Definition at line 205 of file CigiBasePositionResp.h.

References ArtPartID.

00205 { return(ArtPartID); }

int CigiBasePositionResp::GetCnvt ( CigiVersionID CnvtVersion,
CigiCnvtInfoType::Type CnvtInfo 
) [virtual]

A virtual Conversion Information function. This function provides conversion information for this packet.

Parameters:
CnvtVersion - The CIGI version to which this packet is being converted.
CnvtInfo - The information needed for conversion
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Reimplemented from CigiBasePacket.

Definition at line 84 of file CigiBasePositionResp.cpp.

References CIGI_POSITION_RESP_PACKET_ID_V3, CIGI_SUCCESS, CigiVersionID::CigiMajorVersion, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, CigiProcessType::ProcNone, and CigiProcessType::ProcStd.

00086 {
00087    if(CnvtVersion.CigiMajorVersion < 3)
00088    {
00089       CnvtInfo.ProcID = CigiProcessType::ProcNone;
00090       CnvtInfo.CnvtPacketID = 0;
00091    }
00092    else
00093    {
00094       CnvtInfo.ProcID = CigiProcessType::ProcStd;
00095       CnvtInfo.CnvtPacketID = CIGI_POSITION_RESP_PACKET_ID_V3;
00096    }
00097 
00098    return(CIGI_SUCCESS);
00099 }

CoordSysGrp CigiBasePositionResp::GetCoordSys ( void   )  const [inline]

Gets the CoordSys value.

Returns:
the current CoordSys.

Definition at line 248 of file CigiBasePositionResp.h.

References CoordSys.

00248 { return(CoordSys); }

double CigiBasePositionResp::GetLatOrXoff ( void   )  const [inline]

Gets the LatOrXoff value.

Returns:
the current LatOrXoff.

Definition at line 269 of file CigiBasePositionResp.h.

References LatOrXoff.

00269 { return(LatOrXoff); }

double CigiBasePositionResp::GetLonOrYoff ( void   )  const [inline]

Gets the LonOrYoff value.

Returns:
the current LonOrYoff.

Definition at line 290 of file CigiBasePositionResp.h.

References LonOrYoff.

00290 { return(LonOrYoff); }

ObjectClassGrp CigiBasePositionResp::GetObjectClass ( void   )  const [inline]

Gets the ObjectClass value.

Returns:
the current ObjectClass.

Definition at line 227 of file CigiBasePositionResp.h.

References ObjectClass.

00227 { return(ObjectClass); }

Cigi_uint16 CigiBasePositionResp::GetObjectID ( void   )  const [inline]

Gets the ObjectID value.

Returns:
the current ObjectID.

Definition at line 184 of file CigiBasePositionResp.h.

References ObjectID.

00184 { return(ObjectID); }

float CigiBasePositionResp::GetPitch ( void   )  const [inline]

Gets the Pitch value.

Returns:
the current Pitch.

Definition at line 345 of file CigiBasePositionResp.h.

References Pitch.

00345 { return(Pitch); }

float CigiBasePositionResp::GetRoll ( void   )  const [inline]

Gets the Roll value.

Returns:
the current Roll.

Definition at line 328 of file CigiBasePositionResp.h.

References Roll.

00328 { return(Roll); }

float CigiBasePositionResp::GetYaw ( void   )  const [inline]

Gets the Yaw value.

Returns:
the current Yaw.

Definition at line 362 of file CigiBasePositionResp.h.

References Yaw.

00362 { return(Yaw); }

virtual int CigiBasePositionResp::Pack ( CigiBasePacket Base,
Cigi_uint8 Buff,
void *  Spec 
) const [pure virtual]

A pure virtual Pack function. This function is not implemented in this class.

Parameters:
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.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Implements CigiBasePacket.

Implemented in CigiPositionRespV3.

int CigiBasePositionResp::SetAltOrZoff ( const double  AltOrZoffIn,
bool  bndchk = true 
) [inline]

Sets the AltOrZoff with bound checking control

Parameters:
AltOrZoffIn - Altitude or Z offset
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 302 of file CigiBasePositionResp.h.

References AltOrZoff, and CIGI_SUCCESS.

00303    {
00304       AltOrZoff = AltOrZoffIn;
00305       return(CIGI_SUCCESS);
00306    }

int CigiBasePositionResp::SetArtPartID ( const Cigi_uint8  ArtPartIDIn,
bool  bndchk = true 
) [inline]

Sets the ArtPartID with bound checking control

Parameters:
ArtPartIDIn - Articulated Part ID
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 196 of file CigiBasePositionResp.h.

References ArtPartID, and CIGI_SUCCESS.

00197    {
00198       ArtPartID = ArtPartIDIn;
00199       return(CIGI_SUCCESS);
00200    }

int CigiBasePositionResp::SetCoordSys ( const CoordSysGrp  CoordSysIn,
bool  bndchk = true 
)

Sets the CoordSys with bound checking control

Parameters:
CoordSysIn - The coordinate system in which the result data is presented.
Geodetic=0
ParentEntity=1
Submodel=2
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 132 of file CigiBasePositionResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and CoordSys.

00133 {
00134 
00135 #ifndef CIGI_NO_BND_CHK
00136    if(bndchk && ((CoordSysIn < 0)||(CoordSysIn > 2)))
00137    {
00138 #ifndef CIGI_NO_EXCEPT
00139       throw CigiValueOutOfRangeException("CoordSys",(CoordSysGrp)CoordSysIn,0,2);
00140 #endif
00141       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00142    }
00143 #endif
00144 
00145    CoordSys = CoordSysIn;
00146    return(CIGI_SUCCESS);
00147 
00148 }

int CigiBasePositionResp::SetLatOrXoff ( const double  LatOrXoffIn,
bool  bndchk = true 
) [inline]

Sets the LatOrXoff with bound checking control

Parameters:
LatOrXoffIn - Latitude or X offset
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 260 of file CigiBasePositionResp.h.

References CIGI_SUCCESS, and LatOrXoff.

00261    {
00262       LatOrXoff = LatOrXoffIn;
00263       return(CIGI_SUCCESS);
00264    }

int CigiBasePositionResp::SetLonOrYoff ( const double  LonOrYoffIn,
bool  bndchk = true 
) [inline]

Sets the LonOrYoff with bound checking control

Parameters:
LonOrYoffIn - Longitude or Y offset
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 281 of file CigiBasePositionResp.h.

References CIGI_SUCCESS, and LonOrYoff.

00282    {
00283       LonOrYoff = LonOrYoffIn;
00284       return(CIGI_SUCCESS);
00285    }

int CigiBasePositionResp::SetObjectClass ( const ObjectClassGrp  ObjectClassIn,
bool  bndchk = true 
)

Sets the ObjectClass with bound checking control

Parameters:
ObjectClassIn - Type of referance object
Entity=0
ArtPart=1
View=2
ViewGrp=3
MotionTracker=4
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 110 of file CigiBasePositionResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and ObjectClass.

00111 {
00112 
00113 #ifndef CIGI_NO_BND_CHK
00114    if(bndchk && ((ObjectClassIn < 0)||(ObjectClassIn > 4)))
00115    {
00116 #ifndef CIGI_NO_EXCEPT
00117       throw CigiValueOutOfRangeException("ObjectClass",(ObjectClassGrp)ObjectClassIn,0,4);
00118 #endif
00119       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00120    }
00121 #endif
00122 
00123    ObjectClass = ObjectClassIn;
00124    return(CIGI_SUCCESS);
00125 
00126 }

int CigiBasePositionResp::SetObjectID ( const Cigi_uint16  ObjectIDIn,
bool  bndchk = true 
) [inline]

Sets the ObjectID with bound checking control

Parameters:
ObjectIDIn - Object ID
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 175 of file CigiBasePositionResp.h.

References CIGI_SUCCESS, and ObjectID.

00176    {
00177       ObjectID = ObjectIDIn;
00178       return(CIGI_SUCCESS);
00179    }

int CigiBasePositionResp::SetPitch ( const float  PitchIn,
bool  bndchk = true 
)

Sets the Pitch with bound checking control

Parameters:
PitchIn - Pitch
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 176 of file CigiBasePositionResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Pitch.

00177 {
00178 
00179 #ifndef CIGI_NO_BND_CHK
00180    if(bndchk && ((PitchIn < -90.0)||(PitchIn > 90.0)))
00181    {
00182 #ifndef CIGI_NO_EXCEPT
00183       throw CigiValueOutOfRangeException("Pitch",(float)PitchIn,-90.0,90.0);
00184 #endif
00185       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00186    }
00187 #endif
00188 
00189    Pitch = PitchIn;
00190    return(CIGI_SUCCESS);
00191 
00192 }

int CigiBasePositionResp::SetRoll ( const float  RollIn,
bool  bndchk = true 
)

Sets the Roll with bound checking control

Parameters:
RollIn - Roll
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 154 of file CigiBasePositionResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Roll.

00155 {
00156 
00157 #ifndef CIGI_NO_BND_CHK
00158    if(bndchk && ((RollIn < -180.0)||(RollIn > 180.0)))
00159    {
00160 #ifndef CIGI_NO_EXCEPT
00161       throw CigiValueOutOfRangeException("Roll",(float)RollIn,-180.0,180.0);
00162 #endif
00163       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00164    }
00165 #endif
00166 
00167    Roll = RollIn;
00168    return(CIGI_SUCCESS);
00169 
00170 }

int CigiBasePositionResp::SetYaw ( const float  YawIn,
bool  bndchk = true 
)

Sets the Yaw with bound checking control

Parameters:
YawIn - Yaw
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 198 of file CigiBasePositionResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Yaw.

00199 {
00200 
00201 #ifndef CIGI_NO_BND_CHK
00202    if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0)))
00203    {
00204 #ifndef CIGI_NO_EXCEPT
00205       throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0);
00206 #endif
00207       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00208    }
00209 #endif
00210 
00211    Yaw = YawIn;
00212    return(CIGI_SUCCESS);
00213 
00214 }

virtual int CigiBasePositionResp::Unpack ( Cigi_uint8 Buff,
bool  Swap,
void *  Spec 
) [pure virtual]

A pure virtual Unpack function. This function is not implemented in this class.

Parameters:
Buff - A pointer to the current pack point.
Swap - N/A for V1 & V2
Spec - A pointer to special data.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Implements CigiBasePacket.

Implemented in CigiPositionRespV3.


Friends And Related Function Documentation

friend class CigiPositionRespV1 [friend]

Definition at line 76 of file CigiBasePositionResp.h.

friend class CigiPositionRespV2 [friend]

Definition at line 77 of file CigiBasePositionResp.h.

friend class CigiPositionRespV3 [friend]

Definition at line 78 of file CigiBasePositionResp.h.


Member Data Documentation

double CigiBasePositionResp::AltOrZoff [protected]

AltOrZoff
Altitude or Z offset

Definition at line 420 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetAltOrZoff(), CigiPositionRespV3::Pack(), SetAltOrZoff(), and CigiPositionRespV3::Unpack().

Cigi_uint8 CigiBasePositionResp::ArtPartID [protected]

ArtPartID
Articulated Part ID

Definition at line 380 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetArtPartID(), CigiPositionRespV3::Pack(), SetArtPartID(), and CigiPositionRespV3::Unpack().

CoordSysGrp CigiBasePositionResp::CoordSys [protected]

CoordSys
The coordinate system in which the result data is presented.
0-Geodetic
1-ParentEntity
2-Submodel

Definition at line 402 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetCoordSys(), CigiPositionRespV3::Pack(), SetCoordSys(), and CigiPositionRespV3::Unpack().

double CigiBasePositionResp::LatOrXoff [protected]

LatOrXoff
Latitude or X offset

Definition at line 408 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetLatOrXoff(), CigiPositionRespV3::Pack(), SetLatOrXoff(), and CigiPositionRespV3::Unpack().

double CigiBasePositionResp::LonOrYoff [protected]

LonOrYoff
Longitude or Y offset

Definition at line 414 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetLonOrYoff(), CigiPositionRespV3::Pack(), SetLonOrYoff(), and CigiPositionRespV3::Unpack().

ObjectClassGrp CigiBasePositionResp::ObjectClass [protected]

ObjectClass
Type of referance object
0-Entity
1-ArtPart
2-View
3-ViewGrp
4-MotionTracker

Definition at line 392 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetObjectClass(), CigiPositionRespV3::Pack(), SetObjectClass(), and CigiPositionRespV3::Unpack().

Cigi_uint16 CigiBasePositionResp::ObjectID [protected]

ObjectID
Object ID

Definition at line 374 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetObjectID(), CigiPositionRespV3::Pack(), SetObjectID(), and CigiPositionRespV3::Unpack().

float CigiBasePositionResp::Pitch [protected]

Pitch

Definition at line 430 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetPitch(), CigiPositionRespV3::Pack(), SetPitch(), and CigiPositionRespV3::Unpack().

float CigiBasePositionResp::Roll [protected]

Roll

Definition at line 425 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetRoll(), CigiPositionRespV3::Pack(), SetRoll(), and CigiPositionRespV3::Unpack().

float CigiBasePositionResp::Yaw [protected]

Yaw

Definition at line 435 of file CigiBasePositionResp.h.

Referenced by CigiPositionRespV3::CigiPositionRespV3(), GetYaw(), CigiPositionRespV3::Pack(), SetYaw(), and CigiPositionRespV3::Unpack().


The documentation for this class was generated from the following files:
Generated on Wed Apr 29 09:00:05 2009 for CCL by  doxygen 1.4.7