Release 1.0.0_rc.9
This commit is contained in:
@@ -215,10 +215,10 @@ inline void CBOR_ENC_AXIS(CborEncoder &encoder, const char* key, const float det
|
||||
cborErr(cbor_encoder_close_container(&encoder, &arrayEncoder));
|
||||
}
|
||||
|
||||
inline void CBOR_ENC_GONIOMETER(CborEncoder &encoder, const char* key, const GoniometerAxis &g) {
|
||||
inline void CBOR_ENC_GONIOMETER(CborEncoder &encoder, const GoniometerAxis &g) {
|
||||
CborEncoder mapEncoder;
|
||||
|
||||
cborErr(cbor_encode_text_stringz(&encoder, key));
|
||||
cborErr(cbor_encode_text_stringz(&encoder, g.name.c_str()));
|
||||
cborErr(cbor_encoder_create_map(&encoder, &mapEncoder, 2));
|
||||
CBOR_ENC(mapEncoder, "increment", g.increment);
|
||||
CBOR_ENC(mapEncoder, "start", g.start);
|
||||
@@ -228,11 +228,12 @@ inline void CBOR_ENC_GONIOMETER(CborEncoder &encoder, const char* key, const Gon
|
||||
inline void CBOR_ENC_GONIOMETER_MAP(CborEncoder &encoder, const char* key, const StartMessage &msg) {
|
||||
CborEncoder mapEncoder;
|
||||
|
||||
cborErr(cbor_encode_text_stringz(&encoder, key));
|
||||
cborErr(cbor_encoder_create_map(&encoder, &mapEncoder, 1));
|
||||
CBOR_ENC_GONIOMETER(mapEncoder, "omega", msg.omega);
|
||||
|
||||
cborErr(cbor_encoder_close_container(&encoder, &mapEncoder));
|
||||
if (msg.goniometer) {
|
||||
cborErr(cbor_encode_text_stringz(&encoder, key));
|
||||
cborErr(cbor_encoder_create_map(&encoder, &mapEncoder, 1));
|
||||
CBOR_ENC_GONIOMETER(mapEncoder, msg.goniometer.value());
|
||||
cborErr(cbor_encoder_close_container(&encoder, &mapEncoder));
|
||||
}
|
||||
}
|
||||
|
||||
inline void CBOR_ENC(CborEncoder &encoder, const char* key, const std::vector<std::string> &v) {
|
||||
@@ -302,6 +303,8 @@ inline void CBOR_ENC_START_USER_DATA(CborEncoder& encoder, const char* key,
|
||||
j["images_per_file"] = message.images_per_file;
|
||||
j["source_name"] = message.source_name;
|
||||
j["source_name_short"] = message.source_name_short;
|
||||
if (!message.source_type.empty())
|
||||
j["source_type"] = message.source_type;
|
||||
j["instrument_name"] = message.instrument_name;
|
||||
j["instrument_name_short"] = message.instrument_name_short;
|
||||
j["sample_name"] = message.sample_name;
|
||||
@@ -310,7 +313,7 @@ inline void CBOR_ENC_START_USER_DATA(CborEncoder& encoder, const char* key,
|
||||
j["attenuator_transmission"] = message.attenuator_transmission.value();
|
||||
if (message.total_flux)
|
||||
j["total_flux"] = message.total_flux.value();
|
||||
j["omega_rotation_axis"] = {message.omega.axis[0], message.omega.axis[1], message.omega.axis[2]};
|
||||
j["rotation_axis"] = {message.rotation_axis[0], message.rotation_axis[1], message.rotation_axis[2]};
|
||||
j["space_group_number"] = message.space_group_number;
|
||||
j["roi_names"] = message.roi_names;
|
||||
j["gain_file_names"] = message.gain_file_names;
|
||||
@@ -318,7 +321,9 @@ inline void CBOR_ENC_START_USER_DATA(CborEncoder& encoder, const char* key,
|
||||
j["write_master_file"] = message.write_master_file.value();
|
||||
if (message.data_reduction_factor_serialmx)
|
||||
j["data_reduction_factor_serialmx"] = message.data_reduction_factor_serialmx.value();
|
||||
|
||||
if (message.experiment_group)
|
||||
j["experiment_group"] = message.experiment_group.value();
|
||||
j["jfjoch_release"] = message.jfjoch_release;
|
||||
auto str = j.dump();
|
||||
|
||||
CBOR_ENC(encoder, key, str);
|
||||
|
||||
Reference in New Issue
Block a user