13#ifndef RTCTK_REUSABLECOMPONENT_TELREPUB_TELREPUBBUSINESSLOGIC_HPP
14#define RTCTK_REUSABLECOMPONENT_TELREPUB_TELREPUBBUSINESSLOGIC_HPP
16#include <fastdds/dds/publisher/DataWriter.hpp>
20#include "numapp/numapolicies.hpp"
27#include <rad/logger.hpp>
28#include <rad/mal/utils.hpp>
84 std::uint16_t sim_freq_arg,
85 std::uint32_t sim_payload_size_arg,
86 std::int32_t mudpi_topic_id_arg,
87 std::int32_t receiver_index_arg,
88 componentFramework::DataWriter& data_writer,
90 std::uint32_t queue_size,
91 std::uint32_t expected_sample_id_increment,
92 numapp::NumaPolicies
const& thread_policies,
Component metrics interface.
Definition: componentMetricsIf.hpp:184
All functionallty needed to create DDS entities for DDS data publishing is concentrated in this class...
Definition: ddsPub.hpp:45
Definition: runnable.hpp:35
Container class that holds services of any type.
Definition: serviceContainer.hpp:39
Processing MUDPI data received by UDP receiver: rtctk::telRepub::UdpReceiver.
Definition: mudpiProcessor.hpp:44
DDS publisher thread class that supports production and simulation mode.
Definition: ddsPubThread.hpp:46
Telemetry Republisher business logic.
Definition: telRepubBusinessLogic.hpp:51
void ActivityUpdating(StopToken st, JsonPayload const &args) override
Definition: telRepubBusinessLogic.cpp:464
void CreateMudpiReceivers()
Creates UDPI receivers (rtctk::telRepub::UdpReceiver), reading configuration from the Runtime Configu...
Definition: telRepubBusinessLogic.cpp:89
std::unique_ptr< DdsPub > m_dds_pub
Definition: telRepubBusinessLogic.hpp:139
void ActivityEnabling(StopToken st) override
Definition: telRepubBusinessLogic.cpp:428
void ActivityStarting(StopToken st) override
Definition: telRepubBusinessLogic.cpp:419
void ActivityInitialising(StopToken st) override
Definition: telRepubBusinessLogic.cpp:410
const std::string m_name
Component name.
Definition: telRepubBusinessLogic.hpp:133
void ActivityGoingIdle(StopToken st) override
Definition: telRepubBusinessLogic.cpp:437
void DeleteMudpiReceivers()
Deletes UDPI receivers (rtctk::telRepub::UdpReceiver).
Definition: telRepubBusinessLogic.cpp:200
componentFramework::ComponentMetricsIf & m_component_metrics
references to component metrices service
Definition: telRepubBusinessLogic.hpp:151
uint16_t m_sim_freq
Determines if this is simulating DDS publishing (>0) and which frequency.
Definition: telRepubBusinessLogic.hpp:137
void ActivityRunning(StopToken st) override
Definition: telRepubBusinessLogic.cpp:440
void ActivityRecovering(StopToken st) override
Definition: telRepubBusinessLogic.cpp:425
std::vector< DdsPublisherContext > m_pub_threads
DDS publishers.
Definition: telRepubBusinessLogic.hpp:161
RepubWranglerFactory m_wrangler_factory
Factory for wrangler functions, depending on the topic id.
Definition: telRepubBusinessLogic.hpp:166
bool GuardUpdatingAllowed(JsonPayload const &args) override
Definition: telRepubBusinessLogic.cpp:468
log4cplus::Logger & m_logger
Logger object reference of this class.
Definition: telRepubBusinessLogic.hpp:128
virtual ~TelRepubBusinessLogic()
Definition: telRepubBusinessLogic.cpp:84
std::vector< std::unique_ptr< UdpReceiver > > m_udp_receivers
vector of UDP receivers
Definition: telRepubBusinessLogic.hpp:156
void ActivityGoingRunning(StopToken st) override
Definition: telRepubBusinessLogic.cpp:434
void ActivityDisabling(StopToken st) override
Definition: telRepubBusinessLogic.cpp:431
rtctk::componentFramework::ServiceContainer & m_service_container
Reference to container services needed to access the Runtime Configuration Repository for configurati...
Definition: telRepubBusinessLogic.hpp:145
void CreateDdsPubs()
Creates DDS publishers (rtctk::componentFramework::DdsPub), reading configuration from the Runtime Co...
Definition: telRepubBusinessLogic.cpp:207
void DeleteDdsPubs()
Deletes DDS publishers (rtctk::componentFramework::DdsPub).
Definition: telRepubBusinessLogic.cpp:395
Receiving UDP data asynchronously and forwards received packets to provided packet processors.
Definition: udpReceiver.hpp:48
Header file for ComponentMetricsIf.
Logging Support Library based on log4cplus.
Definition: commandReplier.cpp:22
nlohmann::json JsonPayload
Type requirements:
Definition: jsonPayload.hpp:25
rad::StopToken StopToken
Definition: stopToken.hpp:20
Definition: ddsPubThread.cpp:17
Runnable< RtcComponent > LifeCycle
Definition: telRepubBusinessLogic.hpp:36
std::function< std::error_code(const gsl::span< const gsl::span< const uint8_t > >, std::vector< uint8_t > &)> WranglerFunction
The wrangler function that is called with a span of spans containing the payload and an vector where ...
Definition: wrangler.hpp:29
std::function< WranglerFunction(int32_t)> RepubWranglerFactory
Definition: telRepubBusinessLogic.hpp:38
Definition: commandReplier.cpp:22
Wrangler: User extension point.
Lifecycle of a basic 'RtcComponent'.
Lifecycle Extension that makes an RTC Component 'Runnable'.
A container that can hold any type of service.
Life cycle extension to make RtcComponent Runnable.
Definition: runnable.hpp:31
Definition: telRepubBusinessLogic.hpp:82
std::uint16_t mudpi_topic_id
Definition: telRepubBusinessLogic.hpp:95
DdsPublisherContext(DdsPublisherContext &&) noexcept=default
std::uint16_t receiver_index
Identifies which UDP receiver it should be associated with.
Definition: telRepubBusinessLogic.hpp:99
WranglerFunction wrangler
Definition: telRepubBusinessLogic.hpp:101
std::unique_ptr< PubThread > pub_thread
Definition: telRepubBusinessLogic.hpp:100