Class defining the input type used in the ZED SDK. More...
Types | |
enum class | INPUT_TYPE |
Lists input types in the ZED SDK. More... | |
Functions | |
InputType () | |
Default constructor. More... | |
InputType (const InputType &type) | |
Copy constructor. More... | |
void | setFromCameraID (int id=-1, sl::BUS_TYPE bus_type=sl::BUS_TYPE::AUTO, const CAMERA_TYPE camera_type=CAMERA_TYPE::STEREO) |
Set the input as the camera with specified id (for USB or GMSL cameras only). More... | |
void | setFromSerialNumber (unsigned int camera_serial_number, sl::BUS_TYPE bus_type=sl::BUS_TYPE::AUTO) |
Set the input as the camera with specified serial number (for USB or GMSL cameras). More... | |
void | setFromSVOFile (sl::String svo_input_filename) |
Set the input as the SVO specified with the filename. More... | |
void | setFromStream (sl::String sender_ip, unsigned short port=30000) |
Set the input as the stream defined by the IP address and the port of the sending device. More... | |
INPUT_TYPE | getType () const |
Returns the current input type. More... | |
sl::String | getConfiguration () const |
Returns the current input configuration as a string e.g: SVO name, serial number, streaming ip, etc. More... | |
bool | isInit () const |
Check whether the input is set. More... | |
bool | save (String filename) const |
Saves the current set of parameters into a file to be reloaded with the load() method. More... | |
bool | load (String filename) |
Loads a set of parameters from the values contained in a previously saved file. More... | |
bool | encode (String &serialized_content) const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string. More... | |
bool | decode (const String &serialized_content) |
Fill the structure from the serialized json object contained in the input string. More... | |
bool | operator== (const InputType ¶m1) const |
Comparison operator ==. More... | |
bool | operator!= (const InputType ¶m1) const |
Comparison operator !=. More... | |
Class defining the input type used in the ZED SDK.
It can be used to select a specific camera with an id or serial number, or from a SVO file.
|
strong |
Lists input types in the ZED SDK.
Enumerator | |
---|---|
USB_ID | USB input from an id |
USB_SERIAL | USB input from a serial number |
SVO_FILE | SVO file input |
STREAM | STREAM input (requires to use enableStreaming() / disableStreaming()" on the "sender" side) |
GMSL_ID | GMSL input from an id (only on NVIDIA Jetson) |
GMSL_SERIAL | GMSL input from a serial number (only on NVIDIA Jetson) |
InputType | ( | ) |
Default constructor.
void setFromCameraID | ( | int | id = -1 , |
sl::BUS_TYPE | bus_type = sl::BUS_TYPE::AUTO , |
||
const CAMERA_TYPE | camera_type = CAMERA_TYPE::STEREO |
||
) |
Set the input as the camera with specified id (for USB or GMSL cameras only).
id | : Id of the camera to open. |
bus_type | : Whether the camera is a USB or a GMSL camera. |
camera_type | : Type of the camera (stereo or mono). |
void setFromSerialNumber | ( | unsigned int | camera_serial_number, |
sl::BUS_TYPE | bus_type = sl::BUS_TYPE::AUTO |
||
) |
Set the input as the camera with specified serial number (for USB or GMSL cameras).
camera_serial_number | : Serial number of the camera to open. |
bus_type | : Whether the camera is a USB or a GMSL camera. |
void setFromSVOFile | ( | sl::String | svo_input_filename | ) |
Set the input as the SVO specified with the filename.
svo_input_filename | : Path of the SVO file to open. |
void setFromStream | ( | sl::String | sender_ip, |
unsigned short | port = 30000 |
||
) |
Set the input as the stream defined by the IP address and the port of the sending device.
sender_ip | : IP address of the streaming sender. |
port | : Port on which to listen. Default: 30000 |
|
inline |
Returns the current input type.
|
inline |
Returns the current input configuration as a string e.g: SVO name, serial number, streaming ip, etc.
|
inline |
Check whether the input is set.
bool save | ( | String | filename | ) | const |
Saves the current set of parameters into a file to be reloaded with the load() method.
filename | : Name of the file which will be created to store the parameters (extension '.yml' will be added if not set). |
bool load | ( | String | filename | ) |
Loads a set of parameters from the values contained in a previously saved file.
filename | : Path to the file from which the parameters will be loaded (extension '.yml' will be added at the end of the filename if not set). |
bool encode | ( | String & | serialized_content | ) | const |
Generate a JSON Object (with the struct type as a key) containing the serialized struct, converted into a string.
serialized_content | output string containing the JSON Object |
bool decode | ( | const String & | serialized_content | ) |
Fill the structure from the serialized json object contained in the input string.
serialized_content | input string containing the JSON Object |
bool operator== | ( | const InputType & | param1 | ) | const |
Comparison operator ==.
param1 | to compare |
bool operator!= | ( | const InputType & | param1 | ) | const |
Comparison operator !=.
param1 | to compare |