-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing wrapper for reg/drone/service/gnss. (#81)
- Loading branch information
Showing
6 changed files
with
402 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/wrappers/reg/drone/service/gnss/DilutionOfPrecision_0_1.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* This software is distributed under the terms of the MIT License. | ||
* Copyright (c) 2020 LXRobotics. | ||
* Author: Alexander Entinger <alexander.entinger@lxrobotics.com> | ||
* Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. | ||
*/ | ||
|
||
#ifndef ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_DILUTIONOFPRECISION_0_1_HPP_ | ||
#define ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_DILUTIONOFPRECISION_0_1_HPP_ | ||
|
||
/************************************************************************************** | ||
* INCLUDE | ||
**************************************************************************************/ | ||
|
||
#include <libcanard/canard.h> | ||
|
||
#include <types/reg/drone/service/gnss/DilutionOfPrecision_0_1.h> | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
namespace reg { | ||
namespace drone { | ||
namespace service { | ||
namespace gnss { | ||
|
||
/************************************************************************************** | ||
* CLASS DECLARATION | ||
**************************************************************************************/ | ||
|
||
template <CanardPortID ID> | ||
class DilutionOfPrecision_0_1 | ||
{ | ||
|
||
public: | ||
|
||
reg_drone_service_gnss_DilutionOfPrecision_0_1 data; | ||
|
||
static constexpr CanardPortID PORT_ID = ID; | ||
static constexpr size_t MAX_PAYLOAD_SIZE = reg_drone_service_gnss_DilutionOfPrecision_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_; | ||
static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; | ||
|
||
|
||
DilutionOfPrecision_0_1() | ||
{ | ||
reg_drone_service_gnss_DilutionOfPrecision_0_1_initialize_(&data); | ||
} | ||
|
||
DilutionOfPrecision_0_1(DilutionOfPrecision_0_1 const & other) | ||
{ | ||
memcpy(&data, &other.data, sizeof(data)); | ||
} | ||
|
||
static DilutionOfPrecision_0_1 deserialize(CanardTransfer const & transfer) | ||
{ | ||
DilutionOfPrecision_0_1 b; | ||
size_t inout_buffer_size_bytes = transfer.payload_size; | ||
reg_drone_service_gnss_DilutionOfPrecision_0_1_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 = DilutionOfPrecision_0_1::MAX_PAYLOAD_SIZE; | ||
return (reg_drone_service_gnss_DilutionOfPrecision_0_1_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; | ||
} | ||
}; | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
} /* gnss */ | ||
} /* service */ | ||
} /* drone */ | ||
} /* reg */ | ||
|
||
#endif /* ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_DILUTIONOFPRECISION_0_1_HPP_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* This software is distributed under the terms of the MIT License. | ||
* Copyright (c) 2020 LXRobotics. | ||
* Author: Alexander Entinger <alexander.entinger@lxrobotics.com> | ||
* Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. | ||
*/ | ||
|
||
#ifndef ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_HEARTBEAT_0_1_HPP_ | ||
#define ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_HEARTBEAT_0_1_HPP_ | ||
|
||
/************************************************************************************** | ||
* INCLUDE | ||
**************************************************************************************/ | ||
|
||
#include <libcanard/canard.h> | ||
|
||
#include <types/reg/drone/service/gnss/Heartbeat_0_1.h> | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
namespace reg { | ||
namespace drone { | ||
namespace service { | ||
namespace gnss { | ||
|
||
/************************************************************************************** | ||
* CLASS DECLARATION | ||
**************************************************************************************/ | ||
|
||
template <CanardPortID ID> | ||
class Heartbeat_0_1 | ||
{ | ||
|
||
public: | ||
|
||
reg_drone_service_gnss_Heartbeat_0_1 data; | ||
|
||
static constexpr CanardPortID PORT_ID = ID; | ||
static constexpr size_t MAX_PAYLOAD_SIZE = reg_drone_service_gnss_Heartbeat_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_; | ||
static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; | ||
|
||
|
||
Heartbeat_0_1() | ||
{ | ||
reg_drone_service_gnss_Heartbeat_0_1_initialize_(&data); | ||
} | ||
|
||
Heartbeat_0_1(Heartbeat_0_1 const & other) | ||
{ | ||
memcpy(&data, &other.data, sizeof(data)); | ||
} | ||
|
||
static Heartbeat_0_1 deserialize(CanardTransfer const & transfer) | ||
{ | ||
Heartbeat_0_1 b; | ||
size_t inout_buffer_size_bytes = transfer.payload_size; | ||
reg_drone_service_gnss_Heartbeat_0_1_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 = Heartbeat_0_1::MAX_PAYLOAD_SIZE; | ||
return (reg_drone_service_gnss_Heartbeat_0_1_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; | ||
} | ||
}; | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
} /* gnss */ | ||
} /* service */ | ||
} /* drone */ | ||
} /* reg */ | ||
|
||
#endif /* ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_HEARTBEAT_0_1_HPP_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* This software is distributed under the terms of the MIT License. | ||
* Copyright (c) 2020 LXRobotics. | ||
* Author: Alexander Entinger <alexander.entinger@lxrobotics.com> | ||
* Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. | ||
*/ | ||
|
||
#ifndef ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_SOURCES_0_1_HPP_ | ||
#define ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_SOURCES_0_1_HPP_ | ||
|
||
/************************************************************************************** | ||
* INCLUDE | ||
**************************************************************************************/ | ||
|
||
#include <libcanard/canard.h> | ||
|
||
#include <types/reg/drone/service/gnss/Sources_0_1.h> | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
namespace reg { | ||
namespace drone { | ||
namespace service { | ||
namespace gnss { | ||
|
||
/************************************************************************************** | ||
* CLASS DECLARATION | ||
**************************************************************************************/ | ||
|
||
template <CanardPortID ID> | ||
class Sources_0_1 | ||
{ | ||
|
||
public: | ||
|
||
reg_drone_service_gnss_Sources_0_1 data; | ||
|
||
static constexpr CanardPortID PORT_ID = ID; | ||
static constexpr size_t MAX_PAYLOAD_SIZE = reg_drone_service_gnss_Sources_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_; | ||
static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; | ||
|
||
|
||
Sources_0_1() | ||
{ | ||
reg_drone_service_gnss_Sources_0_1_initialize_(&data); | ||
} | ||
|
||
Sources_0_1(Sources_0_1 const & other) | ||
{ | ||
memcpy(&data, &other.data, sizeof(data)); | ||
} | ||
|
||
static Sources_0_1 deserialize(CanardTransfer const & transfer) | ||
{ | ||
Sources_0_1 b; | ||
size_t inout_buffer_size_bytes = transfer.payload_size; | ||
reg_drone_service_gnss_Sources_0_1_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 = Sources_0_1::MAX_PAYLOAD_SIZE; | ||
return (reg_drone_service_gnss_Sources_0_1_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; | ||
} | ||
}; | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
} /* gnss */ | ||
} /* service */ | ||
} /* drone */ | ||
} /* reg */ | ||
|
||
#endif /* ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_SOURCES_0_1_HPP_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* This software is distributed under the terms of the MIT License. | ||
* Copyright (c) 2020 LXRobotics. | ||
* Author: Alexander Entinger <alexander.entinger@lxrobotics.com> | ||
* Contributors: https://github.com/107-systems/107-Arduino-UAVCAN/graphs/contributors. | ||
*/ | ||
|
||
#ifndef ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_TIME_0_1_HPP_ | ||
#define ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_TIME_0_1_HPP_ | ||
|
||
/************************************************************************************** | ||
* INCLUDE | ||
**************************************************************************************/ | ||
|
||
#include <libcanard/canard.h> | ||
|
||
#include <types/reg/drone/service/gnss/Time_0_1.h> | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
namespace reg { | ||
namespace drone { | ||
namespace service { | ||
namespace gnss { | ||
|
||
/************************************************************************************** | ||
* CLASS DECLARATION | ||
**************************************************************************************/ | ||
|
||
template <CanardPortID ID> | ||
class Time_0_1 | ||
{ | ||
|
||
public: | ||
|
||
reg_drone_service_gnss_Time_0_1 data; | ||
|
||
static constexpr CanardPortID PORT_ID = ID; | ||
static constexpr size_t MAX_PAYLOAD_SIZE = reg_drone_service_gnss_Time_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_; | ||
static constexpr CanardTransferKind TRANSFER_KIND = CanardTransferKindMessage; | ||
|
||
|
||
Time_0_1() | ||
{ | ||
reg_drone_service_gnss_Time_0_1_initialize_(&data); | ||
} | ||
|
||
Time_0_1(Time_0_1 const & other) | ||
{ | ||
memcpy(&data, &other.data, sizeof(data)); | ||
} | ||
|
||
static Time_0_1 deserialize(CanardTransfer const & transfer) | ||
{ | ||
Time_0_1 b; | ||
size_t inout_buffer_size_bytes = transfer.payload_size; | ||
reg_drone_service_gnss_Time_0_1_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 = Time_0_1::MAX_PAYLOAD_SIZE; | ||
return (reg_drone_service_gnss_Time_0_1_serialize_(&data, payload, &inout_buffer_size_bytes) < NUNAVUT_SUCCESS) ? 0 : inout_buffer_size_bytes; | ||
} | ||
}; | ||
|
||
/************************************************************************************** | ||
* NAMESPACE | ||
**************************************************************************************/ | ||
|
||
} /* gnss */ | ||
} /* service */ | ||
} /* drone */ | ||
} /* reg */ | ||
|
||
#endif /* ARDUINO_UAVCAN_TYPES_REG_DRONE_SERVICE_GNSS_TIME_0_1_HPP_ */ |
Oops, something went wrong.