地操模型更新完成
This commit is contained in:
parent
cfbe71d49d
commit
1cb2ae1419
@ -1,90 +1,93 @@
|
|||||||
module XNSim
|
module XNSim
|
||||||
{
|
{
|
||||||
module ATA04
|
module C909
|
||||||
{
|
{
|
||||||
struct GroundHandling_input
|
module ATA04
|
||||||
{
|
{
|
||||||
@optional char l_04_i_gdcomac_frz_l1;
|
struct GroundHandling_input
|
||||||
@optional char l_04_i_gdcomac_chocks_l1;
|
{
|
||||||
@optional double l_04_i_gdcomac_alt_agl_f8;
|
@optional char l_04_i_gdcomac_frz_l1;
|
||||||
@optional char l_04_i_gdcomac_frzflt_l1;
|
@optional char l_04_i_gdcomac_chocks_l1;
|
||||||
@optional double l_04_i_gdcomac_p_f8;
|
@optional double l_04_i_gdcomac_alt_agl_f8;
|
||||||
@optional double l_04_i_gdcomac_q_f8;
|
@optional char l_04_i_gdcomac_frzflt_l1;
|
||||||
@optional double l_04_i_gdcomac_r_f8;
|
@optional double l_04_i_gdcomac_p_f8;
|
||||||
@optional double l_04_i_gdcomac_ug_f8;
|
@optional double l_04_i_gdcomac_q_f8;
|
||||||
@optional double l_04_i_gdcomac_vg_f8;
|
@optional double l_04_i_gdcomac_r_f8;
|
||||||
@optional double l_04_i_gdcomac_wg_f8;
|
@optional double l_04_i_gdcomac_ug_f8;
|
||||||
@optional double l_04_i_gdcomac_blcg_f8;
|
@optional double l_04_i_gdcomac_vg_f8;
|
||||||
@optional double l_04_i_gdcomac_bscg_f8;
|
@optional double l_04_i_gdcomac_wg_f8;
|
||||||
@optional double l_04_i_gdcomac_wlcg_f8;
|
@optional double l_04_i_gdcomac_blcg_f8;
|
||||||
@optional char l_04_i_gdcomac_pb_active_l1;
|
@optional double l_04_i_gdcomac_bscg_f8;
|
||||||
@optional double l_04_i_gdcomac_brake_torq_f8[3][2];
|
@optional double l_04_i_gdcomac_wlcg_f8;
|
||||||
@optional double l_04_i_gdcomac_gear_f8[3];
|
@optional char l_04_i_gdcomac_pb_active_l1;
|
||||||
@optional double l_04_i_gdcomac_gsteer_f8[10];
|
@optional double l_04_i_gdcomac_brake_torq_f8[3][2];
|
||||||
@optional double l_04_i_gdcomac_tire_pres_f8[3][2];
|
@optional double l_04_i_gdcomac_gear_f8[3];
|
||||||
@optional char l_04_i_gdcomac_onjax_l1;
|
@optional double l_04_i_gdcomac_gsteer_f8[10];
|
||||||
@optional double l_04_i_gdcomac_contdep_f8[7];
|
@optional double l_04_i_gdcomac_tire_pres_f8[3][2];
|
||||||
@optional double l_04_i_gdcomac_thetag_f8;
|
@optional char l_04_i_gdcomac_onjax_l1;
|
||||||
@optional double l_04_i_gdcomac_phig_f8;
|
@optional double l_04_i_gdcomac_contdep_f8[7];
|
||||||
@optional long l_04_i_gdcomac_rwyrgh_i2;
|
@optional double l_04_i_gdcomac_thetag_f8;
|
||||||
@optional double l_04_i_gdcomac_rwyhdg_f8;
|
@optional double l_04_i_gdcomac_phig_f8;
|
||||||
@optional char l_04_i_gdcomac_reset_braketemp_l1;
|
@optional long l_04_i_gdcomac_rwyrgh_i2;
|
||||||
@optional char l_04_i_gdcomac_reset_tirepress_l1;
|
@optional double l_04_i_gdcomac_rwyhdg_f8;
|
||||||
@optional double l_04_i_gdcomac_temp_c_f8;
|
@optional char l_04_i_gdcomac_reset_braketemp_l1;
|
||||||
@optional double l_04_i_gdcomac_brake_temp_f8[3][2];
|
@optional char l_04_i_gdcomac_reset_tirepress_l1;
|
||||||
@optional char l_04_i_gdcomac_tire_tburst_l1[3][2];
|
@optional double l_04_i_gdcomac_temp_c_f8;
|
||||||
@optional char l_04_i_gdcomac_tire_tflat_l1[3][2];
|
@optional double l_04_i_gdcomac_brake_temp_f8[3][2];
|
||||||
@optional char l_04_i_gdcomac_brk_reset_tpres_l1;
|
@optional char l_04_i_gdcomac_tire_tburst_l1[3][2];
|
||||||
@optional double l_04_i_gdcomac_rcon_ci_f8[14];
|
@optional char l_04_i_gdcomac_tire_tflat_l1[3][2];
|
||||||
@optional double l_04_i_gdcomac_pb_towforce_f8;
|
@optional char l_04_i_gdcomac_brk_reset_tpres_l1;
|
||||||
@optional long l_04_i_gdcomac_gsteer_state_i4;
|
@optional double l_04_i_gdcomac_rcon_ci_f8[14];
|
||||||
@optional char l_04_i_gdcomac_trim_active_l1;
|
@optional double l_04_i_gdcomac_pb_towforce_f8;
|
||||||
@optional double l_04_i_gdcomac_phi_deg_f8;
|
@optional long l_04_i_gdcomac_gsteer_state_i4;
|
||||||
@optional double l_04_i_gdcomac_theta_deg_f8;
|
@optional char l_04_i_gdcomac_trim_active_l1;
|
||||||
@optional double l_04_i_gdcomac_psi_deg_f8;
|
@optional double l_04_i_gdcomac_phi_deg_f8;
|
||||||
@optional char l_04_i_gdcomac_resetint_l1;
|
@optional double l_04_i_gdcomac_theta_deg_f8;
|
||||||
};
|
@optional double l_04_i_gdcomac_psi_deg_f8;
|
||||||
struct GroundHandling_output
|
@optional char l_04_i_gdcomac_resetint_l1;
|
||||||
{
|
};
|
||||||
@optional char l_04_o_gdcomac_frz_l1;
|
struct GroundHandling_output
|
||||||
@optional char l_04_o_gdcomac_ac_on_ground_l1;
|
{
|
||||||
@optional double l_04_o_gdcomac_ac_stationary_f8;
|
@optional char l_04_o_gdcomac_frz_l1;
|
||||||
@optional double l_04_o_gdcomac_alt_tire_f8;
|
@optional char l_04_o_gdcomac_ac_on_ground_l1;
|
||||||
@optional double l_04_o_gdcomac_zcg_to_tire_f8;
|
@optional double l_04_o_gdcomac_ac_stationary_f8;
|
||||||
@optional double l_04_o_gdcomac_fxb_f8;
|
@optional double l_04_o_gdcomac_alt_tire_f8;
|
||||||
@optional double l_04_o_gdcomac_fyb_f8;
|
@optional double l_04_o_gdcomac_zcg_to_tire_f8;
|
||||||
@optional double l_04_o_gdcomac_fzb_f8;
|
@optional double l_04_o_gdcomac_fxb_f8;
|
||||||
@optional double l_04_o_gdcomac_mxb_f8;
|
@optional double l_04_o_gdcomac_fyb_f8;
|
||||||
@optional double l_04_o_gdcomac_myb_f8;
|
@optional double l_04_o_gdcomac_fzb_f8;
|
||||||
@optional double l_04_o_gdcomac_mzb_f8;
|
@optional double l_04_o_gdcomac_mxb_f8;
|
||||||
@optional double l_04_o_gdcomac_fygs_f8[3];
|
@optional double l_04_o_gdcomac_myb_f8;
|
||||||
@optional double l_04_o_gdcomac_mzgs_f8[3];
|
@optional double l_04_o_gdcomac_mzb_f8;
|
||||||
@optional double l_04_o_gdcomac_mu_f8[3];
|
@optional double l_04_o_gdcomac_fygs_f8[3];
|
||||||
@optional double l_04_o_gdcomac_dstroke_f8[3];
|
@optional double l_04_o_gdcomac_mzgs_f8[3];
|
||||||
@optional double l_04_o_gdcomac_sr_f8[3][2];
|
@optional double l_04_o_gdcomac_mu_f8[3];
|
||||||
@optional double l_04_o_gdcomac_sy_f8[3][2];
|
@optional double l_04_o_gdcomac_dstroke_f8[3];
|
||||||
@optional double l_04_o_gdcomac_sx_f8[3][2];
|
@optional double l_04_o_gdcomac_sr_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_xft_f8[3];
|
@optional double l_04_o_gdcomac_sy_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_yft_f8[3];
|
@optional double l_04_o_gdcomac_sx_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_zft_f8[3];
|
@optional double l_04_o_gdcomac_xft_f8[3];
|
||||||
@optional double l_04_o_gdcomac_distngrxcg_f8;
|
@optional double l_04_o_gdcomac_yft_f8[3];
|
||||||
@optional double l_04_o_gdcomac_distmgrxcg_f8;
|
@optional double l_04_o_gdcomac_zft_f8[3];
|
||||||
@optional double l_04_o_gdcomac_distmgrzcg_f8;
|
@optional double l_04_o_gdcomac_distngrxcg_f8;
|
||||||
@optional double l_04_o_gdcomac_tire_vel_f8[3][2];
|
@optional double l_04_o_gdcomac_distmgrxcg_f8;
|
||||||
@optional char l_04_o_gdcomac_tire_burst_l1[3][2];
|
@optional double l_04_o_gdcomac_distmgrzcg_f8;
|
||||||
@optional double l_04_o_gdcomac_tire_temp_f8[3][2];
|
@optional double l_04_o_gdcomac_tire_vel_f8[3][2];
|
||||||
@optional char l_04_o_gdcomac_wow_l1;
|
@optional char l_04_o_gdcomac_tire_burst_l1[3][2];
|
||||||
@optional double l_04_o_gdcomac_utirew_f8[3][2];
|
@optional double l_04_o_gdcomac_tire_temp_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_vtirew_f8[3][2];
|
@optional char l_04_o_gdcomac_wow_l1;
|
||||||
@optional double l_04_o_gdcomac_whl_omega_f8[3][2];
|
@optional double l_04_o_gdcomac_utirew_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_dstruc_f8[6];
|
@optional double l_04_o_gdcomac_vtirew_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_wor_par_f8[3];
|
@optional double l_04_o_gdcomac_whl_omega_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_nd_f8[3];
|
@optional double l_04_o_gdcomac_dstruc_f8[6];
|
||||||
@optional double l_04_o_gdcomac_vczt_f8[3][2];
|
@optional double l_04_o_gdcomac_wor_par_f8[3];
|
||||||
};
|
@optional double l_04_o_gdcomac_nd_f8[3];
|
||||||
struct GroundHandling_heartbeat
|
@optional double l_04_o_gdcomac_vczt_f8[3][2];
|
||||||
{
|
};
|
||||||
long groundhandling_model_heartbeat;
|
struct GroundHandling_heartbeat
|
||||||
|
{
|
||||||
|
@optional long groundhandling_model_heartbeat;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "XNObject.h"
|
#include "XNFramework.h"
|
||||||
|
#include "XNDDSManager.h"
|
||||||
#include "XNByteArray.h"
|
#include "XNByteArray.h"
|
||||||
#include "XNTypeTraits.h"
|
#include "XNTypeTraits.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -19,7 +20,7 @@ public:
|
|||||||
* @brief 初始化
|
* @brief 初始化
|
||||||
* @param framework: 框架
|
* @param framework: 框架
|
||||||
*/
|
*/
|
||||||
virtual void Initialize(XNFrameworkPtr framework) = 0;
|
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelID) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 获取该接口的UDP包
|
* @brief 获取该接口的UDP包
|
||||||
@ -28,13 +29,17 @@ public:
|
|||||||
XNByteArray getUDPPackage();
|
XNByteArray getUDPPackage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief JSON前端获取指定变量的数据
|
* @brief 批量获取指定变量的数据
|
||||||
* @param varName: 变量名
|
* @param varNames: 变量名列表
|
||||||
* @param nameSize: 变量名大小
|
* @return: 变量名到数据的映射
|
||||||
* @param varData: 数据
|
|
||||||
* @param dataSize: 数据大小
|
|
||||||
*/
|
*/
|
||||||
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:
|
protected:
|
||||||
/**
|
/**
|
||||||
@ -153,7 +158,7 @@ protected:
|
|||||||
} else {
|
} else {
|
||||||
return std::to_string(0);
|
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) {
|
if (data) {
|
||||||
return getStringFromStdArray(data.value());
|
return getStringFromStdArray(data.value());
|
||||||
} else {
|
} else {
|
||||||
@ -164,6 +169,34 @@ protected:
|
|||||||
return std::string();
|
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前端
|
* @brief 获取指定数组变量的字符串数据,用于JSON前端
|
||||||
* @param data: 数据
|
* @param data: 数据
|
||||||
@ -185,13 +218,69 @@ protected:
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
/**
|
||||||
* @brief 通过变量名获取指定的数据
|
* @brief 通过字符串数据设置指定数组变量,用于JSON前端
|
||||||
* @param varName: 变量名
|
* @param data: 数据
|
||||||
* @return: 数据(字符串格式)
|
* @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:
|
protected:
|
||||||
struct ByteArrayFunc {
|
struct ByteArrayFunc {
|
||||||
@ -200,15 +289,20 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_map<std::string, std::function<std::string()>> getDataFunction;
|
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::vector<ByteArrayFunc> getByteArrayFunction;
|
||||||
std::unordered_map<std::string, std::function<void(XNByteArray)>> setByteArrayFunction;
|
std::unordered_map<std::string, std::function<void(XNByteArray)>> setByteArrayFunction;
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
uint8_t header[5]{}; // 固定大小的头部
|
uint8_t header[5]{}; // 固定大小的头部
|
||||||
size_t headerSize = 0;
|
size_t headerSize = 5;
|
||||||
|
FAST_DDS_MACRO::DataWriter *dataWriter;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAP_DATA_FUNC(NAME) \
|
#define MAP_DATA_FUNC(NAME) \
|
||||||
getDataFunction[#NAME] = [this]() { return getString(data.NAME()); }; \
|
getDataFunction[#NAME] = [this]() { return getString(data.NAME()); }; \
|
||||||
|
setDataFunction[#NAME] = [this](std::string value) { \
|
||||||
|
setDataFromString(out_data.NAME(), value); \
|
||||||
|
}; \
|
||||||
getByteArrayFunction.push_back( \
|
getByteArrayFunction.push_back( \
|
||||||
{[this]() { return getByteArray(data.NAME()); }, getTypeSize<decltype(data.NAME())>()}); \
|
{[this]() { return getByteArray(data.NAME()); }, getTypeSize<decltype(data.NAME())>()}); \
|
||||||
setByteArrayFunction[#NAME] = [this](XNByteArray byteArray) { \
|
setByteArrayFunction[#NAME] = [this](XNByteArray byteArray) { \
|
||||||
@ -220,13 +314,13 @@ protected:
|
|||||||
auto temp = data.NAME().value(); \
|
auto temp = data.NAME().value(); \
|
||||||
if constexpr (std::is_arithmetic_v<decltype(temp)>) { \
|
if constexpr (std::is_arithmetic_v<decltype(temp)>) { \
|
||||||
model_data->NAME = temp; \
|
model_data->NAME = temp; \
|
||||||
} else if constexpr (std::is_std_array_v<decltype(temp)>) { \
|
} else if constexpr (is_std_array_v<decltype(temp)>) { \
|
||||||
size_t arraySize = std::tuple_size<decltype(temp)>::value; \
|
size_t arraySize = array_size_v<decltype(temp)>; \
|
||||||
for (size_t i = 0; i < arraySize; ++i) { \
|
for (size_t i = 0; i < arraySize; ++i) { \
|
||||||
if constexpr (std::is_arithmetic_v<decltype(temp[i])>) { \
|
if constexpr (std::is_arithmetic_v<decltype(temp[i])>) { \
|
||||||
model_data->NAME[i] = temp[i]; \
|
model_data->NAME[i] = temp[i]; \
|
||||||
} else if constexpr (std::is_std_array_v<decltype(temp[i])>) { \
|
} else if constexpr (is_std_array_v<decltype(temp[i])>) { \
|
||||||
size_t arraySize2 = std::tuple_size<decltype(temp[i])>::value; \
|
size_t arraySize2 = array_size_v<decltype(temp[i])>; \
|
||||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
for (size_t j = 0; j < arraySize2; ++j) { \
|
||||||
model_data->NAME[i][j] = temp[i][j]; \
|
model_data->NAME[i][j] = temp[i][j]; \
|
||||||
} \
|
} \
|
||||||
@ -236,19 +330,19 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define ASSIGN_VALUE_SET(NAME) \
|
#define ASSIGN_VALUE_SET(NAME) \
|
||||||
if constexpr (std::is_arithmetic_v<decltype(data.NAME())::type>) { \
|
if constexpr (std::is_arithmetic_v<decltype(out_data.NAME())::type>) { \
|
||||||
data.NAME(model_data->NAME); \
|
out_data.NAME(model_data->NAME); \
|
||||||
} else if constexpr (std::is_std_array_v<decltype(data.NAME())::type>) { \
|
} else if constexpr (is_std_array_v<decltype(out_data.NAME())::type>) { \
|
||||||
using thisType = typename decltype(data.NAME())::type; \
|
using thisType = typename decltype(out_data.NAME())::type; \
|
||||||
thisType temp; \
|
thisType temp; \
|
||||||
size_t arraySize1 = std::tuple_size<thisType>::value; \
|
size_t arraySize1 = array_size_v<thisType>; \
|
||||||
using subType = thisType::value_type; \
|
using subType = thisType::value_type; \
|
||||||
if constexpr (std::is_arithmetic_v<subType>) { \
|
if constexpr (std::is_arithmetic_v<subType>) { \
|
||||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||||
temp[i] = model_data->NAME[i]; \
|
temp[i] = model_data->NAME[i]; \
|
||||||
} \
|
} \
|
||||||
} else if constexpr (std::is_std_array_v<subType>) { \
|
} else if constexpr (is_std_array_v<subType>) { \
|
||||||
size_t arraySize2 = std::tuple_size<subType>::value; \
|
size_t arraySize2 = array_size_v<subType>; \
|
||||||
std::array<subType, arraySize1> temp; \
|
std::array<subType, arraySize1> temp; \
|
||||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
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>
|
template <typename T>
|
||||||
inline constexpr bool is_std_array_v = is_std_array<T>::value;
|
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>
|
template <typename T>
|
||||||
constexpr size_t getTypeSize()
|
constexpr size_t getTypeSize()
|
||||||
{
|
{
|
||||||
if constexpr (is_std_array_v<T>) {
|
if constexpr (is_std_array_v<T>) {
|
||||||
// 对于std::array,计算所有元素的总大小
|
// 对于std::array,计算所有元素的总大小
|
||||||
return getTypeSize<typename T::value_type>() * std::tuple_size<T>::value;
|
return getTypeSize<typename T::value_type>() * array_size_v<T>;
|
||||||
} else {
|
} else {
|
||||||
return sizeof(T);
|
return sizeof(T);
|
||||||
}
|
}
|
||||||
|
@ -4,23 +4,22 @@
|
|||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
void XNDDSInterface::getUDPPackage(uint8_t *buffer, size_t bufferSize)
|
XNByteArray XNDDSInterface::getUDPPackage()
|
||||||
{
|
{
|
||||||
if (bufferSize < MAX_UDP_PACKET_SIZE)
|
XNByteArray result;
|
||||||
return;
|
|
||||||
|
|
||||||
size_t currentPos = 0;
|
size_t currentPos = 0;
|
||||||
|
|
||||||
// 复制头部
|
// 复制头部
|
||||||
if (headerSize >= 5) {
|
if (headerSize >= 5) {
|
||||||
std::memcpy(buffer, header, 5);
|
result.append(header, 5);
|
||||||
currentPos = 5;
|
currentPos = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复制数据
|
// 复制数据
|
||||||
for (auto func : getByteArrayFunction) {
|
for (auto func : getByteArrayFunction) {
|
||||||
if (currentPos + func.size <= MAX_UDP_PACKET_SIZE) {
|
if (currentPos + func.size <= MAX_UDP_PACKET_SIZE) {
|
||||||
func.func(buffer + currentPos, func.size);
|
result.append(func.func());
|
||||||
currentPos += func.size;
|
currentPos += func.size;
|
||||||
} else {
|
} else {
|
||||||
break; // 超出最大包大小
|
break; // 超出最大包大小
|
||||||
@ -29,79 +28,38 @@ void XNDDSInterface::getUDPPackage(uint8_t *buffer, size_t bufferSize)
|
|||||||
|
|
||||||
// 更新包大小
|
// 更新包大小
|
||||||
if (currentPos >= 5) {
|
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;
|
std::unordered_map<std::string, std::string> result;
|
||||||
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::lock_guard<std::mutex> lock(mutex);
|
std::lock_guard<std::mutex> lock(mutex);
|
||||||
std::string result = it->second();
|
for (const auto &varName : varNames) {
|
||||||
|
auto it = getDataFunction.find(varName);
|
||||||
if (index1 < 0) {
|
if (it == getDataFunction.end()) {
|
||||||
return result;
|
continue;
|
||||||
|
}
|
||||||
|
result[varName] = it->second();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> list;
|
return result;
|
||||||
std::stringstream ss(result);
|
}
|
||||||
std::string item;
|
|
||||||
while (std::getline(ss, item, ',')) {
|
void XNDDSInterface::setDataByString(std::unordered_map<std::string, std::string> data)
|
||||||
list.push_back(item);
|
{
|
||||||
}
|
clearOutData();
|
||||||
|
for (const auto &[varName, value] : data) {
|
||||||
if (index1 >= static_cast<int>(list.size())) {
|
auto it = setDataFunction.find(varName);
|
||||||
std::cerr << "数组索引超出范围: " << varName << std::endl;
|
if (it == setDataFunction.end()) {
|
||||||
return std::string();
|
continue;
|
||||||
}
|
}
|
||||||
|
it->second(value);
|
||||||
if (index2 < 0) {
|
}
|
||||||
return list[index1];
|
sendOutData();
|
||||||
}
|
|
||||||
|
|
||||||
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];
|
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "XNObject.h"
|
#include "XNFramework.h"
|
||||||
|
#include "XNDDSManager.h"
|
||||||
#include "XNByteArray.h"
|
#include "XNByteArray.h"
|
||||||
#include "XNTypeTraits.h"
|
#include "XNTypeTraits.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -19,7 +20,7 @@ public:
|
|||||||
* @brief 初始化
|
* @brief 初始化
|
||||||
* @param framework: 框架
|
* @param framework: 框架
|
||||||
*/
|
*/
|
||||||
virtual void Initialize(XNFrameworkPtr framework) = 0;
|
virtual void Initialize(XNFrameworkPtr framework, uint32_t modelID) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 获取该接口的UDP包
|
* @brief 获取该接口的UDP包
|
||||||
@ -28,13 +29,17 @@ public:
|
|||||||
XNByteArray getUDPPackage();
|
XNByteArray getUDPPackage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief JSON前端获取指定变量的数据
|
* @brief 批量获取指定变量的数据
|
||||||
* @param varName: 变量名
|
* @param varNames: 变量名列表
|
||||||
* @param nameSize: 变量名大小
|
* @return: 变量名到数据的映射
|
||||||
* @param varData: 数据
|
|
||||||
* @param dataSize: 数据大小
|
|
||||||
*/
|
*/
|
||||||
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:
|
protected:
|
||||||
/**
|
/**
|
||||||
@ -153,7 +158,7 @@ protected:
|
|||||||
} else {
|
} else {
|
||||||
return std::to_string(0);
|
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) {
|
if (data) {
|
||||||
return getStringFromStdArray(data.value());
|
return getStringFromStdArray(data.value());
|
||||||
} else {
|
} else {
|
||||||
@ -164,6 +169,34 @@ protected:
|
|||||||
return std::string();
|
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前端
|
* @brief 获取指定数组变量的字符串数据,用于JSON前端
|
||||||
* @param data: 数据
|
* @param data: 数据
|
||||||
@ -185,13 +218,69 @@ protected:
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
/**
|
||||||
* @brief 通过变量名获取指定的数据
|
* @brief 通过字符串数据设置指定数组变量,用于JSON前端
|
||||||
* @param varName: 变量名
|
* @param data: 数据
|
||||||
* @return: 数据(字符串格式)
|
* @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:
|
protected:
|
||||||
struct ByteArrayFunc {
|
struct ByteArrayFunc {
|
||||||
@ -200,15 +289,20 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_map<std::string, std::function<std::string()>> getDataFunction;
|
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::vector<ByteArrayFunc> getByteArrayFunction;
|
||||||
std::unordered_map<std::string, std::function<void(XNByteArray)>> setByteArrayFunction;
|
std::unordered_map<std::string, std::function<void(XNByteArray)>> setByteArrayFunction;
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
uint8_t header[5]{}; // 固定大小的头部
|
uint8_t header[5]{}; // 固定大小的头部
|
||||||
size_t headerSize = 5;
|
size_t headerSize = 5;
|
||||||
|
FAST_DDS_MACRO::DataWriter *dataWriter;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAP_DATA_FUNC(NAME) \
|
#define MAP_DATA_FUNC(NAME) \
|
||||||
getDataFunction[#NAME] = [this]() { return getString(data.NAME()); }; \
|
getDataFunction[#NAME] = [this]() { return getString(data.NAME()); }; \
|
||||||
|
setDataFunction[#NAME] = [this](std::string value) { \
|
||||||
|
setDataFromString(out_data.NAME(), value); \
|
||||||
|
}; \
|
||||||
getByteArrayFunction.push_back( \
|
getByteArrayFunction.push_back( \
|
||||||
{[this]() { return getByteArray(data.NAME()); }, getTypeSize<decltype(data.NAME())>()}); \
|
{[this]() { return getByteArray(data.NAME()); }, getTypeSize<decltype(data.NAME())>()}); \
|
||||||
setByteArrayFunction[#NAME] = [this](XNByteArray byteArray) { \
|
setByteArrayFunction[#NAME] = [this](XNByteArray byteArray) { \
|
||||||
@ -220,13 +314,13 @@ protected:
|
|||||||
auto temp = data.NAME().value(); \
|
auto temp = data.NAME().value(); \
|
||||||
if constexpr (std::is_arithmetic_v<decltype(temp)>) { \
|
if constexpr (std::is_arithmetic_v<decltype(temp)>) { \
|
||||||
model_data->NAME = temp; \
|
model_data->NAME = temp; \
|
||||||
} else if constexpr (std::is_std_array_v<decltype(temp)>) { \
|
} else if constexpr (is_std_array_v<decltype(temp)>) { \
|
||||||
size_t arraySize = std::tuple_size<decltype(temp)>::value; \
|
size_t arraySize = array_size_v<decltype(temp)>; \
|
||||||
for (size_t i = 0; i < arraySize; ++i) { \
|
for (size_t i = 0; i < arraySize; ++i) { \
|
||||||
if constexpr (std::is_arithmetic_v<decltype(temp[i])>) { \
|
if constexpr (std::is_arithmetic_v<decltype(temp[i])>) { \
|
||||||
model_data->NAME[i] = temp[i]; \
|
model_data->NAME[i] = temp[i]; \
|
||||||
} else if constexpr (std::is_std_array_v<decltype(temp[i])>) { \
|
} else if constexpr (is_std_array_v<decltype(temp[i])>) { \
|
||||||
size_t arraySize2 = std::tuple_size<decltype(temp[i])>::value; \
|
size_t arraySize2 = array_size_v<decltype(temp[i])>; \
|
||||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
for (size_t j = 0; j < arraySize2; ++j) { \
|
||||||
model_data->NAME[i][j] = temp[i][j]; \
|
model_data->NAME[i][j] = temp[i][j]; \
|
||||||
} \
|
} \
|
||||||
@ -236,19 +330,19 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define ASSIGN_VALUE_SET(NAME) \
|
#define ASSIGN_VALUE_SET(NAME) \
|
||||||
if constexpr (std::is_arithmetic_v<decltype(data.NAME())::type>) { \
|
if constexpr (std::is_arithmetic_v<decltype(out_data.NAME())::type>) { \
|
||||||
data.NAME(model_data->NAME); \
|
out_data.NAME(model_data->NAME); \
|
||||||
} else if constexpr (std::is_std_array_v<decltype(data.NAME())::type>) { \
|
} else if constexpr (is_std_array_v<decltype(out_data.NAME())::type>) { \
|
||||||
using thisType = typename decltype(data.NAME())::type; \
|
using thisType = typename decltype(out_data.NAME())::type; \
|
||||||
thisType temp; \
|
thisType temp; \
|
||||||
size_t arraySize1 = std::tuple_size<thisType>::value; \
|
size_t arraySize1 = array_size_v<thisType>; \
|
||||||
using subType = thisType::value_type; \
|
using subType = thisType::value_type; \
|
||||||
if constexpr (std::is_arithmetic_v<subType>) { \
|
if constexpr (std::is_arithmetic_v<subType>) { \
|
||||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||||
temp[i] = model_data->NAME[i]; \
|
temp[i] = model_data->NAME[i]; \
|
||||||
} \
|
} \
|
||||||
} else if constexpr (std::is_std_array_v<subType>) { \
|
} else if constexpr (is_std_array_v<subType>) { \
|
||||||
size_t arraySize2 = std::tuple_size<subType>::value; \
|
size_t arraySize2 = array_size_v<subType>; \
|
||||||
std::array<subType, arraySize1> temp; \
|
std::array<subType, arraySize1> temp; \
|
||||||
for (size_t i = 0; i < arraySize1; ++i) { \
|
for (size_t i = 0; i < arraySize1; ++i) { \
|
||||||
for (size_t j = 0; j < arraySize2; ++j) { \
|
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>
|
template <typename T>
|
||||||
inline constexpr bool is_std_array_v = is_std_array<T>::value;
|
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>
|
template <typename T>
|
||||||
constexpr size_t getTypeSize()
|
constexpr size_t getTypeSize()
|
||||||
{
|
{
|
||||||
if constexpr (is_std_array_v<T>) {
|
if constexpr (is_std_array_v<T>) {
|
||||||
// 对于std::array,计算所有元素的总大小
|
// 对于std::array,计算所有元素的总大小
|
||||||
return getTypeSize<typename T::value_type>() * std::tuple_size<T>::value;
|
return getTypeSize<typename T::value_type>() * array_size_v<T>;
|
||||||
} else {
|
} else {
|
||||||
return sizeof(T);
|
return sizeof(T);
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
"cinttypes": "cpp",
|
"cinttypes": "cpp",
|
||||||
"typeindex": "cpp",
|
"typeindex": "cpp",
|
||||||
"typeinfo": "cpp",
|
"typeinfo": "cpp",
|
||||||
"variant": "cpp"
|
"variant": "cpp",
|
||||||
|
"fstream": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
project(XNGroundHandling LANGUAGES CXX)
|
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 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
@ -18,8 +15,5 @@ endif()
|
|||||||
# 添加 XNCore_PATH 下的 include 目录为包含目录
|
# 添加 XNCore_PATH 下的 include 目录为包含目录
|
||||||
include_directories(${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(XNGroundHandlingInterface)
|
||||||
add_subdirectory(XNGroundHandling)
|
add_subdirectory(XNGroundHandling)
|
||||||
|
@ -7,7 +7,6 @@ add_library(XNGroundHandling SHARED
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(XNGroundHandling PRIVATE
|
target_link_libraries(XNGroundHandling PRIVATE
|
||||||
Qt${QT_VERSION_MAJOR}::Core
|
|
||||||
${XNCore_PATH}/lib/libXNCore.so
|
${XNCore_PATH}/lib/libXNCore.so
|
||||||
XNGroundHandlingInterface)
|
XNGroundHandlingInterface)
|
||||||
|
|
||||||
|
@ -2,18 +2,10 @@
|
|||||||
#include "XNGroundHandling_p.h"
|
#include "XNGroundHandling_p.h"
|
||||||
#include <XNCore/XNModelManager.h>
|
#include <XNCore/XNModelManager.h>
|
||||||
#include <XNCore/XNDDSManager.h>
|
#include <XNCore/XNDDSManager.h>
|
||||||
#include <QMutexLocker>
|
|
||||||
|
|
||||||
XN_DLL_INITIALIZE(XNGroundHandling)
|
XN_MODEL_INITIALIZE(XNGroundHandling)
|
||||||
|
|
||||||
XN_REGISTER_PARTICIPANT_BEGIN(XNGroundHandling)
|
XNGroundHandling::XNGroundHandling() : XNModelObject(new XNGroundHandlingPrivate())
|
||||||
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)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,30 +13,27 @@ XNGroundHandling::~XNGroundHandling()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
XNGroundHandling::XNGroundHandling(XNGroundHandlingPrivate &dd, QObject *parent)
|
XNGroundHandling::XNGroundHandling(PrivateType *p) : XNModelObject(p)
|
||||||
: XNModelObject(dd, parent)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void XNGroundHandling::OnInitialize()
|
void XNGroundHandling::Initialize()
|
||||||
{
|
{
|
||||||
Q_D(XNGroundHandling);
|
T_D();
|
||||||
XNModelObject::OnInitialize();
|
XNModelObject::Initialize();
|
||||||
if (d->_dynamicLib) {
|
if (d->_dynamicLib) {
|
||||||
d->_fun = reinterpret_cast<FunctionType>(
|
d->_fun = (FunctionType)dlsym(d->_dynamicLib, d->_entryPointName.c_str());
|
||||||
d->_dynamicLib->resolve("_Z29SACSCGroundHandlingEntryPointP20ComacDataStructure_S"));
|
|
||||||
if (!d->_fun) {
|
if (!d->_fun) {
|
||||||
LOG_WARNING("Failed to resolve SACSCGroundHandlingEntry:%1",
|
LOG_WARNING("Failed to resolve SACSCGroundHandlingEntry");
|
||||||
d->_dynamicLib->errorString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//add other initial code here
|
//add other initial code here
|
||||||
}
|
}
|
||||||
|
|
||||||
void XNGroundHandling::OnPrepareForExecute()
|
void XNGroundHandling::PrepareForExecute()
|
||||||
{
|
{
|
||||||
Q_D(XNGroundHandling);
|
T_D();
|
||||||
XNModelObject::OnPrepareForExecute();
|
XNModelObject::PrepareForExecute();
|
||||||
//add your initial data code here
|
//add your initial data code here
|
||||||
d->_data.input_ground = new input_ground_S();
|
d->_data.input_ground = new input_ground_S();
|
||||||
d->_data.input_ground->l_04_i_gdcomac_brake_torq_f8 = new double *[3];
|
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++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
d->_data.output_ground->l_04_o_gdcomac_vczt_f8[i] = new double[2];
|
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()
|
void XNGroundHandling::StepUpdate()
|
||||||
{
|
{
|
||||||
Q_D(XNGroundHandling);
|
T_D();
|
||||||
XNModelObject::StepUpdate();
|
XNModelObject::StepUpdate();
|
||||||
if (d->_fun) {
|
if (d->_fun) {
|
||||||
//add your input code here
|
//add your input code here
|
||||||
QMutexLocker locker(&d->_mutex);
|
d->_inputInterface.getData(d->_data.input_ground);
|
||||||
d->_fun(&d->_data);
|
d->_fun(&d->_data);
|
||||||
|
d->_outputInterface.setData(d->_data.output_ground);
|
||||||
|
d->_heartbeatInterface.setData(&d->_data);
|
||||||
//add your output code here
|
//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
|
#pragma once
|
||||||
#include "XNGroundHandling_global.h"
|
#include "XNGroundHandling_global.h"
|
||||||
#include <XNCore/XNModelObject.h>
|
#include <XNCore/XNModelObject.h>
|
||||||
#include "../XNGroundHandlingInterface/XNGroundHandlingInterface.hpp"
|
|
||||||
|
|
||||||
struct XNGroundHandlingPrivate;
|
struct XNGroundHandlingPrivate;
|
||||||
|
|
||||||
@ -9,22 +8,17 @@ class XNGROUNDHANDLING_EXPORT XNGroundHandling : public XNModelObject
|
|||||||
{
|
{
|
||||||
XN_METATYPE(XNGroundHandling, XNModelObject)
|
XN_METATYPE(XNGroundHandling, XNModelObject)
|
||||||
XN_DECLARE_PRIVATE(XNGroundHandling)
|
XN_DECLARE_PRIVATE(XNGroundHandling)
|
||||||
XN_DECLARE_DDS()
|
|
||||||
public:
|
public:
|
||||||
explicit XNGroundHandling(QObject *parent = nullptr);
|
XNGroundHandling();
|
||||||
virtual ~XNGroundHandling();
|
virtual ~XNGroundHandling();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
XNGroundHandling(XNGroundHandlingPrivate &dd, QObject *parent = nullptr);
|
XNGroundHandling(PrivateType *p);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void Initialize() override;
|
virtual void Initialize() override;
|
||||||
virtual void PrepareForExecute() override;
|
virtual void PrepareForExecute() override;
|
||||||
|
|
||||||
public:
|
|
||||||
virtual void StepUpdate() override;
|
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
|
#ifndef XNGROUNDHANDLING_GLOBAL_H
|
||||||
#define XNGROUNDHANDLING_GLOBAL_H
|
#define XNGROUNDHANDLING_GLOBAL_H
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
|
||||||
|
|
||||||
#if defined(XNGROUNDHANDLING_LIBRARY)
|
#if defined(XNGROUNDHANDLING_LIBRARY)
|
||||||
#define XNGROUNDHANDLING_EXPORT Q_DECL_EXPORT
|
# define XNGROUNDHANDLING_EXPORT __attribute__((visibility("default")))
|
||||||
#else
|
#else
|
||||||
#define XNGROUNDHANDLING_EXPORT Q_DECL_IMPORT
|
# define XNGROUNDHANDLING_EXPORT __attribute__((visibility("hidden")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // XNGROUNDHANDLING_GLOBAL_H
|
#endif // XNGROUNDHANDLING_GLOBAL_H
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <XNCore/XNModelObject_p.h>
|
#include <XNCore/XNModelObject_p.h>
|
||||||
#include <DataModels/libSACSCGroundHandling_V2.0.27.1H/std_04_dll.h>
|
#include <DataModels/libSACSCGroundHandling_V2.0.27.1H/std_04_dll.h>
|
||||||
|
#include "../XNGroundHandlingInterface/XNGroundHandlingInterface.hpp"
|
||||||
|
|
||||||
typedef void (*FunctionType)(ComacDataStructure_S *);
|
typedef void (*FunctionType)(ComacDataStructure_S *);
|
||||||
|
|
||||||
@ -12,4 +13,8 @@ struct XNGroundHandlingPrivate : public XNModelObjectPrivate {
|
|||||||
std::string _entryPointName = "_Z29SACSCGroundHandlingEntryPointP20ComacDataStructure_S";
|
std::string _entryPointName = "_Z29SACSCGroundHandlingEntryPointP20ComacDataStructure_S";
|
||||||
|
|
||||||
std::mutex _mutex;
|
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
|
target_link_libraries(XNGroundHandlingInterface PRIVATE
|
||||||
Qt${QT_VERSION_MAJOR}::Core
|
|
||||||
fastcdr
|
fastcdr
|
||||||
fastdds
|
fastdds
|
||||||
OpenSSL::SSL
|
OpenSSL::SSL
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
* This file was generated by the tool fastddsgen.
|
* This file was generated by the tool fastddsgen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_HPP
|
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_HPP
|
||||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_HPP
|
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_HPP
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
namespace XNSim {
|
namespace XNSim {
|
||||||
|
|
||||||
|
namespace C909 {
|
||||||
|
|
||||||
namespace ATA04 {
|
namespace ATA04 {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3841,8 +3843,10 @@ private:
|
|||||||
|
|
||||||
} // namespace ATA04
|
} // namespace ATA04
|
||||||
|
|
||||||
|
} // namespace C909
|
||||||
|
|
||||||
} // namespace XNSim
|
} // namespace XNSim
|
||||||
|
|
||||||
#endif // _FAST_DDS_GENERATED_XNSIM_ATA04_XNGROUNDHANDLING_HPP_
|
#endif // _FAST_DDS_GENERATED_XNSIM_C909_ATA04_XNGROUNDHANDLING_HPP_
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,90 +1,93 @@
|
|||||||
module XNSim
|
module XNSim
|
||||||
{
|
{
|
||||||
module ATA04
|
module C909
|
||||||
{
|
{
|
||||||
struct GroundHandling_input
|
module ATA04
|
||||||
{
|
{
|
||||||
@optional char l_04_i_gdcomac_frz_l1;
|
struct GroundHandling_input
|
||||||
@optional char l_04_i_gdcomac_chocks_l1;
|
{
|
||||||
@optional double l_04_i_gdcomac_alt_agl_f8;
|
@optional char l_04_i_gdcomac_frz_l1;
|
||||||
@optional char l_04_i_gdcomac_frzflt_l1;
|
@optional char l_04_i_gdcomac_chocks_l1;
|
||||||
@optional double l_04_i_gdcomac_p_f8;
|
@optional double l_04_i_gdcomac_alt_agl_f8;
|
||||||
@optional double l_04_i_gdcomac_q_f8;
|
@optional char l_04_i_gdcomac_frzflt_l1;
|
||||||
@optional double l_04_i_gdcomac_r_f8;
|
@optional double l_04_i_gdcomac_p_f8;
|
||||||
@optional double l_04_i_gdcomac_ug_f8;
|
@optional double l_04_i_gdcomac_q_f8;
|
||||||
@optional double l_04_i_gdcomac_vg_f8;
|
@optional double l_04_i_gdcomac_r_f8;
|
||||||
@optional double l_04_i_gdcomac_wg_f8;
|
@optional double l_04_i_gdcomac_ug_f8;
|
||||||
@optional double l_04_i_gdcomac_blcg_f8;
|
@optional double l_04_i_gdcomac_vg_f8;
|
||||||
@optional double l_04_i_gdcomac_bscg_f8;
|
@optional double l_04_i_gdcomac_wg_f8;
|
||||||
@optional double l_04_i_gdcomac_wlcg_f8;
|
@optional double l_04_i_gdcomac_blcg_f8;
|
||||||
@optional char l_04_i_gdcomac_pb_active_l1;
|
@optional double l_04_i_gdcomac_bscg_f8;
|
||||||
@optional double l_04_i_gdcomac_brake_torq_f8[3][2];
|
@optional double l_04_i_gdcomac_wlcg_f8;
|
||||||
@optional double l_04_i_gdcomac_gear_f8[3];
|
@optional char l_04_i_gdcomac_pb_active_l1;
|
||||||
@optional double l_04_i_gdcomac_gsteer_f8[10];
|
@optional double l_04_i_gdcomac_brake_torq_f8[3][2];
|
||||||
@optional double l_04_i_gdcomac_tire_pres_f8[3][2];
|
@optional double l_04_i_gdcomac_gear_f8[3];
|
||||||
@optional char l_04_i_gdcomac_onjax_l1;
|
@optional double l_04_i_gdcomac_gsteer_f8[10];
|
||||||
@optional double l_04_i_gdcomac_contdep_f8[7];
|
@optional double l_04_i_gdcomac_tire_pres_f8[3][2];
|
||||||
@optional double l_04_i_gdcomac_thetag_f8;
|
@optional char l_04_i_gdcomac_onjax_l1;
|
||||||
@optional double l_04_i_gdcomac_phig_f8;
|
@optional double l_04_i_gdcomac_contdep_f8[7];
|
||||||
@optional long l_04_i_gdcomac_rwyrgh_i2;
|
@optional double l_04_i_gdcomac_thetag_f8;
|
||||||
@optional double l_04_i_gdcomac_rwyhdg_f8;
|
@optional double l_04_i_gdcomac_phig_f8;
|
||||||
@optional char l_04_i_gdcomac_reset_braketemp_l1;
|
@optional long l_04_i_gdcomac_rwyrgh_i2;
|
||||||
@optional char l_04_i_gdcomac_reset_tirepress_l1;
|
@optional double l_04_i_gdcomac_rwyhdg_f8;
|
||||||
@optional double l_04_i_gdcomac_temp_c_f8;
|
@optional char l_04_i_gdcomac_reset_braketemp_l1;
|
||||||
@optional double l_04_i_gdcomac_brake_temp_f8[3][2];
|
@optional char l_04_i_gdcomac_reset_tirepress_l1;
|
||||||
@optional char l_04_i_gdcomac_tire_tburst_l1[3][2];
|
@optional double l_04_i_gdcomac_temp_c_f8;
|
||||||
@optional char l_04_i_gdcomac_tire_tflat_l1[3][2];
|
@optional double l_04_i_gdcomac_brake_temp_f8[3][2];
|
||||||
@optional char l_04_i_gdcomac_brk_reset_tpres_l1;
|
@optional char l_04_i_gdcomac_tire_tburst_l1[3][2];
|
||||||
@optional double l_04_i_gdcomac_rcon_ci_f8[14];
|
@optional char l_04_i_gdcomac_tire_tflat_l1[3][2];
|
||||||
@optional double l_04_i_gdcomac_pb_towforce_f8;
|
@optional char l_04_i_gdcomac_brk_reset_tpres_l1;
|
||||||
@optional long l_04_i_gdcomac_gsteer_state_i4;
|
@optional double l_04_i_gdcomac_rcon_ci_f8[14];
|
||||||
@optional char l_04_i_gdcomac_trim_active_l1;
|
@optional double l_04_i_gdcomac_pb_towforce_f8;
|
||||||
@optional double l_04_i_gdcomac_phi_deg_f8;
|
@optional long l_04_i_gdcomac_gsteer_state_i4;
|
||||||
@optional double l_04_i_gdcomac_theta_deg_f8;
|
@optional char l_04_i_gdcomac_trim_active_l1;
|
||||||
@optional double l_04_i_gdcomac_psi_deg_f8;
|
@optional double l_04_i_gdcomac_phi_deg_f8;
|
||||||
@optional char l_04_i_gdcomac_resetint_l1;
|
@optional double l_04_i_gdcomac_theta_deg_f8;
|
||||||
};
|
@optional double l_04_i_gdcomac_psi_deg_f8;
|
||||||
struct GroundHandling_output
|
@optional char l_04_i_gdcomac_resetint_l1;
|
||||||
{
|
};
|
||||||
@optional char l_04_o_gdcomac_frz_l1;
|
struct GroundHandling_output
|
||||||
@optional char l_04_o_gdcomac_ac_on_ground_l1;
|
{
|
||||||
@optional double l_04_o_gdcomac_ac_stationary_f8;
|
@optional char l_04_o_gdcomac_frz_l1;
|
||||||
@optional double l_04_o_gdcomac_alt_tire_f8;
|
@optional char l_04_o_gdcomac_ac_on_ground_l1;
|
||||||
@optional double l_04_o_gdcomac_zcg_to_tire_f8;
|
@optional double l_04_o_gdcomac_ac_stationary_f8;
|
||||||
@optional double l_04_o_gdcomac_fxb_f8;
|
@optional double l_04_o_gdcomac_alt_tire_f8;
|
||||||
@optional double l_04_o_gdcomac_fyb_f8;
|
@optional double l_04_o_gdcomac_zcg_to_tire_f8;
|
||||||
@optional double l_04_o_gdcomac_fzb_f8;
|
@optional double l_04_o_gdcomac_fxb_f8;
|
||||||
@optional double l_04_o_gdcomac_mxb_f8;
|
@optional double l_04_o_gdcomac_fyb_f8;
|
||||||
@optional double l_04_o_gdcomac_myb_f8;
|
@optional double l_04_o_gdcomac_fzb_f8;
|
||||||
@optional double l_04_o_gdcomac_mzb_f8;
|
@optional double l_04_o_gdcomac_mxb_f8;
|
||||||
@optional double l_04_o_gdcomac_fygs_f8[3];
|
@optional double l_04_o_gdcomac_myb_f8;
|
||||||
@optional double l_04_o_gdcomac_mzgs_f8[3];
|
@optional double l_04_o_gdcomac_mzb_f8;
|
||||||
@optional double l_04_o_gdcomac_mu_f8[3];
|
@optional double l_04_o_gdcomac_fygs_f8[3];
|
||||||
@optional double l_04_o_gdcomac_dstroke_f8[3];
|
@optional double l_04_o_gdcomac_mzgs_f8[3];
|
||||||
@optional double l_04_o_gdcomac_sr_f8[3][2];
|
@optional double l_04_o_gdcomac_mu_f8[3];
|
||||||
@optional double l_04_o_gdcomac_sy_f8[3][2];
|
@optional double l_04_o_gdcomac_dstroke_f8[3];
|
||||||
@optional double l_04_o_gdcomac_sx_f8[3][2];
|
@optional double l_04_o_gdcomac_sr_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_xft_f8[3];
|
@optional double l_04_o_gdcomac_sy_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_yft_f8[3];
|
@optional double l_04_o_gdcomac_sx_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_zft_f8[3];
|
@optional double l_04_o_gdcomac_xft_f8[3];
|
||||||
@optional double l_04_o_gdcomac_distngrxcg_f8;
|
@optional double l_04_o_gdcomac_yft_f8[3];
|
||||||
@optional double l_04_o_gdcomac_distmgrxcg_f8;
|
@optional double l_04_o_gdcomac_zft_f8[3];
|
||||||
@optional double l_04_o_gdcomac_distmgrzcg_f8;
|
@optional double l_04_o_gdcomac_distngrxcg_f8;
|
||||||
@optional double l_04_o_gdcomac_tire_vel_f8[3][2];
|
@optional double l_04_o_gdcomac_distmgrxcg_f8;
|
||||||
@optional char l_04_o_gdcomac_tire_burst_l1[3][2];
|
@optional double l_04_o_gdcomac_distmgrzcg_f8;
|
||||||
@optional double l_04_o_gdcomac_tire_temp_f8[3][2];
|
@optional double l_04_o_gdcomac_tire_vel_f8[3][2];
|
||||||
@optional char l_04_o_gdcomac_wow_l1;
|
@optional char l_04_o_gdcomac_tire_burst_l1[3][2];
|
||||||
@optional double l_04_o_gdcomac_utirew_f8[3][2];
|
@optional double l_04_o_gdcomac_tire_temp_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_vtirew_f8[3][2];
|
@optional char l_04_o_gdcomac_wow_l1;
|
||||||
@optional double l_04_o_gdcomac_whl_omega_f8[3][2];
|
@optional double l_04_o_gdcomac_utirew_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_dstruc_f8[6];
|
@optional double l_04_o_gdcomac_vtirew_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_wor_par_f8[3];
|
@optional double l_04_o_gdcomac_whl_omega_f8[3][2];
|
||||||
@optional double l_04_o_gdcomac_nd_f8[3];
|
@optional double l_04_o_gdcomac_dstruc_f8[6];
|
||||||
@optional double l_04_o_gdcomac_vczt_f8[3][2];
|
@optional double l_04_o_gdcomac_wor_par_f8[3];
|
||||||
};
|
@optional double l_04_o_gdcomac_nd_f8[3];
|
||||||
struct GroundHandling_heartbeat
|
@optional double l_04_o_gdcomac_vczt_f8[3][2];
|
||||||
{
|
};
|
||||||
@optional long groundhandling_model_heartbeat;
|
struct GroundHandling_heartbeat
|
||||||
|
{
|
||||||
|
@optional long groundhandling_model_heartbeat;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -19,19 +19,19 @@
|
|||||||
* This file was generated by the tool fastddsgen.
|
* This file was generated by the tool fastddsgen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_HPP
|
||||||
|
|
||||||
#include "XNGroundHandling.hpp"
|
#include "XNGroundHandling.hpp"
|
||||||
|
|
||||||
constexpr uint32_t XNSim_ATA04_GroundHandling_input_max_cdr_typesize {1093UL};
|
constexpr uint32_t XNSim_C909_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_key_cdr_typesize {0UL};
|
||||||
|
|
||||||
constexpr uint32_t XNSim_ATA04_GroundHandling_output_max_cdr_typesize {1328UL};
|
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_heartbeat_max_cdr_typesize {12UL};
|
||||||
constexpr uint32_t XNSim_ATA04_GroundHandling_output_max_key_cdr_typesize {0UL};
|
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_C909_ATA04_GroundHandling_output_max_cdr_typesize {1328UL};
|
||||||
constexpr uint32_t XNSim_ATA04_GroundHandling_heartbeat_max_key_cdr_typesize {0UL};
|
constexpr uint32_t XNSim_C909_ATA04_GroundHandling_output_max_key_cdr_typesize {0UL};
|
||||||
|
|
||||||
|
|
||||||
namespace eprosima {
|
namespace eprosima {
|
||||||
@ -42,19 +42,19 @@ class CdrSizeCalculator;
|
|||||||
|
|
||||||
eProsima_user_DllExport void serialize_key(
|
eProsima_user_DllExport void serialize_key(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
eprosima::fastcdr::Cdr& scdr,
|
||||||
const XNSim::ATA04::GroundHandling_input& data);
|
const XNSim::C909::ATA04::GroundHandling_input& data);
|
||||||
|
|
||||||
eProsima_user_DllExport void serialize_key(
|
eProsima_user_DllExport void serialize_key(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
eprosima::fastcdr::Cdr& scdr,
|
||||||
const XNSim::ATA04::GroundHandling_output& data);
|
const XNSim::C909::ATA04::GroundHandling_output& data);
|
||||||
|
|
||||||
eProsima_user_DllExport void serialize_key(
|
eProsima_user_DllExport void serialize_key(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
eprosima::fastcdr::Cdr& scdr,
|
||||||
const XNSim::ATA04::GroundHandling_heartbeat& data);
|
const XNSim::C909::ATA04::GroundHandling_heartbeat& data);
|
||||||
|
|
||||||
|
|
||||||
} // namespace fastcdr
|
} // namespace fastcdr
|
||||||
} // namespace eprosima
|
} // 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.
|
* This file was generated by the tool fastddsgen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLINGCDRAUX_IPP
|
||||||
|
|
||||||
#include "XNGroundHandlingCdrAux.hpp"
|
#include "XNGroundHandlingCdrAux.hpp"
|
||||||
|
|
||||||
@ -37,10 +37,10 @@ namespace fastcdr {
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport size_t calculate_serialized_size(
|
eProsima_user_DllExport size_t calculate_serialized_size(
|
||||||
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
||||||
const XNSim::ATA04::GroundHandling_input& data,
|
const XNSim::C909::ATA04::GroundHandling_input& data,
|
||||||
size_t& current_alignment)
|
size_t& current_alignment)
|
||||||
{
|
{
|
||||||
using namespace XNSim::ATA04;
|
using namespace XNSim::C909::ATA04;
|
||||||
|
|
||||||
static_cast<void>(data);
|
static_cast<void>(data);
|
||||||
|
|
||||||
@ -178,9 +178,9 @@ eProsima_user_DllExport size_t calculate_serialized_size(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport void serialize(
|
eProsima_user_DllExport void serialize(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
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);
|
eprosima::fastcdr::Cdr::state current_state(scdr);
|
||||||
scdr.begin_serialize_type(current_state,
|
scdr.begin_serialize_type(current_state,
|
||||||
@ -235,9 +235,9 @@ eProsima_user_DllExport void serialize(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport void deserialize(
|
eProsima_user_DllExport void deserialize(
|
||||||
eprosima::fastcdr::Cdr& cdr,
|
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() ?
|
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
|
||||||
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
||||||
@ -413,9 +413,9 @@ eProsima_user_DllExport void deserialize(
|
|||||||
|
|
||||||
void serialize_key(
|
void serialize_key(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
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>(scdr);
|
||||||
static_cast<void>(data);
|
static_cast<void>(data);
|
||||||
@ -620,10 +620,10 @@ void serialize_key(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport size_t calculate_serialized_size(
|
eProsima_user_DllExport size_t calculate_serialized_size(
|
||||||
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
||||||
const XNSim::ATA04::GroundHandling_output& data,
|
const XNSim::C909::ATA04::GroundHandling_output& data,
|
||||||
size_t& current_alignment)
|
size_t& current_alignment)
|
||||||
{
|
{
|
||||||
using namespace XNSim::ATA04;
|
using namespace XNSim::C909::ATA04;
|
||||||
|
|
||||||
static_cast<void>(data);
|
static_cast<void>(data);
|
||||||
|
|
||||||
@ -749,9 +749,9 @@ eProsima_user_DllExport size_t calculate_serialized_size(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport void serialize(
|
eProsima_user_DllExport void serialize(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
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);
|
eprosima::fastcdr::Cdr::state current_state(scdr);
|
||||||
scdr.begin_serialize_type(current_state,
|
scdr.begin_serialize_type(current_state,
|
||||||
@ -802,9 +802,9 @@ eProsima_user_DllExport void serialize(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport void deserialize(
|
eProsima_user_DllExport void deserialize(
|
||||||
eprosima::fastcdr::Cdr& cdr,
|
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() ?
|
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
|
||||||
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
||||||
@ -964,9 +964,9 @@ eProsima_user_DllExport void deserialize(
|
|||||||
|
|
||||||
void serialize_key(
|
void serialize_key(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
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>(scdr);
|
||||||
static_cast<void>(data);
|
static_cast<void>(data);
|
||||||
@ -1151,10 +1151,10 @@ void serialize_key(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport size_t calculate_serialized_size(
|
eProsima_user_DllExport size_t calculate_serialized_size(
|
||||||
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
eprosima::fastcdr::CdrSizeCalculator& calculator,
|
||||||
const XNSim::ATA04::GroundHandling_heartbeat& data,
|
const XNSim::C909::ATA04::GroundHandling_heartbeat& data,
|
||||||
size_t& current_alignment)
|
size_t& current_alignment)
|
||||||
{
|
{
|
||||||
using namespace XNSim::ATA04;
|
using namespace XNSim::C909::ATA04;
|
||||||
|
|
||||||
static_cast<void>(data);
|
static_cast<void>(data);
|
||||||
|
|
||||||
@ -1178,9 +1178,9 @@ eProsima_user_DllExport size_t calculate_serialized_size(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport void serialize(
|
eProsima_user_DllExport void serialize(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
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);
|
eprosima::fastcdr::Cdr::state current_state(scdr);
|
||||||
scdr.begin_serialize_type(current_state,
|
scdr.begin_serialize_type(current_state,
|
||||||
@ -1197,9 +1197,9 @@ eProsima_user_DllExport void serialize(
|
|||||||
template<>
|
template<>
|
||||||
eProsima_user_DllExport void deserialize(
|
eProsima_user_DllExport void deserialize(
|
||||||
eprosima::fastcdr::Cdr& cdr,
|
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() ?
|
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
|
||||||
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
|
||||||
@ -1223,9 +1223,9 @@ eProsima_user_DllExport void deserialize(
|
|||||||
|
|
||||||
void serialize_key(
|
void serialize_key(
|
||||||
eprosima::fastcdr::Cdr& scdr,
|
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>(scdr);
|
||||||
static_cast<void>(data);
|
static_cast<void>(data);
|
||||||
@ -1241,5 +1241,5 @@ void serialize_key(
|
|||||||
} // namespace fastcdr
|
} // namespace fastcdr
|
||||||
} // namespace eprosima
|
} // 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"
|
#include "XNGroundHandlingInterface.hpp"
|
||||||
|
|
||||||
namespace XNSim
|
namespace XNSim::C909::ATA04
|
||||||
{
|
{
|
||||||
namespace ATA04
|
GroundHandling_input_Interface::GroundHandling_input_Interface()
|
||||||
{
|
{
|
||||||
GroundHandling_input_Interface::GroundHandling_input_Interface()
|
MAP_DATA_FUNC(l_04_i_gdcomac_frz_l1);
|
||||||
{
|
MAP_DATA_FUNC(l_04_i_gdcomac_chocks_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_frz_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_alt_agl_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_chocks_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_frzflt_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_alt_agl_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_p_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_frzflt_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_q_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_p_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_r_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_q_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_ug_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_r_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_vg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_ug_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_wg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_vg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_blcg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_wg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_bscg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_blcg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_wlcg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_bscg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_pb_active_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_wlcg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_brake_torq_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_pb_active_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_gear_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_brake_torq_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_gsteer_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_gear_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_tire_pres_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_gsteer_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_onjax_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_tire_pres_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_contdep_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_onjax_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_thetag_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_contdep_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_phig_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_thetag_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_rwyrgh_i2);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_phig_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_rwyhdg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_rwyrgh_i2);
|
MAP_DATA_FUNC(l_04_i_gdcomac_reset_braketemp_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_rwyhdg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_reset_tirepress_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_reset_braketemp_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_temp_c_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_reset_tirepress_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_brake_temp_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_temp_c_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_tire_tburst_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_brake_temp_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_tire_tflat_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_tire_tburst_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_tire_tflat_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_rcon_ci_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_brk_reset_tpres_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_pb_towforce_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_rcon_ci_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_gsteer_state_i4);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_pb_towforce_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_trim_active_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_gsteer_state_i4);
|
MAP_DATA_FUNC(l_04_i_gdcomac_phi_deg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_trim_active_l1);
|
MAP_DATA_FUNC(l_04_i_gdcomac_theta_deg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_phi_deg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_psi_deg_f8);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_theta_deg_f8);
|
MAP_DATA_FUNC(l_04_i_gdcomac_resetint_l1);
|
||||||
MAP_GET_DATA_FUNC(l_04_i_gdcomac_psi_deg_f8);
|
}
|
||||||
MAP_GET_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(
|
void GroundHandling_input_Interface::Initialize(XNFrameworkPtr framework, uint32_t modelId)
|
||||||
const XNSim::ATA04::GroundHandling_input &input)
|
{
|
||||||
{
|
auto ddsManager = framework->GetDDSManager();
|
||||||
this->data = input;
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
GroundHandling_output_Interface::GroundHandling_output_Interface()
|
void GroundHandling_input_Interface::clearOutData()
|
||||||
{
|
{
|
||||||
MAP_GET_DATA_FUNC(l_04_o_gdcomac_frz_l1);
|
this->out_data = XNSim::C909::ATA04::GroundHandling_input();
|
||||||
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()
|
void GroundHandling_input_Interface::sendOutData()
|
||||||
{
|
{
|
||||||
}
|
dataWriter->write(&this->out_data);
|
||||||
|
}
|
||||||
|
|
||||||
void GroundHandling_output_Interface::outputDataListener(
|
void GroundHandling_input_Interface::inputDataListener(
|
||||||
const XNSim::ATA04::GroundHandling_output &output)
|
const XNSim::C909::ATA04::GroundHandling_input &input)
|
||||||
{
|
{
|
||||||
this->data = output;
|
this->data = input;
|
||||||
}
|
}
|
||||||
|
|
||||||
GroundHandling_heartbeat_Interface::GroundHandling_heartbeat_Interface()
|
GroundHandling_output_Interface::GroundHandling_output_Interface()
|
||||||
{
|
{
|
||||||
MAP_GET_DATA_FUNC(groundhandling_model_heartbeat);
|
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_heartbeat_Interface::~GroundHandling_heartbeat_Interface()
|
GroundHandling_output_Interface::~GroundHandling_output_Interface()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroundHandling_heartbeat_Interface::heartbeatListener(
|
void GroundHandling_output_Interface::Initialize(XNFrameworkPtr framework, uint32_t modelId)
|
||||||
const XNSim::ATA04::GroundHandling_heartbeat &heartbeat)
|
{
|
||||||
{
|
auto ddsManager = framework->GetDDSManager();
|
||||||
this->data = heartbeat;
|
if (!ddsManager) {
|
||||||
|
LOG_ERROR("DDSManager is nullptr");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} // namespace ATA04
|
dataWriter = ddsManager->RegisterPublisher<XNSim::C909::ATA04::GroundHandling_outputPubSubType>(
|
||||||
} // namespace XNSim
|
"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_DATA_FUNC(groundhandling_model_heartbeat);
|
||||||
|
}
|
||||||
|
|
||||||
|
GroundHandling_heartbeat_Interface::~GroundHandling_heartbeat_Interface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
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 XNSim::C909::ATA04
|
||||||
|
@ -2,132 +2,260 @@
|
|||||||
#include "XNGroundHandlingPubSubTypes.hpp"
|
#include "XNGroundHandlingPubSubTypes.hpp"
|
||||||
#include "XNCore/XNDDSInterface.h"
|
#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:
|
||||||
|
GroundHandling_input_Interface();
|
||||||
|
virtual ~GroundHandling_input_Interface();
|
||||||
|
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
public:
|
if (model_data == nullptr)
|
||||||
explicit GroundHandling_input_Interface();
|
return;
|
||||||
virtual ~GroundHandling_input_Interface();
|
assign_value_get(data.l_04_i_gdcomac_frz_l1(), model_data->l_04_i_gdcomac_frz_l1);
|
||||||
void inputDataListener(const XNSim::ATA04::GroundHandling_input &input);
|
assign_value_get(data.l_04_i_gdcomac_chocks_l1(), model_data->l_04_i_gdcomac_chocks_l1);
|
||||||
template <typename T>
|
assign_value_get(data.l_04_i_gdcomac_alt_agl_f8(), model_data->l_04_i_gdcomac_alt_agl_f8);
|
||||||
void getData(T *model_data)
|
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);
|
||||||
if (model_data == nullptr)
|
assign_value_get(data.l_04_i_gdcomac_q_f8(), model_data->l_04_i_gdcomac_q_f8);
|
||||||
return;
|
assign_value_get(data.l_04_i_gdcomac_r_f8(), model_data->l_04_i_gdcomac_r_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_frz_l1);
|
assign_value_get(data.l_04_i_gdcomac_ug_f8(), model_data->l_04_i_gdcomac_ug_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_chocks_l1);
|
assign_value_get(data.l_04_i_gdcomac_vg_f8(), model_data->l_04_i_gdcomac_vg_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_alt_agl_f8);
|
assign_value_get(data.l_04_i_gdcomac_wg_f8(), model_data->l_04_i_gdcomac_wg_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_frzflt_l1);
|
assign_value_get(data.l_04_i_gdcomac_blcg_f8(), model_data->l_04_i_gdcomac_blcg_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_p_f8);
|
assign_value_get(data.l_04_i_gdcomac_bscg_f8(), model_data->l_04_i_gdcomac_bscg_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_q_f8);
|
assign_value_get(data.l_04_i_gdcomac_wlcg_f8(), model_data->l_04_i_gdcomac_wlcg_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_r_f8);
|
assign_value_get(data.l_04_i_gdcomac_pb_active_l1(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_ug_f8);
|
model_data->l_04_i_gdcomac_pb_active_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_vg_f8);
|
assign_value_get(data.l_04_i_gdcomac_brake_torq_f8(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_wg_f8);
|
model_data->l_04_i_gdcomac_brake_torq_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_blcg_f8);
|
assign_value_get(data.l_04_i_gdcomac_gear_f8(), model_data->l_04_i_gdcomac_gear_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_bscg_f8);
|
assign_value_get(data.l_04_i_gdcomac_gsteer_f8(), model_data->l_04_i_gdcomac_gsteer_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_wlcg_f8);
|
assign_value_get(data.l_04_i_gdcomac_tire_pres_f8(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_pb_active_l1);
|
model_data->l_04_i_gdcomac_tire_pres_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_brake_torq_f8);
|
assign_value_get(data.l_04_i_gdcomac_onjax_l1(), model_data->l_04_i_gdcomac_onjax_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_gear_f8);
|
assign_value_get(data.l_04_i_gdcomac_contdep_f8(), model_data->l_04_i_gdcomac_contdep_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_gsteer_f8);
|
assign_value_get(data.l_04_i_gdcomac_thetag_f8(), model_data->l_04_i_gdcomac_thetag_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_tire_pres_f8);
|
assign_value_get(data.l_04_i_gdcomac_phig_f8(), model_data->l_04_i_gdcomac_phig_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_onjax_l1);
|
assign_value_get(data.l_04_i_gdcomac_rwyrgh_i2(), model_data->l_04_i_gdcomac_rwyrgh_i2);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_contdep_f8);
|
assign_value_get(data.l_04_i_gdcomac_rwyhdg_f8(), model_data->l_04_i_gdcomac_rwyhdg_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_thetag_f8);
|
assign_value_get(data.l_04_i_gdcomac_reset_braketemp_l1(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_phig_f8);
|
model_data->l_04_i_gdcomac_reset_braketemp_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_rwyrgh_i2);
|
assign_value_get(data.l_04_i_gdcomac_reset_tirepress_l1(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_rwyhdg_f8);
|
model_data->l_04_i_gdcomac_reset_tirepress_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_reset_braketemp_l1);
|
assign_value_get(data.l_04_i_gdcomac_temp_c_f8(), model_data->l_04_i_gdcomac_temp_c_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_reset_tirepress_l1);
|
assign_value_get(data.l_04_i_gdcomac_brake_temp_f8(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_temp_c_f8);
|
model_data->l_04_i_gdcomac_brake_temp_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_brake_temp_f8);
|
assign_value_get(data.l_04_i_gdcomac_tire_tburst_l1(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_tire_tburst_l1);
|
model_data->l_04_i_gdcomac_tire_tburst_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_tire_tflat_l1);
|
assign_value_get(data.l_04_i_gdcomac_tire_tflat_l1(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_brk_reset_tpres_l1);
|
model_data->l_04_i_gdcomac_tire_tflat_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_rcon_ci_f8);
|
assign_value_get(data.l_04_i_gdcomac_brk_reset_tpres_l1(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_pb_towforce_f8);
|
model_data->l_04_i_gdcomac_brk_reset_tpres_l1);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_gsteer_state_i4);
|
assign_value_get(data.l_04_i_gdcomac_rcon_ci_f8(), model_data->l_04_i_gdcomac_rcon_ci_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_trim_active_l1);
|
assign_value_get(data.l_04_i_gdcomac_pb_towforce_f8(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_phi_deg_f8);
|
model_data->l_04_i_gdcomac_pb_towforce_f8);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_theta_deg_f8);
|
assign_value_get(data.l_04_i_gdcomac_gsteer_state_i4(),
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_psi_deg_f8);
|
model_data->l_04_i_gdcomac_gsteer_state_i4);
|
||||||
ASSIGN_VALUE_GET(l_04_i_gdcomac_resetint_l1);
|
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>
|
template <typename T>
|
||||||
void setData(T *model_data)
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
XNSim::ATA04::GroundHandling_input data;
|
|
||||||
};
|
|
||||||
|
|
||||||
class GroundHandling_output_Interface : public XNDDSInterface
|
|
||||||
{
|
{
|
||||||
public:
|
// if (model_data == nullptr)
|
||||||
explicit GroundHandling_output_Interface();
|
// return;
|
||||||
virtual ~GroundHandling_output_Interface();
|
// clearOutData();
|
||||||
void outputDataListener(const XNSim::ATA04::GroundHandling_output &output);
|
// 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:
|
private:
|
||||||
XNSim::ATA04::GroundHandling_output data;
|
XNSim::C909::ATA04::GroundHandling_input data;
|
||||||
};
|
XNSim::C909::ATA04::GroundHandling_input out_data;
|
||||||
|
};
|
||||||
|
|
||||||
class GroundHandling_heartbeat_Interface : public XNDDSInterface
|
class GroundHandling_output_Interface final : public XNDDSInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GroundHandling_output_Interface();
|
||||||
|
virtual ~GroundHandling_output_Interface();
|
||||||
|
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:
|
// if (model_data == nullptr)
|
||||||
explicit GroundHandling_heartbeat_Interface();
|
// return;
|
||||||
virtual ~GroundHandling_heartbeat_Interface();
|
// ASSIGN_VALUE_GET(l_04_o_gdcomac_frz_l1);
|
||||||
void heartbeatListener(const XNSim::ATA04::GroundHandling_heartbeat &heartbeat);
|
// 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:
|
template <typename T>
|
||||||
XNSim::ATA04::GroundHandling_heartbeat data;
|
void setData(T *model_data)
|
||||||
};
|
{
|
||||||
} // namespace ATA04
|
// if (model_data == nullptr)
|
||||||
} // namespace XNSim
|
// 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
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
#ifndef FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||||
#define FAST_DDS_GENERATED__XNSIM_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
#define FAST_DDS_GENERATED__XNSIM_C909_ATA04_XNGROUNDHANDLING_PUBSUBTYPES_HPP
|
||||||
|
|
||||||
#include <fastdds/dds/core/policy/QosPolicies.hpp>
|
#include <fastdds/dds/core/policy/QosPolicies.hpp>
|
||||||
#include <fastdds/dds/topic/TopicDataType.hpp>
|
#include <fastdds/dds/topic/TopicDataType.hpp>
|
||||||
@ -39,253 +39,256 @@
|
|||||||
|
|
||||||
namespace XNSim
|
namespace XNSim
|
||||||
{
|
{
|
||||||
namespace ATA04
|
namespace C909
|
||||||
{
|
{
|
||||||
|
namespace ATA04
|
||||||
/*!
|
|
||||||
* @brief This class represents the TopicDataType of the type GroundHandling_input defined by the user in the IDL file.
|
|
||||||
* @ingroup XNGroundHandling
|
|
||||||
*/
|
|
||||||
class GroundHandling_inputPubSubType : public eprosima::fastdds::dds::TopicDataType
|
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
|
|
||||||
typedef GroundHandling_input type;
|
/*!
|
||||||
|
* @brief This class represents the TopicDataType of the type GroundHandling_input defined by the user in the IDL file.
|
||||||
eProsima_user_DllExport GroundHandling_inputPubSubType();
|
* @ingroup XNGroundHandling
|
||||||
|
*/
|
||||||
eProsima_user_DllExport ~GroundHandling_inputPubSubType() override;
|
class GroundHandling_inputPubSubType : public eprosima::fastdds::dds::TopicDataType
|
||||||
|
|
||||||
eProsima_user_DllExport bool serialize(
|
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool deserialize(
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
void* data) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport uint32_t calculate_serialized_size(
|
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool compute_key(
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
|
||||||
bool force_md5 = false) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool compute_key(
|
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
|
||||||
bool force_md5 = false) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport void* create_data() override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport void delete_data(
|
|
||||||
void* data) override;
|
|
||||||
|
|
||||||
//Register TypeObject representation in Fast DDS TypeObjectRegistry
|
|
||||||
eProsima_user_DllExport void register_type_object_representation() override;
|
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
|
||||||
eProsima_user_DllExport inline bool is_bounded() const override
|
|
||||||
{
|
{
|
||||||
return true;
|
public:
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
typedef GroundHandling_input type;
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
eProsima_user_DllExport GroundHandling_inputPubSubType();
|
||||||
|
|
||||||
eProsima_user_DllExport inline bool is_plain(
|
eProsima_user_DllExport ~GroundHandling_inputPubSubType() override;
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
|
|
||||||
|
eProsima_user_DllExport bool serialize(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool deserialize(
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
void* data) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport uint32_t calculate_serialized_size(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool compute_key(
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
||||||
|
bool force_md5 = false) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool compute_key(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
||||||
|
bool force_md5 = false) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport void* create_data() override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport void delete_data(
|
||||||
|
void* data) override;
|
||||||
|
|
||||||
|
//Register TypeObject representation in Fast DDS TypeObjectRegistry
|
||||||
|
eProsima_user_DllExport void register_type_object_representation() override;
|
||||||
|
|
||||||
|
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
||||||
|
eProsima_user_DllExport inline bool is_bounded() const override
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
||||||
|
|
||||||
|
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
||||||
|
|
||||||
|
eProsima_user_DllExport inline bool is_plain(
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
|
||||||
|
{
|
||||||
|
static_cast<void>(data_representation);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
||||||
|
|
||||||
|
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
||||||
|
eProsima_user_DllExport inline bool construct_sample(
|
||||||
|
void* memory) const override
|
||||||
|
{
|
||||||
|
static_cast<void>(memory);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
eprosima::fastdds::MD5 md5_;
|
||||||
|
unsigned char* key_buffer_;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief This class represents the TopicDataType of the type GroundHandling_output defined by the user in the IDL file.
|
||||||
|
* @ingroup XNGroundHandling
|
||||||
|
*/
|
||||||
|
class GroundHandling_outputPubSubType : public eprosima::fastdds::dds::TopicDataType
|
||||||
{
|
{
|
||||||
static_cast<void>(data_representation);
|
public:
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
typedef GroundHandling_output type;
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
eProsima_user_DllExport GroundHandling_outputPubSubType();
|
||||||
eProsima_user_DllExport inline bool construct_sample(
|
|
||||||
void* memory) const override
|
eProsima_user_DllExport ~GroundHandling_outputPubSubType() override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool serialize(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool deserialize(
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
void* data) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport uint32_t calculate_serialized_size(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool compute_key(
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
||||||
|
bool force_md5 = false) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport bool compute_key(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
||||||
|
bool force_md5 = false) override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport void* create_data() override;
|
||||||
|
|
||||||
|
eProsima_user_DllExport void delete_data(
|
||||||
|
void* data) override;
|
||||||
|
|
||||||
|
//Register TypeObject representation in Fast DDS TypeObjectRegistry
|
||||||
|
eProsima_user_DllExport void register_type_object_representation() override;
|
||||||
|
|
||||||
|
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
||||||
|
eProsima_user_DllExport inline bool is_bounded() const override
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
||||||
|
|
||||||
|
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
||||||
|
|
||||||
|
eProsima_user_DllExport inline bool is_plain(
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
|
||||||
|
{
|
||||||
|
static_cast<void>(data_representation);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
||||||
|
|
||||||
|
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
||||||
|
eProsima_user_DllExport inline bool construct_sample(
|
||||||
|
void* memory) const override
|
||||||
|
{
|
||||||
|
static_cast<void>(memory);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
eprosima::fastdds::MD5 md5_;
|
||||||
|
unsigned char* key_buffer_;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief This class represents the TopicDataType of the type GroundHandling_heartbeat defined by the user in the IDL file.
|
||||||
|
* @ingroup XNGroundHandling
|
||||||
|
*/
|
||||||
|
class GroundHandling_heartbeatPubSubType : public eprosima::fastdds::dds::TopicDataType
|
||||||
{
|
{
|
||||||
static_cast<void>(memory);
|
public:
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
typedef GroundHandling_heartbeat type;
|
||||||
|
|
||||||
private:
|
eProsima_user_DllExport GroundHandling_heartbeatPubSubType();
|
||||||
|
|
||||||
eprosima::fastdds::MD5 md5_;
|
eProsima_user_DllExport ~GroundHandling_heartbeatPubSubType() override;
|
||||||
unsigned char* key_buffer_;
|
|
||||||
|
|
||||||
};
|
eProsima_user_DllExport bool serialize(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
||||||
|
|
||||||
/*!
|
eProsima_user_DllExport bool deserialize(
|
||||||
* @brief This class represents the TopicDataType of the type GroundHandling_output defined by the user in the IDL file.
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
* @ingroup XNGroundHandling
|
void* data) override;
|
||||||
*/
|
|
||||||
class GroundHandling_outputPubSubType : public eprosima::fastdds::dds::TopicDataType
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef GroundHandling_output type;
|
eProsima_user_DllExport uint32_t calculate_serialized_size(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
||||||
|
|
||||||
eProsima_user_DllExport GroundHandling_outputPubSubType();
|
eProsima_user_DllExport bool compute_key(
|
||||||
|
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
||||||
|
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
||||||
|
bool force_md5 = false) override;
|
||||||
|
|
||||||
eProsima_user_DllExport ~GroundHandling_outputPubSubType() override;
|
eProsima_user_DllExport bool compute_key(
|
||||||
|
const void* const data,
|
||||||
|
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
||||||
|
bool force_md5 = false) override;
|
||||||
|
|
||||||
eProsima_user_DllExport bool serialize(
|
eProsima_user_DllExport void* create_data() override;
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool deserialize(
|
eProsima_user_DllExport void delete_data(
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
void* data) override;
|
||||||
void* data) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport uint32_t calculate_serialized_size(
|
//Register TypeObject representation in Fast DDS TypeObjectRegistry
|
||||||
const void* const data,
|
eProsima_user_DllExport void register_type_object_representation() override;
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool compute_key(
|
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
eProsima_user_DllExport inline bool is_bounded() const override
|
||||||
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
{
|
||||||
bool force_md5 = false) override;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
eProsima_user_DllExport bool compute_key(
|
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
|
||||||
bool force_md5 = false) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport void* create_data() override;
|
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
||||||
|
|
||||||
eProsima_user_DllExport void delete_data(
|
eProsima_user_DllExport inline bool is_plain(
|
||||||
void* data) override;
|
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
|
||||||
|
{
|
||||||
|
static_cast<void>(data_representation);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//Register TypeObject representation in Fast DDS TypeObjectRegistry
|
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
||||||
eProsima_user_DllExport void register_type_object_representation() override;
|
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
||||||
eProsima_user_DllExport inline bool is_bounded() const override
|
eProsima_user_DllExport inline bool construct_sample(
|
||||||
{
|
void* memory) const override
|
||||||
return true;
|
{
|
||||||
}
|
static_cast<void>(memory);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
private:
|
||||||
|
|
||||||
eProsima_user_DllExport inline bool is_plain(
|
eprosima::fastdds::MD5 md5_;
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
|
unsigned char* key_buffer_;
|
||||||
{
|
|
||||||
static_cast<void>(data_representation);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
};
|
||||||
|
} // namespace ATA04
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
} // namespace C909
|
||||||
eProsima_user_DllExport inline bool construct_sample(
|
|
||||||
void* memory) const override
|
|
||||||
{
|
|
||||||
static_cast<void>(memory);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
eprosima::fastdds::MD5 md5_;
|
|
||||||
unsigned char* key_buffer_;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief This class represents the TopicDataType of the type GroundHandling_heartbeat defined by the user in the IDL file.
|
|
||||||
* @ingroup XNGroundHandling
|
|
||||||
*/
|
|
||||||
class GroundHandling_heartbeatPubSubType : public eprosima::fastdds::dds::TopicDataType
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
typedef GroundHandling_heartbeat type;
|
|
||||||
|
|
||||||
eProsima_user_DllExport GroundHandling_heartbeatPubSubType();
|
|
||||||
|
|
||||||
eProsima_user_DllExport ~GroundHandling_heartbeatPubSubType() override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool serialize(
|
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool deserialize(
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
void* data) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport uint32_t calculate_serialized_size(
|
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool compute_key(
|
|
||||||
eprosima::fastdds::rtps::SerializedPayload_t& payload,
|
|
||||||
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
|
||||||
bool force_md5 = false) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport bool compute_key(
|
|
||||||
const void* const data,
|
|
||||||
eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
|
|
||||||
bool force_md5 = false) override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport void* create_data() override;
|
|
||||||
|
|
||||||
eProsima_user_DllExport void delete_data(
|
|
||||||
void* data) override;
|
|
||||||
|
|
||||||
//Register TypeObject representation in Fast DDS TypeObjectRegistry
|
|
||||||
eProsima_user_DllExport void register_type_object_representation() override;
|
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
|
||||||
eProsima_user_DllExport inline bool is_bounded() const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
|
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
|
||||||
|
|
||||||
eProsima_user_DllExport inline bool is_plain(
|
|
||||||
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
|
|
||||||
{
|
|
||||||
static_cast<void>(data_representation);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
|
|
||||||
|
|
||||||
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
|
||||||
eProsima_user_DllExport inline bool construct_sample(
|
|
||||||
void* memory) const override
|
|
||||||
{
|
|
||||||
static_cast<void>(memory);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
eprosima::fastdds::MD5 md5_;
|
|
||||||
unsigned char* key_buffer_;
|
|
||||||
|
|
||||||
};
|
|
||||||
} // namespace ATA04
|
|
||||||
} // namespace XNSim
|
} // 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;
|
using namespace eprosima::fastdds::dds::xtypes;
|
||||||
|
|
||||||
namespace XNSim {
|
namespace XNSim {
|
||||||
|
namespace C909 {
|
||||||
namespace ATA04 {
|
namespace ATA04 {
|
||||||
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
|
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
|
||||||
void register_GroundHandling_input_type_identifier(
|
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};
|
ReturnCode_t return_code_GroundHandling_input {eprosima::fastdds::dds::RETCODE_OK};
|
||||||
return_code_GroundHandling_input =
|
return_code_GroundHandling_input =
|
||||||
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
|
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)
|
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,
|
StructTypeFlag struct_flags_GroundHandling_input = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
|
||||||
false, false);
|
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<AppliedBuiltinTypeAnnotations> type_ann_builtin_GroundHandling_input;
|
||||||
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_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());
|
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))
|
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,
|
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};
|
ReturnCode_t return_code_GroundHandling_output {eprosima::fastdds::dds::RETCODE_OK};
|
||||||
return_code_GroundHandling_output =
|
return_code_GroundHandling_output =
|
||||||
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
|
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)
|
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,
|
StructTypeFlag struct_flags_GroundHandling_output = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
|
||||||
false, false);
|
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<AppliedBuiltinTypeAnnotations> type_ann_builtin_GroundHandling_output;
|
||||||
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_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());
|
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))
|
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,
|
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};
|
ReturnCode_t return_code_GroundHandling_heartbeat {eprosima::fastdds::dds::RETCODE_OK};
|
||||||
return_code_GroundHandling_heartbeat =
|
return_code_GroundHandling_heartbeat =
|
||||||
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
|
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)
|
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,
|
StructTypeFlag struct_flags_GroundHandling_heartbeat = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
|
||||||
false, false);
|
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<AppliedBuiltinTypeAnnotations> type_ann_builtin_GroundHandling_heartbeat;
|
||||||
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_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());
|
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))
|
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,
|
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 ATA04
|
||||||
|
|
||||||
|
} // namespace C909
|
||||||
|
|
||||||
} // namespace XNSim
|
} // namespace XNSim
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
* This file was generated by the tool fastddsgen.
|
* This file was generated by the tool fastddsgen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef 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_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>
|
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
|
||||||
|
|
||||||
@ -38,6 +38,7 @@
|
|||||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
|
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
|
||||||
|
|
||||||
namespace XNSim {
|
namespace XNSim {
|
||||||
|
namespace C909 {
|
||||||
namespace ATA04 {
|
namespace ATA04 {
|
||||||
/**
|
/**
|
||||||
* @brief Register GroundHandling_input related TypeIdentifier.
|
* @brief Register GroundHandling_input related TypeIdentifier.
|
||||||
@ -80,9 +81,11 @@ eProsima_user_DllExport void register_GroundHandling_heartbeat_type_identifier(
|
|||||||
|
|
||||||
} // namespace ATA04
|
} // namespace ATA04
|
||||||
|
|
||||||
|
} // namespace C909
|
||||||
|
|
||||||
} // namespace XNSim
|
} // namespace XNSim
|
||||||
|
|
||||||
|
|
||||||
#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
|
#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