00001
00040 #define _EXPORT_CCL_
00041
00042
00043 #include "CigiBaseSymbolCtrl.h"
00044 #include "CigiExceptions.h"
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 CigiBaseSymbolCtrl::CigiBaseSymbolCtrl(void)
00056 {
00057 }
00058
00059
00060
00061
00062 CigiBaseSymbolCtrl::~CigiBaseSymbolCtrl(void)
00063 {
00064 }
00065
00066
00067
00068
00069
00070 int CigiBaseSymbolCtrl::GetCnvt(CigiVersionID &CnvtVersion,
00071 CigiCnvtInfoType::Type &CnvtInfo)
00072 {
00073 if(CnvtVersion.GetCombinedCigiVersion() < 0x303)
00074 {
00075 CnvtInfo.ProcID = CigiProcessType::ProcNone;
00076 CnvtInfo.CnvtPacketID = 0;
00077 }
00078 else
00079 {
00080 CnvtInfo.ProcID = CigiProcessType::ProcStd;
00081 CnvtInfo.CnvtPacketID = CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3;
00082 }
00083
00084 return(CIGI_SUCCESS);
00085 }
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 int CigiBaseSymbolCtrl::SetSymbolState(const SymbolStateGrp SymbolStateIn, bool bndchk)
00096 {
00097
00098 #ifndef CIGI_NO_BND_CHK
00099 if(bndchk && ((SymbolStateIn < 0)||(SymbolStateIn > 2)))
00100 {
00101 #ifndef CIGI_NO_EXCEPT
00102 throw CigiValueOutOfRangeException("SymbolState", (int)SymbolStateIn,0,2);
00103 #endif
00104 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00105 }
00106 #endif
00107
00108 SymbolState = SymbolStateIn;
00109
00110 return(CIGI_SUCCESS);
00111
00112 }
00113
00114
00115
00116
00117
00118
00119 int CigiBaseSymbolCtrl::SetAttachState(const AttachStateGrp AttachStateIn, bool bndchk)
00120 {
00121
00122 #ifndef CIGI_NO_BND_CHK
00123 if(bndchk && ((AttachStateIn < 0)||(AttachStateIn > 1)))
00124 {
00125 #ifndef CIGI_NO_EXCEPT
00126 throw CigiValueOutOfRangeException("AttachState", (int)AttachStateIn,0,1);
00127 #endif
00128 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00129 }
00130 #endif
00131
00132 AttachState = AttachStateIn;
00133
00134 return(CIGI_SUCCESS);
00135
00136 }
00137
00138
00139
00140
00141
00142
00143 int CigiBaseSymbolCtrl::SetFlashCtrl(const FlashCtrlGrp FlashCtrlIn, bool bndchk)
00144 {
00145
00146 #ifndef CIGI_NO_BND_CHK
00147 if(bndchk && ((FlashCtrlIn < 0)||(FlashCtrlIn > 1)))
00148 {
00149 #ifndef CIGI_NO_EXCEPT
00150 throw CigiValueOutOfRangeException("FlashCtrl", (int)FlashCtrlIn,0,1);
00151 #endif
00152 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00153 }
00154 #endif
00155
00156 FlashCtrl = FlashCtrlIn;
00157
00158 return(CIGI_SUCCESS);
00159
00160 }
00161
00162
00163
00164
00165
00166
00167 int CigiBaseSymbolCtrl::SetInheritColor(const InheritColorGrp InheritColorIn, bool bndchk)
00168 {
00169
00170 #ifndef CIGI_NO_BND_CHK
00171 if(bndchk && ((InheritColorIn < 0)||(InheritColorIn > 1)))
00172 {
00173 #ifndef CIGI_NO_EXCEPT
00174 throw CigiValueOutOfRangeException("InheritColor", (int)InheritColorIn,0,1);
00175 #endif
00176 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00177 }
00178 #endif
00179
00180 InheritColor = InheritColorIn;
00181
00182 return(CIGI_SUCCESS);
00183
00184 }
00185
00186
00187
00188
00189
00190
00191 int CigiBaseSymbolCtrl::SetFlashDutyCycle(const Cigi_uint8 FlashDutyCycleIn, bool bndchk)
00192 {
00193
00194 #ifndef CIGI_NO_BND_CHK
00195 if(bndchk && ((FlashDutyCycleIn < 0)||(FlashDutyCycleIn > 100)))
00196 {
00197 #ifndef CIGI_NO_EXCEPT
00198 throw CigiValueOutOfRangeException("FlashDutyCycle", (int)FlashDutyCycleIn,0,100);
00199 #endif
00200 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00201 }
00202 #endif
00203
00204 FlashDutyCycle = FlashDutyCycleIn;
00205
00206 return(CIGI_SUCCESS);
00207
00208 }
00209
00210
00211
00212