Function Descriptions
Overview
- reflex_receive_camera_units
- reflex_receive_camera_unit_info
- reflex_receive_system_config
- reflex_receive_calibration_data
- reflex_reboot_camera_unit
- reflex_receive_camera_pose
- reflex_change_camera_pose
- reflex_change_operation_state
- reflex_change_network_settings
- reflex_change_sensor_mode
- reflex_change_sensor_shutter
- reflex_change_sensor_gain
- reflex_receive_system_status
- reflex_receive_sensor_status
- reflex_receive_image
- reflex_receive_images
- reflex_receive_data
- reflex_receive_data_and_image
- reflex_receive_data_and_images
reflex_receive_camera_units
int reflex_receive_camera_units(
std::vector<ReflexCameraUnit>& camera_units
)
The function searches for connected RefleX camera units and provides information about detected camera units. Use this function if the IP address of the camera unit you want to establish a connection with is unknown. Otherwise, use the function reflex_receive_camera_unit_info instead.
Parameters
- camera_units: output vector of detected camera unit information objects (see ReflexCameraUnit)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_camera_unit_info
int reflex_receive_camera_unit_info(
const std::string& ip_address,
ReflexCameraUnit& camera_unit
)
The function provides information about a connected RefleX camera unit with known IP address.
Use this function if the IP address of the camera unit you want to establish a connection with is known. Otherwise, use the function reflex_receive_camera_units instead to search for connected cameras.
Parameters
- ip_address: IP address of the camera unit
- camera_unit: output camera unit information of type ReflexCameraUnit
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_system_config
int reflex_receive_system_config(
const std::string& ip_address,
const std::string& target_directory = std::string("/tmp/")
)
The method downloads system configuration files in YAML format from a connected RefleX camera unit to the desired target directory on the host PC.
Parameters
- ip_address: IP address of the camera unit
- target_directory: target directory in the local file system to store the configuration files
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_calibration_data
int reflex_receive_calibration_data(
const std::string& ip_address,
const std::string& target_directory = std::string("/tmp/"));
The method downloads sensor calibration information in YAML format from a connected RefleX camera unit into the desired target directory on the host PC. The calibration files are needed for geometrical operations when raw camera images need to be processed on the host PC.
Parameters
- ip_address: IP address of the camera unit
- target_directory: target directory in the local file system to store the calibration files
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_reboot_camera_unit
int reflex_reboot_camera_unit(
const std::string& ip_address
)
The function reboots the operating system of a connected RefleX camera unit.
Parameters
- ip_address: IP address of the camera unit
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_camera_pose
int reflex_receive_camera_pose(
const std::string& ip_address,
std::vector<double>& pose
)
The function delivers the currently configured 3-dimensional position and orientation of the camera unit. The resulting vector is of size 6. The first 3 elements represent x/y/z position coordinates, whereas the last 3 elements represent Euler angles.
Parameters
- ip_address: IP address of the camera unit
- pose: 6-dimensional ouput pose vector
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_change_camera_pose
int reflex_change_camera_pose(
const std::string& ip_address,
const std::vector<double>& pose
)
The function changes the configured 3-dimensional position and orientation of the camera unit. The provided pose vector needs to be of size 6 where the first 3 elements are x/y/z position coordinates, and the last 3 elements Euler angles.
Parameters
- ip_address: IP address of the camera unit
- pose: 6-dimensional input pose vector
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_change_operation_state
int reflex_change_operation_state(
const std::string& ip_address,
int state
)
The function sets the camera unit into the desired system operation state (see ReflexSystemStates).
Parameters
- ip_address: IP address of the camera unit
- state: target system operation state (see ReflexSystemStates)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
Please note that a return value ERROR_NONE only confirms that the sensor has successfully received the instruction to carry out a state transition. It does not confirm that the state transition has been successfully completed. For a practical example of changing the operation state and monitoring the completion of the transition, refer to the section Coding Blocks.
reflex_change_network_settings
int reflex_change_network_settings(
const std::string& ip_address,
const std::string& new_ip_address,
const std::string& netmask = "255.255.255.0",
const std::string& gateway = ""
)
The function changes the network settings of a camera unit.
Parameters
- ip_address: Current IP address of the camera unit
- new_ip_address: New IP address
- netmask: New net mask address
- gateway: New gateway address
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_change_sensor_mode
int reflex_change_sensor_mode(
const std::string& ip_address,
int sensor_id,
int8_t mode
)
The function changes the exposure mode of one or several image sensors.
Parameters
- ip_address: IP address of the camera unit
- sensor_id: sensor ID (see ReflexSensors)
- mode: target exposure mode (see ReflexSensorExposureModes)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_change_sensor_shutter
int reflex_change_sensor_shutter(
const std::string& ip_address,
int sensor_id,
uint32_t shutter
)
The function changes the sensor exposure time (shutter) of one or several image sensors.
Parameters
- ip_address: IP address of the camera unit
- sensor_id: sensor ID (see ReflexSensors)
- shutter: target exposure time in microseconds
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_change_sensor_gain
int reflex_change_sensor_gain(
const std::string& ip_address,
int sensor_id,
float gain
)
The function changes the sensor exposure time (shutter) of one or several image sensors.
Parameters
- ip_address: IP address of the camera unit
- sensor_id: sensor ID (see ReflexSensors)
- gain: target sensor gain in the range between 0 and 1023
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_system_status
int reflex_receive_system_status(
const std::string& ip_address,
int system_id,
ReflexSystemStatus& status
)
The function requests status information about a computational sub-system of a camera unit.
Parameters
- ip_address: IP address of the camera unit
- system_id: system ID (see ReflexSystems)
- status: output system status information (see ReflexSystemStatus)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_sensor_status
int reflex_receive_sensor_status(
const std::string& ip_address,
int sensor_id,
ReflexSensorStatus& status
)
The function requests status information about an image sensor of a camera unit.
Parameters
- ip_address: IP address of the camera unit
- sensor_id: sensor ID (see ReflexSensors)
- status: output sensor status information (see ReflexSensorStatus)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
reflex_receive_image
int reflex_receive_image(
const std::string& ip_address,
int sensor_id,
ReflexImageCV& image
)
The function requests the most recent image from a camera sensor.
Parameters
- ip_address: IP address of the camera unit
- sensor_id: sensor ID (see ReflexSensors)
- image: image object (see ReflexImageCV)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
In particular, the function returns ERROR_EMPTY_DATA if no new image data is available since the last successful call of the function.
reflex_receive_images
int reflex_receive_images(
const std::string& ip_address,
const std::vector<int>& sensor_ids,
std::vector<ReflexImageCV>& images
)
The function requests the most recent images from a set of camera sensors.
Parameters
- ip_address: IP address of the camera unit
- sensor_ids: vector of sensor IDs (see ReflexSensors)
- images: vector of image objects (see ReflexImageCV)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
In particular, the function returns ERROR_EMPTY_DATA if no new image data is available since the last successful call of the function.
reflex_receive_data
int reflex_receive_data(
const std::string& ip_address,
ReflexData& data
)
The function requests the latest available data package from a camera unit.
Parameters
- ip_address: IP address of the camera unit
- data: detection data (see ReflexData)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
In particular, the function returns ERROR_EMPTY_DATA if no new data package is available since the last successful call of the function.
reflex_receive_data_and_image
int reflex_receive_data_and_image(
const std::string& ip_address,
ReflexData& data,
int sensor_id,
ReflexImageCV& image
)
The function requests the most recent data package together with the raw data from an image sensor.
Parameters
- ip_address: IP address of the camera unit
- data: detection data (see ReflexData)
- sensor_id: sensor ID (see ReflexSensors)
- image: image object (see ReflexImageCV)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
In particular, the function returns ERROR_EMPTY_DATA if no new data package is available since the last successful call of the function.
reflex_receive_data_and_images
int reflex_receive_data_and_images(
const std::string& ip_address,
ReflexData& data,
const std::vector<int>& sensor_ids,
std::vector<ReflexImageCV>& images
)
The function requests the most recent data package together with the raw data from a set of image sensors.
Parameters
- ip_address: IP address of the camera unit
- data: detection data (see ReflexData)
- sensor_ids: vector of sensor IDs (see ReflexSensors)
- images: vector of image objects (see ReflexImageCV)
The function returns ERROR_NONE or an error code (see ReflexErrorTypes).
In particular, the function returns ERROR_EMPTY_DATA if no new data package is available since the last successful call of the function.