Configuration parameters for data synchronization. More...
Functions | |
bool | save (String filename, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) const |
Saves the current set of parameters into a file to be reloaded with the load() method. More... | |
bool | load (String filename, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) |
Loads a set of parameters from the values contained in a previously saved file. More... | |
bool | encode (String &serialized_content, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) 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, SERIALIZATION_FORMAT format=SERIALIZATION_FORMAT::JSON) |
Fill the structure from the serialized json object contained in the input string. More... | |
bool | operator== (const SynchronizationParameter ¶m1) const |
Comparison operator ==. More... | |
bool | operator!= (const SynchronizationParameter ¶m1) const |
Comparison operator !=. More... | |
Attributes | |
double | windows_size = 0 |
Size of synchronization windows in milliseconds. More... | |
double | data_source_timeout = 1000 |
Duration in milliseconds before considering a camera as inactive if no more data is present (for example camera disconnection). More... | |
bool | keep_last_data = false |
Determines whether to include the last data returned by a source in the final synchronized data. More... | |
double | maximum_lateness = 50 |
Maximum duration in milliseconds allowed for data to be considered as the last data. More... | |
Configuration parameters for data synchronization.
The SynchronizationParameter struct represents the configuration parameters used by the synchronizer. It allows customization of the synchronization process based on specific requirements.
bool save | ( | String | filename, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) | 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, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) |
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 detected). |
bool encode | ( | String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) | 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 |
format | serialization format, default is JSON |
bool decode | ( | const String & | serialized_content, |
SERIALIZATION_FORMAT | format = SERIALIZATION_FORMAT::JSON |
||
) |
Fill the structure from the serialized json object contained in the input string.
serialized_content | input string containing the JSON Object |
format | serialization format, default is JSON |
bool operator== | ( | const SynchronizationParameter & | param1 | ) | const |
Comparison operator ==.
SynchronizationParameter | to compare |
bool operator!= | ( | const SynchronizationParameter & | param1 | ) | const |
Comparison operator !=.
SynchronizationParameter | to compare |
double windows_size = 0 |
Size of synchronization windows in milliseconds.
The synchronization window is used by the synchronizer to return all data present inside the current synchronization window. For efficient fusion, the synchronization window size is expected to be equal to the mean grab()
duration of the camera at the lowest FPS. If not provided, the fusion SDK will compute it from the data's sources.
Default value: 0
double data_source_timeout = 1000 |
Duration in milliseconds before considering a camera as inactive if no more data is present (for example camera disconnection).
The data_source_timeout parameter specifies the duration to wait before considering a camera as inactive if no new data is received within the specified time frame.
Default value: 1000
bool keep_last_data = false |
Determines whether to include the last data returned by a source in the final synchronized data.
If the keep_last_data parameter is set to true and no data is present in the current synchronization window, the last data returned by the source will be included in the final synchronized data. This ensures continuity even in the absence of fresh data.
Default value: false
double maximum_lateness = 50 |
Maximum duration in milliseconds allowed for data to be considered as the last data.
The maximum_lateness parameter sets the maximum duration within which data can be considered as the last available data. If the duration between the last received data and the current synchronization window exceeds this value, the data will not be included as the last data in the final synchronized output.
Default value: 50