12#ifndef RTCTK_TELSUB_MAIN_HPP
13#define RTCTK_TELSUB_MAIN_HPP
15#include "ciiException.hpp"
17#include <boost/interprocess/exceptions.hpp>
19#include <memory_resource>
48template <
class UserTopicType,
class DataBlender>
52 const std::string& name,
61 -> std::unique_ptr<OperationalLogicIf> {
66 size_t size = (
params.dds_params.m_topics.size() + 1u) * (
76 std::unique_ptr<std::byte[]>
mem(
new std::byte[
size]);
79 auto resource = std::make_unique<std::pmr::monotonic_buffer_resource>(
mem.get(),
size);
85 auto correlator = std::make_unique<Correlator>(
88 auto writer = ipcq::Writer<UserTopicType>(
params.shm_params.topic_name.c_str(),
89 params.shm_params.capacity,
90 params.shm_params.mem_policy);
92 return std::make_unique<OperationalLogic>(
params.operational_params,
99 }
catch (boost::interprocess::interprocess_exception&
e) {
103 fmt::format(
"Failed to create SHM queue {}, does it already exist?",
104 params.shm_params.topic_name.c_str()));
108 return std::make_unique<BusinessLogic>(name, services, std::move(
op_logic_factory));
Alert Service interface.
Definition alertServiceIf.hpp:128
Class used to parse default command line arguments.
Definition rtcComponentArgs.hpp:33
Component metrics interface.
Definition componentMetricsIf.hpp:85
The RtctkException class is the base class for all Rtctk exceptions.
Definition exceptions.hpp:211
Container class that holds services of any type.
Definition serviceContainer.hpp:39
Declares the DdsWaitSet implementation.
Provides macros and utilities for exception handling.
int Main(int argc, char *argv[])
Main function implementation.
Definition rtcComponentMain.hpp:231
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
rtctk::componentFramework::AgnosticTopicSeq DdsSampleSeq
Definition agnosticDataSamples.hpp:30
rtctk::componentFramework::SampleInfoSeq DdsInfoSeq
Definition agnosticDataSamples.hpp:32
Implements the business logic for telSub.
Provides core functionality of an RTC Component.
Agnostic data sample non-owning reference type.
Definition dataSampleView.hpp:29
Set of all parameters needed when constructing the OperationalLogic object.
Definition businessLogic.hpp:50