00001
00055 #if !defined(_CIGI_BASE_MOTION_TRACK_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_MOTION_TRACK_CTRL_INCLUDED_
00057
00058 #include "CigiBasePacket.h"
00059
00060
00061
00062
00063
00064 #define CIGI_MOTION_TRACK_CTRL_PACKET_ID_V3 18
00065 #define CIGI_MOTION_TRACK_CTRL_PACKET_SIZE_V3 8
00066
00067
00068 class CigiMotionTrackCtrlV1;
00069 class CigiMotionTrackCtrlV2;
00070 class CigiMotionTrackCtrlV3;
00071
00072
00073 class CIGI_SPEC CigiBaseMotionTrackCtrl : public CigiBasePacket
00074 {
00075
00076 friend class CigiMotionTrackCtrlV1;
00077 friend class CigiMotionTrackCtrlV2;
00078 friend class CigiMotionTrackCtrlV3;
00079
00080 public:
00081
00082
00085 enum ScopeGrp
00086 {
00087 View=0,
00088 ViewGrp=1
00089 };
00090
00091
00092
00093
00094
00095
00096
00099 CigiBaseMotionTrackCtrl();
00100
00101
00104 virtual ~CigiBaseMotionTrackCtrl();
00105
00106
00107
00108
00109
00120 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00121
00122
00132 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00133
00134
00146 virtual int GetCnvt(CigiVersionID &CnvtVersion,
00147 CigiCnvtInfoType::Type &CnvtInfo);
00148
00149
00150
00151
00152
00153
00154
00155
00162 int SetViewID(const Cigi_uint16 ViewIDIn, bool bndchk=true)
00163 {
00164 ViewID = ViewIDIn;
00165 return(CIGI_SUCCESS);
00166 }
00167
00168
00171 Cigi_uint16 GetViewID(void) const { return(ViewID); }
00172
00173
00174
00175
00176
00183 int SetTrackerID(const Cigi_uint8 TrackerIDIn, bool bndchk=true)
00184 {
00185 TrackerID = TrackerIDIn;
00186 return(CIGI_SUCCESS);
00187 }
00188
00189
00192 Cigi_uint8 GetTrackerID(void) const { return(TrackerID); }
00193
00194
00195
00196
00197
00204 int SetTrackerEn(const bool TrackerEnIn, bool bndchk=true)
00205 {
00206 TrackerEn = TrackerEnIn;
00207 return(CIGI_SUCCESS);
00208 }
00209
00210
00213 bool GetTrackerEn(void) const { return(TrackerEn); }
00214
00215
00216
00217
00218
00225 int SetBoresightEn(const bool BoresightEnIn, bool bndchk=true)
00226 {
00227 BoresightEn = BoresightEnIn;
00228 return(CIGI_SUCCESS);
00229 }
00230
00231
00234 bool GetBoresightEn(void) const { return(BoresightEn); }
00235
00236
00237
00238
00239
00246 int SetXEn(const bool XEnIn, bool bndchk=true)
00247 {
00248 XEn = XEnIn;
00249 return(CIGI_SUCCESS);
00250 }
00251
00252
00255 bool GetXEn(void) const { return(XEn); }
00256
00257
00258
00259
00260
00267 int SetYEn(const bool YEnIn, bool bndchk=true)
00268 {
00269 YEn = YEnIn;
00270 return(CIGI_SUCCESS);
00271 }
00272
00273
00276 bool GetYEn(void) const { return(YEn); }
00277
00278
00279
00280
00281
00288 int SetZEn(const bool ZEnIn, bool bndchk=true)
00289 {
00290 ZEn = ZEnIn;
00291 return(CIGI_SUCCESS);
00292 }
00293
00294
00297 bool GetZEn(void) const { return(ZEn); }
00298
00299
00300
00301
00302
00309 int SetRollEn(const bool RollEnIn, bool bndchk=true)
00310 {
00311 RollEn = RollEnIn;
00312 return(CIGI_SUCCESS);
00313 }
00314
00315
00318 bool GetRollEn(void) const { return(RollEn); }
00319
00320
00321
00322
00323
00330 int SetPitchEn(const bool PitchEnIn, bool bndchk=true)
00331 {
00332 PitchEn = PitchEnIn;
00333 return(CIGI_SUCCESS);
00334 }
00335
00336
00339 bool GetPitchEn(void) const { return(PitchEn); }
00340
00341
00342
00343
00344
00351 int SetYawEn(const bool YawEnIn, bool bndchk=true)
00352 {
00353 YawEn = YawEnIn;
00354 return(CIGI_SUCCESS);
00355 }
00356
00357
00360 bool GetYawEn(void) const { return(YawEn); }
00361
00362
00363
00364
00365
00374 int SetScope(const ScopeGrp ScopeIn, bool bndchk=true);
00375
00376
00379 ScopeGrp GetScope(void) const { return(Scope); }
00380
00381
00382
00383 protected:
00384
00385
00386
00387
00391 Cigi_uint16 ViewID;
00392
00393
00397 Cigi_uint8 TrackerID;
00398
00399
00403 bool TrackerEn;
00404
00405
00409 bool BoresightEn;
00410
00411
00415 bool XEn;
00416
00417
00421 bool YEn;
00422
00423
00427 bool ZEn;
00428
00429
00433 bool RollEn;
00434
00435
00439 bool PitchEn;
00440
00441
00445 bool YawEn;
00446
00447
00454 ScopeGrp Scope;
00455
00456
00457 };
00458
00459 #endif // #if !defined(_CIGI_BASE_MOTION_TRACK_CTRL_INCLUDED_)