00001
00055 #if !defined(_CIGI_BASE_WAVE_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_WAVE_CTRL_INCLUDED_
00057
00058 #include "CigiBasePacket.h"
00059
00060
00061
00062
00063
00064 #define CIGI_WAVE_CTRL_PACKET_ID_V3 14
00065 #define CIGI_WAVE_CTRL_PACKET_SIZE_V3 32
00066
00067
00068 class CigiWaveCtrlV3;
00069
00070
00071 class CIGI_SPEC CigiBaseWaveCtrl : public CigiBasePacket
00072 {
00073
00074 friend class CigiWaveCtrlV3;
00075
00076 public:
00077
00078
00081 enum ScopeGrp
00082 {
00083 Global=0,
00084 Regional=1,
00085 Entity=2
00086 };
00087
00088
00091 enum BreakerGrp
00092 {
00093 Plunging=0,
00094 Spilling=1,
00095 Surging=2
00096 };
00097
00098
00099
00100
00101
00102
00103
00106 CigiBaseWaveCtrl();
00107
00108
00111 virtual ~CigiBaseWaveCtrl();
00112
00113
00114
00115
00116
00127 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00128
00129
00139 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00140
00141
00153 virtual int GetCnvt(CigiVersionID &CnvtVersion,
00154 CigiCnvtInfoType::Type &CnvtInfo);
00155
00156
00157
00158
00159
00160
00161
00162
00169 int SetEntityRgnID(const Cigi_uint16 EntityRgnIDIn, bool bndchk=true)
00170 {
00171 EntityRgnID = EntityRgnIDIn;
00172 return(CIGI_SUCCESS);
00173 }
00174
00175
00178 Cigi_uint16 GetEntityRgnID(void) const { return(EntityRgnID); }
00179
00180
00181
00182
00183
00190 int SetWaveID(const Cigi_uint8 WaveIDIn, bool bndchk=true)
00191 {
00192 WaveID = WaveIDIn;
00193 return(CIGI_SUCCESS);
00194 }
00195
00196
00199 Cigi_uint8 GetWaveID(void) const { return(WaveID); }
00200
00201
00202
00203
00204
00211 int SetWaveEn(const bool WaveEnIn, bool bndchk=true)
00212 {
00213 WaveEn = WaveEnIn;
00214 return(CIGI_SUCCESS);
00215 }
00216
00217
00220 bool GetWaveEn(void) const { return(WaveEn); }
00221
00222
00223
00224
00225
00235 int SetScope(const ScopeGrp ScopeIn, bool bndchk=true);
00236
00237
00240 ScopeGrp GetScope(void) const { return(Scope); }
00241
00242
00243
00244
00245
00255 int SetBreaker(const BreakerGrp BreakerIn, bool bndchk=true);
00256
00257
00260 BreakerGrp GetBreaker(void) const { return(Breaker); }
00261
00262
00263
00264
00265
00272 int SetWaveHt(const float WaveHtIn, bool bndchk=true);
00273
00274
00277 float GetWaveHt(void) const { return(WaveHt); }
00278
00279
00280
00281
00282
00289 int SetWaveLen(const float WaveLenIn, bool bndchk=true);
00290
00291
00294 float GetWaveLen(void) const { return(WaveLen); }
00295
00296
00297
00298
00299
00306 int SetPeriod(const float PeriodIn, bool bndchk=true);
00307
00308
00311 float GetPeriod(void) const { return(Period); }
00312
00313
00314
00315
00316
00323 int SetDirection(const float DirectionIn, bool bndchk=true);
00324
00325
00328 float GetDirection(void) const { return(Direction); }
00329
00330
00331
00332
00333
00340 int SetPhaseOff(const float PhaseOffIn, bool bndchk=true);
00341
00342
00345 float GetPhaseOff(void) const { return(PhaseOff); }
00346
00347
00348
00349
00350
00357 int SetLeading(const float LeadingIn, bool bndchk=true);
00358
00359
00362 float GetLeading(void) const { return(Leading); }
00363
00364
00365
00366 protected:
00367
00368
00369
00370
00374 Cigi_uint16 EntityRgnID;
00375
00376
00380 Cigi_uint8 WaveID;
00381
00382
00386 bool WaveEn;
00387
00388
00396 ScopeGrp Scope;
00397
00398
00406 BreakerGrp Breaker;
00407
00408
00412 float WaveHt;
00413
00414
00418 float WaveLen;
00419
00420
00424 float Period;
00425
00426
00430 float Direction;
00431
00432
00436 float PhaseOff;
00437
00438
00442 float Leading;
00443
00444
00445 };
00446
00447 #endif // #if !defined(_CIGI_BASE_WAVE_CTRL_INCLUDED_)