Before you begin to write code, design high-level application flows according to the Imaging Tasks. To implement them in an application, follow the below guidelines. There is also a Code Examples that may help.
- The application must include references to the API Header file and to the iostream library. For example:
- General note: Walabot API is not thread safe
- Connect to Walabot: Walabot_ConnectAny()
- Perform configuration (initially, and subsequently as needed) with the following:
- Set scan profile: Walabot_SetProfile()
- For scans that used the short-range profile, set arena by Cartesian coordinates (), with arena resolution: Walabot_SetArenaX(), Walabot_SetArenaY(), Walabot_SetArenaZ()
- For scans that used one of the Sensor or Tracker profiles, set arena by spherical coordinates, with arena resolution: Walabot_SetArenaR(), Walabot_SetArenaTheta(), Walabot_SetArenaPhi()
- If relevant, set a dynamic-imaging filter: Walabot_SetDynamicImageFilter()
- Optionally, change the sensitivity threshold: Walabot_SetThreshold()
- For each of the above configuration settings (except for profile), you can retrieve the current setting with another function, usually named similarly to the above configuration function, with get replacing set. The retrieval functions are referenced in this documentation from the respective setting functions.
- Start (requires profile already set): Walabot_Start()
- The application loop should usually include at least the following:
- Calibrate (initially, upon any profile change, and as needed upon possible changes to environment): Walabot_StartCalibration()
To check on the calibration’s progression, use Walabot_GetStatus(), which, if the calibration is still ongoing, also provides the percentage completed, which can be used to determine whether to begin scanning or to wait.
You can also stop the calibration: Walabot_CancelCalibration()
- Stop: Walabot_Stop()
- Disconnect: Walabot_Disconnect()
- At any point you can check Walabot’s status: Walabot_GetStatus()
All functions return: WALABOT_RESULT , which the application should check.
The following advanced functions are also available: