|
anyKode Marilou
|
Getting the last scan data (blocking call).
M32 GetScanWaitComplete(xkode::lib::Array<MU8> & Scan, M32 * pDeviceResponse);
|
Parameters |
Description |
|
xkode::lib::Array<MU8> & Scan |
[in/out] Array of BYTES to be filled by the device. In return the array contains scan header and scan values. If an error occured, the array is empty. |
|
M32 * pDeviceResponse |
(see Message) |
MODA_EOK if a valid scan was received,
MODA_ENULLRESULT if no data was available.
GetScanWaitComplete gets the latest scan values. The MODA device instance ask for a scan that is newer (time) than the one obtained by a previous call to GetScanWaitComplete: that's mean that the call is blocked until the sensor updates its values.
User have to use a LidarScan structure pointer for getting access to scan values:
xkode::lib::Array<MU8> _Scan;
M32 DeviceResponse;
M32 SystemResponse=pLidar->GetScanWaitComplete(_Scan,&DeviceResponse);
if(_Scan.Count()!=0)
{
//Data is valid if array the is not empty
Moda::Commons::LidarScan *pScan=(Moda::Commons::LidarScan *)_Scan.GetData();
DisplayScan(pScan);
}
else
{
_cprintf("error while getting scan data (system:%d device:%d)\r\n",SystemResponse,DeviceResponse);
}|
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|