Skip to content

Investigate the possibility to store the name for each element of a buffer stored by the telemetry #156

@GiulioRomualdi

Description

@GiulioRomualdi

It would be really nice to add the possibility to give a name of each element stored by a channel

Currently, the info associated with a channel is defined by a ChannelInfo

https://github.com/robotology/yarp-telemetry/blob/0646ef0d6c099b5a3c6291a0f7d535c46a7462e8/src/libYARP_telemetry/src/yarp/telemetry/experimental/BufferConfig.h#L24

yarp::telemetry::experimental::ChannelInfo channel{ "one", {1,1} };

One of the possibility is to use a struct to define the ChannelInfo

struct ChannelInfo {
   std::string name;
   dimensions_t dimensions;
   std::vector<std::string> elements_names
}

To keep back-compatibility with the existing code the elements_names can be set as an optional parameter.

For the time being, telemetry has been used only with vectors but in theory, it can consider n-dimensional tensors. Indeed dimensions_t is a std::vector<size_t> so it may happen that a ChannelInfo has the following dimensions

dimensions = {2, 4, 1, 4}

In this case I have no idea how we can store the element names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions