1. ioctrl和print修改为module InternalSystem。

main
baocm 9 months ago
parent 51e99c4e22
commit b7a813b18f

@ -129,7 +129,7 @@ void MsgHandler::HandleDdsMsg(const std::map<std::string, std::string>& msg)
}
}
int MsgHandler::ParseDeviceMsg(std::vector<uint8_t>& data, IoCtrlRsp& rsp)
int MsgHandler::ParseDeviceMsg(std::vector<uint8_t>& data, InternalSystem::IoCtrlRsp& rsp)
{
if (data[0] == this->device_id)
{
@ -158,7 +158,7 @@ int MsgHandler::ParseDeviceMsg(std::vector<uint8_t>& data, IoCtrlRsp& rsp)
return 0;
}
int MsgHandler::HandleDeviceMsg(IoCtrlRsp& rsp)
int MsgHandler::HandleDeviceMsg(InternalSystem::IoCtrlRsp& rsp)
{
std::vector<uint8_t> m_RecvData;

@ -26,7 +26,7 @@ public:
~MsgHandler() = default;
void HandleDdsMsg(const std::map<std::string, std::string>& msg);
int HandleDeviceMsg(IoCtrlRsp& rsp);
int HandleDeviceMsg(InternalSystem::IoCtrlRsp& rsp);
virtual bool OpenPort(const std::string& port, const std::string& baudrate);
virtual int SendDeviceMsg(std::vector<uint8_t>& data);
@ -39,7 +39,7 @@ public:
void ClosePort();
private:
int ParseDeviceMsg(std::vector<uint8_t>& data, IoCtrlRsp& rsp);
int ParseDeviceMsg(std::vector<uint8_t>& data, InternalSystem::IoCtrlRsp& rsp);
};
#endif

@ -47,7 +47,7 @@ PublisherApp::PublisherApp(
, publisher_(nullptr)
, topic_(nullptr)
, writer_(nullptr)
, type_(new IoCtrlRspPubSubType())
, type_(new InternalSystem::IoCtrlRspPubSubType())
, matched_(0)
, samples_sent_(0)
, stop_(false)
@ -63,7 +63,7 @@ PublisherApp::PublisherApp(
participant_ = factory_->create_participant(domain_id, pqos, nullptr, StatusMask::none());
if (participant_ == nullptr)
{
throw std::runtime_error("IoCtrlRsp Participant initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlRsp Participant initialization failed");
}
// Register the type
@ -75,16 +75,16 @@ PublisherApp::PublisherApp(
publisher_ = participant_->create_publisher(pub_qos, nullptr, StatusMask::none());
if (publisher_ == nullptr)
{
throw std::runtime_error("IoCtrlRsp Publisher initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlRsp Publisher initialization failed");
}
// Create the topic
TopicQos topic_qos = TOPIC_QOS_DEFAULT;
participant_->get_default_topic_qos(topic_qos);
topic_ = participant_->create_topic("IoCtrlRspTopic", type_.get_type_name(), topic_qos);
topic_ = participant_->create_topic("InternalSystem::IoCtrlRspTopic", type_.get_type_name(), topic_qos);
if (topic_ == nullptr)
{
throw std::runtime_error("IoCtrlRsp Topic initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlRsp Topic initialization failed");
}
// Create the data writer
@ -96,7 +96,7 @@ PublisherApp::PublisherApp(
writer_ = publisher_->create_datawriter(topic_, writer_qos, this, StatusMask::all());
if (writer_ == nullptr)
{
throw std::runtime_error("IoCtrlRsp DataWriter initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlRsp DataWriter initialization failed");
}
}
@ -142,7 +142,7 @@ void PublisherApp::on_publication_matched(
void PublisherApp::run(std::shared_ptr<MsgHandler> handler)
{
IoCtrlRsp rsp;
InternalSystem::IoCtrlRsp rsp;
while (!is_stopped())
{
@ -179,7 +179,7 @@ bool PublisherApp::publish()
if (!is_stopped())
{
/* Initialize your structure here */
WeighRsp sample_;
InternalSystem::IoCtrlRsp sample_;
ret = (RETCODE_OK == writer_->write(&sample_));
}
return ret;

@ -45,7 +45,7 @@ SubscriberApp::SubscriberApp(
, subscriber_(nullptr)
, topic_(nullptr)
, reader_(nullptr)
, type_(new IoCtrlReqPubSubType())
, type_(new InternalSystem::IoCtrlReqPubSubType())
, samples_received_(0)
, stop_(false)
{
@ -58,7 +58,7 @@ SubscriberApp::SubscriberApp(
participant_ = factory_->create_participant(domain_id, pqos, nullptr, StatusMask::none());
if (participant_ == nullptr)
{
throw std::runtime_error("IoCtrlReq Participant initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlReq Participant initialization failed");
}
// Register the type
@ -70,16 +70,16 @@ SubscriberApp::SubscriberApp(
subscriber_ = participant_->create_subscriber(sub_qos, nullptr, StatusMask::none());
if (subscriber_ == nullptr)
{
throw std::runtime_error("IoCtrlReq Subscriber initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlReq Subscriber initialization failed");
}
// Create the topic
TopicQos topic_qos = TOPIC_QOS_DEFAULT;
participant_->get_default_topic_qos(topic_qos);
topic_ = participant_->create_topic("IoCtrlReqTopic", type_.get_type_name(), topic_qos);
topic_ = participant_->create_topic("InternalSystem::IoCtrlReqTopic", type_.get_type_name(), topic_qos);
if (topic_ == nullptr)
{
throw std::runtime_error("IoCtrlReq Topic initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlReq Topic initialization failed");
}
// Create the reader
@ -91,7 +91,7 @@ SubscriberApp::SubscriberApp(
reader_ = subscriber_->create_datareader(topic_, reader_qos, this, StatusMask::all());
if (reader_ == nullptr)
{
throw std::runtime_error("IoCtrlReq DataReader initialization failed");
throw std::runtime_error("InternalSystem::IoCtrlReq DataReader initialization failed");
}
}
@ -133,9 +133,9 @@ void SubscriberApp::on_data_available(
std::string topic_name = reader->get_topicdescription()->get_name();
std::cout << topic_name << std::endl;
if (topic_name == "IoCtrlReqTopic")
if (topic_name == "InternalSystem::IoCtrlReqTopic")
{
IoCtrlReq sample_;
InternalSystem::IoCtrlReq sample_;
while ((!is_stopped()) && (RETCODE_OK == reader->take_next_sample(&sample_, &info)))
{
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
@ -159,7 +159,7 @@ void SubscriberApp::run(std::shared_ptr<MsgHandler> handler)
{
if(!MsgData::IoCtrlReq_queue_.empty())
{
IoCtrlReq req = std::move(MsgData::IoCtrlReq_queue_.front());
InternalSystem::IoCtrlReq req = std::move(MsgData::IoCtrlReq_queue_.front());
MsgData::IoCtrlReq_queue_.pop();
lock.unlock();
handler->HandleDdsMsg(req.msg());

@ -69,7 +69,7 @@ std::string parse_signal(
}
}
std::queue<IoCtrlReq> MsgData::IoCtrlReq_queue_;
std::queue<InternalSystem::IoCtrlReq> MsgData::IoCtrlReq_queue_;
std::mutex MsgData::queue_cv_mtx_;
std::filesystem::path getExeDir()

@ -7,7 +7,7 @@
class MsgData {
public:
static std::queue<IoCtrlReq> IoCtrlReq_queue_;
static std::queue<InternalSystem::IoCtrlReq> IoCtrlReq_queue_;
static std::mutex queue_cv_mtx_;
};

@ -19,8 +19,8 @@
* This file was generated by the tool fastddsgen.
*/
#ifndef FAST_DDS_GENERATED__SYSTEM_HPP
#define FAST_DDS_GENERATED__SYSTEM_HPP
#ifndef FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_HPP
#define FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_HPP
#include <cstdint>
#include <map>
@ -52,6 +52,8 @@
#define SYSTEM_DllAPI
#endif // _WIN32
namespace InternalSystem {
/*!
* @brief This class represents the structure LicencePlateReq defined by the user in the IDL file.
* @ingroup System
@ -1440,6 +1442,8 @@ private:
};
#endif // _FAST_DDS_GENERATED_SYSTEM_HPP_
} // namespace InternalSystem
#endif // _FAST_DDS_GENERATED_INTERNALSYSTEM_SYSTEM_HPP_

@ -1,50 +1,53 @@
@extensibility(APPENDABLE)
struct LicencePlateReq
module InternalSystem
{
struct LicencePlateReq
{
unsigned long index;
map<string, string> msg;
};
};
struct LicencePlateRsp
{
struct LicencePlateRsp
{
unsigned long index;
string licence;
};
};
struct PrintReq
{
struct PrintReq
{
unsigned long index;
map<string, string> msg;
};
};
struct PrintRsp
{
struct PrintRsp
{
unsigned long index;
string msg;
};
};
struct WeighReq
{
struct WeighReq
{
unsigned long index;
map<string, string> msg;
};
};
struct WeighRsp
{
struct WeighRsp
{
unsigned long index;
float stable_weight;
float instantaneous_weight;
};
};
// private
struct IoCtrlReq
{
struct IoCtrlReq
{
unsigned long index;
map<string, string> msg;
};
};
struct IoCtrlRsp
{
struct IoCtrlRsp
{
unsigned long index;
map<string, string> msg;
};
};

@ -19,34 +19,34 @@
* This file was generated by the tool fastddsgen.
*/
#ifndef FAST_DDS_GENERATED__SYSTEMCDRAUX_HPP
#define FAST_DDS_GENERATED__SYSTEMCDRAUX_HPP
#ifndef FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEMCDRAUX_HPP
#define FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEMCDRAUX_HPP
#include "System.hpp"
constexpr uint32_t PrintReq_max_cdr_typesize {16UL};
constexpr uint32_t PrintReq_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_WeighRsp_max_cdr_typesize {16UL};
constexpr uint32_t InternalSystem_WeighRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t LicencePlateRsp_max_cdr_typesize {268UL};
constexpr uint32_t LicencePlateRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_PrintRsp_max_cdr_typesize {268UL};
constexpr uint32_t InternalSystem_PrintRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t LicencePlateReq_max_cdr_typesize {16UL};
constexpr uint32_t LicencePlateReq_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_WeighReq_max_cdr_typesize {16UL};
constexpr uint32_t InternalSystem_WeighReq_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighReq_max_cdr_typesize {16UL};
constexpr uint32_t WeighReq_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_PrintReq_max_cdr_typesize {16UL};
constexpr uint32_t InternalSystem_PrintReq_max_key_cdr_typesize {0UL};
constexpr uint32_t PrintRsp_max_cdr_typesize {268UL};
constexpr uint32_t PrintRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_LicencePlateReq_max_cdr_typesize {16UL};
constexpr uint32_t InternalSystem_LicencePlateReq_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighRsp_max_cdr_typesize {16UL};
constexpr uint32_t WeighRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_IoCtrlRsp_max_cdr_typesize {16UL};
constexpr uint32_t InternalSystem_IoCtrlRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t IoCtrlRsp_max_cdr_typesize {16UL};
constexpr uint32_t IoCtrlRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_IoCtrlReq_max_cdr_typesize {16UL};
constexpr uint32_t InternalSystem_IoCtrlReq_max_key_cdr_typesize {0UL};
constexpr uint32_t IoCtrlReq_max_cdr_typesize {16UL};
constexpr uint32_t IoCtrlReq_max_key_cdr_typesize {0UL};
constexpr uint32_t InternalSystem_LicencePlateRsp_max_cdr_typesize {268UL};
constexpr uint32_t InternalSystem_LicencePlateRsp_max_key_cdr_typesize {0UL};
namespace eprosima {
@ -57,39 +57,39 @@ class CdrSizeCalculator;
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const LicencePlateReq& data);
const InternalSystem::LicencePlateReq& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const LicencePlateRsp& data);
const InternalSystem::LicencePlateRsp& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const PrintReq& data);
const InternalSystem::PrintReq& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const PrintRsp& data);
const InternalSystem::PrintRsp& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighReq& data);
const InternalSystem::WeighReq& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighRsp& data);
const InternalSystem::WeighRsp& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const IoCtrlReq& data);
const InternalSystem::IoCtrlReq& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const IoCtrlRsp& data);
const InternalSystem::IoCtrlRsp& data);
} // namespace fastcdr
} // namespace eprosima
#endif // FAST_DDS_GENERATED__SYSTEMCDRAUX_HPP
#endif // FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEMCDRAUX_HPP

@ -19,8 +19,8 @@
* This file was generated by the tool fastddsgen.
*/
#ifndef FAST_DDS_GENERATED__SYSTEMCDRAUX_IPP
#define FAST_DDS_GENERATED__SYSTEMCDRAUX_IPP
#ifndef FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEMCDRAUX_IPP
#define FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEMCDRAUX_IPP
#include "SystemCdrAux.hpp"
@ -37,9 +37,11 @@ namespace fastcdr {
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const LicencePlateReq& data,
const InternalSystem::LicencePlateReq& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -65,8 +67,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const LicencePlateReq& data)
const InternalSystem::LicencePlateReq& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -83,8 +87,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
LicencePlateReq& data)
InternalSystem::LicencePlateReq& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -111,8 +117,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const LicencePlateReq& data)
const InternalSystem::LicencePlateReq& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -126,9 +133,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const LicencePlateRsp& data,
const InternalSystem::LicencePlateRsp& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -154,8 +163,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const LicencePlateRsp& data)
const InternalSystem::LicencePlateRsp& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -172,8 +183,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
LicencePlateRsp& data)
InternalSystem::LicencePlateRsp& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -200,8 +213,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const LicencePlateRsp& data)
const InternalSystem::LicencePlateRsp& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -215,9 +229,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const PrintReq& data,
const InternalSystem::PrintReq& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -243,8 +259,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const PrintReq& data)
const InternalSystem::PrintReq& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -261,8 +279,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
PrintReq& data)
InternalSystem::PrintReq& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -289,8 +309,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const PrintReq& data)
const InternalSystem::PrintReq& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -304,9 +325,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const PrintRsp& data,
const InternalSystem::PrintRsp& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -332,8 +355,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const PrintRsp& data)
const InternalSystem::PrintRsp& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -350,8 +375,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
PrintRsp& data)
InternalSystem::PrintRsp& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -378,8 +405,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const PrintRsp& data)
const InternalSystem::PrintRsp& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -393,9 +421,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const WeighReq& data,
const InternalSystem::WeighReq& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -421,8 +451,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const WeighReq& data)
const InternalSystem::WeighReq& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -439,8 +471,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
WeighReq& data)
InternalSystem::WeighReq& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -467,8 +501,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighReq& data)
const InternalSystem::WeighReq& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -482,9 +517,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const WeighRsp& data,
const InternalSystem::WeighRsp& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -513,8 +550,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const WeighRsp& data)
const InternalSystem::WeighRsp& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -532,8 +571,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
WeighRsp& data)
InternalSystem::WeighRsp& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -564,8 +605,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighRsp& data)
const InternalSystem::WeighRsp& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -581,9 +623,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const IoCtrlReq& data,
const InternalSystem::IoCtrlReq& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -609,8 +653,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const IoCtrlReq& data)
const InternalSystem::IoCtrlReq& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -627,8 +673,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
IoCtrlReq& data)
InternalSystem::IoCtrlReq& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -655,8 +703,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const IoCtrlReq& data)
const InternalSystem::IoCtrlReq& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -670,9 +719,11 @@ void serialize_key(
template<>
eProsima_user_DllExport size_t calculate_serialized_size(
eprosima::fastcdr::CdrSizeCalculator& calculator,
const IoCtrlRsp& data,
const InternalSystem::IoCtrlRsp& data,
size_t& current_alignment)
{
using namespace InternalSystem;
static_cast<void>(data);
eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding();
@ -698,8 +749,10 @@ eProsima_user_DllExport size_t calculate_serialized_size(
template<>
eProsima_user_DllExport void serialize(
eprosima::fastcdr::Cdr& scdr,
const IoCtrlRsp& data)
const InternalSystem::IoCtrlRsp& data)
{
using namespace InternalSystem;
eprosima::fastcdr::Cdr::state current_state(scdr);
scdr.begin_serialize_type(current_state,
eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ?
@ -716,8 +769,10 @@ eProsima_user_DllExport void serialize(
template<>
eProsima_user_DllExport void deserialize(
eprosima::fastcdr::Cdr& cdr,
IoCtrlRsp& data)
InternalSystem::IoCtrlRsp& data)
{
using namespace InternalSystem;
cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ?
eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 :
eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR,
@ -744,8 +799,9 @@ eProsima_user_DllExport void deserialize(
void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const IoCtrlRsp& data)
const InternalSystem::IoCtrlRsp& data)
{
using namespace InternalSystem;
static_cast<void>(scdr);
static_cast<void>(data);
@ -760,5 +816,5 @@ void serialize_key(
} // namespace fastcdr
} // namespace eprosima
#endif // FAST_DDS_GENERATED__SYSTEMCDRAUX_IPP
#endif // FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEMCDRAUX_IPP

File diff suppressed because it is too large Load Diff

@ -20,8 +20,8 @@
*/
#ifndef FAST_DDS_GENERATED__SYSTEM_PUBSUBTYPES_HPP
#define FAST_DDS_GENERATED__SYSTEM_PUBSUBTYPES_HPP
#ifndef FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_PUBSUBTYPES_HPP
#define FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_PUBSUBTYPES_HPP
#include <fastdds/dds/core/policy/QosPolicies.hpp>
#include <fastdds/dds/topic/TopicDataType.hpp>
@ -37,14 +37,16 @@
Generated System is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
#endif // FASTDDS_GEN_API_VER
namespace InternalSystem
{
/*!
/*!
* @brief This class represents the TopicDataType of the type LicencePlateReq defined by the user in the IDL file.
* @ingroup System
*/
class LicencePlateReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class LicencePlateReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef LicencePlateReq type;
@ -83,15 +85,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -100,9 +102,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -110,22 +112,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type LicencePlateRsp defined by the user in the IDL file.
* @ingroup System
*/
class LicencePlateRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class LicencePlateRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef LicencePlateRsp type;
@ -164,15 +166,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -181,9 +183,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -191,22 +193,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type PrintReq defined by the user in the IDL file.
* @ingroup System
*/
class PrintReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class PrintReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef PrintReq type;
@ -245,15 +247,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -262,9 +264,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -272,22 +274,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type PrintRsp defined by the user in the IDL file.
* @ingroup System
*/
class PrintRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class PrintRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef PrintRsp type;
@ -326,15 +328,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -343,9 +345,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -353,22 +355,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type WeighReq defined by the user in the IDL file.
* @ingroup System
*/
class WeighReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class WeighReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef WeighReq type;
@ -407,15 +409,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -424,9 +426,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -434,22 +436,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type WeighRsp defined by the user in the IDL file.
* @ingroup System
*/
class WeighRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class WeighRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef WeighRsp type;
@ -488,15 +490,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#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
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -505,9 +507,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -515,22 +517,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type IoCtrlReq defined by the user in the IDL file.
* @ingroup System
*/
class IoCtrlReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class IoCtrlReqPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef IoCtrlReq type;
@ -569,15 +571,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -586,9 +588,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -596,22 +598,22 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
/*!
/*!
* @brief This class represents the TopicDataType of the type IoCtrlRsp defined by the user in the IDL file.
* @ingroup System
*/
class IoCtrlRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
class IoCtrlRspPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef IoCtrlRsp type;
@ -650,15 +652,15 @@ public:
//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() override;
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
{
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
eProsima_user_DllExport inline bool is_plain(
eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
@ -667,9 +669,9 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
eProsima_user_DllExport inline bool construct_sample(
void* memory) const override
{
@ -677,14 +679,15 @@ public:
return false;
}
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
private:
private:
eprosima::fastdds::MD5 md5_;
unsigned char* key_buffer_;
};
};
} // namespace InternalSystem
#endif // FAST_DDS_GENERATED__SYSTEM_PUBSUBTYPES_HPP
#endif // FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_PUBSUBTYPES_HPP

@ -38,6 +38,7 @@
using namespace eprosima::fastdds::dds::xtypes;
namespace InternalSystem {
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_LicencePlateReq_type_identifier(
TypeIdentifierPair& type_ids_LicencePlateReq)
@ -46,21 +47,14 @@ void register_LicencePlateReq_type_identifier(
ReturnCode_t return_code_LicencePlateReq {eprosima::fastdds::dds::RETCODE_OK};
return_code_LicencePlateReq =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"LicencePlateReq", type_ids_LicencePlateReq);
"InternalSystem::LicencePlateReq", type_ids_LicencePlateReq);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_LicencePlateReq)
{
StructTypeFlag struct_flags_LicencePlateReq = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_LicencePlateReq = "LicencePlateReq";
QualifiedTypeName type_name_LicencePlateReq = "InternalSystem::LicencePlateReq";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_LicencePlateReq;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_LicencePlateReq;
AppliedAnnotationSeq tmp_ann_custom_LicencePlateReq;
eprosima::fastcdr::optional<AppliedVerbatimAnnotation> verbatim_LicencePlateReq;
if (!tmp_ann_custom_LicencePlateReq.empty())
{
ann_custom_LicencePlateReq = tmp_ann_custom_LicencePlateReq;
}
CompleteTypeDetail detail_LicencePlateReq = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_LicencePlateReq, ann_custom_LicencePlateReq, type_name_LicencePlateReq.to_string());
CompleteStructHeader header_LicencePlateReq;
header_LicencePlateReq = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_LicencePlateReq);
@ -205,7 +199,7 @@ void register_LicencePlateReq_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_LicencePlateReq, type_name_LicencePlateReq.to_string(), type_ids_LicencePlateReq))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"LicencePlateReq already registered in TypeObjectRegistry for a different type.");
"InternalSystem::LicencePlateReq already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -217,12 +211,12 @@ void register_LicencePlateRsp_type_identifier(
ReturnCode_t return_code_LicencePlateRsp {eprosima::fastdds::dds::RETCODE_OK};
return_code_LicencePlateRsp =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"LicencePlateRsp", type_ids_LicencePlateRsp);
"InternalSystem::LicencePlateRsp", type_ids_LicencePlateRsp);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_LicencePlateRsp)
{
StructTypeFlag struct_flags_LicencePlateRsp = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_LicencePlateRsp = "LicencePlateRsp";
QualifiedTypeName type_name_LicencePlateRsp = "InternalSystem::LicencePlateRsp";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_LicencePlateRsp;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_LicencePlateRsp;
CompleteTypeDetail detail_LicencePlateRsp = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_LicencePlateRsp, ann_custom_LicencePlateRsp, type_name_LicencePlateRsp.to_string());
@ -302,7 +296,7 @@ void register_LicencePlateRsp_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_LicencePlateRsp, type_name_LicencePlateRsp.to_string(), type_ids_LicencePlateRsp))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"LicencePlateRsp already registered in TypeObjectRegistry for a different type.");
"InternalSystem::LicencePlateRsp already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -314,12 +308,12 @@ void register_PrintReq_type_identifier(
ReturnCode_t return_code_PrintReq {eprosima::fastdds::dds::RETCODE_OK};
return_code_PrintReq =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"PrintReq", type_ids_PrintReq);
"InternalSystem::PrintReq", type_ids_PrintReq);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_PrintReq)
{
StructTypeFlag struct_flags_PrintReq = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_PrintReq = "PrintReq";
QualifiedTypeName type_name_PrintReq = "InternalSystem::PrintReq";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_PrintReq;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_PrintReq;
CompleteTypeDetail detail_PrintReq = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_PrintReq, ann_custom_PrintReq, type_name_PrintReq.to_string());
@ -466,7 +460,7 @@ void register_PrintReq_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_PrintReq, type_name_PrintReq.to_string(), type_ids_PrintReq))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"PrintReq already registered in TypeObjectRegistry for a different type.");
"InternalSystem::PrintReq already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -478,12 +472,12 @@ void register_PrintRsp_type_identifier(
ReturnCode_t return_code_PrintRsp {eprosima::fastdds::dds::RETCODE_OK};
return_code_PrintRsp =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"PrintRsp", type_ids_PrintRsp);
"InternalSystem::PrintRsp", type_ids_PrintRsp);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_PrintRsp)
{
StructTypeFlag struct_flags_PrintRsp = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_PrintRsp = "PrintRsp";
QualifiedTypeName type_name_PrintRsp = "InternalSystem::PrintRsp";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_PrintRsp;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_PrintRsp;
CompleteTypeDetail detail_PrintRsp = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_PrintRsp, ann_custom_PrintRsp, type_name_PrintRsp.to_string());
@ -563,7 +557,7 @@ void register_PrintRsp_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_PrintRsp, type_name_PrintRsp.to_string(), type_ids_PrintRsp))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"PrintRsp already registered in TypeObjectRegistry for a different type.");
"InternalSystem::PrintRsp already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -575,12 +569,12 @@ void register_WeighReq_type_identifier(
ReturnCode_t return_code_WeighReq {eprosima::fastdds::dds::RETCODE_OK};
return_code_WeighReq =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"WeighReq", type_ids_WeighReq);
"InternalSystem::WeighReq", type_ids_WeighReq);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_WeighReq)
{
StructTypeFlag struct_flags_WeighReq = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_WeighReq = "WeighReq";
QualifiedTypeName type_name_WeighReq = "InternalSystem::WeighReq";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_WeighReq;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_WeighReq;
CompleteTypeDetail detail_WeighReq = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_WeighReq, ann_custom_WeighReq, type_name_WeighReq.to_string());
@ -727,7 +721,7 @@ void register_WeighReq_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_WeighReq, type_name_WeighReq.to_string(), type_ids_WeighReq))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"WeighReq already registered in TypeObjectRegistry for a different type.");
"InternalSystem::WeighReq already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -739,12 +733,12 @@ void register_WeighRsp_type_identifier(
ReturnCode_t return_code_WeighRsp {eprosima::fastdds::dds::RETCODE_OK};
return_code_WeighRsp =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"WeighRsp", type_ids_WeighRsp);
"InternalSystem::WeighRsp", type_ids_WeighRsp);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_WeighRsp)
{
StructTypeFlag struct_flags_WeighRsp = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_WeighRsp = "WeighRsp";
QualifiedTypeName type_name_WeighRsp = "InternalSystem::WeighRsp";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_WeighRsp;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_WeighRsp;
CompleteTypeDetail detail_WeighRsp = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_WeighRsp, ann_custom_WeighRsp, type_name_WeighRsp.to_string());
@ -846,7 +840,7 @@ void register_WeighRsp_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_WeighRsp, type_name_WeighRsp.to_string(), type_ids_WeighRsp))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"WeighRsp already registered in TypeObjectRegistry for a different type.");
"InternalSystem::WeighRsp already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -858,12 +852,12 @@ void register_IoCtrlReq_type_identifier(
ReturnCode_t return_code_IoCtrlReq {eprosima::fastdds::dds::RETCODE_OK};
return_code_IoCtrlReq =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"IoCtrlReq", type_ids_IoCtrlReq);
"InternalSystem::IoCtrlReq", type_ids_IoCtrlReq);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_IoCtrlReq)
{
StructTypeFlag struct_flags_IoCtrlReq = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_IoCtrlReq = "IoCtrlReq";
QualifiedTypeName type_name_IoCtrlReq = "InternalSystem::IoCtrlReq";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_IoCtrlReq;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_IoCtrlReq;
CompleteTypeDetail detail_IoCtrlReq = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_IoCtrlReq, ann_custom_IoCtrlReq, type_name_IoCtrlReq.to_string());
@ -1010,7 +1004,7 @@ void register_IoCtrlReq_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_IoCtrlReq, type_name_IoCtrlReq.to_string(), type_ids_IoCtrlReq))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"IoCtrlReq already registered in TypeObjectRegistry for a different type.");
"InternalSystem::IoCtrlReq already registered in TypeObjectRegistry for a different type.");
}
}
}
@ -1022,12 +1016,12 @@ void register_IoCtrlRsp_type_identifier(
ReturnCode_t return_code_IoCtrlRsp {eprosima::fastdds::dds::RETCODE_OK};
return_code_IoCtrlRsp =
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
"IoCtrlRsp", type_ids_IoCtrlRsp);
"InternalSystem::IoCtrlRsp", type_ids_IoCtrlRsp);
if (eprosima::fastdds::dds::RETCODE_OK != return_code_IoCtrlRsp)
{
StructTypeFlag struct_flags_IoCtrlRsp = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::APPENDABLE,
false, false);
QualifiedTypeName type_name_IoCtrlRsp = "IoCtrlRsp";
QualifiedTypeName type_name_IoCtrlRsp = "InternalSystem::IoCtrlRsp";
eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_IoCtrlRsp;
eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_IoCtrlRsp;
CompleteTypeDetail detail_IoCtrlRsp = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_IoCtrlRsp, ann_custom_IoCtrlRsp, type_name_IoCtrlRsp.to_string());
@ -1174,8 +1168,10 @@ void register_IoCtrlRsp_type_identifier(
TypeObjectUtils::build_and_register_struct_type_object(struct_type_IoCtrlRsp, type_name_IoCtrlRsp.to_string(), type_ids_IoCtrlRsp))
{
EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
"IoCtrlRsp already registered in TypeObjectRegistry for a different type.");
"InternalSystem::IoCtrlRsp already registered in TypeObjectRegistry for a different type.");
}
}
}
} // namespace InternalSystem

@ -19,8 +19,8 @@
* This file was generated by the tool fastddsgen.
*/
#ifndef FAST_DDS_GENERATED__SYSTEM_TYPE_OBJECT_SUPPORT_HPP
#define FAST_DDS_GENERATED__SYSTEM_TYPE_OBJECT_SUPPORT_HPP
#ifndef FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_TYPE_OBJECT_SUPPORT_HPP
#define FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_TYPE_OBJECT_SUPPORT_HPP
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
@ -37,6 +37,7 @@
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
namespace InternalSystem {
/**
* @brief Register LicencePlateReq related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -49,6 +50,7 @@
*/
eProsima_user_DllExport void register_LicencePlateReq_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register LicencePlateRsp related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -61,6 +63,7 @@ eProsima_user_DllExport void register_LicencePlateReq_type_identifier(
*/
eProsima_user_DllExport void register_LicencePlateRsp_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register PrintReq related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -73,6 +76,7 @@ eProsima_user_DllExport void register_LicencePlateRsp_type_identifier(
*/
eProsima_user_DllExport void register_PrintReq_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register PrintRsp related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -85,6 +89,7 @@ eProsima_user_DllExport void register_PrintReq_type_identifier(
*/
eProsima_user_DllExport void register_PrintRsp_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register WeighReq related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -97,6 +102,7 @@ eProsima_user_DllExport void register_PrintRsp_type_identifier(
*/
eProsima_user_DllExport void register_WeighReq_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register WeighRsp related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -109,6 +115,7 @@ eProsima_user_DllExport void register_WeighReq_type_identifier(
*/
eProsima_user_DllExport void register_WeighRsp_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register IoCtrlReq related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -121,6 +128,7 @@ eProsima_user_DllExport void register_WeighRsp_type_identifier(
*/
eProsima_user_DllExport void register_IoCtrlReq_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register IoCtrlRsp related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
@ -134,7 +142,9 @@ eProsima_user_DllExport void register_IoCtrlReq_type_identifier(
eProsima_user_DllExport void register_IoCtrlRsp_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
} // namespace InternalSystem
#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
#endif // FAST_DDS_GENERATED__SYSTEM_TYPE_OBJECT_SUPPORT_HPP
#endif // FAST_DDS_GENERATED__INTERNALSYSTEM_SYSTEM_TYPE_OBJECT_SUPPORT_HPP

@ -63,7 +63,7 @@ PublisherApp::PublisherApp(
participant_ = factory_->create_participant(domain_id, pqos, nullptr, StatusMask::none());
if (participant_ == nullptr)
{
throw std::runtime_error("PrintRsp Participant initialization failed");
throw std::runtime_error("InternalSystem::PrintRsp Participant initialization failed");
}
// Register the type
@ -75,7 +75,7 @@ PublisherApp::PublisherApp(
publisher_ = participant_->create_publisher(pub_qos, nullptr, StatusMask::none());
if (publisher_ == nullptr)
{
throw std::runtime_error("PrintRsp Publisher initialization failed");
throw std::runtime_error("InternalSystem::PrintRsp Publisher initialization failed");
}
// Create the topic
@ -84,7 +84,7 @@ PublisherApp::PublisherApp(
topic_ = participant_->create_topic("PrintRspTopic", type_.get_type_name(), topic_qos);
if (topic_ == nullptr)
{
throw std::runtime_error("PrintRsp Topic initialization failed");
throw std::runtime_error("InternalSystem::PrintRsp Topic initialization failed");
}
// Create the data writer
@ -96,7 +96,7 @@ PublisherApp::PublisherApp(
writer_ = publisher_->create_datawriter(topic_, writer_qos, this, StatusMask::all());
if (writer_ == nullptr)
{
throw std::runtime_error("PrintRsp DataWriter initialization failed");
throw std::runtime_error("InternalSystem::PrintRsp DataWriter initialization failed");
}
}
@ -149,14 +149,14 @@ void PublisherApp::run(std::shared_ptr<MsgHandler> handler)
{
if(!MsgData::PrintReq_queue_.empty())
{
PrintReq req = std::move(MsgData::PrintReq_queue_.front());
InternalSystem::PrintReq req = std::move(MsgData::PrintReq_queue_.front());
MsgData::PrintReq_queue_.pop();
lock.unlock();
std::cout << "index: " << req.index() << std::endl;
handler->HandleDdsMsg(req.msg());
PrintRsp rsp;
InternalSystem::PrintRsp rsp;
rsp.index() = req.index();
rsp.msg() = "success";
writer_->write(&rsp);
@ -190,7 +190,7 @@ bool PublisherApp::publish()
if (!is_stopped())
{
/* Initialize your structure here */
WeighRsp sample_;
InternalSystem::LicencePlateRsp sample_;
ret = (RETCODE_OK == writer_->write(&sample_));
}
return ret;

@ -58,7 +58,7 @@ SubscriberApp::SubscriberApp(
participant_ = factory_->create_participant(domain_id, pqos, nullptr, StatusMask::none());
if (participant_ == nullptr)
{
throw std::runtime_error("PrintReq Participant initialization failed");
throw std::runtime_error("InternalSystem::PrintReq Participant initialization failed");
}
// Register the type
@ -70,7 +70,7 @@ SubscriberApp::SubscriberApp(
subscriber_ = participant_->create_subscriber(sub_qos, nullptr, StatusMask::none());
if (subscriber_ == nullptr)
{
throw std::runtime_error("PrintReq Subscriber initialization failed");
throw std::runtime_error("InternalSystem::PrintReq Subscriber initialization failed");
}
// Create the topic
@ -79,7 +79,7 @@ SubscriberApp::SubscriberApp(
topic_ = participant_->create_topic("PrintReqTopic", type_.get_type_name(), topic_qos);
if (topic_ == nullptr)
{
throw std::runtime_error("PrintReq Topic initialization failed");
throw std::runtime_error("InternalSystem::PrintReq Topic initialization failed");
}
// Create the reader
@ -91,7 +91,7 @@ SubscriberApp::SubscriberApp(
reader_ = subscriber_->create_datareader(topic_, reader_qos, this, StatusMask::all());
if (reader_ == nullptr)
{
throw std::runtime_error("PrintReq DataReader initialization failed");
throw std::runtime_error("InternalSystem::PrintReq DataReader initialization failed");
}
}
@ -135,7 +135,7 @@ void SubscriberApp::on_data_available(
if (topic_name == "PrintReqTopic")
{
PrintReq sample_;
InternalSystem::PrintReq sample_;
while ((!is_stopped()) && (RETCODE_OK == reader->take_next_sample(&sample_, &info)))
{
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)

@ -64,7 +64,7 @@ std::string parse_signal(
}
}
std::queue<PrintReq> MsgData::PrintReq_queue_;
std::queue<InternalSystem::PrintReq> MsgData::PrintReq_queue_;
std::mutex MsgData::queue_cv_mtx_;
int main(int argc, char** argv)

@ -7,7 +7,7 @@
class MsgData {
public:
static std::queue<PrintReq> PrintReq_queue_;
static std::queue<InternalSystem::PrintReq> PrintReq_queue_;
static std::mutex queue_cv_mtx_;
};

Loading…
Cancel
Save