deviceCollection |
iteration over device collection |
<span style="font-size: 1em; line-height: 22px;">fesa::MultiplexingContext* pCtxt = pEvt->getMultiplexingContext();
</span><span style="font-size: 1em; line-height: 22px;">for (std::vector<Device*>::iterator itr = deviceCol_.begin(); itr != deviceCol_.end(); ++itr) </span><span style="font-size: 1em; line-height: 22px;">{</span><span style="font-size: 1em; line-height: 22px;">
try</span><span style="font-size: 1em; line-height: 22px;"> {
</span><span style="font-size: 1em; line-height: 22px;"> Device* pDev = (*itr);
</span><span style="font-size: 1em; line-height: 22px;"> // perform an action with the device
</span><span style="font-size: 1em; line-height: 22px;"> pDev->myField.set(someValue,pCtxt);
</span><span style="font-size: 1em; line-height: 22px;"> }</span><span style="font-size: 1em; line-height: 22px;"> catch (fesa::FesaException& exception)</span><span style="font-size: 1em; line-height: 22px;"> {
</span><span style="line-height: 22px; font-size: 1em;"> }
</span><span style="font-size: 1em; line-height: 22px;">}</span> |
getGlobalDevice |
retrieve the global device |
GlobalDevice* globalDev = !DeviceFactory::getInstance()->getGlobalDevice(); |
getIntField |
retrieve an int32 value |
int32_t myData = (*device)->myField.get(pEvt->getMultiplexingContext()); |
setIntField |
set a field's value |
(*device)->myField.set(myData,pEvt->getMultiplexingContext()); |
getIntArray |
retrieve an int32 array |
uint32_t dim;
const int32_t* myData = (*device)->myArrayField.get(dim,pEvt->getMultiplexingContext()); |
setIntArray |
set an in32 array |
uint32_t sizeOfmyData = 4;
int32_t myData[sizeOfmyData];
myData[1] = 15;
(*device)->myArrayField.set(myData,sizeOfmyData,pEvt->getMultiplexingContext()); |
get2DIntArray |
retrieve an 2D int32 array |
uint32_t dim1;
uint32_t dim2;
const int32_t** myDataAll = (*device)->my2DArray.get(dim1,dim2,pEvt->getMultiplexingContext()); |
set2DIntArrayRow |
set a row in an 2D int32 array |
<span style="line-height: 22px;">uint32_t dim1;
</span><span style="line-height: 22px;">uint32_t index = 1;
</span><span style="line-height: 22px;">int32_t myDataRow[dim1];
</span><span style="line-height: 22px;">(*device)->my2DArray.setRow(myDataRow,index,dim1,pEvt->getMultiplexingContext());</span> |
set2DIntArrayColumn |
set a column in an 2D int32 array |
uint32_t dim2;
uint32_t index = 1;
int32_t myDataColumn[dim2];
(*device)->my2DArray.setColumn(myDataColumn,index,dim2,pEvt->getMultiplexingContext()); |
throwRDAIOException |
throws an RDA IO exception to a client |
std::string errorCategory = "MyCategory";
long errorCode = 4711;
std::string errorMessage = "Something went wrong!";
throw rdaIOError(errorCategory.c_str(), errorCode, errorMessage.c_str()); |
throwFESAException |
throws a FESA exception to a client |
std::string errorMessage = "Something went wrong here!";
std::string errorCode = "4711";
// errorCategory should use "FESACLASS_" as prefix and the class name
std::string errorCategory = "FESACLASS_MyFesaClassName";
throw fesa::FesaException(errorMessage,__FILE__,__LINE__,errorCode,errorCategory); |
throwRDABadParameterException |
throw RDA bad parameter exception |
throw rdaBadParameter(""); |
throwRDATypeMismatchException |
throw RDA type mismatch exception |
throw rdaTypeMismatch(""); |
throwRDATimeOutException |
throw RDA time out exception |
throw rdaTimeOut(""); |
throwRDANoConnection |
throw RDA tno connection exception |
throw rdaNoConnection(""); |
throwRDANoPermission |
throw RDA tno permission exception |
throw rdaNoPermission(""); |