Interim data configuration file

Updated: October 26, 2022

The interim data configuration file is used to identify the units that correspond to interim data. All interim data units that publishers and subscribers can use to publish and receive interim data are identified in this configuration file.

The configuration for a data unit is specified in a section enclosed by begin DATAUNIT and end DATAUNIT, where DATAUNIT is an enumerated value from sensor_interim_data_unit_t such as INTERIM_DATA_UNIT_1. For more information about these values, see sensor_interim_data_unit_t in the Sensor Library chapter of the Sensor Developer's Guide.

The identifiers you use must follow these rules:

For example, you can't name your second interim data unit INTERIM_DATA_UNIT_5; it should be named INTERIM_DATA_UNIT_2. Though it isn't necessary to put your definitions in sequential order within the file, it is recommended that you do so to make it easier to read and maintain.

The following are valid configurations for interim data, which follow the rules mentioned previously:
begin INTERIM_DATA_UNIT_1
    num_buffers = 5
    buffer_size = 65535
    queue_depth = 5
    data_format = SENSOR_FORMAT_USER_DATA
    data_id = 1
    name = tracked_objects
    position = -25.2, 13.25, -7.278
    direction = 128.9, -221, 17.98
end INTERIM_DATA_UNIT_1

begin INTERIM_DATA_UNIT_2
    num_buffers = 3
    buffer_size = 512
    queue_depth = 1
    data_format = SENSOR_FORMAT_USER_DATA
    data_id = 2
    name = sign_detected
end INTERIM_DATA_UNIT_2

Parameters:

There are parameters that you can use to configure a data unit. The name, position, and direction specified for each are useful when an application wants to know more information about the sensor.

buffer_size
(Required) The size of each data buffer, in bytes, for publishing interim data.
data_format
(Optional) A value from sensor_format_t that specifies the format of the data buffer. If this parameter isn't set, its default format is SENSOR_FORMAT_USER_DATA.
data_id
(Optional) When the data format is user-specific, the publisher and subscriber can use this identifier to distinguish different types of user-specific interim data.
direction
(Optional) A vector coordinate (yaw, pitch, and roll), which represents the direction that's associated with the interim data. This parameter is similar to position, but lets you know the direction that's associated with the data.
name
(Required) A unique string to identify the interim data.
num_buffers
(Required) The maximum number of buffers that are available to publish interim data. This value must be 1 or greater.
position
(Optional) A vector coordinate (X,Y,Z) associated with the interim data.
queue_depth
(Optional) The maximum number of buffers that can be queued to a subscriber.