8 #ifndef RTCTK_TELSUB_MAIN_HPP
9 #define RTCTK_TELSUB_MAIN_HPP
34 template <
class UserTopicType,
class DataBlender>
37 [blender = std::forward<DataBlender>(blender)](
38 std::string
const& name,
45 auto op_logic_factory =
47 -> std::unique_ptr<OperationalLogicIf> {
48 auto dds_subscriber = std::make_unique<DdsSubscriber>(params.dds_params);
49 auto correlator = std::make_unique<Correlator>(std::move(dds_subscriber));
50 auto writer = ipcq::Writer<UserTopicType>(params.shm_params.topic_name.c_str(),
51 params.shm_params.capacity,
52 params.shm_params.mem_policy);
53 auto shm_publisher = MakeShmPublisher<UserTopicType>(std::move(writer), blender);
54 return std::make_unique<OperationalLogic>(
55 params.operational_params, std::move(correlator), std::move(shm_publisher));
58 return std::make_unique<BusinessLogic>(name, services, std::move(op_logic_factory));
60 componentFramework::RunAsRtcComponent<BusinessLogic>(args, std::move(factory));
64 #endif // #ifndef RTCTK_TELSUB_MAIN_HPP