From 0ca5ad950ba530458a682e81e413a59d601e792c Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Mon, 13 Sep 2021 15:42:00 +0200 Subject: [PATCH 1/8] Add missing warppers for uavcan/si/sample/acceleration --- .../si/sample/acceleration/Scalar_1_0.hpp | 80 +++++++++++++++++++ .../si/sample/acceleration/Vector3_1_0.hpp | 80 +++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp diff --git a/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp new file mode 100644 index 00000000..18c9e948 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp @@ -0,0 +1,80 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ACCELERATION_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ACCELERATION_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace acceleration { +namespace scalar { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_acceleration_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_acceleration_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_acceleration_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_acceleration_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_acceleration_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* scalar */ +} /* acceleration */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ACCELERATION_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp new file mode 100644 index 00000000..289647f3 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp @@ -0,0 +1,80 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ACCELERATION_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ACCELERATION_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace acceleration { +namespace vector3 { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_acceleration_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_acceleration_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_acceleration_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_acceleration_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_acceleration_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* vector3 */ +} /* acceleration */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ACCELERATION_VECTOR3_1_0_HPP_ */ From e232e5a5ff73ced9a9cbe5cc7e700686c35af3f2 Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Mon, 13 Sep 2021 15:51:01 +0200 Subject: [PATCH 2/8] Add newly created wrappers to ArduinoUAVCANTypes.h --- src/ArduinoUAVCANTypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ArduinoUAVCANTypes.h b/src/ArduinoUAVCANTypes.h index e2a0b70d..44f75594 100644 --- a/src/ArduinoUAVCANTypes.h +++ b/src/ArduinoUAVCANTypes.h @@ -199,6 +199,10 @@ #include "wrappers/uavcan/register/Name_1_0.hpp" #include "wrappers/uavcan/register/Value_1_0.hpp" +/* /uavcan/si *******************************************************************/ +#include "wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp" + /* /uavcan/time ***********************************************************************/ #include "wrappers/uavcan/time/GetSynchronizationMasterInfo_0_1.hpp" #include "wrappers/uavcan/time/Synchronization_1_0.hpp" From 3af95c44dcb128b6f202b0ce97fb9d9eabc4f105 Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Tue, 14 Sep 2021 13:40:19 +0200 Subject: [PATCH 3/8] Remove redundant namespaces --- src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp | 2 -- src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp index 18c9e948..b35c1e07 100644 --- a/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp +++ b/src/wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp @@ -24,7 +24,6 @@ namespace uavcan { namespace si { namespace sample { namespace acceleration { -namespace scalar { /************************************************************************************** * CLASS DECLARATION @@ -71,7 +70,6 @@ class Scalar_1_0 * NAMESPACE **************************************************************************************/ -} /* scalar */ } /* acceleration */ } /* sample */ } /* si */ diff --git a/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp index 289647f3..03c622eb 100644 --- a/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp +++ b/src/wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp @@ -24,7 +24,6 @@ namespace uavcan { namespace si { namespace sample { namespace acceleration { -namespace vector3 { /************************************************************************************** * CLASS DECLARATION @@ -71,7 +70,6 @@ class Vector3_1_0 * NAMESPACE **************************************************************************************/ -} /* vector3 */ } /* acceleration */ } /* sample */ } /* si */ From 02a6793ba0a9a71186c4d738f5d68bf9f0d50ad2 Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Tue, 21 Sep 2021 13:28:48 +0200 Subject: [PATCH 4/8] Add missing wrappers for uavcan/si --- .../uavcan/si/sample/_torque/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/_torque/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/angle/Quaternion_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/angle/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../angular_acceleration/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../angular_acceleration/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/angular_velocity/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../sample/angular_velocity/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/duration/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/duration/WideScalar_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/electric_charge/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/electric_current/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/energy/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/force/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/force/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/frequency/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/length/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/length/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/length/WideScalar_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/length/WideVector3_1_0.hpp | 78 +++++++++++++++++++ .../magnetic_field_strength/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../magnetic_field_strength/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/mass/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/power/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/pressure/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/sample/temperature/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/torque/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/torque/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/velocity/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/velocity/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/voltage/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/sample/volume/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../volumetric_flow_rate/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/_torque/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/_torque/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/acceleration/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/acceleration/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/angle/Quaternion_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/angle/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../unit/angular_acceleration/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../unit/angular_acceleration/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/angular_velocity/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/angular_velocity/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/duration/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/duration/WideScalar_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/electric_charge/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../si/unit/electric_current/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/energy/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/force/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/force/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/frequency/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/length/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/length/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/length/WideScalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/length/WideVector3_1_0.hpp | 78 +++++++++++++++++++ .../magnetic_field_strength/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../magnetic_field_strength/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/mass/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/power/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/pressure/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/temperature/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/torque/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/torque/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/velocity/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/velocity/Vector3_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/voltage/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../uavcan/si/unit/volume/Scalar_1_0.hpp | 78 +++++++++++++++++++ .../unit/volumetric_flow_rate/Scalar_1_0.hpp | 78 +++++++++++++++++++ 68 files changed, 5304 insertions(+) create mode 100644 src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/angle/Quaternion_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/angle/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/angular_acceleration/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/angular_acceleration/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/angular_velocity/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/angular_velocity/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/duration/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/duration/WideScalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/electric_charge/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/electric_current/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/energy/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/force/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/force/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/frequency/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/length/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/length/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/length/WideScalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/length/WideVector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/magnetic_field_strength/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/magnetic_field_strength/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/mass/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/power/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/pressure/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/temperature/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/torque/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/torque/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/velocity/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/velocity/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/voltage/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/volume/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/sample/volumetric_flow_rate/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/acceleration/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/acceleration/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/angle/Quaternion_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/angle/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/angular_acceleration/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/angular_acceleration/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/angular_velocity/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/angular_velocity/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/duration/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/duration/WideScalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/electric_charge/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/electric_current/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/energy/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/force/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/force/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/frequency/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/length/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/length/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/length/WideScalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/length/WideVector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/magnetic_field_strength/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/magnetic_field_strength/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/mass/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/power/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/pressure/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/temperature/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/torque/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/torque/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/velocity/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/velocity/Vector3_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/voltage/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/volume/Scalar_1_0.hpp create mode 100644 src/wrappers/uavcan/si/unit/volumetric_flow_rate/Scalar_1_0.hpp diff --git a/src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp new file mode 100644 index 00000000..ef813f35 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace _torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample__torque_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample__torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample__torque_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample__torque_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample__torque_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* _torque */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp new file mode 100644 index 00000000..429833c4 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace _torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample__torque_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample__torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample__torque_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample__torque_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample__torque_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* _torque */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/angle/Quaternion_1_0.hpp b/src/wrappers/uavcan/si/sample/angle/Quaternion_1_0.hpp new file mode 100644 index 00000000..29fdc5ed --- /dev/null +++ b/src/wrappers/uavcan/si/sample/angle/Quaternion_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGLE_QUATERNION_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGLE_QUATERNION_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace angle { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Quaternion_1_0 +{ + +public: + + uavcan_si_sample_angle_Quaternion_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_angle_Quaternion_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Quaternion_1_0() + { + uavcan_si_sample_angle_Quaternion_1_0_initialize_(&data); + } + + Quaternion_1_0(Quaternion_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Quaternion_1_0 deserialize(CanardTransfer const & transfer) + { + Quaternion_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_angle_Quaternion_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Quaternion_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_angle_Quaternion_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angle */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGLE_QUATERNION_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/angle/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/angle/Scalar_1_0.hpp new file mode 100644 index 00000000..d2bee074 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/angle/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGLE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGLE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace angle { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_angle_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_angle_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_angle_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_angle_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_angle_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angle */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGLE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/angular_acceleration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/angular_acceleration/Scalar_1_0.hpp new file mode 100644 index 00000000..95d23713 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/angular_acceleration/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_ACCELERATION_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_ACCELERATION_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace angular_acceleration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_angular_acceleration_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_angular_acceleration_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_angular_acceleration_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_angular_acceleration_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_angular_acceleration_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_acceleration */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_ACCELERATION_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/angular_acceleration/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/angular_acceleration/Vector3_1_0.hpp new file mode 100644 index 00000000..50b3bb6b --- /dev/null +++ b/src/wrappers/uavcan/si/sample/angular_acceleration/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_ACCELERATION_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_ACCELERATION_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace angular_acceleration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_angular_acceleration_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_angular_acceleration_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_angular_acceleration_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_angular_acceleration_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_angular_acceleration_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_acceleration */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_ACCELERATION_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/angular_velocity/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/angular_velocity/Scalar_1_0.hpp new file mode 100644 index 00000000..7a60ac51 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/angular_velocity/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_VELOCITY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_VELOCITY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace angular_velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_angular_velocity_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_angular_velocity_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_angular_velocity_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_angular_velocity_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_angular_velocity_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_velocity */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_VELOCITY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/angular_velocity/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/angular_velocity/Vector3_1_0.hpp new file mode 100644 index 00000000..a55a746c --- /dev/null +++ b/src/wrappers/uavcan/si/sample/angular_velocity/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_VELOCITY_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_VELOCITY_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace angular_velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_angular_velocity_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_angular_velocity_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_angular_velocity_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_angular_velocity_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_angular_velocity_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_velocity */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ANGULAR_VELOCITY_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/duration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/duration/Scalar_1_0.hpp new file mode 100644 index 00000000..74fd77c0 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/duration/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_DURATION_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_DURATION_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace duration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_duration_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_duration_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_duration_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_duration_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_duration_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* duration */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_DURATION_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/duration/WideScalar_1_0.hpp b/src/wrappers/uavcan/si/sample/duration/WideScalar_1_0.hpp new file mode 100644 index 00000000..bb4f4a8c --- /dev/null +++ b/src/wrappers/uavcan/si/sample/duration/WideScalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_DURATION_WIDESCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_DURATION_WIDESCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace duration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class WideScalar_1_0 +{ + +public: + + uavcan_si_sample_duration_WideScalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_duration_WideScalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + WideScalar_1_0() + { + uavcan_si_sample_duration_WideScalar_1_0_initialize_(&data); + } + + WideScalar_1_0(WideScalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static WideScalar_1_0 deserialize(CanardTransfer const & transfer) + { + WideScalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_duration_WideScalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = WideScalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_duration_WideScalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* duration */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_DURATION_WIDESCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/electric_charge/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/electric_charge/Scalar_1_0.hpp new file mode 100644 index 00000000..b92abc04 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/electric_charge/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ELECTRIC_CHARGE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ELECTRIC_CHARGE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace electric_charge { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_electric_charge_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_electric_charge_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_electric_charge_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_electric_charge_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_electric_charge_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* electric_charge */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ELECTRIC_CHARGE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/electric_current/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/electric_current/Scalar_1_0.hpp new file mode 100644 index 00000000..b8d2ce81 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/electric_current/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ELECTRIC_CURRENT_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ELECTRIC_CURRENT_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace electric_current { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_electric_current_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_electric_current_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_electric_current_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_electric_current_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_electric_current_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* electric_current */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ELECTRIC_CURRENT_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/energy/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/energy/Scalar_1_0.hpp new file mode 100644 index 00000000..dca9040d --- /dev/null +++ b/src/wrappers/uavcan/si/sample/energy/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ENERGY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ENERGY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace energy { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_energy_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_energy_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_energy_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_energy_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_energy_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* energy */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_ENERGY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/force/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/force/Scalar_1_0.hpp new file mode 100644 index 00000000..8c07382f --- /dev/null +++ b/src/wrappers/uavcan/si/sample/force/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FORCE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FORCE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace force { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_force_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_force_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_force_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_force_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_force_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* force */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FORCE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/force/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/force/Vector3_1_0.hpp new file mode 100644 index 00000000..caf92fd3 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/force/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FORCE_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FORCE_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace force { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_force_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_force_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_force_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_force_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_force_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* force */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FORCE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/frequency/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/frequency/Scalar_1_0.hpp new file mode 100644 index 00000000..eff8f23b --- /dev/null +++ b/src/wrappers/uavcan/si/sample/frequency/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FREQUENCY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FREQUENCY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace frequency { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_frequency_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_frequency_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_frequency_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_frequency_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_frequency_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* frequency */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_FREQUENCY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/length/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/length/Scalar_1_0.hpp new file mode 100644 index 00000000..0f20954d --- /dev/null +++ b/src/wrappers/uavcan/si/sample/length/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_length_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_length_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_length_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_length_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_length_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/length/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/length/Vector3_1_0.hpp new file mode 100644 index 00000000..e86c911c --- /dev/null +++ b/src/wrappers/uavcan/si/sample/length/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_length_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_length_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_length_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_length_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_length_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/length/WideScalar_1_0.hpp b/src/wrappers/uavcan/si/sample/length/WideScalar_1_0.hpp new file mode 100644 index 00000000..06c9615a --- /dev/null +++ b/src/wrappers/uavcan/si/sample/length/WideScalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_WIDESCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_WIDESCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class WideScalar_1_0 +{ + +public: + + uavcan_si_sample_length_WideScalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_length_WideScalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + WideScalar_1_0() + { + uavcan_si_sample_length_WideScalar_1_0_initialize_(&data); + } + + WideScalar_1_0(WideScalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static WideScalar_1_0 deserialize(CanardTransfer const & transfer) + { + WideScalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_length_WideScalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = WideScalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_length_WideScalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_WIDESCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/length/WideVector3_1_0.hpp b/src/wrappers/uavcan/si/sample/length/WideVector3_1_0.hpp new file mode 100644 index 00000000..7050f1a1 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/length/WideVector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_WIDEVECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_WIDEVECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class WideVector3_1_0 +{ + +public: + + uavcan_si_sample_length_WideVector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_length_WideVector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + WideVector3_1_0() + { + uavcan_si_sample_length_WideVector3_1_0_initialize_(&data); + } + + WideVector3_1_0(WideVector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static WideVector3_1_0 deserialize(CanardTransfer const & transfer) + { + WideVector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_length_WideVector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = WideVector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_length_WideVector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_LENGTH_WIDEVECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/magnetic_field_strength/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/magnetic_field_strength/Scalar_1_0.hpp new file mode 100644 index 00000000..18edcf32 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/magnetic_field_strength/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MAGNETIC_FIELD_STRENGTH_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MAGNETIC_FIELD_STRENGTH_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace magnetic_field_strength { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_magnetic_field_strength_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_magnetic_field_strength_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_magnetic_field_strength_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_magnetic_field_strength_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_magnetic_field_strength_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* magnetic_field_strength */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MAGNETIC_FIELD_STRENGTH_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/magnetic_field_strength/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/magnetic_field_strength/Vector3_1_0.hpp new file mode 100644 index 00000000..8b324cdd --- /dev/null +++ b/src/wrappers/uavcan/si/sample/magnetic_field_strength/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MAGNETIC_FIELD_STRENGTH_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MAGNETIC_FIELD_STRENGTH_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace magnetic_field_strength { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_magnetic_field_strength_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_magnetic_field_strength_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_magnetic_field_strength_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_magnetic_field_strength_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_magnetic_field_strength_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* magnetic_field_strength */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MAGNETIC_FIELD_STRENGTH_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/mass/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/mass/Scalar_1_0.hpp new file mode 100644 index 00000000..bae3e0a6 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/mass/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MASS_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MASS_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace mass { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_mass_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_mass_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_mass_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_mass_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_mass_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* mass */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_MASS_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/power/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/power/Scalar_1_0.hpp new file mode 100644 index 00000000..67d83291 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/power/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_POWER_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_POWER_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace power { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_power_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_power_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_power_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_power_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_power_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* power */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_POWER_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/pressure/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/pressure/Scalar_1_0.hpp new file mode 100644 index 00000000..ddfc0ba5 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/pressure/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_PRESSURE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_PRESSURE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace pressure { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_pressure_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_pressure_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_pressure_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_pressure_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_pressure_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* pressure */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_PRESSURE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/temperature/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/temperature/Scalar_1_0.hpp new file mode 100644 index 00000000..8ac019aa --- /dev/null +++ b/src/wrappers/uavcan/si/sample/temperature/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TEMPERATURE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TEMPERATURE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace temperature { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_temperature_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_temperature_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_temperature_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_temperature_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_temperature_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* temperature */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TEMPERATURE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/torque/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/torque/Scalar_1_0.hpp new file mode 100644 index 00000000..f070f578 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/torque/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TORQUE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TORQUE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_torque_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_torque_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_torque_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_torque_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* torque */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TORQUE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/torque/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/torque/Vector3_1_0.hpp new file mode 100644 index 00000000..f27f3698 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/torque/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TORQUE_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TORQUE_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_torque_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_torque_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_torque_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_torque_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* torque */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_TORQUE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/velocity/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/velocity/Scalar_1_0.hpp new file mode 100644 index 00000000..f7d0d9fa --- /dev/null +++ b/src/wrappers/uavcan/si/sample/velocity/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VELOCITY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VELOCITY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_velocity_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_velocity_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_velocity_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_velocity_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_velocity_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* velocity */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VELOCITY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/velocity/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/velocity/Vector3_1_0.hpp new file mode 100644 index 00000000..d9d1d00f --- /dev/null +++ b/src/wrappers/uavcan/si/sample/velocity/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VELOCITY_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VELOCITY_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_sample_velocity_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_velocity_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_sample_velocity_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_velocity_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_velocity_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* velocity */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VELOCITY_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/voltage/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/voltage/Scalar_1_0.hpp new file mode 100644 index 00000000..c11ad490 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/voltage/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLTAGE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLTAGE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace voltage { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_voltage_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_voltage_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_voltage_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_voltage_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_voltage_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* voltage */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLTAGE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/volume/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/volume/Scalar_1_0.hpp new file mode 100644 index 00000000..0e0d8e0b --- /dev/null +++ b/src/wrappers/uavcan/si/sample/volume/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLUME_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLUME_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace volume { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_volume_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_volume_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_volume_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_volume_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_volume_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* volume */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLUME_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/volumetric_flow_rate/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/volumetric_flow_rate/Scalar_1_0.hpp new file mode 100644 index 00000000..f1593a18 --- /dev/null +++ b/src/wrappers/uavcan/si/sample/volumetric_flow_rate/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLUMETRIC_FLOW_RATE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLUMETRIC_FLOW_RATE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace sample { +namespace volumetric_flow_rate { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_sample_volumetric_flow_rate_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample_volumetric_flow_rate_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_sample_volumetric_flow_rate_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_sample_volumetric_flow_rate_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_sample_volumetric_flow_rate_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* volumetric_flow_rate */ +} /* sample */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE_VOLUMETRIC_FLOW_RATE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp new file mode 100644 index 00000000..9475f286 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace _torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit__torque_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit__torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit__torque_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit__torque_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit__torque_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* _torque */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp new file mode 100644 index 00000000..25d09be1 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace _torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit__torque_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit__torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit__torque_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit__torque_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit__torque_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* _torque */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/acceleration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/acceleration/Scalar_1_0.hpp new file mode 100644 index 00000000..8b693615 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/acceleration/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ACCELERATION_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ACCELERATION_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace acceleration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_acceleration_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_acceleration_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_acceleration_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_acceleration_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_acceleration_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* acceleration */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ACCELERATION_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/acceleration/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/acceleration/Vector3_1_0.hpp new file mode 100644 index 00000000..9fdd6def --- /dev/null +++ b/src/wrappers/uavcan/si/unit/acceleration/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ACCELERATION_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ACCELERATION_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace acceleration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_acceleration_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_acceleration_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_acceleration_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_acceleration_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_acceleration_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* acceleration */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ACCELERATION_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/angle/Quaternion_1_0.hpp b/src/wrappers/uavcan/si/unit/angle/Quaternion_1_0.hpp new file mode 100644 index 00000000..9f18d1b2 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/angle/Quaternion_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGLE_QUATERNION_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGLE_QUATERNION_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace angle { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Quaternion_1_0 +{ + +public: + + uavcan_si_unit_angle_Quaternion_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_angle_Quaternion_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Quaternion_1_0() + { + uavcan_si_unit_angle_Quaternion_1_0_initialize_(&data); + } + + Quaternion_1_0(Quaternion_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Quaternion_1_0 deserialize(CanardTransfer const & transfer) + { + Quaternion_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_angle_Quaternion_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Quaternion_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_angle_Quaternion_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angle */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGLE_QUATERNION_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/angle/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/angle/Scalar_1_0.hpp new file mode 100644 index 00000000..edf03b94 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/angle/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGLE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGLE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace angle { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_angle_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_angle_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_angle_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_angle_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_angle_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angle */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGLE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/angular_acceleration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/angular_acceleration/Scalar_1_0.hpp new file mode 100644 index 00000000..60043428 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/angular_acceleration/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_ACCELERATION_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_ACCELERATION_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace angular_acceleration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_angular_acceleration_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_angular_acceleration_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_angular_acceleration_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_angular_acceleration_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_angular_acceleration_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_acceleration */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_ACCELERATION_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/angular_acceleration/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/angular_acceleration/Vector3_1_0.hpp new file mode 100644 index 00000000..637523bf --- /dev/null +++ b/src/wrappers/uavcan/si/unit/angular_acceleration/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_ACCELERATION_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_ACCELERATION_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace angular_acceleration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_angular_acceleration_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_angular_acceleration_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_angular_acceleration_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_angular_acceleration_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_angular_acceleration_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_acceleration */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_ACCELERATION_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/angular_velocity/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/angular_velocity/Scalar_1_0.hpp new file mode 100644 index 00000000..14e1b900 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/angular_velocity/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_VELOCITY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_VELOCITY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace angular_velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_angular_velocity_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_angular_velocity_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_angular_velocity_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_angular_velocity_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_angular_velocity_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_velocity */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_VELOCITY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/angular_velocity/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/angular_velocity/Vector3_1_0.hpp new file mode 100644 index 00000000..e280f1af --- /dev/null +++ b/src/wrappers/uavcan/si/unit/angular_velocity/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_VELOCITY_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_VELOCITY_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace angular_velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_angular_velocity_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_angular_velocity_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_angular_velocity_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_angular_velocity_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_angular_velocity_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* angular_velocity */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ANGULAR_VELOCITY_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/duration/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/duration/Scalar_1_0.hpp new file mode 100644 index 00000000..e350fd1f --- /dev/null +++ b/src/wrappers/uavcan/si/unit/duration/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_DURATION_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_DURATION_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace duration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_duration_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_duration_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_duration_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_duration_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_duration_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* duration */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_DURATION_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/duration/WideScalar_1_0.hpp b/src/wrappers/uavcan/si/unit/duration/WideScalar_1_0.hpp new file mode 100644 index 00000000..073a9b64 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/duration/WideScalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_DURATION_WIDESCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_DURATION_WIDESCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace duration { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class WideScalar_1_0 +{ + +public: + + uavcan_si_unit_duration_WideScalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_duration_WideScalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + WideScalar_1_0() + { + uavcan_si_unit_duration_WideScalar_1_0_initialize_(&data); + } + + WideScalar_1_0(WideScalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static WideScalar_1_0 deserialize(CanardTransfer const & transfer) + { + WideScalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_duration_WideScalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = WideScalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_duration_WideScalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* duration */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_DURATION_WIDESCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/electric_charge/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/electric_charge/Scalar_1_0.hpp new file mode 100644 index 00000000..50dc3606 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/electric_charge/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ELECTRIC_CHARGE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ELECTRIC_CHARGE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace electric_charge { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_electric_charge_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_electric_charge_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_electric_charge_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_electric_charge_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_electric_charge_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* electric_charge */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ELECTRIC_CHARGE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/electric_current/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/electric_current/Scalar_1_0.hpp new file mode 100644 index 00000000..6bdc651a --- /dev/null +++ b/src/wrappers/uavcan/si/unit/electric_current/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ELECTRIC_CURRENT_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ELECTRIC_CURRENT_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace electric_current { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_electric_current_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_electric_current_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_electric_current_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_electric_current_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_electric_current_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* electric_current */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ELECTRIC_CURRENT_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/energy/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/energy/Scalar_1_0.hpp new file mode 100644 index 00000000..27bde003 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/energy/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ENERGY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ENERGY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace energy { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_energy_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_energy_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_energy_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_energy_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_energy_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* energy */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_ENERGY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/force/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/force/Scalar_1_0.hpp new file mode 100644 index 00000000..4191c5ba --- /dev/null +++ b/src/wrappers/uavcan/si/unit/force/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FORCE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FORCE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace force { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_force_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_force_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_force_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_force_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_force_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* force */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FORCE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/force/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/force/Vector3_1_0.hpp new file mode 100644 index 00000000..3a4bc675 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/force/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FORCE_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FORCE_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace force { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_force_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_force_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_force_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_force_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_force_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* force */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FORCE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/frequency/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/frequency/Scalar_1_0.hpp new file mode 100644 index 00000000..09d22694 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/frequency/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FREQUENCY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FREQUENCY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace frequency { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_frequency_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_frequency_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_frequency_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_frequency_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_frequency_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* frequency */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_FREQUENCY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/length/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/length/Scalar_1_0.hpp new file mode 100644 index 00000000..eeaff6e1 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/length/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_length_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_length_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_length_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_length_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_length_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/length/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/length/Vector3_1_0.hpp new file mode 100644 index 00000000..396b9802 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/length/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_length_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_length_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_length_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_length_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_length_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/length/WideScalar_1_0.hpp b/src/wrappers/uavcan/si/unit/length/WideScalar_1_0.hpp new file mode 100644 index 00000000..0791c8c7 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/length/WideScalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_WIDESCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_WIDESCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class WideScalar_1_0 +{ + +public: + + uavcan_si_unit_length_WideScalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_length_WideScalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + WideScalar_1_0() + { + uavcan_si_unit_length_WideScalar_1_0_initialize_(&data); + } + + WideScalar_1_0(WideScalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static WideScalar_1_0 deserialize(CanardTransfer const & transfer) + { + WideScalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_length_WideScalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = WideScalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_length_WideScalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_WIDESCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/length/WideVector3_1_0.hpp b/src/wrappers/uavcan/si/unit/length/WideVector3_1_0.hpp new file mode 100644 index 00000000..a145cee8 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/length/WideVector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_WIDEVECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_WIDEVECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace length { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class WideVector3_1_0 +{ + +public: + + uavcan_si_unit_length_WideVector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_length_WideVector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + WideVector3_1_0() + { + uavcan_si_unit_length_WideVector3_1_0_initialize_(&data); + } + + WideVector3_1_0(WideVector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static WideVector3_1_0 deserialize(CanardTransfer const & transfer) + { + WideVector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_length_WideVector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = WideVector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_length_WideVector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* length */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_LENGTH_WIDEVECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/magnetic_field_strength/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/magnetic_field_strength/Scalar_1_0.hpp new file mode 100644 index 00000000..71cbe5a6 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/magnetic_field_strength/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MAGNETIC_FIELD_STRENGTH_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MAGNETIC_FIELD_STRENGTH_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace magnetic_field_strength { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_magnetic_field_strength_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_magnetic_field_strength_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_magnetic_field_strength_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_magnetic_field_strength_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_magnetic_field_strength_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* magnetic_field_strength */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MAGNETIC_FIELD_STRENGTH_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/magnetic_field_strength/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/magnetic_field_strength/Vector3_1_0.hpp new file mode 100644 index 00000000..a56920b6 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/magnetic_field_strength/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MAGNETIC_FIELD_STRENGTH_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MAGNETIC_FIELD_STRENGTH_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace magnetic_field_strength { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_magnetic_field_strength_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_magnetic_field_strength_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_magnetic_field_strength_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_magnetic_field_strength_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_magnetic_field_strength_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* magnetic_field_strength */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MAGNETIC_FIELD_STRENGTH_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/mass/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/mass/Scalar_1_0.hpp new file mode 100644 index 00000000..7840eea2 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/mass/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MASS_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MASS_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace mass { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_mass_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_mass_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_mass_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_mass_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_mass_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* mass */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_MASS_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/power/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/power/Scalar_1_0.hpp new file mode 100644 index 00000000..161db95b --- /dev/null +++ b/src/wrappers/uavcan/si/unit/power/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_POWER_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_POWER_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace power { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_power_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_power_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_power_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_power_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_power_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* power */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_POWER_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/pressure/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/pressure/Scalar_1_0.hpp new file mode 100644 index 00000000..7ea2f0cf --- /dev/null +++ b/src/wrappers/uavcan/si/unit/pressure/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_PRESSURE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_PRESSURE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace pressure { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_pressure_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_pressure_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_pressure_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_pressure_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_pressure_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* pressure */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_PRESSURE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/temperature/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/temperature/Scalar_1_0.hpp new file mode 100644 index 00000000..5b80e1b3 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/temperature/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TEMPERATURE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TEMPERATURE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace temperature { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_temperature_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_temperature_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_temperature_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_temperature_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_temperature_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* temperature */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TEMPERATURE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/torque/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/torque/Scalar_1_0.hpp new file mode 100644 index 00000000..416fd808 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/torque/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TORQUE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TORQUE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_torque_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_torque_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_torque_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_torque_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* torque */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TORQUE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/torque/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/torque/Vector3_1_0.hpp new file mode 100644 index 00000000..1266a825 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/torque/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TORQUE_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TORQUE_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace torque { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_torque_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_torque_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_torque_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_torque_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* torque */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_TORQUE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/velocity/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/velocity/Scalar_1_0.hpp new file mode 100644 index 00000000..84fba28c --- /dev/null +++ b/src/wrappers/uavcan/si/unit/velocity/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VELOCITY_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VELOCITY_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_velocity_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_velocity_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_velocity_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_velocity_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_velocity_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* velocity */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VELOCITY_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/velocity/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/velocity/Vector3_1_0.hpp new file mode 100644 index 00000000..4ef85299 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/velocity/Vector3_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VELOCITY_VECTOR3_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VELOCITY_VECTOR3_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace velocity { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Vector3_1_0 +{ + +public: + + uavcan_si_unit_velocity_Vector3_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_velocity_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Vector3_1_0() + { + uavcan_si_unit_velocity_Vector3_1_0_initialize_(&data); + } + + Vector3_1_0(Vector3_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Vector3_1_0 deserialize(CanardTransfer const & transfer) + { + Vector3_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_velocity_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_velocity_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* velocity */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VELOCITY_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/voltage/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/voltage/Scalar_1_0.hpp new file mode 100644 index 00000000..b0713436 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/voltage/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLTAGE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLTAGE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace voltage { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_voltage_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_voltage_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_voltage_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_voltage_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_voltage_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* voltage */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLTAGE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/volume/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/volume/Scalar_1_0.hpp new file mode 100644 index 00000000..609946c5 --- /dev/null +++ b/src/wrappers/uavcan/si/unit/volume/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLUME_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLUME_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace volume { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_volume_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_volume_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_volume_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_volume_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_volume_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* volume */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLUME_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/volumetric_flow_rate/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/volumetric_flow_rate/Scalar_1_0.hpp new file mode 100644 index 00000000..43ce38ce --- /dev/null +++ b/src/wrappers/uavcan/si/unit/volumetric_flow_rate/Scalar_1_0.hpp @@ -0,0 +1,78 @@ +/** + * This software is distributed under the terms of the MIT License. + * Copyright (c) 2020 LXRobotics. + * Author: Bernhard Mayer , Alexander Entinger + * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. + */ + +#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLUMETRIC_FLOW_RATE_SCALAR_1_0_HPP_ +#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLUMETRIC_FLOW_RATE_SCALAR_1_0_HPP_ + +/************************************************************************************** + * INCLUDE + **************************************************************************************/ + +#include + +#include + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +namespace uavcan { +namespace si { +namespace unit { +namespace volumetric_flow_rate { + +/************************************************************************************** + * CLASS DECLARATION + **************************************************************************************/ + +template +class Scalar_1_0 +{ + +public: + + uavcan_si_unit_volumetric_flow_rate_Scalar_1_0 data; + + static constexpr CanardPortID PORT_ID = ID; + static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit_volumetric_flow_rate_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; + static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; + + Scalar_1_0() + { + uavcan_si_unit_volumetric_flow_rate_Scalar_1_0_initialize_(&data); + } + + Scalar_1_0(Scalar_1_0 const & other) + { + memcpy(&data, &other.data, sizeof(data)); + } + + static Scalar_1_0 deserialize(CanardTransfer const & transfer) + { + Scalar_1_0 b; + size_t inout_buffer_size_bytes = transfer.payload_size; + uavcan_si_unit_volumetric_flow_rate_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); + return b; + } + + size_t serialize(uint8_t * payload) const + { + size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; + return (uavcan_si_unit_volumetric_flow_rate_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; + } +}; + +/************************************************************************************** + * NAMESPACE + **************************************************************************************/ + +} /* volumetric_flow_rate */ +} /* unit */ +} /* si */ +} /* uavcan */ + +#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT_VOLUMETRIC_FLOW_RATE_SCALAR_1_0_HPP_ */ From 45152e538785c72c4332a4804c3fdcee2d1da29c Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Tue, 21 Sep 2021 13:33:11 +0200 Subject: [PATCH 5/8] Add missing includes --- src/ArduinoUAVCANTypes.h | 71 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/src/ArduinoUAVCANTypes.h b/src/ArduinoUAVCANTypes.h index 44f75594..28774836 100644 --- a/src/ArduinoUAVCANTypes.h +++ b/src/ArduinoUAVCANTypes.h @@ -15,7 +15,7 @@ /* /reg/drone/physics/acoustics *******************************************************/ #include "wrappers/reg/drone/physics/acoustics/Note_0_1.hpp" -/* /reg/drone/physics/dynamics/rotation ***********************************************/ +/* /reg/drone/physics/dynamics/rotation **************gnees *********************************/ #include "wrappers/reg/drone/physics/dynamics/rotation/Planar_0_1.hpp" #include "wrappers/reg/drone/physics/dynamics/rotation/PlanarTs_0_1.hpp" @@ -202,6 +202,75 @@ /* /uavcan/si *******************************************************************/ #include "wrappers/uavcan/si/sample/acceleration/Scalar_1_0.hpp" #include "wrappers/uavcan/si/sample/acceleration/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/angle/Quaternion_1_0.hpp" +#include "wrappers/uavcan/si/sample/angle/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/angular_acceleration/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/angular_acceleration/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/angular_velocity/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/angular_velocity/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/duration/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/duration/WideScalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/electric_charge/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/electric_current/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/energy/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/force/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/force/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/frequency/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/length/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/length/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/length/WideScalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/length/WideVector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/magnetic_field_strength/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/magnetic_field_strength/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/mass/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/power/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/pressure/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/temperature/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/torque/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/torque/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/velocity/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/velocity/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/sample/voltage/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/volume/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/sample/volumetric_flow_rate/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/acceleration/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/acceleration/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/angle/Quaternion_1_0.hpp" +#include "wrappers/uavcan/si/unit/angle/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/angular_acceleration/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/angular_acceleration/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/angular_velocity/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/angular_velocity/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/duration/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/duration/WideScalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/electric_charge/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/electric_current/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/energy/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/force/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/force/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/frequency/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/length/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/length/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/length/WideScalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/length/WideVector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/magnetic_field_strength/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/magnetic_field_strength/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/mass/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/power/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/pressure/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/temperature/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/torque/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/torque/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/velocity/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/velocity/Vector3_1_0.hpp" +#include "wrappers/uavcan/si/unit/voltage/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/volume/Scalar_1_0.hpp" +#include "wrappers/uavcan/si/unit/volumetric_flow_rate/Scalar_1_0.hpp" + /* /uavcan/time ***********************************************************************/ #include "wrappers/uavcan/time/GetSynchronizationMasterInfo_0_1.hpp" From cc3b30c98b983e46038e16630d32e2f000679f22 Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Tue, 21 Sep 2021 13:35:48 +0200 Subject: [PATCH 6/8] Fix typo --- src/ArduinoUAVCANTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ArduinoUAVCANTypes.h b/src/ArduinoUAVCANTypes.h index 28774836..e3f4d43a 100644 --- a/src/ArduinoUAVCANTypes.h +++ b/src/ArduinoUAVCANTypes.h @@ -15,7 +15,7 @@ /* /reg/drone/physics/acoustics *******************************************************/ #include "wrappers/reg/drone/physics/acoustics/Note_0_1.hpp" -/* /reg/drone/physics/dynamics/rotation **************gnees *********************************/ +/* /reg/drone/physics/dynamics/rotation ***********************************************/ #include "wrappers/reg/drone/physics/dynamics/rotation/Planar_0_1.hpp" #include "wrappers/reg/drone/physics/dynamics/rotation/PlanarTs_0_1.hpp" From fcfaa803d3033d077df739b1661f1060ae6f9078 Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Tue, 21 Sep 2021 13:53:26 +0200 Subject: [PATCH 7/8] Remove redundant _torque type --- src/ArduinoUAVCANTypes.h | 4 - .../uavcan/si/sample/_torque/Scalar_1_0.h | 236 --------------- .../uavcan/si/sample/_torque/Vector3_1_0.h | 283 ------------------ src/types/uavcan/si/unit/_torque/Scalar_1_0.h | 198 ------------ .../uavcan/si/unit/_torque/Vector3_1_0.h | 245 --------------- .../uavcan/si/sample/_torque/Scalar_1_0.hpp | 78 ----- .../uavcan/si/sample/_torque/Vector3_1_0.hpp | 78 ----- .../uavcan/si/unit/_torque/Scalar_1_0.hpp | 78 ----- .../uavcan/si/unit/_torque/Vector3_1_0.hpp | 78 ----- 9 files changed, 1278 deletions(-) delete mode 100644 src/types/uavcan/si/sample/_torque/Scalar_1_0.h delete mode 100644 src/types/uavcan/si/sample/_torque/Vector3_1_0.h delete mode 100644 src/types/uavcan/si/unit/_torque/Scalar_1_0.h delete mode 100644 src/types/uavcan/si/unit/_torque/Vector3_1_0.h delete mode 100644 src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp delete mode 100644 src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp delete mode 100644 src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp delete mode 100644 src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp diff --git a/src/ArduinoUAVCANTypes.h b/src/ArduinoUAVCANTypes.h index e3f4d43a..0c6046bb 100644 --- a/src/ArduinoUAVCANTypes.h +++ b/src/ArduinoUAVCANTypes.h @@ -226,9 +226,7 @@ #include "wrappers/uavcan/si/sample/power/Scalar_1_0.hpp" #include "wrappers/uavcan/si/sample/pressure/Scalar_1_0.hpp" #include "wrappers/uavcan/si/sample/temperature/Scalar_1_0.hpp" -#include "wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp" #include "wrappers/uavcan/si/sample/torque/Scalar_1_0.hpp" -#include "wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp" #include "wrappers/uavcan/si/sample/torque/Vector3_1_0.hpp" #include "wrappers/uavcan/si/sample/velocity/Scalar_1_0.hpp" #include "wrappers/uavcan/si/sample/velocity/Vector3_1_0.hpp" @@ -261,9 +259,7 @@ #include "wrappers/uavcan/si/unit/power/Scalar_1_0.hpp" #include "wrappers/uavcan/si/unit/pressure/Scalar_1_0.hpp" #include "wrappers/uavcan/si/unit/temperature/Scalar_1_0.hpp" -#include "wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp" #include "wrappers/uavcan/si/unit/torque/Scalar_1_0.hpp" -#include "wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp" #include "wrappers/uavcan/si/unit/torque/Vector3_1_0.hpp" #include "wrappers/uavcan/si/unit/velocity/Scalar_1_0.hpp" #include "wrappers/uavcan/si/unit/velocity/Vector3_1_0.hpp" diff --git a/src/types/uavcan/si/sample/_torque/Scalar_1_0.h b/src/types/uavcan/si/sample/_torque/Scalar_1_0.h deleted file mode 100644 index 72b12a30..00000000 --- a/src/types/uavcan/si/sample/_torque/Scalar_1_0.h +++ /dev/null @@ -1,236 +0,0 @@ -// This is an AUTO-GENERATED UAVCAN DSDL data type implementation. Curious? See https://uavcan.org. -// You shouldn't attempt to edit this file. -// -// Checking this file under version control is not recommended unless it is used as part of a high-SIL -// safety-critical codebase. The typical usage scenario is to generate it as part of the build process. -// -// To avoid conflicts with definitions given in the source DSDL file, all entities created by the code generator -// are named with an underscore at the end, like foo_bar_(). -// -// Generator: nunavut-1.0.0 (serialization was enabled) -// Source file: /home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Scalar.1.0.uavcan -// Generated at: 2021-02-08 09:42:29.436265 UTC -// Is deprecated: no -// Fixed port-ID: None -// Full name: uavcan.si.sample.torque.Scalar -// Version: 1.0 -// -// Language Options -// target_endianness: any -// omit_float_serialization_support: False -// enable_serialization_asserts: True - -#ifndef UAVCAN_SI_SAMPLE_TORQUE_SCALAR_1_0_INCLUDED_ -#define UAVCAN_SI_SAMPLE_TORQUE_SCALAR_1_0_INCLUDED_ - -#include -#include -#include - -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_TARGET_ENDIANNESS == 1693710260, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Scalar.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_OMIT_FLOAT_SERIALIZATION_SUPPORT == 0, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Scalar.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_ENABLE_SERIALIZATION_ASSERTS == 1, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Scalar.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); - -#ifdef __cplusplus -extern "C" { -#endif - -/// This type does not have a fixed port-ID. See https://forum.uavcan.org/t/choosing-message-and-service-ids/889 -#define uavcan_si_sample_torque_Scalar_1_0_HAS_FIXED_PORT_ID_ false - -#define uavcan_si_sample_torque_Scalar_1_0_FULL_NAME_ "uavcan.si.sample.torque.Scalar" -#define uavcan_si_sample_torque_Scalar_1_0_FULL_NAME_AND_VERSION_ "uavcan.si.sample.torque.Scalar.1.0" - -/// Extent is the minimum amount of memory required to hold any serialized representation of any compatible -/// version of the data type; or, on other words, it is the the maximum possible size of received objects of this type. -/// The size is specified in bytes (rather than bits) because by definition, extent is an integer number of bytes long. -/// When allocating a deserialization (RX) buffer for this data type, it should be at least extent bytes large. -/// When allocating a serialization (TX) buffer, it is safe to use the size of the largest serialized representation -/// instead of the extent because it provides a tighter bound of the object size; it is safe because the concrete type -/// is always known during serialization (unlike deserialization). If not sure, use extent everywhere. -#define uavcan_si_sample_torque_Scalar_1_0_EXTENT_BYTES_ 11UL -#define uavcan_si_sample_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ 11UL -static_assert(uavcan_si_sample_torque_Scalar_1_0_EXTENT_BYTES_ >= uavcan_si_sample_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_, - "Internal constraint violation"); - -typedef struct -{ - /// uavcan.time.SynchronizedTimestamp.1.0 timestamp - uavcan_time_SynchronizedTimestamp_1_0 timestamp; - - /// saturated float32 newton_meter - float newton_meter; -} uavcan_si_sample_torque_Scalar_1_0; - -/// Serialize an instance into the provided buffer. -/// The lifetime of the resulting serialized representation is independent of the original instance. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original object where possible. -/// -/// @param obj The object to serialize. -/// -/// @param buffer The destination buffer. There are no alignment requirements. -/// @see uavcan_si_sample_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the buffer in bytes. -/// Upon return this value will be updated with the size of the constructed serialized -/// representation (in bytes); this value is then to be passed over to the transport -/// layer. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_sample_torque_Scalar_1_0_serialize_( - const uavcan_si_sample_torque_Scalar_1_0* const obj, uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - if ((8U * (size_t) capacity_bytes) < 88UL) - { - return -NUNAVUT_ERROR_SERIALIZATION_BUFFER_TOO_SMALL; - } - // Notice that fields that are not an integer number of bytes long may overrun the space allocated for them - // in the serialization buffer up to the next byte boundary. This is by design and is guaranteed to be safe. - size_t offset_bits = 0U; - - { // uavcan.time.SynchronizedTimestamp.1.0 timestamp - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 56ULL) <= (capacity_bytes * 8U)); - size_t _size_bytes0_ = 7UL; // Nested object (max) size, in bytes. - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits / 8U + _size_bytes0_) <= capacity_bytes); - int8_t _err0_ = uavcan_time_SynchronizedTimestamp_1_0_serialize_( - &obj->timestamp, &buffer[offset_bits / 8U], &_size_bytes0_); - if (_err0_ < 0) - { - return _err0_; - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - NUNAVUT_ASSERT((_size_bytes0_ * 8U) == 56ULL); - offset_bits += _size_bytes0_ * 8U; // Advance by the size of the nested object. - NUNAVUT_ASSERT(offset_bits <= (capacity_bytes * 8U)); - } - - { // saturated float32 newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err1_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter); - if (_err1_ < 0) - { - return _err1_; - } - offset_bits += 32U; - } - - if (offset_bits % 8U != 0U) // Pad to 8 bits. TODO: Eliminate redundant padding checks. - { - const uint8_t _pad0_ = (uint8_t)(8U - offset_bits % 8U); - NUNAVUT_ASSERT(_pad0_ > 0); - const int8_t _err2_ = nunavutSetUxx(&buffer[0], capacity_bytes, offset_bits, 0U, _pad0_); // Optimize? - if (_err2_ < 0) - { - return _err2_; - } - offset_bits += _pad0_; - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - - NUNAVUT_ASSERT(offset_bits == 88ULL); - - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (offset_bits / 8U); - - return NUNAVUT_SUCCESS; -} - -/// Deserialize an instance from the provided buffer. -/// The lifetime of the resulting object is independent of the original buffer. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original buffer where possible. -/// -/// @param obj The object to update from the provided serialized representation. -/// -/// @param buffer The source buffer containing the serialized representation. There are no alignment requirements. -/// If the buffer is shorter or longer than expected, it will be implicitly zero-extended or truncated, -/// respectively; see Specification for "implicit zero extension" and "implicit truncation" rules. -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the supplied serialized -/// representation, in bytes. Upon return this value will be updated with the -/// size of the consumed fragment of the serialized representation (in bytes), -/// which may be smaller due to the implicit truncation rule, but it is guaranteed -/// to never exceed the original buffer size even if the implicit zero extension rule -/// was activated. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_sample_torque_Scalar_1_0_deserialize_( - uavcan_si_sample_torque_Scalar_1_0* const out_obj, const uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((out_obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - const size_t capacity_bits = capacity_bytes * (size_t) 8U; - size_t offset_bits = 0U; - - // uavcan.time.SynchronizedTimestamp.1.0 timestamp - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - { - size_t _size_bytes1_ = (size_t)(capacity_bytes - nunavutChooseMin((offset_bits / 8U), capacity_bytes)); - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - const int8_t _err3_ = uavcan_time_SynchronizedTimestamp_1_0_deserialize_( - &out_obj->timestamp, &buffer[offset_bits / 8U], &_size_bytes1_); - if (_err3_ < 0) - { - return _err3_; - } - offset_bits += _size_bytes1_ * 8U; // Advance by the size of the nested serialized representation. - } - - // saturated float32 newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - - offset_bits = (offset_bits + 7U) & ~(size_t) 7U; // Align on 8 bits. - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (nunavutChooseMin(offset_bits, capacity_bits) / 8U); - NUNAVUT_ASSERT(capacity_bytes >= *inout_buffer_size_bytes); - - return NUNAVUT_SUCCESS; -} - -/// Initialize an instance to default values. Does nothing if @param out_obj is NULL. -/// This function intentionally leaves inactive elements uninitialized; for example, members of a variable-length -/// array beyond its length are left uninitialized; aliased union memory that is not used by the first union field -/// is left uninitialized, etc. If full zero-initialization is desired, just use memset(&obj, 0, sizeof(obj)). -static inline void uavcan_si_sample_torque_Scalar_1_0_initialize_(uavcan_si_sample_torque_Scalar_1_0* const out_obj) -{ - if (out_obj != NULL) - { - size_t size_bytes = 0; - const uint8_t buf = 0; - const int8_t err = uavcan_si_sample_torque_Scalar_1_0_deserialize_(out_obj, &buf, &size_bytes); - NUNAVUT_ASSERT(err >= 0); - (void) err; - } -} - -#ifdef __cplusplus -} -#endif -#endif // UAVCAN_SI_SAMPLE_TORQUE_SCALAR_1_0_INCLUDED_ diff --git a/src/types/uavcan/si/sample/_torque/Vector3_1_0.h b/src/types/uavcan/si/sample/_torque/Vector3_1_0.h deleted file mode 100644 index 1d03587d..00000000 --- a/src/types/uavcan/si/sample/_torque/Vector3_1_0.h +++ /dev/null @@ -1,283 +0,0 @@ -// This is an AUTO-GENERATED UAVCAN DSDL data type implementation. Curious? See https://uavcan.org. -// You shouldn't attempt to edit this file. -// -// Checking this file under version control is not recommended unless it is used as part of a high-SIL -// safety-critical codebase. The typical usage scenario is to generate it as part of the build process. -// -// To avoid conflicts with definitions given in the source DSDL file, all entities created by the code generator -// are named with an underscore at the end, like foo_bar_(). -// -// Generator: nunavut-1.0.0 (serialization was enabled) -// Source file: /home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Vector3.1.0.uavcan -// Generated at: 2021-02-08 09:42:29.627426 UTC -// Is deprecated: no -// Fixed port-ID: None -// Full name: uavcan.si.sample.torque.Vector3 -// Version: 1.0 -// -// Language Options -// target_endianness: any -// omit_float_serialization_support: False -// enable_serialization_asserts: True - -#ifndef UAVCAN_SI_SAMPLE_TORQUE_VECTOR3_1_0_INCLUDED_ -#define UAVCAN_SI_SAMPLE_TORQUE_VECTOR3_1_0_INCLUDED_ - -#include -#include -#include -#include - -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_TARGET_ENDIANNESS == 1693710260, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Vector3.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_OMIT_FLOAT_SERIALIZATION_SUPPORT == 0, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Vector3.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_ENABLE_SERIALIZATION_ASSERTS == 1, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/sample/torque/Vector3.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); - -#ifdef __cplusplus -extern "C" { -#endif - -/// This type does not have a fixed port-ID. See https://forum.uavcan.org/t/choosing-message-and-service-ids/889 -#define uavcan_si_sample_torque_Vector3_1_0_HAS_FIXED_PORT_ID_ false - -#define uavcan_si_sample_torque_Vector3_1_0_FULL_NAME_ "uavcan.si.sample.torque.Vector3" -#define uavcan_si_sample_torque_Vector3_1_0_FULL_NAME_AND_VERSION_ "uavcan.si.sample.torque.Vector3.1.0" - -/// Extent is the minimum amount of memory required to hold any serialized representation of any compatible -/// version of the data type; or, on other words, it is the the maximum possible size of received objects of this type. -/// The size is specified in bytes (rather than bits) because by definition, extent is an integer number of bytes long. -/// When allocating a deserialization (RX) buffer for this data type, it should be at least extent bytes large. -/// When allocating a serialization (TX) buffer, it is safe to use the size of the largest serialized representation -/// instead of the extent because it provides a tighter bound of the object size; it is safe because the concrete type -/// is always known during serialization (unlike deserialization). If not sure, use extent everywhere. -#define uavcan_si_sample_torque_Vector3_1_0_EXTENT_BYTES_ 19UL -#define uavcan_si_sample_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ 19UL -static_assert(uavcan_si_sample_torque_Vector3_1_0_EXTENT_BYTES_ >= uavcan_si_sample_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_, - "Internal constraint violation"); - -/// Array metadata for: saturated float32[3] newton_meter -#define uavcan_si_sample_torque_Vector3_1_0_newton_meter_ARRAY_CAPACITY_ 3U -#define uavcan_si_sample_torque_Vector3_1_0_newton_meter_ARRAY_IS_VARIABLE_LENGTH_ false - -typedef struct -{ - /// uavcan.time.SynchronizedTimestamp.1.0 timestamp - uavcan_time_SynchronizedTimestamp_1_0 timestamp; - - /// saturated float32[3] newton_meter - float newton_meter[3]; -} uavcan_si_sample_torque_Vector3_1_0; - -/// Serialize an instance into the provided buffer. -/// The lifetime of the resulting serialized representation is independent of the original instance. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original object where possible. -/// -/// @param obj The object to serialize. -/// -/// @param buffer The destination buffer. There are no alignment requirements. -/// @see uavcan_si_sample_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the buffer in bytes. -/// Upon return this value will be updated with the size of the constructed serialized -/// representation (in bytes); this value is then to be passed over to the transport -/// layer. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_sample_torque_Vector3_1_0_serialize_( - const uavcan_si_sample_torque_Vector3_1_0* const obj, uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - if ((8U * (size_t) capacity_bytes) < 152UL) - { - return -NUNAVUT_ERROR_SERIALIZATION_BUFFER_TOO_SMALL; - } - // Notice that fields that are not an integer number of bytes long may overrun the space allocated for them - // in the serialization buffer up to the next byte boundary. This is by design and is guaranteed to be safe. - size_t offset_bits = 0U; - - { // uavcan.time.SynchronizedTimestamp.1.0 timestamp - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 56ULL) <= (capacity_bytes * 8U)); - size_t _size_bytes0_ = 7UL; // Nested object (max) size, in bytes. - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits / 8U + _size_bytes0_) <= capacity_bytes); - int8_t _err0_ = uavcan_time_SynchronizedTimestamp_1_0_serialize_( - &obj->timestamp, &buffer[offset_bits / 8U], &_size_bytes0_); - if (_err0_ < 0) - { - return _err0_; - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - NUNAVUT_ASSERT((_size_bytes0_ * 8U) == 56ULL); - offset_bits += _size_bytes0_ * 8U; // Advance by the size of the nested object. - NUNAVUT_ASSERT(offset_bits <= (capacity_bytes * 8U)); - } - - { // saturated float32[3] newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 96ULL) <= (capacity_bytes * 8U)); - const size_t _origin0_ = offset_bits; - { // Array element #0 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err1_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter[0]); - if (_err1_ < 0) - { - return _err1_; - } - offset_bits += 32U; - } - { // Array element #1 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err2_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter[1]); - if (_err2_ < 0) - { - return _err2_; - } - offset_bits += 32U; - } - { // Array element #2 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err3_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter[2]); - if (_err3_ < 0) - { - return _err3_; - } - offset_bits += 32U; - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - NUNAVUT_ASSERT((offset_bits - _origin0_) == 96ULL); - (void) _origin0_; - } - - if (offset_bits % 8U != 0U) // Pad to 8 bits. TODO: Eliminate redundant padding checks. - { - const uint8_t _pad0_ = (uint8_t)(8U - offset_bits % 8U); - NUNAVUT_ASSERT(_pad0_ > 0); - const int8_t _err4_ = nunavutSetUxx(&buffer[0], capacity_bytes, offset_bits, 0U, _pad0_); // Optimize? - if (_err4_ < 0) - { - return _err4_; - } - offset_bits += _pad0_; - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - - NUNAVUT_ASSERT(offset_bits == 152ULL); - - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (offset_bits / 8U); - - return NUNAVUT_SUCCESS; -} - -/// Deserialize an instance from the provided buffer. -/// The lifetime of the resulting object is independent of the original buffer. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original buffer where possible. -/// -/// @param obj The object to update from the provided serialized representation. -/// -/// @param buffer The source buffer containing the serialized representation. There are no alignment requirements. -/// If the buffer is shorter or longer than expected, it will be implicitly zero-extended or truncated, -/// respectively; see Specification for "implicit zero extension" and "implicit truncation" rules. -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the supplied serialized -/// representation, in bytes. Upon return this value will be updated with the -/// size of the consumed fragment of the serialized representation (in bytes), -/// which may be smaller due to the implicit truncation rule, but it is guaranteed -/// to never exceed the original buffer size even if the implicit zero extension rule -/// was activated. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_sample_torque_Vector3_1_0_deserialize_( - uavcan_si_sample_torque_Vector3_1_0* const out_obj, const uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((out_obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - const size_t capacity_bits = capacity_bytes * (size_t) 8U; - size_t offset_bits = 0U; - - // uavcan.time.SynchronizedTimestamp.1.0 timestamp - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - { - size_t _size_bytes1_ = (size_t)(capacity_bytes - nunavutChooseMin((offset_bits / 8U), capacity_bytes)); - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - const int8_t _err5_ = uavcan_time_SynchronizedTimestamp_1_0_deserialize_( - &out_obj->timestamp, &buffer[offset_bits / 8U], &_size_bytes1_); - if (_err5_ < 0) - { - return _err5_; - } - offset_bits += _size_bytes1_ * 8U; // Advance by the size of the nested serialized representation. - } - - // saturated float32[3] newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - // Array element #0 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter[0] = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - // Array element #1 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter[1] = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - // Array element #2 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter[2] = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - - offset_bits = (offset_bits + 7U) & ~(size_t) 7U; // Align on 8 bits. - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (nunavutChooseMin(offset_bits, capacity_bits) / 8U); - NUNAVUT_ASSERT(capacity_bytes >= *inout_buffer_size_bytes); - - return NUNAVUT_SUCCESS; -} - -/// Initialize an instance to default values. Does nothing if @param out_obj is NULL. -/// This function intentionally leaves inactive elements uninitialized; for example, members of a variable-length -/// array beyond its length are left uninitialized; aliased union memory that is not used by the first union field -/// is left uninitialized, etc. If full zero-initialization is desired, just use memset(&obj, 0, sizeof(obj)). -static inline void uavcan_si_sample_torque_Vector3_1_0_initialize_(uavcan_si_sample_torque_Vector3_1_0* const out_obj) -{ - if (out_obj != NULL) - { - size_t size_bytes = 0; - const uint8_t buf = 0; - const int8_t err = uavcan_si_sample_torque_Vector3_1_0_deserialize_(out_obj, &buf, &size_bytes); - NUNAVUT_ASSERT(err >= 0); - (void) err; - } -} - -#ifdef __cplusplus -} -#endif -#endif // UAVCAN_SI_SAMPLE_TORQUE_VECTOR3_1_0_INCLUDED_ diff --git a/src/types/uavcan/si/unit/_torque/Scalar_1_0.h b/src/types/uavcan/si/unit/_torque/Scalar_1_0.h deleted file mode 100644 index 5ca603e0..00000000 --- a/src/types/uavcan/si/unit/_torque/Scalar_1_0.h +++ /dev/null @@ -1,198 +0,0 @@ -// This is an AUTO-GENERATED UAVCAN DSDL data type implementation. Curious? See https://uavcan.org. -// You shouldn't attempt to edit this file. -// -// Checking this file under version control is not recommended unless it is used as part of a high-SIL -// safety-critical codebase. The typical usage scenario is to generate it as part of the build process. -// -// To avoid conflicts with definitions given in the source DSDL file, all entities created by the code generator -// are named with an underscore at the end, like foo_bar_(). -// -// Generator: nunavut-1.0.0 (serialization was enabled) -// Source file: /home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Scalar.1.0.uavcan -// Generated at: 2021-02-08 09:42:24.865680 UTC -// Is deprecated: no -// Fixed port-ID: None -// Full name: uavcan.si.unit.torque.Scalar -// Version: 1.0 -// -// Language Options -// target_endianness: any -// omit_float_serialization_support: False -// enable_serialization_asserts: True - -#ifndef UAVCAN_SI_UNIT_TORQUE_SCALAR_1_0_INCLUDED_ -#define UAVCAN_SI_UNIT_TORQUE_SCALAR_1_0_INCLUDED_ - -#include -#include - -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_TARGET_ENDIANNESS == 1693710260, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Scalar.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_OMIT_FLOAT_SERIALIZATION_SUPPORT == 0, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Scalar.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_ENABLE_SERIALIZATION_ASSERTS == 1, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Scalar.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); - -#ifdef __cplusplus -extern "C" { -#endif - -/// This type does not have a fixed port-ID. See https://forum.uavcan.org/t/choosing-message-and-service-ids/889 -#define uavcan_si_unit_torque_Scalar_1_0_HAS_FIXED_PORT_ID_ false - -#define uavcan_si_unit_torque_Scalar_1_0_FULL_NAME_ "uavcan.si.unit.torque.Scalar" -#define uavcan_si_unit_torque_Scalar_1_0_FULL_NAME_AND_VERSION_ "uavcan.si.unit.torque.Scalar.1.0" - -/// Extent is the minimum amount of memory required to hold any serialized representation of any compatible -/// version of the data type; or, on other words, it is the the maximum possible size of received objects of this type. -/// The size is specified in bytes (rather than bits) because by definition, extent is an integer number of bytes long. -/// When allocating a deserialization (RX) buffer for this data type, it should be at least extent bytes large. -/// When allocating a serialization (TX) buffer, it is safe to use the size of the largest serialized representation -/// instead of the extent because it provides a tighter bound of the object size; it is safe because the concrete type -/// is always known during serialization (unlike deserialization). If not sure, use extent everywhere. -#define uavcan_si_unit_torque_Scalar_1_0_EXTENT_BYTES_ 4UL -#define uavcan_si_unit_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ 4UL -static_assert(uavcan_si_unit_torque_Scalar_1_0_EXTENT_BYTES_ >= uavcan_si_unit_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_, - "Internal constraint violation"); - -typedef struct -{ - /// saturated float32 newton_meter - float newton_meter; -} uavcan_si_unit_torque_Scalar_1_0; - -/// Serialize an instance into the provided buffer. -/// The lifetime of the resulting serialized representation is independent of the original instance. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original object where possible. -/// -/// @param obj The object to serialize. -/// -/// @param buffer The destination buffer. There are no alignment requirements. -/// @see uavcan_si_unit_torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the buffer in bytes. -/// Upon return this value will be updated with the size of the constructed serialized -/// representation (in bytes); this value is then to be passed over to the transport -/// layer. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_unit_torque_Scalar_1_0_serialize_( - const uavcan_si_unit_torque_Scalar_1_0* const obj, uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - if ((8U * (size_t) capacity_bytes) < 32UL) - { - return -NUNAVUT_ERROR_SERIALIZATION_BUFFER_TOO_SMALL; - } - // Notice that fields that are not an integer number of bytes long may overrun the space allocated for them - // in the serialization buffer up to the next byte boundary. This is by design and is guaranteed to be safe. - size_t offset_bits = 0U; - - { // saturated float32 newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err0_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter); - if (_err0_ < 0) - { - return _err0_; - } - offset_bits += 32U; - } - - if (offset_bits % 8U != 0U) // Pad to 8 bits. TODO: Eliminate redundant padding checks. - { - const uint8_t _pad0_ = (uint8_t)(8U - offset_bits % 8U); - NUNAVUT_ASSERT(_pad0_ > 0); - const int8_t _err1_ = nunavutSetUxx(&buffer[0], capacity_bytes, offset_bits, 0U, _pad0_); // Optimize? - if (_err1_ < 0) - { - return _err1_; - } - offset_bits += _pad0_; - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - - NUNAVUT_ASSERT(offset_bits == 32ULL); - - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (offset_bits / 8U); - - return NUNAVUT_SUCCESS; -} - -/// Deserialize an instance from the provided buffer. -/// The lifetime of the resulting object is independent of the original buffer. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original buffer where possible. -/// -/// @param obj The object to update from the provided serialized representation. -/// -/// @param buffer The source buffer containing the serialized representation. There are no alignment requirements. -/// If the buffer is shorter or longer than expected, it will be implicitly zero-extended or truncated, -/// respectively; see Specification for "implicit zero extension" and "implicit truncation" rules. -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the supplied serialized -/// representation, in bytes. Upon return this value will be updated with the -/// size of the consumed fragment of the serialized representation (in bytes), -/// which may be smaller due to the implicit truncation rule, but it is guaranteed -/// to never exceed the original buffer size even if the implicit zero extension rule -/// was activated. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_unit_torque_Scalar_1_0_deserialize_( - uavcan_si_unit_torque_Scalar_1_0* const out_obj, const uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((out_obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - const size_t capacity_bits = capacity_bytes * (size_t) 8U; - size_t offset_bits = 0U; - - // saturated float32 newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - - offset_bits = (offset_bits + 7U) & ~(size_t) 7U; // Align on 8 bits. - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (nunavutChooseMin(offset_bits, capacity_bits) / 8U); - NUNAVUT_ASSERT(capacity_bytes >= *inout_buffer_size_bytes); - - return NUNAVUT_SUCCESS; -} - -/// Initialize an instance to default values. Does nothing if @param out_obj is NULL. -/// This function intentionally leaves inactive elements uninitialized; for example, members of a variable-length -/// array beyond its length are left uninitialized; aliased union memory that is not used by the first union field -/// is left uninitialized, etc. If full zero-initialization is desired, just use memset(&obj, 0, sizeof(obj)). -static inline void uavcan_si_unit_torque_Scalar_1_0_initialize_(uavcan_si_unit_torque_Scalar_1_0* const out_obj) -{ - if (out_obj != NULL) - { - size_t size_bytes = 0; - const uint8_t buf = 0; - const int8_t err = uavcan_si_unit_torque_Scalar_1_0_deserialize_(out_obj, &buf, &size_bytes); - NUNAVUT_ASSERT(err >= 0); - (void) err; - } -} - -#ifdef __cplusplus -} -#endif -#endif // UAVCAN_SI_UNIT_TORQUE_SCALAR_1_0_INCLUDED_ diff --git a/src/types/uavcan/si/unit/_torque/Vector3_1_0.h b/src/types/uavcan/si/unit/_torque/Vector3_1_0.h deleted file mode 100644 index a1b64ae1..00000000 --- a/src/types/uavcan/si/unit/_torque/Vector3_1_0.h +++ /dev/null @@ -1,245 +0,0 @@ -// This is an AUTO-GENERATED UAVCAN DSDL data type implementation. Curious? See https://uavcan.org. -// You shouldn't attempt to edit this file. -// -// Checking this file under version control is not recommended unless it is used as part of a high-SIL -// safety-critical codebase. The typical usage scenario is to generate it as part of the build process. -// -// To avoid conflicts with definitions given in the source DSDL file, all entities created by the code generator -// are named with an underscore at the end, like foo_bar_(). -// -// Generator: nunavut-1.0.0 (serialization was enabled) -// Source file: /home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Vector3.1.0.uavcan -// Generated at: 2021-02-08 09:42:25.038922 UTC -// Is deprecated: no -// Fixed port-ID: None -// Full name: uavcan.si.unit.torque.Vector3 -// Version: 1.0 -// -// Language Options -// target_endianness: any -// omit_float_serialization_support: False -// enable_serialization_asserts: True - -#ifndef UAVCAN_SI_UNIT_TORQUE_VECTOR3_1_0_INCLUDED_ -#define UAVCAN_SI_UNIT_TORQUE_VECTOR3_1_0_INCLUDED_ - -#include -#include -#include - -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_TARGET_ENDIANNESS == 1693710260, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Vector3.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_OMIT_FLOAT_SERIALIZATION_SUPPORT == 0, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Vector3.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); -static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_ENABLE_SERIALIZATION_ASSERTS == 1, - "/home/alex/projects/107-systems/public_regulated_data_types/uavcan/si/unit/torque/Vector3.1.0.uavcan is trying to use a serialization library that was compiled with " - "different language options. This is dangerous and therefore not allowed." ); - -#ifdef __cplusplus -extern "C" { -#endif - -/// This type does not have a fixed port-ID. See https://forum.uavcan.org/t/choosing-message-and-service-ids/889 -#define uavcan_si_unit_torque_Vector3_1_0_HAS_FIXED_PORT_ID_ false - -#define uavcan_si_unit_torque_Vector3_1_0_FULL_NAME_ "uavcan.si.unit.torque.Vector3" -#define uavcan_si_unit_torque_Vector3_1_0_FULL_NAME_AND_VERSION_ "uavcan.si.unit.torque.Vector3.1.0" - -/// Extent is the minimum amount of memory required to hold any serialized representation of any compatible -/// version of the data type; or, on other words, it is the the maximum possible size of received objects of this type. -/// The size is specified in bytes (rather than bits) because by definition, extent is an integer number of bytes long. -/// When allocating a deserialization (RX) buffer for this data type, it should be at least extent bytes large. -/// When allocating a serialization (TX) buffer, it is safe to use the size of the largest serialized representation -/// instead of the extent because it provides a tighter bound of the object size; it is safe because the concrete type -/// is always known during serialization (unlike deserialization). If not sure, use extent everywhere. -#define uavcan_si_unit_torque_Vector3_1_0_EXTENT_BYTES_ 12UL -#define uavcan_si_unit_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ 12UL -static_assert(uavcan_si_unit_torque_Vector3_1_0_EXTENT_BYTES_ >= uavcan_si_unit_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_, - "Internal constraint violation"); - -/// Array metadata for: saturated float32[3] newton_meter -#define uavcan_si_unit_torque_Vector3_1_0_newton_meter_ARRAY_CAPACITY_ 3U -#define uavcan_si_unit_torque_Vector3_1_0_newton_meter_ARRAY_IS_VARIABLE_LENGTH_ false - -typedef struct -{ - /// saturated float32[3] newton_meter - float newton_meter[3]; -} uavcan_si_unit_torque_Vector3_1_0; - -/// Serialize an instance into the provided buffer. -/// The lifetime of the resulting serialized representation is independent of the original instance. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original object where possible. -/// -/// @param obj The object to serialize. -/// -/// @param buffer The destination buffer. There are no alignment requirements. -/// @see uavcan_si_unit_torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_ -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the buffer in bytes. -/// Upon return this value will be updated with the size of the constructed serialized -/// representation (in bytes); this value is then to be passed over to the transport -/// layer. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_unit_torque_Vector3_1_0_serialize_( - const uavcan_si_unit_torque_Vector3_1_0* const obj, uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - if ((8U * (size_t) capacity_bytes) < 96UL) - { - return -NUNAVUT_ERROR_SERIALIZATION_BUFFER_TOO_SMALL; - } - // Notice that fields that are not an integer number of bytes long may overrun the space allocated for them - // in the serialization buffer up to the next byte boundary. This is by design and is guaranteed to be safe. - size_t offset_bits = 0U; - - { // saturated float32[3] newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 96ULL) <= (capacity_bytes * 8U)); - const size_t _origin0_ = offset_bits; - { // Array element #0 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err0_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter[0]); - if (_err0_ < 0) - { - return _err0_; - } - offset_bits += 32U; - } - { // Array element #1 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err1_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter[1]); - if (_err1_ < 0) - { - return _err1_; - } - offset_bits += 32U; - } - { // Array element #2 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - NUNAVUT_ASSERT((offset_bits + 32ULL) <= (capacity_bytes * 8U)); - // Saturation code not emitted -- assume the native representation of float32 is conformant. - static_assert(NUNAVUT_PLATFORM_IEEE754_FLOAT, "Native IEEE754 binary32 required. TODO: relax constraint"); - const int8_t _err2_ = nunavutSetF32(&buffer[0], capacity_bytes, offset_bits, obj->newton_meter[2]); - if (_err2_ < 0) - { - return _err2_; - } - offset_bits += 32U; - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - NUNAVUT_ASSERT((offset_bits - _origin0_) == 96ULL); - (void) _origin0_; - } - - if (offset_bits % 8U != 0U) // Pad to 8 bits. TODO: Eliminate redundant padding checks. - { - const uint8_t _pad0_ = (uint8_t)(8U - offset_bits % 8U); - NUNAVUT_ASSERT(_pad0_ > 0); - const int8_t _err3_ = nunavutSetUxx(&buffer[0], capacity_bytes, offset_bits, 0U, _pad0_); // Optimize? - if (_err3_ < 0) - { - return _err3_; - } - offset_bits += _pad0_; - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - } - // It is assumed that we know the exact type of the serialized entity, hence we expect the size to match. - - NUNAVUT_ASSERT(offset_bits == 96ULL); - - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (offset_bits / 8U); - - return NUNAVUT_SUCCESS; -} - -/// Deserialize an instance from the provided buffer. -/// The lifetime of the resulting object is independent of the original buffer. -/// This method may be slow for large objects (e.g., images, point clouds, radar samples), so in a later revision -/// we may define a zero-copy alternative that keeps references to the original buffer where possible. -/// -/// @param obj The object to update from the provided serialized representation. -/// -/// @param buffer The source buffer containing the serialized representation. There are no alignment requirements. -/// If the buffer is shorter or longer than expected, it will be implicitly zero-extended or truncated, -/// respectively; see Specification for "implicit zero extension" and "implicit truncation" rules. -/// -/// @param inout_buffer_size_bytes When calling, this is a pointer to the size of the supplied serialized -/// representation, in bytes. Upon return this value will be updated with the -/// size of the consumed fragment of the serialized representation (in bytes), -/// which may be smaller due to the implicit truncation rule, but it is guaranteed -/// to never exceed the original buffer size even if the implicit zero extension rule -/// was activated. In case of error this value is undefined. -/// -/// @returns Negative on error, zero on success. -static inline int8_t uavcan_si_unit_torque_Vector3_1_0_deserialize_( - uavcan_si_unit_torque_Vector3_1_0* const out_obj, const uint8_t* const buffer, size_t* const inout_buffer_size_bytes) -{ - if ((out_obj == NULL) || (buffer == NULL) || (inout_buffer_size_bytes == NULL)) - { - return -NUNAVUT_ERROR_INVALID_ARGUMENT; - } - - const size_t capacity_bytes = *inout_buffer_size_bytes; - const size_t capacity_bits = capacity_bytes * (size_t) 8U; - size_t offset_bits = 0U; - - // saturated float32[3] newton_meter - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - // Array element #0 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter[0] = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - // Array element #1 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter[1] = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - // Array element #2 - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - out_obj->newton_meter[2] = nunavutGetF32(&buffer[0], capacity_bytes, offset_bits); - offset_bits += 32U; - - offset_bits = (offset_bits + 7U) & ~(size_t) 7U; // Align on 8 bits. - NUNAVUT_ASSERT(offset_bits % 8U == 0U); - *inout_buffer_size_bytes = (size_t) (nunavutChooseMin(offset_bits, capacity_bits) / 8U); - NUNAVUT_ASSERT(capacity_bytes >= *inout_buffer_size_bytes); - - return NUNAVUT_SUCCESS; -} - -/// Initialize an instance to default values. Does nothing if @param out_obj is NULL. -/// This function intentionally leaves inactive elements uninitialized; for example, members of a variable-length -/// array beyond its length are left uninitialized; aliased union memory that is not used by the first union field -/// is left uninitialized, etc. If full zero-initialization is desired, just use memset(&obj, 0, sizeof(obj)). -static inline void uavcan_si_unit_torque_Vector3_1_0_initialize_(uavcan_si_unit_torque_Vector3_1_0* const out_obj) -{ - if (out_obj != NULL) - { - size_t size_bytes = 0; - const uint8_t buf = 0; - const int8_t err = uavcan_si_unit_torque_Vector3_1_0_deserialize_(out_obj, &buf, &size_bytes); - NUNAVUT_ASSERT(err >= 0); - (void) err; - } -} - -#ifdef __cplusplus -} -#endif -#endif // UAVCAN_SI_UNIT_TORQUE_VECTOR3_1_0_INCLUDED_ diff --git a/src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp b/src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp deleted file mode 100644 index ef813f35..00000000 --- a/src/wrappers/uavcan/si/sample/_torque/Scalar_1_0.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This software is distributed under the terms of the MIT License. - * Copyright (c) 2020 LXRobotics. - * Author: Bernhard Mayer , Alexander Entinger - * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. - */ - -#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_SCALAR_1_0_HPP_ -#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_SCALAR_1_0_HPP_ - -/************************************************************************************** - * INCLUDE - **************************************************************************************/ - -#include - -#include - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -namespace uavcan { -namespace si { -namespace sample { -namespace _torque { - -/************************************************************************************** - * CLASS DECLARATION - **************************************************************************************/ - -template -class Scalar_1_0 -{ - -public: - - uavcan_si_sample__torque_Scalar_1_0 data; - - static constexpr CanardPortID PORT_ID = ID; - static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample__torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; - static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; - - Scalar_1_0() - { - uavcan_si_sample__torque_Scalar_1_0_initialize_(&data); - } - - Scalar_1_0(Scalar_1_0 const & other) - { - memcpy(&data, &other.data, sizeof(data)); - } - - static Scalar_1_0 deserialize(CanardTransfer const & transfer) - { - Scalar_1_0 b; - size_t inout_buffer_size_bytes = transfer.payload_size; - uavcan_si_sample__torque_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); - return b; - } - - size_t serialize(uint8_t * payload) const - { - size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; - return (uavcan_si_sample__torque_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; - } -}; - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -} /* _torque */ -} /* sample */ -} /* si */ -} /* uavcan */ - -#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp b/src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp deleted file mode 100644 index 429833c4..00000000 --- a/src/wrappers/uavcan/si/sample/_torque/Vector3_1_0.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This software is distributed under the terms of the MIT License. - * Copyright (c) 2020 LXRobotics. - * Author: Bernhard Mayer , Alexander Entinger - * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. - */ - -#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_VECTOR3_1_0_HPP_ -#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_VECTOR3_1_0_HPP_ - -/************************************************************************************** - * INCLUDE - **************************************************************************************/ - -#include - -#include - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -namespace uavcan { -namespace si { -namespace sample { -namespace _torque { - -/************************************************************************************** - * CLASS DECLARATION - **************************************************************************************/ - -template -class Vector3_1_0 -{ - -public: - - uavcan_si_sample__torque_Vector3_1_0 data; - - static constexpr CanardPortID PORT_ID = ID; - static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_sample__torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; - static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; - - Vector3_1_0() - { - uavcan_si_sample__torque_Vector3_1_0_initialize_(&data); - } - - Vector3_1_0(Vector3_1_0 const & other) - { - memcpy(&data, &other.data, sizeof(data)); - } - - static Vector3_1_0 deserialize(CanardTransfer const & transfer) - { - Vector3_1_0 b; - size_t inout_buffer_size_bytes = transfer.payload_size; - uavcan_si_sample__torque_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); - return b; - } - - size_t serialize(uint8_t * payload) const - { - size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; - return (uavcan_si_sample__torque_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; - } -}; - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -} /* _torque */ -} /* sample */ -} /* si */ -} /* uavcan */ - -#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_SAMPLE__TORQUE_VECTOR3_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp b/src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp deleted file mode 100644 index 9475f286..00000000 --- a/src/wrappers/uavcan/si/unit/_torque/Scalar_1_0.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This software is distributed under the terms of the MIT License. - * Copyright (c) 2020 LXRobotics. - * Author: Bernhard Mayer , Alexander Entinger - * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. - */ - -#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_SCALAR_1_0_HPP_ -#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_SCALAR_1_0_HPP_ - -/************************************************************************************** - * INCLUDE - **************************************************************************************/ - -#include - -#include - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -namespace uavcan { -namespace si { -namespace unit { -namespace _torque { - -/************************************************************************************** - * CLASS DECLARATION - **************************************************************************************/ - -template -class Scalar_1_0 -{ - -public: - - uavcan_si_unit__torque_Scalar_1_0 data; - - static constexpr CanardPortID PORT_ID = ID; - static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit__torque_Scalar_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; - static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; - - Scalar_1_0() - { - uavcan_si_unit__torque_Scalar_1_0_initialize_(&data); - } - - Scalar_1_0(Scalar_1_0 const & other) - { - memcpy(&data, &other.data, sizeof(data)); - } - - static Scalar_1_0 deserialize(CanardTransfer const & transfer) - { - Scalar_1_0 b; - size_t inout_buffer_size_bytes = transfer.payload_size; - uavcan_si_unit__torque_Scalar_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); - return b; - } - - size_t serialize(uint8_t * payload) const - { - size_t inout_buffer_size_bytes = Scalar_1_0::MAX_PAYLOAD_SIZE; - return (uavcan_si_unit__torque_Scalar_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; - } -}; - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -} /* _torque */ -} /* unit */ -} /* si */ -} /* uavcan */ - -#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_SCALAR_1_0_HPP_ */ diff --git a/src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp b/src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp deleted file mode 100644 index 25d09be1..00000000 --- a/src/wrappers/uavcan/si/unit/_torque/Vector3_1_0.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This software is distributed under the terms of the MIT License. - * Copyright (c) 2020 LXRobotics. - * Author: Bernhard Mayer , Alexander Entinger - * Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. - */ - -#ifndef ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_VECTOR3_1_0_HPP_ -#define ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_VECTOR3_1_0_HPP_ - -/************************************************************************************** - * INCLUDE - **************************************************************************************/ - -#include - -#include - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -namespace uavcan { -namespace si { -namespace unit { -namespace _torque { - -/************************************************************************************** - * CLASS DECLARATION - **************************************************************************************/ - -template -class Vector3_1_0 -{ - -public: - - uavcan_si_unit__torque_Vector3_1_0 data; - - static constexpr CanardPortID PORT_ID = ID; - static constexpr size_t MAX_PAYLOAD_SIZE = uavcan_si_unit__torque_Vector3_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_; - static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; - - Vector3_1_0() - { - uavcan_si_unit__torque_Vector3_1_0_initialize_(&data); - } - - Vector3_1_0(Vector3_1_0 const & other) - { - memcpy(&data, &other.data, sizeof(data)); - } - - static Vector3_1_0 deserialize(CanardTransfer const & transfer) - { - Vector3_1_0 b; - size_t inout_buffer_size_bytes = transfer.payload_size; - uavcan_si_unit__torque_Vector3_1_0_deserialize_(&b.data, (uint8_t *)(transfer.payload), &inout_buffer_size_bytes); - return b; - } - - size_t serialize(uint8_t * payload) const - { - size_t inout_buffer_size_bytes = Vector3_1_0::MAX_PAYLOAD_SIZE; - return (uavcan_si_unit__torque_Vector3_1_0_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; - } -}; - -/************************************************************************************** - * NAMESPACE - **************************************************************************************/ - -} /* _torque */ -} /* unit */ -} /* si */ -} /* uavcan */ - -#endif /* ARDUINO_UAVCAN_TYPES_UAVCAN_SI_UNIT__TORQUE_VECTOR3_1_0_HPP_ */ From 67dceffa35ef07fa6a4468faced18f4847658ccd Mon Sep 17 00:00:00 2001 From: Joel Schulz-Andres Date: Tue, 21 Sep 2021 13:59:24 +0200 Subject: [PATCH 8/8] Remove usages of now removed _torque data type --- .../reg/drone/physics/dynamics/rotation/Planar_0_1.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/reg/drone/physics/dynamics/rotation/Planar_0_1.h b/src/types/reg/drone/physics/dynamics/rotation/Planar_0_1.h index cd39f029..480fbc97 100644 --- a/src/types/reg/drone/physics/dynamics/rotation/Planar_0_1.h +++ b/src/types/reg/drone/physics/dynamics/rotation/Planar_0_1.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include static_assert( NUNAVUT_SUPPORT_LANGUAGE_OPTION_TARGET_ENDIANNESS == 1693710260, @@ -66,7 +66,7 @@ typedef struct reg_drone_physics_kinematics_rotation_Planar_0_1 kinematics; /// uavcan.si.unit.torque.Scalar.1.0 torque - uavcan_si_unit_torque_Scalar_1_0 _torque; + uavcan_si_unit_torque_Scalar_1_0 torque; } reg_drone_physics_dynamics_rotation_Planar_0_1; /// Serialize an instance into the provided buffer. @@ -142,7 +142,7 @@ static inline int8_t reg_drone_physics_dynamics_rotation_Planar_0_1_serialize_( NUNAVUT_ASSERT(offset_bits % 8U == 0U); NUNAVUT_ASSERT((offset_bits / 8U + _size_bytes1_) <= capacity_bytes); int8_t _err2_ = uavcan_si_unit_torque_Scalar_1_0_serialize_( - &obj->_torque, &buffer[offset_bits / 8U], &_size_bytes1_); + &obj->torque, &buffer[offset_bits / 8U], &_size_bytes1_); if (_err2_ < 0) { return _err2_; @@ -230,7 +230,7 @@ static inline int8_t reg_drone_physics_dynamics_rotation_Planar_0_1_deserialize_ size_t _size_bytes3_ = (size_t)(capacity_bytes - nunavutChooseMin((offset_bits / 8U), capacity_bytes)); NUNAVUT_ASSERT(offset_bits % 8U == 0U); const int8_t _err5_ = uavcan_si_unit_torque_Scalar_1_0_deserialize_( - &out_obj->_torque, &buffer[offset_bits / 8U], &_size_bytes3_); + &out_obj->torque, &buffer[offset_bits / 8U], &_size_bytes3_); if (_err5_ < 0) { return _err5_;