Baumer-GAPI2 SDK Programmer's Guide - Site ftp Elvitec
Baumer-GAPI2 SDK Programmer's Guide - Site ftp Elvitec
Baumer-GAPI2 SDK Programmer's Guide - Site ftp Elvitec
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5.1.7<br />
Open a Device<br />
Now you search for the device in the list (here open the first device in the list):<br />
C++ C#<br />
for (DeviceList::iterator dev = deviceList->begin();<br />
dev != deviceList-<br />
>end(); dev++)<br />
foreach (KeyValuePair<br />
dev_pair in deviceList)<br />
{ {<br />
dev->second->Open(); dev_pair:Value.Open();<br />
sDeviceID = dev->first; sDeviceID = dev_pair.Key;<br />
break; break;<br />
} }<br />
Check the DeviceID is filled and assign the device pointer:<br />
if (sDeviceID == "") if (sDeviceID == "")<br />
return 0; // no device found return; // no device found<br />
else<br />
else<br />
pDevice = (*deviceList)[sDeviceID]; mDevice = deviceList[sDeviceID];<br />
5.1.8<br />
Get DataStreamList and fill it<br />
Get the the DataStreamList of the selected Device and update that list. Using a timeout<br />
of 100 ms.<br />
C++ C#<br />
datastreamList = pDevice-<br />
datastreamList = mDevice.DataStreams;<br />
>GetDataStreams();<br />
datastreamList->Refresh(100);<br />
datastreamList.Refresh(100);<br />
std::cout