-
Notifications
You must be signed in to change notification settings - Fork 177
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] HDF5 v6 - Store channel ID in measurement #1375
base: master
Are you sure you want to change the base?
Changes from all commits
430dd93
2ec49bb
90c09af
24fac95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,12 +76,12 @@ void MeasurementExporter::setData(eCALMeasCutterUtils::Timestamp timestamp, cons | |
const auto sender_timestamp = (iter != meta_data.end()) ? iter->second.sender_timestamp : static_cast<eCALMeasCutterUtils::Timestamp>(0); | ||
|
||
iter = meta_data.find(eCALMeasCutterUtils::MetaDatumKey::SENDER_ID); | ||
const auto sender_id = (iter != meta_data.end()) ? iter->second.sender_id : static_cast<uint64_t>(0); | ||
const auto sender_id = (iter != meta_data.end()) ? iter->second.sender_id : 0; | ||
|
||
iter = meta_data.find(eCALMeasCutterUtils::MetaDatumKey::SENDER_CLOCK); | ||
const auto sender_clock = (iter != meta_data.end()) ? iter->second.sender_clock : static_cast<uint64_t>(0); | ||
const auto sender_clock = (iter != meta_data.end()) ? iter->second.sender_clock : 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access] const auto sender_clock = (iter != meta_data.end()) ? iter->second.sender_clock : 0;
^ |
||
|
||
if (!_writer->AddEntryToFile(payload.data(), payload.size(), sender_timestamp, timestamp, _current_channel_name, sender_id, sender_clock)) | ||
if (!_writer->AddEntryToFile(payload.data(), payload.size(), sender_timestamp, timestamp, eCAL::experimental::measurement::base::Channel{ _current_channel_name, sender_id }, sender_clock)) | ||
{ | ||
throw ExporterException("Unable to export protobuf message."); | ||
} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -312,10 +312,10 @@ namespace eCALMeasCutterUtils | |||||
{ | ||||||
Timestamp receiver_timestamp; | ||||||
Timestamp sender_timestamp; | ||||||
uint64_t sender_id; | ||||||
uint64_t sender_clock; | ||||||
int64_t sender_id; | ||||||
int64_t sender_clock; | ||||||
|
||||||
std::array<char,64> __union_size; | ||||||
std::array<char,64> __union_size; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: declaration uses identifier '__union_size', which is a reserved identifier [bugprone-reserved-identifier]
Suggested change
|
||||||
}; | ||||||
|
||||||
typedef std::unordered_map<MetaDatumKey, MetaDatumValue, MetaDatumHash> MetaData; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access]