ifm3d
ifm3d::O3X Class Reference

#include <ifm3d/device/o3x.h>

Public Types

using Ptr = std::shared_ptr< O3X >
 
- Public Types inherited from ifm3d::LegacyDevice
using Ptr = std::shared_ptr< LegacyDevice >
 
using boot_mode = ifm3d::Device::boot_mode
 
using operating_mode = ifm3d::Device::operating_mode
 
using trigger_mode = ifm3d::Device::trigger_mode
 
using import_flags = ifm3d::Device::import_flags
 
using spatial_filter = ifm3d::Device::spatial_filter
 
using temporal_filter = ifm3d::Device::temporal_filter
 
using mfilt_mask_size = ifm3d::Device::mfilt_mask_size
 
using device_family = ifm3d::Device::device_family
 
- Public Types inherited from ifm3d::Device
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 >
 

Public Member Functions

 O3X (const std::string &ip=ifm3d::DEFAULT_IP, const std::uint16_t xmlrpc_port=ifm3d::DEFAULT_XMLRPC_PORT, const std::string &password=ifm3d::DEFAULT_PASSWORD)
 
 O3X (O3X &&)=delete
 
O3Xoperator= (O3X &&)=delete
 
 O3X (O3X &)=delete
 
O3Xoperator= (O3X &)=delete
 
device_family WhoAmI () override
 This function can be used to retrieve the family of the connected device. More...
 
- Public Member Functions inherited from ifm3d::LegacyDevice
 LegacyDevice (const std::string &ip=ifm3d::DEFAULT_IP, const std::uint16_t xmlrpc_port=ifm3d::DEFAULT_XMLRPC_PORT, const std::string &password=ifm3d::DEFAULT_PASSWORD)
 Initializes the device interface utilizing library defaults for password, ip, and xmlrpc port unless explicitly passed in. More...
 
virtual std::string Password ()
 The password associated with this Device instance.
 
virtual std::string SessionID ()
 Retrieves the active session id.
 
virtual void FactoryReset ()
 Sets the device configuration back to the state in which it shipped from the ifm factory.
 
virtual std::string RequestSession ()
 Requests an edit-mode session with the device. More...
 
virtual bool CancelSession ()
 Explictly stops the current session with the sensor. More...
 
virtual bool CancelSession (const std::string &sid)
 Attempts to cancel a session with a particular session id. More...
 
virtual int Heartbeat (int hb)
 Heartbeat messages are used to keep a session with the sensor alive. More...
 
virtual std::unordered_map< std::string, std::string > NetInfo ()
 
virtual std::unordered_map< std::string, std::string > TimeInfo ()
 
virtual void SetTemporaryApplicationParameters (const std::unordered_map< std::string, std::string > &params)
 Sets temporary application parameters in run mode. More...
 
virtual int ActiveApplication ()
 Returns the integer index of the active application. More...
 
virtual json ApplicationList ()
 Delivers basic information about all applications stored on the device. More...
 
virtual std::vector< std::string > ApplicationTypes ()
 Lists the valid application types supported by the sensor. More...
 
virtual std::vector< std::string > ImagerTypes ()
 Lists the valid imager types supported by the sensor. More...
 
virtual int CopyApplication (int idx)
 Creates a new application by copying the configuration of another application. More...
 
virtual int CreateApplication (const std::string &type=DEFAULT_APPLICATION_TYPE)
 Creates a new application on the device of the given type. More...
 
virtual void DeleteApplication (int idx)
 Deletes the application at the specified index from the sensor. More...
 
virtual void SetCurrentTime (int epoch_secs=-1)
 Explicitly sets the current time on the device. More...
 
virtual std::vector< std::uint8_t > UnitVectors ()
 For devices that support fetching the Unit Vectors over XML-RPC, this function will return those data as a binary blob.
 
virtual std::vector< std::uint8_t > ExportIFMConfig ()
 Exports the entire device configuration in a format compatible with Vision Assistant.
 
virtual std::vector< std::uint8_t > ExportIFMApp (int idx)
 Export the application at the specified index into a byte array suitable for writing to a file. More...
 
virtual void ImportIFMConfig (const std::vector< std::uint8_t > &bytes, std::uint16_t flags=0x0)
 Imports an entire device configuration from a format compatible with Vision Assistant.
 
virtual int ImportIFMApp (const std::vector< std::uint8_t > &bytes)
 Import the IFM-encoded application. More...
 
virtual void SetPassword (std::string password="")
 Sets or disable the password on the device. More...
 
json ToJSON () override
 Serializes the state of the device to JSON. More...
 
void FromJSON (const json &j) override
 Configures the device based on the parameter values of the passed in JSON. More...
 
void ForceTrigger () override
 Sends a S/W trigger to the device over XMLRPC. More...
 
- Public Member Functions inherited from ifm3d::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
 
Deviceoperator= (Device &&)=delete
 
 Device (Device &)=delete
 
Deviceoperator= (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 std::string DeviceType (bool use_cached=true)
 This is a convenience function for extracting out the device type 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 std::string ToJSONStr ()
 A stringified version of the JSON object returned by ToJSON(). 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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ifm3d::LegacyDevice
static Ptr MakeShared (const std::string &ip=ifm3d::DEFAULT_IP, const std::uint16_t xmlrpc_port=ifm3d::DEFAULT_XMLRPC_PORT, const std::string &password=ifm3d::DEFAULT_PASSWORD)
 Factory function for instantiating the proper subclass based on h/w probing. More...
 
- Static Public Member Functions inherited from ifm3d::Device
static std::vector< ifm3d::IFMNetworkDeviceDeviceDiscovery ()
 This function Provides a convinent way to find all ifm devices on the network. More...
 
static void SetTempIPAddress (std::string mac, std::string temp_ip)
 This function Provides a way to set temporary IP. More...
 
static Ptr MakeShared (const std::string &ip=ifm3d::DEFAULT_IP, const std::uint16_t xmlrpc_port=ifm3d::DEFAULT_XMLRPC_PORT, const std::string &password=ifm3d::DEFAULT_PASSWORD, bool throwIfUnavailable=true)
 Factory function for instantiating the proper subclass based on h/w probing. More...
 
- Protected Member Functions inherited from ifm3d::LegacyDevice
void FromJSON_ (const json &j_curr, const json &j_new, std::function< void(const std::string &, const std::string &)> SetFunc, std::function< void()> SaveFunc, const std::string &name, int idx=-1)
 Handles parsing a selected sub-tree of a potential input JSON file, setting the parameters as appropriate on the device, and saving them persistently. More...
 
json ToJSON_ (const bool open_session=true)
 
json getApplicationInfosToJSON ()
 
- Protected Member Functions inherited from ifm3d::Device
int DeviceID ()
 Implements the serialization of the device state to JSON. More...
 
bool checkDeviceID (int deviceID, int minID, int maxID)
 
std::shared_ptr< XMLRPCWrapper > XWrapper ()
 
- Static Protected Member Functions inherited from ifm3d::LegacyDevice
static bool getAppJSON (int index, const json &j, json &app)
 Return json of an app with given index from device configuration json. More...
 
- Protected Attributes inherited from ifm3d::LegacyDevice
std::unique_ptr< Impl > pImpl
 
- Protected Attributes inherited from ifm3d::Device
std::unique_ptr< Impl > pImpl
 
std::string device_type_
 The cached device type of the connected device.
 

Detailed Description

Device specialization for O3X

Note that O3X support is currently experimental- Use at your own risk!.

Member Function Documentation

◆ WhoAmI()

device_family ifm3d::O3X::WhoAmI ( )
overridevirtual

This function can be used to retrieve the family of the connected device.

Returns
the device family of the connected device.

Reimplemented from ifm3d::Device.


The documentation for this class was generated from the following file: