|
enum | boot_mode : int { PRODUCTIVE = 0,
RECOVERY = 1
} |
| Device boot up modes: More...
|
|
enum | operating_mode : int { RUN = 0,
EDIT = 1
} |
| Device operating modes: run (streaming pixel data), edit (configuring the device/applications).
|
|
enum | trigger_mode : int { FREE_RUN = 1,
SW = 2
} |
| Image acquisition trigger modes.
|
|
enum | import_flags : int { GLOBAL = 0x1,
NET = 0x2,
APPS = 0x10
} |
| Import flags used when importing a Vision Assistant configuration.
|
|
enum | spatial_filter : int { OFF = 0x0,
MEDIAN = 0x1,
MEAN = 0x2,
BILATERAL = 0x3
} |
| Convenience constants for spatial filter types.
|
|
enum | temporal_filter : int { OFF = 0x0,
MEAN = 0x1,
ADAPTIVE_EXP = 0x2
} |
| Convenience constants for temporal filter types.
|
|
enum | mfilt_mask_size : int { _3x3 = 0,
_5x5 = 1
} |
| Convenient constants for median filter mask sizes.
|
|
enum | device_family : int { UNKNOWN = 0,
O3D = 1,
O3X = 2,
O3R = 3
} |
|
enum | swu_version : int { SWU_NOT_SUPPORTED = 0,
SWU_V1 = 1,
SWU_V2 = 2
} |
|
using | Ptr = std::shared_ptr< Device > |
|
|
| Device (const std::string &ip=ifm3d::DEFAULT_IP, const std::uint16_t xmlrpc_port=ifm3d::DEFAULT_XMLRPC_PORT) |
| Initializes the device interface utilizing library defaults for password, ip, and xmlrpc port unless explicitly passed in. More...
|
|
virtual | ~Device () |
| The dtor will cancel any open edit sessions with the device.
|
|
| Device (Device &&)=delete |
|
Device & | operator= (Device &&)=delete |
|
| Device (Device &)=delete |
|
Device & | operator= (Device &)=delete |
|
virtual std::string | IP () |
| The IP address associated with this Device instance.
|
|
virtual std::uint16_t | XMLRPCPort () |
| The XMLRPC Port associated with this Device instance.
|
|
virtual void | Reboot (const boot_mode &mode=ifm3d::Device::boot_mode::PRODUCTIVE) |
| Reboot the device. More...
|
|
virtual void | ForceTrigger () |
| Sends a S/W trigger to the device over XMLRPC. More...
|
|
virtual std::string | DeviceType (bool use_cached=true) |
| This is a convenience function for extracting out the device type of the connected device. More...
|
|
virtual device_family | WhoAmI () |
| This function can be used to retrieve the family of the connected device. More...
|
|
virtual bool | AmI (device_family family) |
| This is a convenience function for checking whether a device is one of the specified device family. More...
|
|
virtual std::string | DeviceParameter (const std::string &key) |
| Convenience accessor for extracting a device parameters (i.e., no edit session created on the device)
|
|
virtual std::vector< std::string > | TraceLogs (int count) |
| Delivers the trace log from the device A session is not required to call this function. More...
|
|
virtual json | ToJSON () |
| Serializes the state of the device to JSON. More...
|
|
virtual std::string | ToJSONStr () |
| A stringified version of the JSON object returned by ToJSON() . More...
|
|
virtual void | FromJSON (const json &j) |
| Configures the device based on the parameter values of the passed in JSON. More...
|
|
virtual void | FromJSONStr (const std::string &jstr) |
| Accepts a string with properly formatted/escaped JSON text, converts it to a json object, and call FromJSON() on it. More...
|
|
bool | CheckMinimumFirmwareVersion (unsigned int major, unsigned int minor, unsigned int patch) |
| Checks for a minimum ifm device software version. More...
|
|
ifm3d::SemVer | FirmwareVersion () |
| get the firmware version of the device
|
|
virtual ifm3d::Device::swu_version | SwUpdateVersion () |
| Checks the swupdater version supported by device. More...
|
|
json | GetSWVersion () |
|
Software interface to an ifm 3D device
The Device
class implements the underlying network protocol for communicating with the ifm hardware. Via this communication layer, this class exposes objects that can be used to mutate and tune the device parameters including those of the underlying pmd imager.
virtual std::string ifm3d::Device::DeviceType |
( |
bool |
use_cached = true | ) |
|
|
virtual |
This is a convenience function for extracting out the device type of the connected device.
The primary intention of this function is for internal usage (i.e., to trigger conditional logic based on the model hardware we are talking to) however, it will likely be useful in application-level logic as well, so, it is available in the public interface.
- Parameters
-
[in] | use_cached | If set to true, a cached lookup of the device type will be used as the return value. If false, it will make a network call to the device to get the "real" device type. The only reason for setting this to false would be if you expect over the lifetime of your camera instance that you will swap out (for example) an O3D for an O3X (or vice versa) – literally, swapping out the network cables while an object instance is still alive. If that is not something you are worried about, leaving this set to true should result in a signficant performance increase. |
virtual json ifm3d::Device::ToJSON |
( |
| ) |
|
|
virtual |
Serializes the state of the device to JSON.
The JSON interface returned here is the excellent JSON for Modern C++.
This function (along with its std::string
equivalent ToJSONStr()
) provides the primary gateway into obtaining the current parameter settings for the device and PMD imager. Data returned from this function can be manipulated as a json
object, then fed into FromJSON(...)
to mutate parameter settings on the device.
- Returns
- A JSON object representation of the current state of the hardware.
- Exceptions
-
Reimplemented in ifm3d::LegacyDevice, and ifm3d::O3R.