mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-23 17:10:44 +02:00
Add 64bit integer support
This commit is contained in:
+8
-2
@@ -93,8 +93,11 @@ const H5::PredType& H5FormatUtils::get_dataset_data_type(const string& type)
|
||||
|
||||
} else if (type == "uint32") {
|
||||
return H5::PredType::NATIVE_UINT32;
|
||||
|
||||
} else if (type == "uint64") {
|
||||
return H5::PredType::NATIVE_UINT64;
|
||||
|
||||
}if (type == "int8") {
|
||||
} else if (type == "int8") {
|
||||
return H5::PredType::NATIVE_INT8;
|
||||
|
||||
} else if (type == "int16") {
|
||||
@@ -103,10 +106,13 @@ const H5::PredType& H5FormatUtils::get_dataset_data_type(const string& type)
|
||||
} else if (type == "int32") {
|
||||
return H5::PredType::NATIVE_INT32;
|
||||
|
||||
} else if (type == "int64") {
|
||||
return H5::PredType::NATIVE_INT64;
|
||||
|
||||
} else {
|
||||
// We cannot really convert this attribute.
|
||||
stringstream error_message;
|
||||
error_message << "[H5FormatUtils::get_dataset_data_type] Unsupported array data_type " << type << endl;
|
||||
error_message << "[H5FormatUtils::get_dataset_data_type] Unsupported dataset data_type " << type << endl;
|
||||
|
||||
throw runtime_error(error_message.str());
|
||||
}
|
||||
|
||||
+8
-2
@@ -84,7 +84,10 @@ shared_ptr<char> ZmqReceiver::get_value_from_json(const pt::ptree& json_header,
|
||||
} else if (type == "uint32") {
|
||||
return shared_ptr<char>(reinterpret_cast<char*>(new uint32_t(json_header.get<uint32_t>(name))));
|
||||
|
||||
}if (type == "int8") {
|
||||
} else if (type == "uint64") {
|
||||
return shared_ptr<char>(reinterpret_cast<char*>(new uint64_t(json_header.get<uint64_t>(name))));
|
||||
|
||||
} else if (type == "int8") {
|
||||
return shared_ptr<char>(reinterpret_cast<char*>(new int8_t(json_header.get<int8_t>(name))));
|
||||
|
||||
} else if (type == "int16") {
|
||||
@@ -92,7 +95,10 @@ shared_ptr<char> ZmqReceiver::get_value_from_json(const pt::ptree& json_header,
|
||||
|
||||
} else if (type == "int32") {
|
||||
return shared_ptr<char>(reinterpret_cast<char*>(new int32_t(json_header.get<int32_t>(name))));
|
||||
|
||||
|
||||
} else if (type == "int64") {
|
||||
return shared_ptr<char>(reinterpret_cast<char*>(new int64_t(json_header.get<uint32_t>(name))));
|
||||
|
||||
} else if (type == "float32") {
|
||||
return shared_ptr<char>(reinterpret_cast<char*>(new float(json_header.get<float>(name))));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user