地操模型更新完成
This commit is contained in:
parent
cfbe71d49d
commit
1cb2ae1419
@ -1,5 +1,7 @@
|
||||
module XNSim
|
||||
{
|
||||
module C909
|
||||
{
|
||||
module ATA04
|
||||
{
|
||||
struct GroundHandling_input
|
||||
@ -84,7 +86,8 @@ module XNSim
|
||||
};
|
||||
struct GroundHandling_heartbeat
|
||||
{
|
||||
long groundhandling_model_heartbeat;
|
||||
@optional long groundhandling_model_heartbeat;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "XNObject.h"
|
||||
#include "XNFramework.h"
|
||||
#include "XNDDSManager.h"
|
||||
#include "XNByteArray.h"
|
||||
#include "XNTypeTraits.h"
|
||||
#include <stdexcept>
|
||||
@ -19,7 +20,7 @@ public:
|
||||
* @brief 初始化
|
||||
* @param framework: 框架
|
||||
*/
|
||||
virtual void Initialize(XNFrameworkPtr framework) = 0;
|
||||
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelID) = 0;
|
||||
|
||||
/**
|
||||
* @brief 获取该接口的UDP包
|
||||
@ -28,13 +29,17 @@ public:
|
||||
XNByteArray getUDPPackage();
|
||||
|
||||
/**
|
||||
* @brief JSON前端获取指定变量的数据
|
||||
* @param varName: 变量名
|
||||
* @param nameSize: 变量名大小
|
||||
* @param varData: 数据
|
||||
* @param dataSize: 数据大小
|
||||
* @brief 批量获取指定变量的数据
|
||||
* @param varNames: 变量名列表
|
||||
* @return: 变量名到数据的映射
|
||||
*/
|
||||
void getData(const char *varName, const size_t nameSize, char *varData, size_t dataSize);
|
||||
std::unordered_map<std::string, std::string> getStringData(std::vector<std::string> varNames);
|
||||
|
||||
/**
|
||||
* @brief 批量设置指定变量的数据
|
||||
* @param data: 变量名到数据的映射
|
||||
*/
|
||||
void setDataByString(std::unordered_map<std::string, std::string> data);
|
||||
|
||||
protected:
|
||||
/**
|
||||
@ -153,7 +158,7 @@ protected:
|
||||
} else {
|
||||
return std::to_string(0);
|
||||
}
|
||||
} else if constexpr (std::is_same_v<T, std::string>) {
|
||||
} else if constexpr (is_std_array_v<T>) {
|
||||
if (data) {
|
||||
return getStringFromStdArray(data.value());
|
||||
} else {
|
||||
@ -164,6 +169,34 @@ protected:
|
||||
return std::string();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 通过字符串数据设置指定变量,用于JSON前端
|
||||
* @param data: 数据
|
||||
* @param value: 字符串数据
|
||||
*/
|
||||
template <typename T>
|
||||
void setDataFromString(eprosima::fastcdr::optional<T> &data, const std::string &value)
|
||||
{
|
||||
if constexpr (std::is_arithmetic_v<T>) {
|
||||
if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
|
||||
data = std::stod(value);
|
||||
} else {
|
||||
data = std::stoll(value);
|
||||
}
|
||||
} else if constexpr (is_std_array_v<T>) {
|
||||
// 解析输入字符串
|
||||
std::stringstream ss(value);
|
||||
std::string item;
|
||||
std::vector<std::string> items;
|
||||
while (std::getline(ss, item, ',')) {
|
||||
items.push_back(item);
|
||||
}
|
||||
T temp;
|
||||
setStdArrayFromString(temp, items, 0);
|
||||
data = temp;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取指定数组变量的字符串数据,用于JSON前端
|
||||
* @param data: 数据
|
||||
@ -185,13 +218,69 @@ protected:
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief 通过变量名获取指定的数据
|
||||
* @param varName: 变量名
|
||||
* @return: 数据(字符串格式)
|
||||
* @brief 通过字符串数据设置指定数组变量,用于JSON前端
|
||||
* @param data: 数据
|
||||
* @param value: 字符串数据,格式为"数字,数字,..."
|
||||
* @param start_pos: 当前数组在输入字符串中的起始位置
|
||||
* @return 处理完当前数组后,下一个数组的起始位置
|
||||
* @throw std::runtime_error: 当输入数据格式不正确时抛出异常
|
||||
*/
|
||||
std::string getData(const std::string &varName);
|
||||
template <typename T, std::size_t N>
|
||||
size_t setStdArrayFromString(std::array<T, N> &data, const std::vector<std::string> &value,
|
||||
size_t start_pos = 0)
|
||||
{
|
||||
// 递归处理每个元素
|
||||
for (std::size_t i = 0; i < N; ++i) {
|
||||
try {
|
||||
if constexpr (std::is_arithmetic_v<T>) {
|
||||
// 对于基本类型,直接转换
|
||||
if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
|
||||
data[i] = static_cast<T>(std::stod(value[start_pos + i]));
|
||||
} else {
|
||||
data[i] = static_cast<T>(std::stoll(value[start_pos + i]));
|
||||
}
|
||||
} else if constexpr (is_std_array_v<T>) {
|
||||
// 对于嵌套数组,递归处理
|
||||
start_pos = setStdArrayFromString(data[i], value, start_pos + i);
|
||||
} else {
|
||||
static_assert(std::is_arithmetic_v<T> || is_std_array_v<T>,
|
||||
"Type must be arithmetic or std::array");
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
throw std::runtime_error("Error parsing element " + std::to_string(i) + ": "
|
||||
+ e.what());
|
||||
}
|
||||
}
|
||||
return start_pos + N;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
void assign_value_get(eprosima::fastcdr::optional<T1> &data, T2 &model_data)
|
||||
{
|
||||
if (data) {
|
||||
auto temp = data.value();
|
||||
if constexpr (std::is_arithmetic_v<T1>) {
|
||||
model_data = temp;
|
||||
} else if constexpr (is_std_array_v<T1>) {
|
||||
size_t arraySize = array_size_v<T1>;
|
||||
for (size_t i = 0; i < arraySize; ++i) {
|
||||
auto temp2 = temp[i];
|
||||
if constexpr (std::is_arithmetic_v<T2>) {
|
||||
model_data[i] = temp2;
|
||||
} else if constexpr (is_std_array_v<T2>) {
|
||||
size_t arraySize2 = array_size_v<T2>;
|
||||
for (size_t j = 0; j < arraySize2; ++j) {
|
||||
model_data[i][j] = temp2[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void clearOutData() {}
|
||||
virtual void sendOutData() {}
|
||||
|
||||
protected:
|
||||
struct ByteArrayFunc {
|
||||
@ -200,15 +289,20 @@ protected:
|
||||
};
|
||||
|
||||
std::unordered_map<std::string, std::function<std::string()>> getDataFunction;
|
||||
std::unordered_map<std::string, std::function<void(std::string)>> setDataFunction;
|
||||
std::vector<ByteArrayFunc> getByteArrayFunction;
|
||||
std::unordered_map<std::string, std::function<void(XNByteArray)>> setByteArrayFunction;
|
||||
std::mutex mutex;
|
||||
uint8_t header[5]{}; // 固定大小的头部
|
||||
size_t headerSize = 0;
|
||||
size_t headerSize = 5;
|
||||
FAST_DDS_MACRO::DataWriter *dataWriter;
|
||||
};
|
||||
|
||||
#define MAP_DATA_FUNC(NAME) \
|
||||
getDataFunction[#NAME] = [this]() { return getString(data.NAME()); }; \
|
||||
setDataFunction[#NAME] = [this](std::string value) { \
|
||||
setDataFromString(out_data.NAME(), value); \
|
||||
}; \
|
||||
getByteArrayFunction.push_back( \
|
||||
{[this]() { return getByteArray(data.NAME()); }, getTypeSize<decltype(data.NAME())>()}); \
|
||||
setByteArrayFunction[#NAME] = [this](XNByteArray byteArray) { \
|
||||
@ -220,13 +314,13 @@ protected:
|
||||
auto temp = data.NAME().value(); \
|
||||
if constexpr (std::is_arithmetic_v<decltype(temp)>) { \
|
||||
model_data->NAME = temp; \
|
||||
} else if constexpr (std::is_std_array_v<decltype(temp)>) { \
|
||||
size_t arraySize = std::tuple_size<decltype(temp)>::value; \
|
||||
} else if constexpr (is_std_array_v<decltype(temp)>) { \
|
||||
size_t arraySize = array_size_v<decltype(temp)>; \
|
||||
for (size_t i = 0; i < arraySize; ++i) { \
|
||||
if constexpr (std::is_arithmetic_v<decltype(temp[i])>) { \
|
||||
model_data->NAME[i] = temp[i]; \
|
||||
} else if constexpr (std::is_std_array_v<decltype(temp[i])>) { \
|
||||
size_t arraySize2 = std::tuple_size<decltype(temp[i])>::value; \
|
||||
} else if constexpr (is_std_array_v<decltype(temp[i])>) { \
|
||||
size_t arraySize2 = array_size_v<decltype(temp[i])>; \
|
||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
||||
model_data->NAME[i][j] = temp[i][j]; \
|
||||
} \
|
||||
@ -236,19 +330,19 @@ protected:
|
||||
}
|
||||
|
||||
#define ASSIGN_VALUE_SET(NAME) \
|
||||
if constexpr (std::is_arithmetic_v<decltype(data.NAME())::type>) { \
|
||||
data.NAME(model_data->NAME); \
|
||||
} else if constexpr (std::is_std_array_v<decltype(data.NAME())::type>) { \
|
||||
using thisType = typename decltype(data.NAME())::type; \
|
||||
if constexpr (std::is_arithmetic_v<decltype(out_data.NAME())::type>) { \
|
||||
out_data.NAME(model_data->NAME); \
|
||||
} else if constexpr (is_std_array_v<decltype(out_data.NAME())::type>) { \
|
||||
using thisType = typename decltype(out_data.NAME())::type; \
|
||||
thisType temp; \
|
||||
size_t arraySize1 = std::tuple_size<thisType>::value; \
|
||||
size_t arraySize1 = array_size_v<thisType>; \
|
||||
using subType = thisType::value_type; \
|
||||
if constexpr (std::is_arithmetic_v<subType>) { \
|
||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||
temp[i] = model_data->NAME[i]; \
|
||||
} \
|
||||
} else if constexpr (std::is_std_array_v<subType>) { \
|
||||
size_t arraySize2 = std::tuple_size<subType>::value; \
|
||||
} else if constexpr (is_std_array_v<subType>) { \
|
||||
size_t arraySize2 = array_size_v<subType>; \
|
||||
std::array<subType, arraySize1> temp; \
|
||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
||||
@ -256,5 +350,5 @@ protected:
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
data.NAME(temp); \
|
||||
out_data.NAME(temp); \
|
||||
}
|
||||
|
@ -15,13 +15,30 @@ struct is_std_array<std::array<T, N>> : std::true_type {
|
||||
template <typename T>
|
||||
inline constexpr bool is_std_array_v = is_std_array<T>::value;
|
||||
|
||||
/**
|
||||
* @brief 获取类型的数组大小
|
||||
* @tparam T 要检查的类型
|
||||
* @return 如果是std::array,返回其大小;否则返回1
|
||||
*/
|
||||
template <typename T>
|
||||
struct array_size : std::integral_constant<std::size_t, 1> {
|
||||
};
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
struct array_size<std::array<T, N>> : std::integral_constant<std::size_t, N> {
|
||||
};
|
||||
|
||||
// 变量模板简化使用
|
||||
template <typename T>
|
||||
inline constexpr std::size_t array_size_v = array_size<T>::value;
|
||||
|
||||
// 获取类型大小的辅助函数
|
||||
template <typename T>
|
||||
constexpr size_t getTypeSize()
|
||||
{
|
||||
if constexpr (is_std_array_v<T>) {
|
||||
// 对于std::array,计算所有元素的总大小
|
||||
return getTypeSize<typename T::value_type>() * std::tuple_size<T>::value;
|
||||
return getTypeSize<typename T::value_type>() * array_size_v<T>;
|
||||
} else {
|
||||
return sizeof(T);
|
||||
}
|
||||
|
@ -4,23 +4,22 @@
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
void XNDDSInterface::getUDPPackage(uint8_t *buffer, size_t bufferSize)
|
||||
XNByteArray XNDDSInterface::getUDPPackage()
|
||||
{
|
||||
if (bufferSize < MAX_UDP_PACKET_SIZE)
|
||||
return;
|
||||
XNByteArray result;
|
||||
|
||||
size_t currentPos = 0;
|
||||
|
||||
// 复制头部
|
||||
if (headerSize >= 5) {
|
||||
std::memcpy(buffer, header, 5);
|
||||
result.append(header, 5);
|
||||
currentPos = 5;
|
||||
}
|
||||
|
||||
// 复制数据
|
||||
for (auto func : getByteArrayFunction) {
|
||||
if (currentPos + func.size <= MAX_UDP_PACKET_SIZE) {
|
||||
func.func(buffer + currentPos, func.size);
|
||||
result.append(func.func());
|
||||
currentPos += func.size;
|
||||
} else {
|
||||
break; // 超出最大包大小
|
||||
@ -29,79 +28,38 @@ void XNDDSInterface::getUDPPackage(uint8_t *buffer, size_t bufferSize)
|
||||
|
||||
// 更新包大小
|
||||
if (currentPos >= 5) {
|
||||
buffer[4] = static_cast<uint8_t>(currentPos);
|
||||
result[4] = static_cast<uint8_t>(currentPos);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string XNDDSInterface::getData(const std::string &varName)
|
||||
std::unordered_map<std::string, std::string>
|
||||
XNDDSInterface::getStringData(std::vector<std::string> varNames)
|
||||
{
|
||||
int index1 = -1;
|
||||
int index2 = -1;
|
||||
std::string trueVarName = varName;
|
||||
|
||||
size_t startPos = varName.find('[');
|
||||
if (startPos != std::string::npos) {
|
||||
size_t midPos = varName.find("][", startPos);
|
||||
size_t endPos = varName.find_last_of(']');
|
||||
|
||||
if (midPos != std::string::npos) {
|
||||
try {
|
||||
index1 = std::stoi(varName.substr(startPos + 1, midPos - startPos - 1));
|
||||
index2 = std::stoi(varName.substr(midPos + 2, endPos - midPos - 2));
|
||||
} catch (...) {
|
||||
std::cerr << "无法解析数组索引: " << varName << std::endl;
|
||||
index1 = 0;
|
||||
index2 = 0;
|
||||
}
|
||||
} else if (endPos != std::string::npos) {
|
||||
try {
|
||||
index1 = std::stoi(varName.substr(startPos + 1, endPos - startPos - 1));
|
||||
} catch (...) {
|
||||
std::cerr << "无法解析数组索引: " << varName << std::endl;
|
||||
index1 = 0;
|
||||
}
|
||||
}
|
||||
trueVarName = varName.substr(0, startPos);
|
||||
}
|
||||
|
||||
auto it = getDataFunction.find(trueVarName);
|
||||
if (it == getDataFunction.end()) {
|
||||
return std::string();
|
||||
}
|
||||
std::unordered_map<std::string, std::string> result;
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
std::string result = it->second();
|
||||
for (const auto &varName : varNames) {
|
||||
auto it = getDataFunction.find(varName);
|
||||
if (it == getDataFunction.end()) {
|
||||
continue;
|
||||
}
|
||||
result[varName] = it->second();
|
||||
}
|
||||
|
||||
if (index1 < 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<std::string> list;
|
||||
std::stringstream ss(result);
|
||||
std::string item;
|
||||
while (std::getline(ss, item, ',')) {
|
||||
list.push_back(item);
|
||||
}
|
||||
|
||||
if (index1 >= static_cast<int>(list.size())) {
|
||||
std::cerr << "数组索引超出范围: " << varName << std::endl;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
if (index2 < 0) {
|
||||
return list[index1];
|
||||
}
|
||||
|
||||
std::vector<std::string> list2;
|
||||
std::stringstream ss2(list[index1]);
|
||||
while (std::getline(ss2, item, ' ')) {
|
||||
list2.push_back(item);
|
||||
}
|
||||
|
||||
if (index2 >= static_cast<int>(list2.size())) {
|
||||
std::cerr << "数组索引超出范围: " << varName << std::endl;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
return list2[index2];
|
||||
}
|
||||
|
||||
void XNDDSInterface::setDataByString(std::unordered_map<std::string, std::string> data)
|
||||
{
|
||||
clearOutData();
|
||||
for (const auto &[varName, value] : data) {
|
||||
auto it = setDataFunction.find(varName);
|
||||
if (it == setDataFunction.end()) {
|
||||
continue;
|
||||
}
|
||||
it->second(value);
|
||||
}
|
||||
sendOutData();
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "XNObject.h"
|
||||
#include "XNFramework.h"
|
||||
#include "XNDDSManager.h"
|
||||
#include "XNByteArray.h"
|
||||
#include "XNTypeTraits.h"
|
||||
#include <stdexcept>
|
||||
@ -19,7 +20,7 @@ public:
|
||||
* @brief 初始化
|
||||
* @param framework: 框架
|
||||
*/
|
||||
virtual void Initialize(XNFrameworkPtr framework) = 0;
|
||||
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelID) = 0;
|
||||
|
||||
/**
|
||||
* @brief 获取该接口的UDP包
|
||||
@ -28,13 +29,17 @@ public:
|
||||
XNByteArray getUDPPackage();
|
||||
|
||||
/**
|
||||
* @brief JSON前端获取指定变量的数据
|
||||
* @param varName: 变量名
|
||||
* @param nameSize: 变量名大小
|
||||
* @param varData: 数据
|
||||
* @param dataSize: 数据大小
|
||||
* @brief 批量获取指定变量的数据
|
||||
* @param varNames: 变量名列表
|
||||
* @return: 变量名到数据的映射
|
||||
*/
|
||||
void getData(const char *varName, const size_t nameSize, char *varData, size_t dataSize);
|
||||
std::unordered_map<std::string, std::string> getStringData(std::vector<std::string> varNames);
|
||||
|
||||
/**
|
||||
* @brief 批量设置指定变量的数据
|
||||
* @param data: 变量名到数据的映射
|
||||
*/
|
||||
void setDataByString(std::unordered_map<std::string, std::string> data);
|
||||
|
||||
protected:
|
||||
/**
|
||||
@ -153,7 +158,7 @@ protected:
|
||||
} else {
|
||||
return std::to_string(0);
|
||||
}
|
||||
} else if constexpr (std::is_same_v<T, std::string>) {
|
||||
} else if constexpr (is_std_array_v<T>) {
|
||||
if (data) {
|
||||
return getStringFromStdArray(data.value());
|
||||
} else {
|
||||
@ -164,6 +169,34 @@ protected:
|
||||
return std::string();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 通过字符串数据设置指定变量,用于JSON前端
|
||||
* @param data: 数据
|
||||
* @param value: 字符串数据
|
||||
*/
|
||||
template <typename T>
|
||||
void setDataFromString(eprosima::fastcdr::optional<T> &data, const std::string &value)
|
||||
{
|
||||
if constexpr (std::is_arithmetic_v<T>) {
|
||||
if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
|
||||
data = std::stod(value);
|
||||
} else {
|
||||
data = std::stoll(value);
|
||||
}
|
||||
} else if constexpr (is_std_array_v<T>) {
|
||||
// 解析输入字符串
|
||||
std::stringstream ss(value);
|
||||
std::string item;
|
||||
std::vector<std::string> items;
|
||||
while (std::getline(ss, item, ',')) {
|
||||
items.push_back(item);
|
||||
}
|
||||
T temp;
|
||||
setStdArrayFromString(temp, items, 0);
|
||||
data = temp;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取指定数组变量的字符串数据,用于JSON前端
|
||||
* @param data: 数据
|
||||
@ -185,13 +218,69 @@ protected:
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief 通过变量名获取指定的数据
|
||||
* @param varName: 变量名
|
||||
* @return: 数据(字符串格式)
|
||||
* @brief 通过字符串数据设置指定数组变量,用于JSON前端
|
||||
* @param data: 数据
|
||||
* @param value: 字符串数据,格式为"数字,数字,..."
|
||||
* @param start_pos: 当前数组在输入字符串中的起始位置
|
||||
* @return 处理完当前数组后,下一个数组的起始位置
|
||||
* @throw std::runtime_error: 当输入数据格式不正确时抛出异常
|
||||
*/
|
||||
std::string getData(const std::string &varName);
|
||||
template <typename T, std::size_t N>
|
||||
size_t setStdArrayFromString(std::array<T, N> &data, const std::vector<std::string> &value,
|
||||
size_t start_pos = 0)
|
||||
{
|
||||
// 递归处理每个元素
|
||||
for (std::size_t i = 0; i < N; ++i) {
|
||||
try {
|
||||
if constexpr (std::is_arithmetic_v<T>) {
|
||||
// 对于基本类型,直接转换
|
||||
if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
|
||||
data[i] = static_cast<T>(std::stod(value[start_pos + i]));
|
||||
} else {
|
||||
data[i] = static_cast<T>(std::stoll(value[start_pos + i]));
|
||||
}
|
||||
} else if constexpr (is_std_array_v<T>) {
|
||||
// 对于嵌套数组,递归处理
|
||||
start_pos = setStdArrayFromString(data[i], value, start_pos + i);
|
||||
} else {
|
||||
static_assert(std::is_arithmetic_v<T> || is_std_array_v<T>,
|
||||
"Type must be arithmetic or std::array");
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
throw std::runtime_error("Error parsing element " + std::to_string(i) + ": "
|
||||
+ e.what());
|
||||
}
|
||||
}
|
||||
return start_pos + N;
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
void assign_value_get(eprosima::fastcdr::optional<T1> &data, T2 &model_data)
|
||||
{
|
||||
if (data) {
|
||||
auto temp = data.value();
|
||||
if constexpr (std::is_arithmetic_v<T1>) {
|
||||
model_data = temp;
|
||||
} else if constexpr (is_std_array_v<T1>) {
|
||||
size_t arraySize = array_size_v<T1>;
|
||||
for (size_t i = 0; i < arraySize; ++i) {
|
||||
auto temp2 = temp[i];
|
||||
if constexpr (std::is_arithmetic_v<T2>) {
|
||||
model_data[i] = temp2;
|
||||
} else if constexpr (is_std_array_v<T2>) {
|
||||
size_t arraySize2 = array_size_v<T2>;
|
||||
for (size_t j = 0; j < arraySize2; ++j) {
|
||||
model_data[i][j] = temp2[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void clearOutData() {}
|
||||
virtual void sendOutData() {}
|
||||
|
||||
protected:
|
||||
struct ByteArrayFunc {
|
||||
@ -200,15 +289,20 @@ protected:
|
||||
};
|
||||
|
||||
std::unordered_map<std::string, std::function<std::string()>> getDataFunction;
|
||||
std::unordered_map<std::string, std::function<void(std::string)>> setDataFunction;
|
||||
std::vector<ByteArrayFunc> getByteArrayFunction;
|
||||
std::unordered_map<std::string, std::function<void(XNByteArray)>> setByteArrayFunction;
|
||||
std::mutex mutex;
|
||||
uint8_t header[5]{}; // 固定大小的头部
|
||||
size_t headerSize = 5;
|
||||
FAST_DDS_MACRO::DataWriter *dataWriter;
|
||||
};
|
||||
|
||||
#define MAP_DATA_FUNC(NAME) \
|
||||
getDataFunction[#NAME] = [this]() { return getString(data.NAME()); }; \
|
||||
setDataFunction[#NAME] = [this](std::string value) { \
|
||||
setDataFromString(out_data.NAME(), value); \
|
||||
}; \
|
||||
getByteArrayFunction.push_back( \
|
||||
{[this]() { return getByteArray(data.NAME()); }, getTypeSize<decltype(data.NAME())>()}); \
|
||||
setByteArrayFunction[#NAME] = [this](XNByteArray byteArray) { \
|
||||
@ -220,13 +314,13 @@ protected:
|
||||
auto temp = data.NAME().value(); \
|
||||
if constexpr (std::is_arithmetic_v<decltype(temp)>) { \
|
||||
model_data->NAME = temp; \
|
||||
} else if constexpr (std::is_std_array_v<decltype(temp)>) { \
|
||||
size_t arraySize = std::tuple_size<decltype(temp)>::value; \
|
||||
} else if constexpr (is_std_array_v<decltype(temp)>) { \
|
||||
size_t arraySize = array_size_v<decltype(temp)>; \
|
||||
for (size_t i = 0; i < arraySize; ++i) { \
|
||||
if constexpr (std::is_arithmetic_v<decltype(temp[i])>) { \
|
||||
model_data->NAME[i] = temp[i]; \
|
||||
} else if constexpr (std::is_std_array_v<decltype(temp[i])>) { \
|
||||
size_t arraySize2 = std::tuple_size<decltype(temp[i])>::value; \
|
||||
} else if constexpr (is_std_array_v<decltype(temp[i])>) { \
|
||||
size_t arraySize2 = array_size_v<decltype(temp[i])>; \
|
||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
||||
model_data->NAME[i][j] = temp[i][j]; \
|
||||
} \
|
||||
@ -236,19 +330,19 @@ protected:
|
||||
}
|
||||
|
||||
#define ASSIGN_VALUE_SET(NAME) \
|
||||
if constexpr (std::is_arithmetic_v<decltype(data.NAME())::type>) { \
|
||||
data.NAME(model_data->NAME); \
|
||||
} else if constexpr (std::is_std_array_v<decltype(data.NAME())::type>) { \
|
||||
using thisType = typename decltype(data.NAME())::type; \
|
||||
if constexpr (std::is_arithmetic_v<decltype(out_data.NAME())::type>) { \
|
||||
out_data.NAME(model_data->NAME); \
|
||||
} else if constexpr (is_std_array_v<decltype(out_data.NAME())::type>) { \
|
||||
using thisType = typename decltype(out_data.NAME())::type; \
|
||||
thisType temp; \
|
||||
size_t arraySize1 = std::tuple_size<thisType>::value; \
|
||||
size_t arraySize1 = array_size_v<thisType>; \
|
||||
using subType = thisType::value_type; \
|
||||
if constexpr (std::is_arithmetic_v<subType>) { \
|
||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||
temp[i] = model_data->NAME[i]; \
|
||||
} \
|
||||
} else if constexpr (std::is_std_array_v<subType>) { \
|
||||
size_t arraySize2 = std::tuple_size<subType>::value; \
|
||||
} else if constexpr (is_std_array_v<subType>) { \
|
||||
size_t arraySize2 = array_size_v<subType>; \
|
||||
std::array<subType, arraySize1> temp; \
|
||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
||||
@ -256,5 +350,5 @@ protected:
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
data.NAME(temp); \
|
||||
out_data.NAME(temp); \
|
||||
}
|
||||
|
@ -15,13 +15,30 @@ struct is_std_array<std::array<T, N>> : std::true_type {
|
||||
template <typename T>
|
||||
inline constexpr bool is_std_array_v = is_std_array<T>::value;
|
||||
|
||||
/**
|
||||
* @brief 获取类型的数组大小
|
||||
* @tparam T 要检查的类型
|
||||
* @return 如果是std::array,返回其大小;否则返回1
|
||||
*/
|
||||
template <typename T>
|
||||
struct array_size : std::integral_constant<std::size_t, 1> {
|
||||
};
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
struct array_size<std::array<T, N>> : std::integral_constant<std::size_t, N> {
|
||||
};
|
||||
|
||||
// 变量模板简化使用
|
||||
template <typename T>
|
||||
inline constexpr std::size_t array_size_v = array_size<T>::value;
|
||||
|
||||
// 获取类型大小的辅助函数
|
||||
template <typename T>
|
||||
constexpr size_t getTypeSize()
|
||||
{
|
||||
if constexpr (is_std_array_v<T>) {
|
||||
// 对于std::array,计算所有元素的总大小
|
||||
return getTypeSize<typename T::value_type>() * std::tuple_size<T>::value;
|
||||
return getTypeSize<typename T::value_type>() * array_size_v<T>;
|
||||
} else {
|
||||
return sizeof(T);
|
||||
}
|
||||
|
@ -71,6 +71,7 @@
|
||||
"cinttypes": "cpp",
|
||||
"typeindex": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"variant": "cpp"
|
||||
"variant": "cpp",
|
||||
"fstream": "cpp"
|
||||
}
|
||||
}
|
@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(XNGroundHandling LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
@ -18,8 +15,5 @@ endif()
|
||||
# 添加 XNCore_PATH 下的 include 目录为包含目录
|
||||
include_directories(${XNCore_PATH}/include)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
|
||||
|
||||
add_subdirectory(XNGroundHandlingInterface)
|
||||
add_subdirectory(XNGroundHandling)
|
||||
|
@ -7,7 +7,6 @@ add_library(XNGroundHandling SHARED
|
||||
)
|
||||
|
||||
target_link_libraries(XNGroundHandling PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
${XNCore_PATH}/lib/libXNCore.so
|
||||
XNGroundHandlingInterface)
|
||||
|
||||
|
@ -2,18 +2,10 @@
|
||||
#include "XNGroundHandling_p.h"
|
||||
#include <XNCore/XNModelManager.h>
|
||||
#include <XNCore/XNDDSManager.h>
|
||||
#include <QMutexLocker>
|
||||
|
||||
XN_DLL_INITIALIZE(XNGroundHandling)
|
||||
XN_MODEL_INITIALIZE(XNGroundHandling)
|
||||
|
||||
XN_REGISTER_PARTICIPANT_BEGIN(XNGroundHandling)
|
||||
XN_PUBLISHTOPIC(XNSim::ATA04::GroundHandling_output)
|
||||
XN_PUBLISHTOPIC(XNSim::ATA04::GroundHandling_heartbeat)
|
||||
XN_SUBSCRIBETOPIC(XNSim::ATA04::GroundHandling_input, &XNGroundHandling::OnInput)
|
||||
XN_REGISTER_PARTICIPANT_END(XNGroundHandling)
|
||||
|
||||
XNGroundHandling::XNGroundHandling(QObject *parent)
|
||||
: XNModelObject(*new XNGroundHandlingPrivate(this), parent)
|
||||
XNGroundHandling::XNGroundHandling() : XNModelObject(new XNGroundHandlingPrivate())
|
||||
{
|
||||
}
|
||||
|
||||
@ -21,30 +13,27 @@ XNGroundHandling::~XNGroundHandling()
|
||||
{
|
||||
}
|
||||
|
||||
XNGroundHandling::XNGroundHandling(XNGroundHandlingPrivate &dd, QObject *parent)
|
||||
: XNModelObject(dd, parent)
|
||||
XNGroundHandling::XNGroundHandling(PrivateType *p) : XNModelObject(p)
|
||||
{
|
||||
}
|
||||
|
||||
void XNGroundHandling::OnInitialize()
|
||||
void XNGroundHandling::Initialize()
|
||||
{
|
||||
Q_D(XNGroundHandling);
|
||||
XNModelObject::OnInitialize();
|
||||
T_D();
|
||||
XNModelObject::Initialize();
|
||||
if (d->_dynamicLib) {
|
||||
d->_fun = reinterpret_cast<FunctionType>(
|
||||
d->_dynamicLib->resolve("_Z29SACSCGroundHandlingEntryPointP20ComacDataStructure_S"));
|
||||
d->_fun = (FunctionType)dlsym(d->_dynamicLib, d->_entryPointName.c_str());
|
||||
if (!d->_fun) {
|
||||
LOG_WARNING("Failed to resolve SACSCGroundHandlingEntry:%1",
|
||||
d->_dynamicLib->errorString());
|
||||
LOG_WARNING("Failed to resolve SACSCGroundHandlingEntry");
|
||||
}
|
||||
}
|
||||
//add other initial code here
|
||||
}
|
||||
|
||||
void XNGroundHandling::OnPrepareForExecute()
|
||||
void XNGroundHandling::PrepareForExecute()
|
||||
{
|
||||
Q_D(XNGroundHandling);
|
||||
XNModelObject::OnPrepareForExecute();
|
||||
T_D();
|
||||
XNModelObject::PrepareForExecute();
|
||||
//add your initial data code here
|
||||
d->_data.input_ground = new input_ground_S();
|
||||
d->_data.input_ground->l_04_i_gdcomac_brake_torq_f8 = new double *[3];
|
||||
@ -122,355 +111,21 @@ void XNGroundHandling::OnPrepareForExecute()
|
||||
for (int i = 0; i < 3; i++) {
|
||||
d->_data.output_ground->l_04_o_gdcomac_vczt_f8[i] = new double[2];
|
||||
}
|
||||
d->_inputInterface.Initialize(GetFramework(), GetUniqueId());
|
||||
d->_outputInterface.Initialize(GetFramework(), GetUniqueId());
|
||||
d->_heartbeatInterface.Initialize(GetFramework(), GetUniqueId());
|
||||
}
|
||||
|
||||
void XNGroundHandling::StepUpdate()
|
||||
{
|
||||
Q_D(XNGroundHandling);
|
||||
T_D();
|
||||
XNModelObject::StepUpdate();
|
||||
if (d->_fun) {
|
||||
//add your input code here
|
||||
QMutexLocker locker(&d->_mutex);
|
||||
d->_inputInterface.getData(d->_data.input_ground);
|
||||
d->_fun(&d->_data);
|
||||
d->_outputInterface.setData(d->_data.output_ground);
|
||||
d->_heartbeatInterface.setData(&d->_data);
|
||||
//add your output code here
|
||||
}
|
||||
OnOutput();
|
||||
}
|
||||
|
||||
// template <class T1, class T2>
|
||||
// void CopyInputData(T1 *model_input, const T2 &dds_input)
|
||||
// {
|
||||
// Q_D(XNGroundHandling);
|
||||
// QMutexLocker locker(&d->_mutex);
|
||||
// if (dds_input.l_04_i_gdcomac_frz_l1()) {
|
||||
// model_input->l_04_i_gdcomac_frz_l1 = dds_input.l_04_i_gdcomac_frz_l1().value();
|
||||
// }
|
||||
// }
|
||||
|
||||
void XNGroundHandling::OnInput(const XNSim::ATA04::GroundHandling_input &input)
|
||||
{
|
||||
Q_D(XNGroundHandling);
|
||||
QMutexLocker locker(&d->_mutex);
|
||||
if (input.l_04_i_gdcomac_frz_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_frz_l1 = input.l_04_i_gdcomac_frz_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_chocks_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_chocks_l1 = input.l_04_i_gdcomac_chocks_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_alt_agl_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_alt_agl_f8 =
|
||||
input.l_04_i_gdcomac_alt_agl_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_frzflt_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_frzflt_l1 = input.l_04_i_gdcomac_frzflt_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_p_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_p_f8 = input.l_04_i_gdcomac_p_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_q_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_q_f8 = input.l_04_i_gdcomac_q_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_r_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_r_f8 = input.l_04_i_gdcomac_r_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_ug_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_ug_f8 = input.l_04_i_gdcomac_ug_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_vg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_vg_f8 = input.l_04_i_gdcomac_vg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_wg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_wg_f8 = input.l_04_i_gdcomac_wg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_blcg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_blcg_f8 = input.l_04_i_gdcomac_blcg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_bscg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_bscg_f8 = input.l_04_i_gdcomac_bscg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_wlcg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_wlcg_f8 = input.l_04_i_gdcomac_wlcg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_pb_active_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_pb_active_l1 =
|
||||
input.l_04_i_gdcomac_pb_active_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_brake_torq_f8()) {
|
||||
auto l_04_i_gdcomac_brake_torq_f8 = input.l_04_i_gdcomac_brake_torq_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_brake_torq_f8[i][j] =
|
||||
l_04_i_gdcomac_brake_torq_f8[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_gear_f8()) {
|
||||
auto l_04_i_gdcomac_gear_f8 = input.l_04_i_gdcomac_gear_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_gear_f8[i] = l_04_i_gdcomac_gear_f8[i];
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_gsteer_f8()) {
|
||||
auto l_04_i_gdcomac_gsteer_f8 = input.l_04_i_gdcomac_gsteer_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_gsteer_f8[i] = l_04_i_gdcomac_gsteer_f8[i];
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_tire_pres_f8()) {
|
||||
auto l_04_i_gdcomac_tire_pres_f8 = input.l_04_i_gdcomac_tire_pres_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_tire_pres_f8[i][j] =
|
||||
l_04_i_gdcomac_tire_pres_f8[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_onjax_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_onjax_l1 = input.l_04_i_gdcomac_onjax_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_contdep_f8()) {
|
||||
auto l_04_i_gdcomac_contdep_f8 = input.l_04_i_gdcomac_contdep_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_contdep_f8[i] = l_04_i_gdcomac_contdep_f8[i];
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_thetag_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_thetag_f8 = input.l_04_i_gdcomac_thetag_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_phig_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_phig_f8 = input.l_04_i_gdcomac_phig_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_rwyrgh_i2()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_rwyrgh_i2 = input.l_04_i_gdcomac_rwyrgh_i2().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_rwyhdg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_rwyhdg_f8 = input.l_04_i_gdcomac_rwyhdg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_reset_braketemp_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_reset_braketemp_l1 =
|
||||
input.l_04_i_gdcomac_reset_braketemp_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_reset_tirepress_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_reset_tirepress_l1 =
|
||||
input.l_04_i_gdcomac_reset_tirepress_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_temp_c_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_temp_c_f8 = input.l_04_i_gdcomac_temp_c_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_brake_temp_f8()) {
|
||||
auto l_04_i_gdcomac_brake_temp_f8 = input.l_04_i_gdcomac_brake_temp_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_brake_temp_f8[i][j] =
|
||||
l_04_i_gdcomac_brake_temp_f8[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_tire_tburst_l1()) {
|
||||
auto l_04_i_gdcomac_tire_tburst_l1 = input.l_04_i_gdcomac_tire_tburst_l1().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_tire_tburst_l1[i][j] =
|
||||
l_04_i_gdcomac_tire_tburst_l1[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_tire_tflat_l1()) {
|
||||
auto l_04_i_gdcomac_tire_tflat_l1 = input.l_04_i_gdcomac_tire_tflat_l1().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_tire_tflat_l1[i][j] =
|
||||
l_04_i_gdcomac_tire_tflat_l1[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_brk_reset_tpres_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_brk_reset_tpres_l1 =
|
||||
input.l_04_i_gdcomac_brk_reset_tpres_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_rcon_ci_f8()) {
|
||||
auto l_04_i_gdcomac_rcon_ci_f8 = input.l_04_i_gdcomac_rcon_ci_f8().value();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_rcon_ci_f8[i] = l_04_i_gdcomac_rcon_ci_f8[i];
|
||||
}
|
||||
}
|
||||
if (input.l_04_i_gdcomac_pb_towforce_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_pb_towforce_f8 =
|
||||
input.l_04_i_gdcomac_pb_towforce_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_gsteer_state_i4()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_gsteer_state_i4 =
|
||||
input.l_04_i_gdcomac_gsteer_state_i4().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_trim_active_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_trim_active_l1 =
|
||||
input.l_04_i_gdcomac_trim_active_l1().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_phi_deg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_phi_deg_f8 =
|
||||
input.l_04_i_gdcomac_phi_deg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_theta_deg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_theta_deg_f8 =
|
||||
input.l_04_i_gdcomac_theta_deg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_psi_deg_f8()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_psi_deg_f8 =
|
||||
input.l_04_i_gdcomac_psi_deg_f8().value();
|
||||
}
|
||||
if (input.l_04_i_gdcomac_resetint_l1()) {
|
||||
d->_data.input_ground->l_04_i_gdcomac_resetint_l1 =
|
||||
input.l_04_i_gdcomac_resetint_l1().value();
|
||||
}
|
||||
}
|
||||
|
||||
void XNGroundHandling::OnOutput()
|
||||
{
|
||||
Q_D(XNGroundHandling);
|
||||
QMutexLocker locker(&d->_mutex);
|
||||
XNSim::ATA04::GroundHandling_heartbeat heartbeat;
|
||||
heartbeat.groundhandling_model_heartbeat(d->_data.groundhandling_model_heartbeat);
|
||||
d->_dataWriters["XNSim::ATA04::GroundHandling_heartbeat"]->write(&heartbeat);
|
||||
//DDS数据发布
|
||||
XNSim::ATA04::GroundHandling_output output;
|
||||
output.l_04_o_gdcomac_frz_l1(d->_data.output_ground->l_04_o_gdcomac_frz_l1);
|
||||
output.l_04_o_gdcomac_ac_on_ground_l1(d->_data.output_ground->l_04_o_gdcomac_ac_on_ground_l1);
|
||||
output.l_04_o_gdcomac_ac_stationary_f8(d->_data.output_ground->l_04_o_gdcomac_ac_stationary_f8);
|
||||
output.l_04_o_gdcomac_alt_tire_f8(d->_data.output_ground->l_04_o_gdcomac_alt_tire_f8);
|
||||
output.l_04_o_gdcomac_zcg_to_tire_f8(d->_data.output_ground->l_04_o_gdcomac_zcg_to_tire_f8);
|
||||
output.l_04_o_gdcomac_fxb_f8(d->_data.output_ground->l_04_o_gdcomac_fxb_f8);
|
||||
output.l_04_o_gdcomac_fyb_f8(d->_data.output_ground->l_04_o_gdcomac_fyb_f8);
|
||||
output.l_04_o_gdcomac_fzb_f8(d->_data.output_ground->l_04_o_gdcomac_fzb_f8);
|
||||
output.l_04_o_gdcomac_mxb_f8(d->_data.output_ground->l_04_o_gdcomac_mxb_f8);
|
||||
output.l_04_o_gdcomac_myb_f8(d->_data.output_ground->l_04_o_gdcomac_myb_f8);
|
||||
output.l_04_o_gdcomac_mzb_f8(d->_data.output_ground->l_04_o_gdcomac_mzb_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_fygs_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_fygs_f8[i] = d->_data.output_ground->l_04_o_gdcomac_fygs_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_fygs_f8(l_04_o_gdcomac_fygs_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_mzgs_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_mzgs_f8[i] = d->_data.output_ground->l_04_o_gdcomac_mzgs_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_mzgs_f8(l_04_o_gdcomac_mzgs_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_mu_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_mu_f8[i] = d->_data.output_ground->l_04_o_gdcomac_mu_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_mu_f8(l_04_o_gdcomac_mu_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_dstroke_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_dstroke_f8[i] = d->_data.output_ground->l_04_o_gdcomac_dstroke_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_dstroke_f8(l_04_o_gdcomac_dstroke_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_sr_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_sr_f8[i][j] = d->_data.output_ground->l_04_o_gdcomac_sr_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_sr_f8(l_04_o_gdcomac_sr_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_sy_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_sy_f8[i][j] = d->_data.output_ground->l_04_o_gdcomac_sy_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_sy_f8(l_04_o_gdcomac_sy_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_sx_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_sx_f8[i][j] = d->_data.output_ground->l_04_o_gdcomac_sx_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_sx_f8(l_04_o_gdcomac_sx_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_xft_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_xft_f8[i] = d->_data.output_ground->l_04_o_gdcomac_xft_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_xft_f8(l_04_o_gdcomac_xft_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_yft_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_yft_f8[i] = d->_data.output_ground->l_04_o_gdcomac_yft_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_yft_f8(l_04_o_gdcomac_yft_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_zft_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_zft_f8[i] = d->_data.output_ground->l_04_o_gdcomac_zft_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_zft_f8(l_04_o_gdcomac_zft_f8);
|
||||
output.l_04_o_gdcomac_distngrxcg_f8(d->_data.output_ground->l_04_o_gdcomac_distngrxcg_f8);
|
||||
output.l_04_o_gdcomac_distmgrxcg_f8(d->_data.output_ground->l_04_o_gdcomac_distmgrxcg_f8);
|
||||
output.l_04_o_gdcomac_distmgrzcg_f8(d->_data.output_ground->l_04_o_gdcomac_distmgrzcg_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_tire_vel_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_tire_vel_f8[i][j] =
|
||||
d->_data.output_ground->l_04_o_gdcomac_tire_vel_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_tire_vel_f8(l_04_o_gdcomac_tire_vel_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_tire_temp_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_tire_temp_f8[i][j] =
|
||||
d->_data.output_ground->l_04_o_gdcomac_tire_temp_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_tire_temp_f8(l_04_o_gdcomac_tire_temp_f8);
|
||||
std::array<std::array<char, 2>, 3> l_04_o_gdcomac_tire_burst_l1;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_tire_burst_l1[i][j] =
|
||||
d->_data.output_ground->l_04_o_gdcomac_tire_burst_l1[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_tire_burst_l1(l_04_o_gdcomac_tire_burst_l1);
|
||||
output.l_04_o_gdcomac_wow_l1(d->_data.output_ground->l_04_o_gdcomac_wow_l1);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_utirew_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_utirew_f8[i][j] = d->_data.output_ground->l_04_o_gdcomac_utirew_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_utirew_f8(l_04_o_gdcomac_utirew_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_vtirew_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_vtirew_f8[i][j] = d->_data.output_ground->l_04_o_gdcomac_vtirew_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_vtirew_f8(l_04_o_gdcomac_vtirew_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_whl_omega_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_whl_omega_f8[i][j] =
|
||||
d->_data.output_ground->l_04_o_gdcomac_whl_omega_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_whl_omega_f8(l_04_o_gdcomac_whl_omega_f8);
|
||||
std::array<double, 6> l_04_o_gdcomac_dstruc_f8;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
l_04_o_gdcomac_dstruc_f8[i] = d->_data.output_ground->l_04_o_gdcomac_dstruc_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_dstruc_f8(l_04_o_gdcomac_dstruc_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_nd_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_nd_f8[i] = d->_data.output_ground->l_04_o_gdcomac_nd_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_nd_f8(l_04_o_gdcomac_nd_f8);
|
||||
std::array<double, 3> l_04_o_gdcomac_wor_par_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
l_04_o_gdcomac_wor_par_f8[i] = d->_data.output_ground->l_04_o_gdcomac_wor_par_f8[i];
|
||||
}
|
||||
output.l_04_o_gdcomac_wor_par_f8(l_04_o_gdcomac_wor_par_f8);
|
||||
std::array<std::array<double, 2>, 3> l_04_o_gdcomac_vczt_f8;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
l_04_o_gdcomac_vczt_f8[i][j] = d->_data.output_ground->l_04_o_gdcomac_vczt_f8[i][j];
|
||||
}
|
||||
}
|
||||
output.l_04_o_gdcomac_vczt_f8(l_04_o_gdcomac_vczt_f8);
|
||||
d->_dataWriters["XNSim::ATA04::GroundHandling_output"]->write(&output);
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include "XNGroundHandling_global.h"
|
||||
#include <XNCore/XNModelObject.h>
|
||||
#include "../XNGroundHandlingInterface/XNGroundHandlingInterface.hpp"
|
||||
|
||||
struct XNGroundHandlingPrivate;
|
||||
|
||||
@ -9,22 +8,17 @@ class XNGROUNDHANDLING_EXPORT XNGroundHandling : public XNModelObject
|
||||
{
|
||||
XN_METATYPE(XNGroundHandling, XNModelObject)
|
||||
XN_DECLARE_PRIVATE(XNGroundHandling)
|
||||
XN_DECLARE_DDS()
|
||||
public:
|
||||
explicit XNGroundHandling(QObject *parent = nullptr);
|
||||
XNGroundHandling();
|
||||
virtual ~XNGroundHandling();
|
||||
|
||||
protected:
|
||||
XNGroundHandling(XNGroundHandlingPrivate &dd, QObject *parent = nullptr);
|
||||
XNGroundHandling(PrivateType *p);
|
||||
|
||||
public:
|
||||
virtual void Initialize() override;
|
||||
virtual void PrepareForExecute() override;
|
||||
|
||||
public:
|
||||
virtual void StepUpdate() override;
|
||||
|
||||
private:
|
||||
void OnInput(const XNSim::ATA04::GroundHandling_input &input);
|
||||
void OnOutput();
|
||||
};
|
||||
|
||||
XNCLASS_PTR_DECLARE(XNGroundHandling)
|
@ -1,12 +1,10 @@
|
||||
#ifndef XNGROUNDHANDLING_GLOBAL_H
|
||||
#define XNGROUNDHANDLING_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(XNGROUNDHANDLING_LIBRARY)
|
||||
#define XNGROUNDHANDLING_EXPORT Q_DECL_EXPORT
|
||||
# define XNGROUNDHANDLING_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define XNGROUNDHANDLING_EXPORT Q_DECL_IMPORT
|
||||
# define XNGROUNDHANDLING_EXPORT __attribute__((visibility("hidden")))
|
||||
#endif
|
||||
|
||||
#endif // XNGROUNDHANDLING_GLOBAL_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <XNCore/XNModelObject_p.h>
|
||||
#include <DataModels/libSACSCGroundHandling_V2.0.27.1H/std_04_dll.h>
|
||||
#include "../XNGroundHandlingInterface/XNGroundHandlingInterface.hpp"
|
||||
|
||||
typedef void (*FunctionType)(ComacDataStructure_S *);
|
||||
|
||||
@ -12,4 +13,8 @@ struct XNGroundHandlingPrivate : public XNModelObjectPrivate {
|
||||
std::string _entryPointName = "_Z29SACSCGroundHandlingEntryPointP20ComacDataStructure_S";
|
||||
|
||||
std::mutex _mutex;
|
||||
|
||||
XNSim::C909::ATA04::GroundHandling_input_Interface _inputInterface;
|
||||
XNSim::C909::ATA04::GroundHandling_output_Interface _outputInterface;
|
||||
XNSim::C909::ATA04::GroundHandling_heartbeat_Interface _heartbeatInterface;
|
||||
};
|
||||
|
@ -25,7 +25,6 @@ add_library(XNGroundHandlingInterface SHARED
|
||||
)
|
||||
|
||||
target_link_libraries(XNGroundHandlingInterface PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
fastcdr
|
||||
fastdds
|
||||
OpenSSL::SSL
|
||||
|
@ -19,8 +19,8 @@
|
||||
* This file was generated by the tool fastddsgen.
|
||||
*/
|
||||
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_HPP
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_HPP
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
@ -53,6 +53,8 @@
|
||||
|
||||
namespace XNSim {
|
||||
|
||||
namespace C909 {
|
||||
|
||||
namespace ATA04 {
|
||||
|
||||
/*!
|
||||
@ -3841,8 +3843,10 @@ private:
|
||||
|
||||
} // namespace ATA04
|
||||
|
||||
} // namespace C909
|
||||
|
||||
} // namespace XNSim
|
||||
|
||||
#endif // _FAST_DDS_GENERATED_XNSIM_ATA04_XNGROUNDHANDLING_HPP_
|
||||
#endif // _FAST_DDS_GENERATED_XNSIM_C909_ATA04_XNGROUNDHANDLING_HPP_
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
module XNSim
|
||||
{
|
||||
module C909
|
||||
{
|
||||
module ATA04
|
||||
{
|
||||
struct GroundHandling_input
|
||||
@ -87,4 +89,5 @@ module XNSim
|
||||
@optional long groundhandling_model_heartbeat;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -19,19 +19,19 @@
|
||||
* This file was generated by the tool fastddsgen.
|
||||
*/
|
||||
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||
|
||||
#include "XNGroundHandling.hpp"
|
||||
|
||||
constexpr uint32_t XNSim_ATA04_GroundHandling_input_max_cdr_typesize {1093UL};
|
||||
constexpr uint32_t XNSim_ATA04_GroundHandling_input_max_key_cdr_typesize {0UL};
|
||||
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_input_max_cdr_typesize {1093UL};
|
||||
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_input_max_key_cdr_typesize {0UL};
|
||||
|
||||
constexpr uint32_t XNSim_ATA04_GroundHandling_output_max_cdr_typesize {1328UL};
|
||||
constexpr uint32_t XNSim_ATA04_GroundHandling_output_max_key_cdr_typesize {0UL};
|
||||
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_heartbeat_max_cdr_typesize {12UL};
|
||||
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize {0UL};
|
||||
|
||||
constexpr uint32_t XNSim_ATA04_GroundHandling_heartbeat_max_cdr_typesize {12UL};
|
||||
constexpr uint32_t XNSim_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize {0UL};
|
||||
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_output_max_cdr_typesize {1328UL};
|
||||
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_output_max_key_cdr_typesize {0UL};
|
||||
|
||||
|
||||
namespace eprosima {
|
||||
@ -42,19 +42,19 @@ class CdrSizeCalculator;
|
||||
|
||||
eProsima_user_DllExport void serialize_key(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_input& data);
|
||||
const XNSim::C909::ATA04::GroundHandling_input& data);
|
||||
|
||||
eProsima_user_DllExport void serialize_key(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_output& data);
|
||||
const XNSim::C909::ATA04::GroundHandling_output& data);
|
||||
|
||||
eProsima_user_DllExport void serialize_key(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_heartbeat& data);
|
||||
const XNSim::C909::ATA04::GroundHandling_heartbeat& data);
|
||||
|
||||
|
||||
} // namespace fastcdr
|
||||
} // namespace eprosima
|
||||
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
* This file was generated by the tool fastddsgen.
|
||||
*/
|
||||
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||
|
||||
#include "XNGroundHandlingCdrAux.hpp"
|
||||
|
||||
@ -37,10 +37,10 @@ namespace fastcdr {
|
||||
template<>
|
||||
eProsima_user_DllExport size_t calculate_serialized_size(
|
||||
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
||||
const XNSim::ATA04::GroundHandling_input& data,
|
||||
const XNSim::C909::ATA04::GroundHandling_input& data,
|
||||
size_t& current_alignment)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
static_cast<void>(data);
|
||||
|
||||
@ -178,9 +178,9 @@ eProsima_user_DllExport size_t calculate_serialized_size(
|
||||
template<>
|
||||
eProsima_user_DllExport void serialize(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_input& data)
|
||||
const XNSim::C909::ATA04::GroundHandling_input& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
eprosima::fastcdr::Cdr::state current_state(scdr);
|
||||
scdr.begin_serialize_type(current_state,
|
||||
@ -235,9 +235,9 @@ eProsima_user_DllExport void serialize(
|
||||
template<>
|
||||
eProsima_user_DllExport void deserialize(
|
||||
eprosima::fastcdr::Cdr& cdr,
|
||||
XNSim::ATA04::GroundHandling_input& data)
|
||||
XNSim::C909::ATA04::GroundHandling_input& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
|
||||
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
||||
@ -413,9 +413,9 @@ eProsima_user_DllExport void deserialize(
|
||||
|
||||
void serialize_key(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_input& data)
|
||||
const XNSim::C909::ATA04::GroundHandling_input& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
static_cast<void>(scdr);
|
||||
static_cast<void>(data);
|
||||
@ -620,10 +620,10 @@ void serialize_key(
|
||||
template<>
|
||||
eProsima_user_DllExport size_t calculate_serialized_size(
|
||||
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
||||
const XNSim::ATA04::GroundHandling_output& data,
|
||||
const XNSim::C909::ATA04::GroundHandling_output& data,
|
||||
size_t& current_alignment)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
static_cast<void>(data);
|
||||
|
||||
@ -749,9 +749,9 @@ eProsima_user_DllExport size_t calculate_serialized_size(
|
||||
template<>
|
||||
eProsima_user_DllExport void serialize(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_output& data)
|
||||
const XNSim::C909::ATA04::GroundHandling_output& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
eprosima::fastcdr::Cdr::state current_state(scdr);
|
||||
scdr.begin_serialize_type(current_state,
|
||||
@ -802,9 +802,9 @@ eProsima_user_DllExport void serialize(
|
||||
template<>
|
||||
eProsima_user_DllExport void deserialize(
|
||||
eprosima::fastcdr::Cdr& cdr,
|
||||
XNSim::ATA04::GroundHandling_output& data)
|
||||
XNSim::C909::ATA04::GroundHandling_output& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
|
||||
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
||||
@ -964,9 +964,9 @@ eProsima_user_DllExport void deserialize(
|
||||
|
||||
void serialize_key(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_output& data)
|
||||
const XNSim::C909::ATA04::GroundHandling_output& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
static_cast<void>(scdr);
|
||||
static_cast<void>(data);
|
||||
@ -1151,10 +1151,10 @@ void serialize_key(
|
||||
template<>
|
||||
eProsima_user_DllExport size_t calculate_serialized_size(
|
||||
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
||||
const XNSim::ATA04::GroundHandling_heartbeat& data,
|
||||
const XNSim::C909::ATA04::GroundHandling_heartbeat& data,
|
||||
size_t& current_alignment)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
static_cast<void>(data);
|
||||
|
||||
@ -1178,9 +1178,9 @@ eProsima_user_DllExport size_t calculate_serialized_size(
|
||||
template<>
|
||||
eProsima_user_DllExport void serialize(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_heartbeat& data)
|
||||
const XNSim::C909::ATA04::GroundHandling_heartbeat& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
eprosima::fastcdr::Cdr::state current_state(scdr);
|
||||
scdr.begin_serialize_type(current_state,
|
||||
@ -1197,9 +1197,9 @@ eProsima_user_DllExport void serialize(
|
||||
template<>
|
||||
eProsima_user_DllExport void deserialize(
|
||||
eprosima::fastcdr::Cdr& cdr,
|
||||
XNSim::ATA04::GroundHandling_heartbeat& data)
|
||||
XNSim::C909::ATA04::GroundHandling_heartbeat& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
|
||||
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
||||
@ -1223,9 +1223,9 @@ eProsima_user_DllExport void deserialize(
|
||||
|
||||
void serialize_key(
|
||||
eprosima::fastcdr::Cdr& scdr,
|
||||
const XNSim::ATA04::GroundHandling_heartbeat& data)
|
||||
const XNSim::C909::ATA04::GroundHandling_heartbeat& data)
|
||||
{
|
||||
using namespace XNSim::ATA04;
|
||||
using namespace XNSim::C909::ATA04;
|
||||
|
||||
static_cast<void>(scdr);
|
||||
static_cast<void>(data);
|
||||
@ -1241,5 +1241,5 @@ void serialize_key(
|
||||
} // namespace fastcdr
|
||||
} // namespace eprosima
|
||||
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||
|
||||
|
@ -1,124 +1,196 @@
|
||||
#include "XNGroundHandlingInterface.hpp"
|
||||
|
||||
namespace XNSim
|
||||
namespace XNSim::C909::ATA04
|
||||
{
|
||||
namespace ATA04
|
||||
GroundHandling_input_Interface::GroundHandling_input_Interface()
|
||||
{
|
||||
GroundHandling_input_Interface::GroundHandling_input_Interface()
|
||||
{
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_frz_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_chocks_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_alt_agl_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_frzflt_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_p_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_q_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_r_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_ug_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_vg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_wg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_blcg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_bscg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_wlcg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_pb_active_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_brake_torq_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_gear_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_gsteer_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_tire_pres_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_onjax_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_contdep_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_thetag_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_phig_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_rwyrgh_i2);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_rwyhdg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_reset_braketemp_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_reset_tirepress_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_temp_c_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_brake_temp_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_tire_tburst_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_tire_tflat_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_rcon_ci_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_pb_towforce_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_gsteer_state_i4);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_trim_active_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_phi_deg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_theta_deg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_psi_deg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_resetint_l1);
|
||||
}
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_frz_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_chocks_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_alt_agl_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_frzflt_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_p_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_q_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_r_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_ug_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_vg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_wg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_blcg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_bscg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_wlcg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_pb_active_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_brake_torq_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_gear_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_gsteer_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_tire_pres_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_onjax_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_contdep_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_thetag_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_phig_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_rwyrgh_i2);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_rwyhdg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_reset_braketemp_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_reset_tirepress_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_temp_c_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_brake_temp_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_tire_tburst_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_tire_tflat_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_rcon_ci_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_pb_towforce_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_gsteer_state_i4);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_trim_active_l1);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_phi_deg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_theta_deg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_psi_deg_f8);
|
||||
MAP_DATA_FUNC(l_04_i_gdcomac_resetint_l1);
|
||||
}
|
||||
|
||||
GroundHandling_input_Interface::~GroundHandling_input_Interface()
|
||||
{
|
||||
}
|
||||
GroundHandling_input_Interface::~GroundHandling_input_Interface()
|
||||
{
|
||||
}
|
||||
|
||||
void GroundHandling_input_Interface::inputDataListener(
|
||||
const XNSim::ATA04::GroundHandling_input &input)
|
||||
{
|
||||
void GroundHandling_input_Interface::Initialize(XNFrameworkPtr framework, uint32_t modelId)
|
||||
{
|
||||
auto ddsManager = framework->GetDDSManager();
|
||||
if (!ddsManager) {
|
||||
LOG_ERROR("DDSManager is nullptr");
|
||||
return;
|
||||
}
|
||||
dataWriter = ddsManager->RegisterPublisher<XNSim::C909::ATA04::GroundHandling_inputPubSubType>(
|
||||
"XNSim::C909::ATA04::GroundHandling_input", modelId);
|
||||
ddsManager->RegisterSubscriber<XNSim::C909::ATA04::GroundHandling_inputPubSubType>(
|
||||
"XNSim::C909::ATA04::GroundHandling_input", modelId,
|
||||
std::bind(&GroundHandling_input_Interface::inputDataListener, this, std::placeholders::_1));
|
||||
}
|
||||
|
||||
void GroundHandling_input_Interface::clearOutData()
|
||||
{
|
||||
this->out_data = XNSim::C909::ATA04::GroundHandling_input();
|
||||
}
|
||||
|
||||
void GroundHandling_input_Interface::sendOutData()
|
||||
{
|
||||
dataWriter->write(&this->out_data);
|
||||
}
|
||||
|
||||
void GroundHandling_input_Interface::inputDataListener(
|
||||
const XNSim::C909::ATA04::GroundHandling_input &input)
|
||||
{
|
||||
this->data = input;
|
||||
}
|
||||
}
|
||||
|
||||
GroundHandling_output_Interface::GroundHandling_output_Interface()
|
||||
{
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_frz_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_ac_on_ground_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_ac_stationary_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_alt_tire_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_zcg_to_tire_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_fxb_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_fyb_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_fzb_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_mxb_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_myb_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_mzb_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_fygs_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_mzgs_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_mu_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_dstroke_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_sr_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_sy_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_sx_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_xft_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_yft_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_zft_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_distngrxcg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_distmgrxcg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_distmgrzcg_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_tire_vel_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_tire_burst_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_tire_temp_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_wow_l1);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_utirew_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_vtirew_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_whl_omega_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_dstruc_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_wor_par_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_nd_f8);
|
||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_vczt_f8);
|
||||
}
|
||||
GroundHandling_output_Interface::GroundHandling_output_Interface()
|
||||
{
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_frz_l1);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_ac_on_ground_l1);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_ac_stationary_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_alt_tire_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_zcg_to_tire_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_fxb_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_fyb_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_fzb_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_mxb_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_myb_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_mzb_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_fygs_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_mzgs_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_mu_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_dstroke_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_sr_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_sy_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_sx_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_xft_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_yft_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_zft_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_distngrxcg_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_distmgrxcg_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_distmgrzcg_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_tire_vel_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_tire_burst_l1);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_tire_temp_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_wow_l1);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_utirew_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_vtirew_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_whl_omega_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_dstruc_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_wor_par_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_nd_f8);
|
||||
MAP_DATA_FUNC(l_04_o_gdcomac_vczt_f8);
|
||||
}
|
||||
|
||||
GroundHandling_output_Interface::~GroundHandling_output_Interface()
|
||||
{
|
||||
}
|
||||
GroundHandling_output_Interface::~GroundHandling_output_Interface()
|
||||
{
|
||||
}
|
||||
|
||||
void GroundHandling_output_Interface::outputDataListener(
|
||||
const XNSim::ATA04::GroundHandling_output &output)
|
||||
{
|
||||
void GroundHandling_output_Interface::Initialize(XNFrameworkPtr framework, uint32_t modelId)
|
||||
{
|
||||
auto ddsManager = framework->GetDDSManager();
|
||||
if (!ddsManager) {
|
||||
LOG_ERROR("DDSManager is nullptr");
|
||||
return;
|
||||
}
|
||||
dataWriter = ddsManager->RegisterPublisher<XNSim::C909::ATA04::GroundHandling_outputPubSubType>(
|
||||
"XNSim::C909::ATA04::GroundHandling_output", modelId);
|
||||
ddsManager->RegisterSubscriber<XNSim::C909::ATA04::GroundHandling_outputPubSubType>(
|
||||
"XNSim::C909::ATA04::GroundHandling_output", modelId,
|
||||
std::bind(&GroundHandling_output_Interface::outputDataListener, this,
|
||||
std::placeholders::_1));
|
||||
}
|
||||
|
||||
void GroundHandling_output_Interface::clearOutData()
|
||||
{
|
||||
this->out_data = XNSim::C909::ATA04::GroundHandling_output();
|
||||
}
|
||||
|
||||
void GroundHandling_output_Interface::sendOutData()
|
||||
{
|
||||
dataWriter->write(&this->out_data);
|
||||
}
|
||||
|
||||
void GroundHandling_output_Interface::outputDataListener(
|
||||
const XNSim::C909::ATA04::GroundHandling_output &output)
|
||||
{
|
||||
this->data = output;
|
||||
}
|
||||
}
|
||||
|
||||
GroundHandling_heartbeat_Interface::GroundHandling_heartbeat_Interface()
|
||||
{
|
||||
MAP_GET_DATA_FUNC(groundhandling_model_heartbeat);
|
||||
}
|
||||
GroundHandling_heartbeat_Interface::GroundHandling_heartbeat_Interface()
|
||||
{
|
||||
MAP_DATA_FUNC(groundhandling_model_heartbeat);
|
||||
}
|
||||
|
||||
GroundHandling_heartbeat_Interface::~GroundHandling_heartbeat_Interface()
|
||||
{
|
||||
}
|
||||
GroundHandling_heartbeat_Interface::~GroundHandling_heartbeat_Interface()
|
||||
{
|
||||
}
|
||||
|
||||
void GroundHandling_heartbeat_Interface::heartbeatListener(
|
||||
const XNSim::ATA04::GroundHandling_heartbeat &heartbeat)
|
||||
{
|
||||
void GroundHandling_heartbeat_Interface::Initialize(XNFrameworkPtr framework, uint32_t modelId)
|
||||
{
|
||||
auto ddsManager = framework->GetDDSManager();
|
||||
if (!ddsManager) {
|
||||
LOG_ERROR("DDSManager is nullptr");
|
||||
return;
|
||||
}
|
||||
dataWriter =
|
||||
ddsManager->RegisterPublisher<XNSim::C909::ATA04::GroundHandling_heartbeatPubSubType>(
|
||||
"XNSim::C909::ATA04::GroundHandling_heartbeat", modelId);
|
||||
ddsManager->RegisterSubscriber<XNSim::C909::ATA04::GroundHandling_heartbeatPubSubType>(
|
||||
"XNSim::C909::ATA04::GroundHandling_heartbeat", modelId,
|
||||
std::bind(&GroundHandling_heartbeat_Interface::heartbeatListener, this,
|
||||
std::placeholders::_1));
|
||||
}
|
||||
|
||||
void GroundHandling_heartbeat_Interface::clearOutData()
|
||||
{
|
||||
this->out_data = XNSim::C909::ATA04::GroundHandling_heartbeat();
|
||||
}
|
||||
|
||||
void GroundHandling_heartbeat_Interface::sendOutData()
|
||||
{
|
||||
dataWriter->write(&this->out_data);
|
||||
}
|
||||
|
||||
void GroundHandling_heartbeat_Interface::heartbeatListener(
|
||||
const XNSim::C909::ATA04::GroundHandling_heartbeat &heartbeat)
|
||||
{
|
||||
this->data = heartbeat;
|
||||
}
|
||||
} // namespace ATA04
|
||||
} // namespace XNSim
|
||||
}
|
||||
} // namespace XNSim::C909::ATA04
|
||||
|
@ -2,132 +2,260 @@
|
||||
#include "XNGroundHandlingPubSubTypes.hpp"
|
||||
#include "XNCore/XNDDSInterface.h"
|
||||
|
||||
namespace XNSim
|
||||
namespace XNSim::C909::ATA04
|
||||
{
|
||||
namespace ATA04
|
||||
class GroundHandling_input_Interface final : public XNDDSInterface
|
||||
{
|
||||
class GroundHandling_input_Interface : public XNDDSInterface
|
||||
{
|
||||
public:
|
||||
explicit GroundHandling_input_Interface();
|
||||
public:
|
||||
GroundHandling_input_Interface();
|
||||
virtual ~GroundHandling_input_Interface();
|
||||
void inputDataListener(const XNSim::ATA04::GroundHandling_input &input);
|
||||
|
||||
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelId) override;
|
||||
virtual void clearOutData() override;
|
||||
virtual void sendOutData() override;
|
||||
|
||||
void inputDataListener(const XNSim::C909::ATA04::GroundHandling_input &input);
|
||||
template <typename T>
|
||||
void getData(T *model_data)
|
||||
{
|
||||
if (model_data == nullptr)
|
||||
return;
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_frz_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_chocks_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_alt_agl_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_frzflt_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_p_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_q_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_r_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_ug_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_vg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_wg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_blcg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_bscg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_wlcg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_pb_active_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_brake_torq_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_gear_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_gsteer_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_tire_pres_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_onjax_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_contdep_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_thetag_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_phig_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_rwyrgh_i2);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_rwyhdg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_reset_braketemp_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_reset_tirepress_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_temp_c_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_brake_temp_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_tire_tburst_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_tire_tflat_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_rcon_ci_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_pb_towforce_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_gsteer_state_i4);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_trim_active_l1);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_phi_deg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_theta_deg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_psi_deg_f8);
|
||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_resetint_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_frz_l1(), model_data->l_04_i_gdcomac_frz_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_chocks_l1(), model_data->l_04_i_gdcomac_chocks_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_alt_agl_f8(), model_data->l_04_i_gdcomac_alt_agl_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_frzflt_l1(), model_data->l_04_i_gdcomac_frzflt_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_p_f8(), model_data->l_04_i_gdcomac_p_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_q_f8(), model_data->l_04_i_gdcomac_q_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_r_f8(), model_data->l_04_i_gdcomac_r_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_ug_f8(), model_data->l_04_i_gdcomac_ug_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_vg_f8(), model_data->l_04_i_gdcomac_vg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_wg_f8(), model_data->l_04_i_gdcomac_wg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_blcg_f8(), model_data->l_04_i_gdcomac_blcg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_bscg_f8(), model_data->l_04_i_gdcomac_bscg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_wlcg_f8(), model_data->l_04_i_gdcomac_wlcg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_pb_active_l1(),
|
||||
model_data->l_04_i_gdcomac_pb_active_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_brake_torq_f8(),
|
||||
model_data->l_04_i_gdcomac_brake_torq_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_gear_f8(), model_data->l_04_i_gdcomac_gear_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_gsteer_f8(), model_data->l_04_i_gdcomac_gsteer_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_tire_pres_f8(),
|
||||
model_data->l_04_i_gdcomac_tire_pres_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_onjax_l1(), model_data->l_04_i_gdcomac_onjax_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_contdep_f8(), model_data->l_04_i_gdcomac_contdep_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_thetag_f8(), model_data->l_04_i_gdcomac_thetag_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_phig_f8(), model_data->l_04_i_gdcomac_phig_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_rwyrgh_i2(), model_data->l_04_i_gdcomac_rwyrgh_i2);
|
||||
assign_value_get(data.l_04_i_gdcomac_rwyhdg_f8(), model_data->l_04_i_gdcomac_rwyhdg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_reset_braketemp_l1(),
|
||||
model_data->l_04_i_gdcomac_reset_braketemp_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_reset_tirepress_l1(),
|
||||
model_data->l_04_i_gdcomac_reset_tirepress_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_temp_c_f8(), model_data->l_04_i_gdcomac_temp_c_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_brake_temp_f8(),
|
||||
model_data->l_04_i_gdcomac_brake_temp_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_tire_tburst_l1(),
|
||||
model_data->l_04_i_gdcomac_tire_tburst_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_tire_tflat_l1(),
|
||||
model_data->l_04_i_gdcomac_tire_tflat_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_brk_reset_tpres_l1(),
|
||||
model_data->l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_rcon_ci_f8(), model_data->l_04_i_gdcomac_rcon_ci_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_pb_towforce_f8(),
|
||||
model_data->l_04_i_gdcomac_pb_towforce_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_gsteer_state_i4(),
|
||||
model_data->l_04_i_gdcomac_gsteer_state_i4);
|
||||
assign_value_get(data.l_04_i_gdcomac_trim_active_l1(),
|
||||
model_data->l_04_i_gdcomac_trim_active_l1);
|
||||
assign_value_get(data.l_04_i_gdcomac_phi_deg_f8(), model_data->l_04_i_gdcomac_phi_deg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_theta_deg_f8(),
|
||||
model_data->l_04_i_gdcomac_theta_deg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_psi_deg_f8(), model_data->l_04_i_gdcomac_psi_deg_f8);
|
||||
assign_value_get(data.l_04_i_gdcomac_resetint_l1(), model_data->l_04_i_gdcomac_resetint_l1);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void setData(T *model_data)
|
||||
{
|
||||
if (model_data == nullptr)
|
||||
return;
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_frz_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_chocks_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_alt_agl_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_frzflt_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_p_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_q_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_r_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_ug_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_vg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_wg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_blcg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_bscg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_wlcg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_pb_active_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_brake_torq_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_gear_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_gsteer_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_tire_pres_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_onjax_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_contdep_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_thetag_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_phig_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_rwyrgh_i2);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_rwyhdg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_reset_braketemp_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_reset_tirepress_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_temp_c_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_brake_temp_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_tire_tburst_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_tire_tflat_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_rcon_ci_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_pb_towforce_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_gsteer_state_i4);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_trim_active_l1);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_phi_deg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_theta_deg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_psi_deg_f8);
|
||||
ASSIGN_VALUE_SET(l_04_i_gdcomac_resetint_l1);
|
||||
// if (model_data == nullptr)
|
||||
// return;
|
||||
// clearOutData();
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_frz_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_chocks_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_alt_agl_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_frzflt_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_p_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_q_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_r_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_ug_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_vg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_wg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_blcg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_bscg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_wlcg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_pb_active_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_brake_torq_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_gear_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_gsteer_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_tire_pres_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_onjax_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_contdep_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_thetag_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_phig_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_rwyrgh_i2);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_rwyhdg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_reset_braketemp_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_reset_tirepress_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_temp_c_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_brake_temp_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_tire_tburst_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_tire_tflat_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_rcon_ci_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_pb_towforce_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_gsteer_state_i4);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_trim_active_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_phi_deg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_theta_deg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_psi_deg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_i_gdcomac_resetint_l1);
|
||||
// sendOutData();
|
||||
}
|
||||
|
||||
private:
|
||||
XNSim::ATA04::GroundHandling_input data;
|
||||
};
|
||||
private:
|
||||
XNSim::C909::ATA04::GroundHandling_input data;
|
||||
XNSim::C909::ATA04::GroundHandling_input out_data;
|
||||
};
|
||||
|
||||
class GroundHandling_output_Interface : public XNDDSInterface
|
||||
{
|
||||
public:
|
||||
explicit GroundHandling_output_Interface();
|
||||
class GroundHandling_output_Interface final : public XNDDSInterface
|
||||
{
|
||||
public:
|
||||
GroundHandling_output_Interface();
|
||||
virtual ~GroundHandling_output_Interface();
|
||||
void outputDataListener(const XNSim::ATA04::GroundHandling_output &output);
|
||||
|
||||
private:
|
||||
XNSim::ATA04::GroundHandling_output data;
|
||||
};
|
||||
|
||||
class GroundHandling_heartbeat_Interface : public XNDDSInterface
|
||||
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelId) override;
|
||||
void outputDataListener(const XNSim::C909::ATA04::GroundHandling_output &output);
|
||||
virtual void clearOutData() override;
|
||||
virtual void sendOutData() override;
|
||||
template <typename T>
|
||||
void getData(T *model_data)
|
||||
{
|
||||
public:
|
||||
explicit GroundHandling_heartbeat_Interface();
|
||||
virtual ~GroundHandling_heartbeat_Interface();
|
||||
void heartbeatListener(const XNSim::ATA04::GroundHandling_heartbeat &heartbeat);
|
||||
// if (model_data == nullptr)
|
||||
// return;
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_frz_l1);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_ac_on_ground_l1);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_ac_stationary_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_alt_tire_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_zcg_to_tire_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_fxb_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_fyb_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_fzb_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_mxb_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_myb_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_mzb_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_fygs_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_mzgs_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_mu_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_dstroke_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_sr_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_sy_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_sx_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_xft_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_yft_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_zft_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_distngrxcg_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_distmgrxcg_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_distmgrzcg_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_tire_vel_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_tire_burst_l1);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_tire_temp_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_wow_l1);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_utirew_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_vtirew_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_whl_omega_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_dstruc_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_wor_par_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_nd_f8);
|
||||
// ASSIGN_VALUE_GET(l_04_o_gdcomac_vczt_f8);
|
||||
}
|
||||
|
||||
private:
|
||||
XNSim::ATA04::GroundHandling_heartbeat data;
|
||||
};
|
||||
} // namespace ATA04
|
||||
} // namespace XNSim
|
||||
template <typename T>
|
||||
void setData(T *model_data)
|
||||
{
|
||||
// if (model_data == nullptr)
|
||||
// return;
|
||||
// clearOutData();
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_frz_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_ac_on_ground_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_ac_stationary_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_alt_tire_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_zcg_to_tire_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_fxb_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_fyb_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_fzb_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_mxb_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_myb_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_mzb_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_fygs_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_mzgs_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_mu_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_dstroke_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_sr_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_sy_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_sx_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_xft_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_yft_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_zft_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_distngrxcg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_distmgrxcg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_distmgrzcg_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_tire_vel_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_tire_burst_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_tire_temp_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_wow_l1);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_utirew_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_vtirew_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_whl_omega_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_dstruc_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_wor_par_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_nd_f8);
|
||||
// ASSIGN_VALUE_SET(l_04_o_gdcomac_vczt_f8);
|
||||
// sendOutData();
|
||||
}
|
||||
|
||||
private:
|
||||
XNSim::C909::ATA04::GroundHandling_output data;
|
||||
XNSim::C909::ATA04::GroundHandling_output out_data;
|
||||
};
|
||||
|
||||
class GroundHandling_heartbeat_Interface final : public XNDDSInterface
|
||||
{
|
||||
public:
|
||||
GroundHandling_heartbeat_Interface();
|
||||
virtual ~GroundHandling_heartbeat_Interface();
|
||||
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelId) override;
|
||||
void heartbeatListener(const XNSim::C909::ATA04::GroundHandling_heartbeat &heartbeat);
|
||||
virtual void clearOutData() override;
|
||||
virtual void sendOutData() override;
|
||||
template <typename T>
|
||||
void getData(T *model_data)
|
||||
{
|
||||
// if (model_data == nullptr)
|
||||
// return;
|
||||
// ASSIGN_VALUE_GET(groundhandling_model_heartbeat);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void setData(T *model_data)
|
||||
{
|
||||
// if (model_data == nullptr)
|
||||
// return;
|
||||
// clearOutData();
|
||||
// ASSIGN_VALUE_SET(groundhandling_model_heartbeat);
|
||||
// sendOutData();
|
||||
}
|
||||
|
||||
private:
|
||||
XNSim::C909::ATA04::GroundHandling_heartbeat data;
|
||||
XNSim::C909::ATA04::GroundHandling_heartbeat out_data;
|
||||
};
|
||||
} // namespace XNSim::C909::ATA04
|
||||
|
@ -32,15 +32,16 @@ using InstanceHandle_t = eprosima::fastdds::rtps::InstanceHandle_t;
|
||||
using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t;
|
||||
|
||||
namespace XNSim {
|
||||
namespace C909 {
|
||||
namespace ATA04 {
|
||||
GroundHandling_inputPubSubType::GroundHandling_inputPubSubType()
|
||||
{
|
||||
set_name("XNSim::ATA04::GroundHandling_input");
|
||||
uint32_t type_size = XNSim_ATA04_GroundHandling_input_max_cdr_typesize;
|
||||
set_name("XNSim::C909::ATA04::GroundHandling_input");
|
||||
uint32_t type_size = XNSim_C909_ATA04_GroundHandling_input_max_cdr_typesize;
|
||||
type_size += static_cast<uint32_t>(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */
|
||||
max_serialized_type_size = type_size + 4; /*encapsulation*/
|
||||
is_compute_key_provided = false;
|
||||
uint32_t key_length = XNSim_ATA04_GroundHandling_input_max_key_cdr_typesize > 16 ? XNSim_ATA04_GroundHandling_input_max_key_cdr_typesize : 16;
|
||||
uint32_t key_length = XNSim_C909_ATA04_GroundHandling_input_max_key_cdr_typesize > 16 ? XNSim_C909_ATA04_GroundHandling_input_max_key_cdr_typesize : 16;
|
||||
key_buffer_ = reinterpret_cast<unsigned char*>(malloc(key_length));
|
||||
memset(key_buffer_, 0, key_length);
|
||||
}
|
||||
@ -184,13 +185,13 @@ namespace XNSim {
|
||||
|
||||
// Object that manages the raw buffer.
|
||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(key_buffer_),
|
||||
XNSim_ATA04_GroundHandling_input_max_key_cdr_typesize);
|
||||
XNSim_C909_ATA04_GroundHandling_input_max_key_cdr_typesize);
|
||||
|
||||
// Object that serializes the data.
|
||||
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv2);
|
||||
ser.set_encoding_flag(eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR2);
|
||||
eprosima::fastcdr::serialize_key(ser, *p_type);
|
||||
if (force_md5 || XNSim_ATA04_GroundHandling_input_max_key_cdr_typesize > 16)
|
||||
if (force_md5 || XNSim_C909_ATA04_GroundHandling_input_max_key_cdr_typesize > 16)
|
||||
{
|
||||
md5_.init();
|
||||
md5_.update(key_buffer_, static_cast<unsigned int>(ser.get_serialized_data_length()));
|
||||
@ -217,12 +218,12 @@ namespace XNSim {
|
||||
|
||||
GroundHandling_outputPubSubType::GroundHandling_outputPubSubType()
|
||||
{
|
||||
set_name("XNSim::ATA04::GroundHandling_output");
|
||||
uint32_t type_size = XNSim_ATA04_GroundHandling_output_max_cdr_typesize;
|
||||
set_name("XNSim::C909::ATA04::GroundHandling_output");
|
||||
uint32_t type_size = XNSim_C909_ATA04_GroundHandling_output_max_cdr_typesize;
|
||||
type_size += static_cast<uint32_t>(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */
|
||||
max_serialized_type_size = type_size + 4; /*encapsulation*/
|
||||
is_compute_key_provided = false;
|
||||
uint32_t key_length = XNSim_ATA04_GroundHandling_output_max_key_cdr_typesize > 16 ? XNSim_ATA04_GroundHandling_output_max_key_cdr_typesize : 16;
|
||||
uint32_t key_length = XNSim_C909_ATA04_GroundHandling_output_max_key_cdr_typesize > 16 ? XNSim_C909_ATA04_GroundHandling_output_max_key_cdr_typesize : 16;
|
||||
key_buffer_ = reinterpret_cast<unsigned char*>(malloc(key_length));
|
||||
memset(key_buffer_, 0, key_length);
|
||||
}
|
||||
@ -366,13 +367,13 @@ namespace XNSim {
|
||||
|
||||
// Object that manages the raw buffer.
|
||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(key_buffer_),
|
||||
XNSim_ATA04_GroundHandling_output_max_key_cdr_typesize);
|
||||
XNSim_C909_ATA04_GroundHandling_output_max_key_cdr_typesize);
|
||||
|
||||
// Object that serializes the data.
|
||||
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv2);
|
||||
ser.set_encoding_flag(eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR2);
|
||||
eprosima::fastcdr::serialize_key(ser, *p_type);
|
||||
if (force_md5 || XNSim_ATA04_GroundHandling_output_max_key_cdr_typesize > 16)
|
||||
if (force_md5 || XNSim_C909_ATA04_GroundHandling_output_max_key_cdr_typesize > 16)
|
||||
{
|
||||
md5_.init();
|
||||
md5_.update(key_buffer_, static_cast<unsigned int>(ser.get_serialized_data_length()));
|
||||
@ -399,12 +400,12 @@ namespace XNSim {
|
||||
|
||||
GroundHandling_heartbeatPubSubType::GroundHandling_heartbeatPubSubType()
|
||||
{
|
||||
set_name("XNSim::ATA04::GroundHandling_heartbeat");
|
||||
uint32_t type_size = XNSim_ATA04_GroundHandling_heartbeat_max_cdr_typesize;
|
||||
set_name("XNSim::C909::ATA04::GroundHandling_heartbeat");
|
||||
uint32_t type_size = XNSim_C909_ATA04_GroundHandling_heartbeat_max_cdr_typesize;
|
||||
type_size += static_cast<uint32_t>(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */
|
||||
max_serialized_type_size = type_size + 4; /*encapsulation*/
|
||||
is_compute_key_provided = false;
|
||||
uint32_t key_length = XNSim_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize > 16 ? XNSim_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize : 16;
|
||||
uint32_t key_length = XNSim_C909_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize > 16 ? XNSim_C909_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize : 16;
|
||||
key_buffer_ = reinterpret_cast<unsigned char*>(malloc(key_length));
|
||||
memset(key_buffer_, 0, key_length);
|
||||
}
|
||||
@ -548,13 +549,13 @@ namespace XNSim {
|
||||
|
||||
// Object that manages the raw buffer.
|
||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(key_buffer_),
|
||||
XNSim_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize);
|
||||
XNSim_C909_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize);
|
||||
|
||||
// Object that serializes the data.
|
||||
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv2);
|
||||
ser.set_encoding_flag(eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR2);
|
||||
eprosima::fastcdr::serialize_key(ser, *p_type);
|
||||
if (force_md5 || XNSim_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize > 16)
|
||||
if (force_md5 || XNSim_C909_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize > 16)
|
||||
{
|
||||
md5_.init();
|
||||
md5_.update(key_buffer_, static_cast<unsigned int>(ser.get_serialized_data_length()));
|
||||
@ -581,6 +582,8 @@ namespace XNSim {
|
||||
|
||||
} // namespace ATA04
|
||||
|
||||
} // namespace C909
|
||||
|
||||
} // namespace XNSim
|
||||
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||
|
||||
#include <fastdds/dds/core/policy/QosPolicies.hpp>
|
||||
#include <fastdds/dds/topic/TopicDataType.hpp>
|
||||
@ -39,6 +39,8 @@
|
||||
|
||||
namespace XNSim
|
||||
{
|
||||
namespace C909
|
||||
{
|
||||
namespace ATA04
|
||||
{
|
||||
|
||||
@ -285,7 +287,8 @@ namespace XNSim
|
||||
|
||||
};
|
||||
} // namespace ATA04
|
||||
} // namespace C909
|
||||
} // namespace XNSim
|
||||
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
using namespace eprosima::fastdds::dds::xtypes;
|
||||
|
||||
namespace XNSim {
|
||||
namespace C909 {
|
||||
namespace ATA04 {
|
||||
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
|
||||
void register_GroundHandling_input_type_identifier(
|
||||
@ -48,12 +49,12 @@ void register_GroundHandling_input_type_identifier(
|
||||
ReturnCode_t return_code_GroundHandling_input {eprosima::fastdds::dds::RETCODE_OK};
|
||||
return_code_GroundHandling_input =
|
||||
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
|
||||
"XNSim::ATA04::GroundHandling_input", type_ids_GroundHandling_input);
|
||||
"XNSim::C909::ATA04::GroundHandling_input", type_ids_GroundHandling_input);
|
||||
if (eprosima::fastdds::dds::RETCODE_OK != return_code_GroundHandling_input)
|
||||
{
|
||||
StructTypeFlag struct_flags_GroundHandling_input = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
|
||||
false, false);
|
||||
QualifiedTypeName type_name_GroundHandling_input = "XNSim::ATA04::GroundHandling_input";
|
||||
QualifiedTypeName type_name_GroundHandling_input = "XNSim::C909::ATA04::GroundHandling_input";
|
||||
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_GroundHandling_input;
|
||||
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_GroundHandling_input;
|
||||
CompleteTypeDetail detail_GroundHandling_input = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_GroundHandling_input, ann_custom_GroundHandling_input, type_name_GroundHandling_input.to_string());
|
||||
@ -2058,7 +2059,7 @@ void register_GroundHandling_input_type_identifier(
|
||||
TypeObjectUtils::build_and_register_struct_type_object(struct_type_GroundHandling_input, type_name_GroundHandling_input.to_string(), type_ids_GroundHandling_input))
|
||||
{
|
||||
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
|
||||
"XNSim::ATA04::GroundHandling_input already registered in TypeObjectRegistry for a different type.");
|
||||
"XNSim::C909::ATA04::GroundHandling_input already registered in TypeObjectRegistry for a different type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2070,12 +2071,12 @@ void register_GroundHandling_output_type_identifier(
|
||||
ReturnCode_t return_code_GroundHandling_output {eprosima::fastdds::dds::RETCODE_OK};
|
||||
return_code_GroundHandling_output =
|
||||
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
|
||||
"XNSim::ATA04::GroundHandling_output", type_ids_GroundHandling_output);
|
||||
"XNSim::C909::ATA04::GroundHandling_output", type_ids_GroundHandling_output);
|
||||
if (eprosima::fastdds::dds::RETCODE_OK != return_code_GroundHandling_output)
|
||||
{
|
||||
StructTypeFlag struct_flags_GroundHandling_output = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
|
||||
false, false);
|
||||
QualifiedTypeName type_name_GroundHandling_output = "XNSim::ATA04::GroundHandling_output";
|
||||
QualifiedTypeName type_name_GroundHandling_output = "XNSim::C909::ATA04::GroundHandling_output";
|
||||
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_GroundHandling_output;
|
||||
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_GroundHandling_output;
|
||||
CompleteTypeDetail detail_GroundHandling_output = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_GroundHandling_output, ann_custom_GroundHandling_output, type_name_GroundHandling_output.to_string());
|
||||
@ -4292,7 +4293,7 @@ void register_GroundHandling_output_type_identifier(
|
||||
TypeObjectUtils::build_and_register_struct_type_object(struct_type_GroundHandling_output, type_name_GroundHandling_output.to_string(), type_ids_GroundHandling_output))
|
||||
{
|
||||
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
|
||||
"XNSim::ATA04::GroundHandling_output already registered in TypeObjectRegistry for a different type.");
|
||||
"XNSim::C909::ATA04::GroundHandling_output already registered in TypeObjectRegistry for a different type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4304,12 +4305,12 @@ void register_GroundHandling_heartbeat_type_identifier(
|
||||
ReturnCode_t return_code_GroundHandling_heartbeat {eprosima::fastdds::dds::RETCODE_OK};
|
||||
return_code_GroundHandling_heartbeat =
|
||||
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
|
||||
"XNSim::ATA04::GroundHandling_heartbeat", type_ids_GroundHandling_heartbeat);
|
||||
"XNSim::C909::ATA04::GroundHandling_heartbeat", type_ids_GroundHandling_heartbeat);
|
||||
if (eprosima::fastdds::dds::RETCODE_OK != return_code_GroundHandling_heartbeat)
|
||||
{
|
||||
StructTypeFlag struct_flags_GroundHandling_heartbeat = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
|
||||
false, false);
|
||||
QualifiedTypeName type_name_GroundHandling_heartbeat = "XNSim::ATA04::GroundHandling_heartbeat";
|
||||
QualifiedTypeName type_name_GroundHandling_heartbeat = "XNSim::C909::ATA04::GroundHandling_heartbeat";
|
||||
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_GroundHandling_heartbeat;
|
||||
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_GroundHandling_heartbeat;
|
||||
CompleteTypeDetail detail_GroundHandling_heartbeat = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_GroundHandling_heartbeat, ann_custom_GroundHandling_heartbeat, type_name_GroundHandling_heartbeat.to_string());
|
||||
@ -4364,12 +4365,14 @@ void register_GroundHandling_heartbeat_type_identifier(
|
||||
TypeObjectUtils::build_and_register_struct_type_object(struct_type_GroundHandling_heartbeat, type_name_GroundHandling_heartbeat.to_string(), type_ids_GroundHandling_heartbeat))
|
||||
{
|
||||
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
|
||||
"XNSim::ATA04::GroundHandling_heartbeat already registered in TypeObjectRegistry for a different type.");
|
||||
"XNSim::C909::ATA04::GroundHandling_heartbeat already registered in TypeObjectRegistry for a different type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ATA04
|
||||
|
||||
} // namespace C909
|
||||
|
||||
} // namespace XNSim
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
* This file was generated by the tool fastddsgen.
|
||||
*/
|
||||
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_TYPE_OBJECT_SUPPORT_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_TYPE_OBJECT_SUPPORT_HPP
|
||||
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_TYPE_OBJECT_SUPPORT_HPP
|
||||
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_TYPE_OBJECT_SUPPORT_HPP
|
||||
|
||||
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
|
||||
|
||||
namespace XNSim {
|
||||
namespace C909 {
|
||||
namespace ATA04 {
|
||||
/**
|
||||
* @brief Register GroundHandling_input related TypeIdentifier.
|
||||
@ -80,9 +81,11 @@ eProsima_user_DllExport void register_GroundHandling_heartbeat_type_identifier(
|
||||
|
||||
} // namespace ATA04
|
||||
|
||||
} // namespace C909
|
||||
|
||||
} // namespace XNSim
|
||||
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
|
||||
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_TYPE_OBJECT_SUPPORT_HPP
|
||||
#endif // FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_TYPE_OBJECT_SUPPORT_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user