Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[measurement] GetChannelDataTypeInformation / SetChannelDataTypeInformation #1349

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

KerstinKeller
Copy link
Contributor

@KerstinKeller KerstinKeller commented Feb 5, 2024

Description

Provides an API to get/set ChannelDatatypeInformation atomically.

Related issues

#1076

I'd wait for this to be merged until after a branch for 5.13 has been created.

Cherry-Pick to: master-v5

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -177,10 +177,9 @@ bool MeasurementImporter::isEcalMeasFile(const std::string& path)
return false;
}

bool MeasurementImporter::isProtoChannel(const std::string& channel_type)
bool MeasurementImporter::isProtoChannel(const eCAL::experimental::measurement::base::DataTypeInformation& channel_info)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'isProtoChannel' can be made static [readability-convert-member-functions-to-static]

app/meas_cutter/src/measurement_importer.h:54:

-   bool                                 isProtoChannel(const eCAL::experimental::measurement::base::DataTypeInformation& channel_info);
+   static bool                                 isProtoChannel(const eCAL::experimental::measurement::base::DataTypeInformation& channel_info);

{
std::string name; //!< name of the datatype
std::string encoding; //!< encoding of the datatype (e.g. protobuf, flatbuffers, capnproto)
std::string descriptor; //!< descriptor information of the datatype (necessary for reflection)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no type named 'string' in namespace 'std' [clang-diagnostic-error]

          std::string descriptor;    //!< descriptor information of the datatype (necessary for reflection)
               ^

meas->SetChannelType(channel, eCAL::message::GetTypeName(msg));
meas->SetChannelDescription(channel, eCAL::message::GetDescription(msg));
eCAL::experimental::measurement::base::DataTypeInformation datatype_info;
datatype_info.name = eCAL::message::GetTypeName(msg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'message' in namespace 'eCAL' [clang-diagnostic-error]

      datatype_info.name = eCAL::message::GetTypeName(msg);
                                 ^

meas->SetChannelDescription(channel, eCAL::message::GetDescription(msg));
eCAL::experimental::measurement::base::DataTypeInformation datatype_info;
datatype_info.name = eCAL::message::GetTypeName(msg);
datatype_info.encoding = eCAL::message::GetEncoding(msg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'message' in namespace 'eCAL' [clang-diagnostic-error]

      datatype_info.encoding = eCAL::message::GetEncoding(msg);
                                     ^

eCAL::experimental::measurement::base::DataTypeInformation datatype_info;
datatype_info.name = eCAL::message::GetTypeName(msg);
datatype_info.encoding = eCAL::message::GetEncoding(msg);
datatype_info.descriptor = eCAL::message::GetDescription(msg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'message' in namespace 'eCAL' [clang-diagnostic-error]

      datatype_info.descriptor = eCAL::message::GetDescription(msg);
                                       ^

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

meas->SetChannelType(channel, eCAL::message::GetTypeName(msg));
meas->SetChannelDescription(channel, eCAL::message::GetDescription(msg));
const eCAL::experimental::measurement::base::DataTypeInformation datatype_info{
eCAL::message::GetTypeName(msg),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'message' in namespace 'eCAL' [clang-diagnostic-error]

        eCAL::message::GetTypeName(msg),
              ^

meas->SetChannelDescription(channel, eCAL::message::GetDescription(msg));
const eCAL::experimental::measurement::base::DataTypeInformation datatype_info{
eCAL::message::GetTypeName(msg),
eCAL::message::GetEncoding(msg),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'message' in namespace 'eCAL' [clang-diagnostic-error]

        eCAL::message::GetEncoding(msg),
              ^

const eCAL::experimental::measurement::base::DataTypeInformation datatype_info{
eCAL::message::GetTypeName(msg),
eCAL::message::GetEncoding(msg),
eCAL::message::GetDescription(msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'message' in namespace 'eCAL' [clang-diagnostic-error]

        eCAL::message::GetDescription(msg)
              ^

@KerstinKeller KerstinKeller enabled auto-merge (squash) February 14, 2024 10:09
@KerstinKeller KerstinKeller merged commit c3ae601 into master Feb 14, 2024
14 checks passed
@KerstinKeller KerstinKeller deleted the feature/ecal-meas-v6-2 branch February 15, 2024 17:11
FlorianReimold pushed a commit that referenced this pull request Feb 16, 2024
…mation (#1349)

Provide atomic operations to get and set meta-information related to the channel

Co-authored-by: Rex Schilasky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants