#include <CigiBaseWaveCtrl.h>
Inheritance diagram for CigiBaseWaveCtrl:
Public Types | |
Global = 0 | |
Regional = 1 | |
Entity = 2 | |
Plunging = 0 | |
Spilling = 1 | |
Surging = 2 | |
enum | ScopeGrp { Global = 0, Regional = 1, Entity = 2 } |
enum | BreakerGrp { Plunging = 0, Spilling = 1, Surging = 2 } |
Public Member Functions | |
CigiBaseWaveCtrl () | |
virtual | ~CigiBaseWaveCtrl () |
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 | SetEntityRgnID (const Cigi_uint16 EntityRgnIDIn, bool bndchk=true) |
Cigi_uint16 | GetEntityRgnID (void) const |
int | SetWaveID (const Cigi_uint8 WaveIDIn, bool bndchk=true) |
Cigi_uint8 | GetWaveID (void) const |
int | SetWaveEn (const bool WaveEnIn, bool bndchk=true) |
bool | GetWaveEn (void) const |
int | SetScope (const ScopeGrp ScopeIn, bool bndchk=true) |
ScopeGrp | GetScope (void) const |
int | SetBreaker (const BreakerGrp BreakerIn, bool bndchk=true) |
BreakerGrp | GetBreaker (void) const |
int | SetWaveHt (const float WaveHtIn, bool bndchk=true) |
float | GetWaveHt (void) const |
int | SetWaveLen (const float WaveLenIn, bool bndchk=true) |
float | GetWaveLen (void) const |
int | SetPeriod (const float PeriodIn, bool bndchk=true) |
float | GetPeriod (void) const |
int | SetDirection (const float DirectionIn, bool bndchk=true) |
float | GetDirection (void) const |
int | SetPhaseOff (const float PhaseOffIn, bool bndchk=true) |
float | GetPhaseOff (void) const |
int | SetLeading (const float LeadingIn, bool bndchk=true) |
float | GetLeading (void) const |
Protected Attributes | |
Cigi_uint16 | EntityRgnID |
Cigi_uint8 | WaveID |
bool | WaveEn |
ScopeGrp | Scope |
BreakerGrp | Breaker |
float | WaveHt |
float | WaveLen |
float | Period |
float | Direction |
float | PhaseOff |
float | Leading |
Friends | |
class | CigiWaveCtrlV3 |
Definition at line 71 of file CigiBaseWaveCtrl.h.
CigiBaseWaveCtrl::CigiBaseWaveCtrl | ( | ) |
CigiBaseWaveCtrl::~CigiBaseWaveCtrl | ( | ) | [virtual] |
BreakerGrp CigiBaseWaveCtrl::GetBreaker | ( | void | ) | const [inline] |
Gets the Breaker value.
Definition at line 260 of file CigiBaseWaveCtrl.h.
References Breaker.
00260 { return(Breaker); }
int CigiBaseWaveCtrl::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 84 of file CigiBaseWaveCtrl.cpp.
References CIGI_SUCCESS, CIGI_WAVE_CTRL_PACKET_ID_V3, 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_WAVE_CTRL_PACKET_ID_V3; 00096 } 00097 00098 return(CIGI_SUCCESS); 00099 }
float CigiBaseWaveCtrl::GetDirection | ( | void | ) | const [inline] |
Gets the Direction value.
Definition at line 328 of file CigiBaseWaveCtrl.h.
References Direction.
00328 { return(Direction); }
Cigi_uint16 CigiBaseWaveCtrl::GetEntityRgnID | ( | void | ) | const [inline] |
Gets the EntityRgnID value.
Definition at line 178 of file CigiBaseWaveCtrl.h.
References EntityRgnID.
00178 { return(EntityRgnID); }
float CigiBaseWaveCtrl::GetLeading | ( | void | ) | const [inline] |
Gets the Leading value.
Definition at line 362 of file CigiBaseWaveCtrl.h.
References Leading.
00362 { return(Leading); }
float CigiBaseWaveCtrl::GetPeriod | ( | void | ) | const [inline] |
Gets the Period value.
Definition at line 311 of file CigiBaseWaveCtrl.h.
References Period.
00311 { return(Period); }
float CigiBaseWaveCtrl::GetPhaseOff | ( | void | ) | const [inline] |
Gets the PhaseOff value.
Definition at line 345 of file CigiBaseWaveCtrl.h.
References PhaseOff.
00345 { return(PhaseOff); }
ScopeGrp CigiBaseWaveCtrl::GetScope | ( | void | ) | const [inline] |
Gets the Scope value.
Definition at line 240 of file CigiBaseWaveCtrl.h.
References Scope.
00240 { return(Scope); }
bool CigiBaseWaveCtrl::GetWaveEn | ( | void | ) | const [inline] |
Gets the WaveEn value.
Definition at line 220 of file CigiBaseWaveCtrl.h.
References WaveEn.
00220 { return(WaveEn); }
float CigiBaseWaveCtrl::GetWaveHt | ( | void | ) | const [inline] |
Gets the WaveHt value.
Definition at line 277 of file CigiBaseWaveCtrl.h.
References WaveHt.
00277 { return(WaveHt); }
Cigi_uint8 CigiBaseWaveCtrl::GetWaveID | ( | void | ) | const [inline] |
Gets the WaveID value.
Definition at line 199 of file CigiBaseWaveCtrl.h.
References WaveID.
00199 { return(WaveID); }
float CigiBaseWaveCtrl::GetWaveLen | ( | void | ) | const [inline] |
Gets the WaveLen value.
Definition at line 294 of file CigiBaseWaveCtrl.h.
References WaveLen.
00294 { return(WaveLen); }
virtual int CigiBaseWaveCtrl::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 CigiWaveCtrlV3.
int CigiBaseWaveCtrl::SetBreaker | ( | const BreakerGrp | BreakerIn, | |
bool | bndchk = true | |||
) |
Sets the Breaker with bound checking control
BreakerIn | - Breaker type Plunging=0 Spilling=1 Surging=2 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 131 of file CigiBaseWaveCtrl.cpp.
References Breaker, CIGI_ERROR_VALUE_OUT_OF_RANGE, and CIGI_SUCCESS.
00132 { 00133 00134 #ifndef CIGI_NO_BND_CHK 00135 if(bndchk && ((BreakerIn < 0)||(BreakerIn > 2))) 00136 { 00137 #ifndef CIGI_NO_EXCEPT 00138 throw CigiValueOutOfRangeException("Breaker",(BreakerGrp)BreakerIn,0,2); 00139 #endif 00140 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00141 } 00142 #endif 00143 00144 Breaker = BreakerIn; 00145 return(CIGI_SUCCESS); 00146 00147 }
int CigiBaseWaveCtrl::SetDirection | ( | const float | DirectionIn, | |
bool | bndchk = true | |||
) |
Sets the Direction with bound checking control
DirectionIn | - Direction the wave is propagating | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 219 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Direction.
00220 { 00221 00222 #ifndef CIGI_NO_BND_CHK 00223 if(bndchk && ((DirectionIn < 0.0)||(DirectionIn > 360.0))) 00224 { 00225 #ifndef CIGI_NO_EXCEPT 00226 throw CigiValueOutOfRangeException("Direction",(float)DirectionIn,0.0,360.0); 00227 #endif 00228 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00229 } 00230 #endif 00231 00232 Direction = DirectionIn; 00233 return(CIGI_SUCCESS); 00234 00235 }
int CigiBaseWaveCtrl::SetEntityRgnID | ( | const Cigi_uint16 | EntityRgnIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the EntityRgnID with bound checking control
EntityRgnIDIn | - Entity or Region ID | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 169 of file CigiBaseWaveCtrl.h.
References CIGI_SUCCESS, and EntityRgnID.
00170 { 00171 EntityRgnID = EntityRgnIDIn; 00172 return(CIGI_SUCCESS); 00173 }
int CigiBaseWaveCtrl::SetLeading | ( | const float | LeadingIn, | |
bool | bndchk = true | |||
) |
Sets the Leading with bound checking control
LeadingIn | - Leading | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 263 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Leading.
00264 { 00265 00266 #ifndef CIGI_NO_BND_CHK 00267 if(bndchk && ((LeadingIn < -180.0)||(LeadingIn > 180.0))) 00268 { 00269 #ifndef CIGI_NO_EXCEPT 00270 throw CigiValueOutOfRangeException("Leading",(float)LeadingIn,-180.0,180.0); 00271 #endif 00272 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00273 } 00274 #endif 00275 00276 Leading = LeadingIn; 00277 return(CIGI_SUCCESS); 00278 00279 }
int CigiBaseWaveCtrl::SetPeriod | ( | const float | PeriodIn, | |
bool | bndchk = true | |||
) |
Sets the Period with bound checking control
PeriodIn | - Wave period | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 197 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Period.
00198 { 00199 00200 #ifndef CIGI_NO_BND_CHK 00201 if(bndchk && (PeriodIn < 0.0)) 00202 { 00203 #ifndef CIGI_NO_EXCEPT 00204 throw CigiValueOutOfRangeException("Period",(float)PeriodIn,">",0.0); 00205 #endif 00206 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00207 } 00208 #endif 00209 00210 Period = PeriodIn; 00211 return(CIGI_SUCCESS); 00212 00213 }
int CigiBaseWaveCtrl::SetPhaseOff | ( | const float | PhaseOffIn, | |
bool | bndchk = true | |||
) |
Sets the PhaseOff with bound checking control
PhaseOffIn | - Phase offset | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 241 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and PhaseOff.
00242 { 00243 00244 #ifndef CIGI_NO_BND_CHK 00245 if(bndchk && ((PhaseOffIn < -360.0)||(PhaseOffIn > 360.0))) 00246 { 00247 #ifndef CIGI_NO_EXCEPT 00248 throw CigiValueOutOfRangeException("PhaseOff",(float)PhaseOffIn,-360.0,360.0); 00249 #endif 00250 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00251 } 00252 #endif 00253 00254 PhaseOff = PhaseOffIn; 00255 return(CIGI_SUCCESS); 00256 00257 }
int CigiBaseWaveCtrl::SetScope | ( | const ScopeGrp | ScopeIn, | |
bool | bndchk = true | |||
) |
Sets the Scope with bound checking control
ScopeIn | - Scope of Effect Global=0 Regional=1 Entity=2 | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 109 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Scope.
00110 { 00111 00112 #ifndef CIGI_NO_BND_CHK 00113 if(bndchk && ((ScopeIn < 0)||(ScopeIn > 2))) 00114 { 00115 #ifndef CIGI_NO_EXCEPT 00116 throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,2); 00117 #endif 00118 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00119 } 00120 #endif 00121 00122 Scope = ScopeIn; 00123 return(CIGI_SUCCESS); 00124 00125 }
int CigiBaseWaveCtrl::SetWaveEn | ( | const bool | WaveEnIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the WaveEn with bound checking control
WaveEnIn | - Wave enable | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 211 of file CigiBaseWaveCtrl.h.
References CIGI_SUCCESS, and WaveEn.
00212 { 00213 WaveEn = WaveEnIn; 00214 return(CIGI_SUCCESS); 00215 }
int CigiBaseWaveCtrl::SetWaveHt | ( | const float | WaveHtIn, | |
bool | bndchk = true | |||
) |
Sets the WaveHt with bound checking control
WaveHtIn | - Wave height | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 153 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and WaveHt.
00154 { 00155 00156 #ifndef CIGI_NO_BND_CHK 00157 if(bndchk && (WaveHtIn < 0.0)) 00158 { 00159 #ifndef CIGI_NO_EXCEPT 00160 throw CigiValueOutOfRangeException("WaveHt",(float)WaveHtIn,">",0.0); 00161 #endif 00162 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00163 } 00164 #endif 00165 00166 WaveHt = WaveHtIn; 00167 return(CIGI_SUCCESS); 00168 00169 }
int CigiBaseWaveCtrl::SetWaveID | ( | const Cigi_uint8 | WaveIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the WaveID with bound checking control
WaveIDIn | - Wave ID | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 190 of file CigiBaseWaveCtrl.h.
References CIGI_SUCCESS, and WaveID.
00191 { 00192 WaveID = WaveIDIn; 00193 return(CIGI_SUCCESS); 00194 }
int CigiBaseWaveCtrl::SetWaveLen | ( | const float | WaveLenIn, | |
bool | bndchk = true | |||
) |
Sets the WaveLen with bound checking control
WaveLenIn | - Wave length | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 175 of file CigiBaseWaveCtrl.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and WaveLen.
00176 { 00177 00178 #ifndef CIGI_NO_BND_CHK 00179 if(bndchk && (WaveLenIn < 0.0)) 00180 { 00181 #ifndef CIGI_NO_EXCEPT 00182 throw CigiValueOutOfRangeException("WaveLen",(float)WaveLenIn,">",0.0); 00183 #endif 00184 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00185 } 00186 #endif 00187 00188 WaveLen = WaveLenIn; 00189 return(CIGI_SUCCESS); 00190 00191 }
virtual int CigiBaseWaveCtrl::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 CigiWaveCtrlV3.
friend class CigiWaveCtrlV3 [friend] |
Definition at line 74 of file CigiBaseWaveCtrl.h.
BreakerGrp CigiBaseWaveCtrl::Breaker [protected] |
Breaker
Breaker type
0-Plunging
1-Spilling
2-Surging
Definition at line 406 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetBreaker(), CigiWaveCtrlV3::Pack(), SetBreaker(), and CigiWaveCtrlV3::Unpack().
float CigiBaseWaveCtrl::Direction [protected] |
Direction
Direction the wave is propagating
Definition at line 430 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetDirection(), CigiWaveCtrlV3::Pack(), SetDirection(), and CigiWaveCtrlV3::Unpack().
Cigi_uint16 CigiBaseWaveCtrl::EntityRgnID [protected] |
EntityRgnID
Entity or Region ID
Definition at line 374 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetEntityRgnID(), CigiWaveCtrlV3::Pack(), SetEntityRgnID(), and CigiWaveCtrlV3::Unpack().
float CigiBaseWaveCtrl::Leading [protected] |
Leading
Leading
Definition at line 442 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetLeading(), CigiWaveCtrlV3::Pack(), SetLeading(), and CigiWaveCtrlV3::Unpack().
float CigiBaseWaveCtrl::Period [protected] |
Period
Wave period
Definition at line 424 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetPeriod(), CigiWaveCtrlV3::Pack(), SetPeriod(), and CigiWaveCtrlV3::Unpack().
float CigiBaseWaveCtrl::PhaseOff [protected] |
PhaseOff
Phase offset
Definition at line 436 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetPhaseOff(), CigiWaveCtrlV3::Pack(), SetPhaseOff(), and CigiWaveCtrlV3::Unpack().
ScopeGrp CigiBaseWaveCtrl::Scope [protected] |
Scope
Scope of Effect
0-Global
1-Regional
2-Entity
Definition at line 396 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetScope(), CigiWaveCtrlV3::Pack(), SetScope(), and CigiWaveCtrlV3::Unpack().
bool CigiBaseWaveCtrl::WaveEn [protected] |
WaveEn
Wave enable
Definition at line 386 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetWaveEn(), CigiWaveCtrlV3::Pack(), SetWaveEn(), and CigiWaveCtrlV3::Unpack().
float CigiBaseWaveCtrl::WaveHt [protected] |
WaveHt
Wave height
Definition at line 412 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetWaveHt(), CigiWaveCtrlV3::Pack(), SetWaveHt(), and CigiWaveCtrlV3::Unpack().
Cigi_uint8 CigiBaseWaveCtrl::WaveID [protected] |
WaveID
Wave ID
Definition at line 380 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetWaveID(), CigiWaveCtrlV3::Pack(), SetWaveID(), and CigiWaveCtrlV3::Unpack().
float CigiBaseWaveCtrl::WaveLen [protected] |
WaveLen
Wave length
Definition at line 418 of file CigiBaseWaveCtrl.h.
Referenced by CigiWaveCtrlV3::CigiWaveCtrlV3(), GetWaveLen(), CigiWaveCtrlV3::Pack(), SetWaveLen(), and CigiWaveCtrlV3::Unpack().