13#ifndef HLCC_TELIF_ELTPK_COMMANDSIMPL_HPP
14#define HLCC_TELIF_ELTPK_COMMANDSIMPL_HPP
16#include <rad/smAdapter.hpp>
18#include <eltpk/commands.rad.hpp>
69 std::shared_ptr<PkCommands::SetTargetAltAzPos>
ev = std::make_shared<PkCommands::SetTargetAltAzPos>(
axes_position->clone());
71 m_sm.RegisterDefaultRequestRejectHandler<PkCommands::SetTargetAltAzPos>();
75 elt::mal::future<std::string>
ret_rad =
ev->GetPayload().GetReplyFuture();
76 elt::mal::future<std::string>
ret =
ret_rad.then([](elt::mal::future<std::string>
fut_then) {
77 return ContinuationCheckRejection(std::move(
fut_then),
"SetTargetAltAzPos");
94 <<
", Object_name " <<
preset_data->getObject_name()
95 <<
", Proper_motion_ra " <<
preset_data->getProper_motion_ra()
96 <<
", Proper_motion_dec " <<
preset_data->getProper_motion_dec()
100 <<
", Velocity_offset_ra " <<
preset_data->getVelocity_offset_ra()
101 <<
", Velocity_offset_dec " <<
preset_data->getVelocity_offset_dec() );
105 std::shared_ptr<PkCommands::SetTargetRaDec>
ev = std::make_shared<PkCommands::SetTargetRaDec>(
preset_args->clone());
110 m_sm.RegisterDefaultRequestRejectHandler<PkCommands::SetTargetRaDec>();
114 elt::mal::future<std::string>
ret_rad =
ev->GetPayload().GetReplyFuture();
115 elt::mal::future<std::string>
ret =
ret_rad.then([](elt::mal::future<std::string>
fut_then) {
116 return ContinuationCheckRejection(std::move(
fut_then),
"SetTargetRaDec");
126 ::elt::mal::future<std::string>
SkyOffset(
const std::shared_ptr<::ccsinsif::OffsetSkyArgs>&
offset_args)
override {
131 <<
", Field_stabilization " <<
offset_args->getField_stabilization()
132 <<
", Guide_star_param " <<
offset_args->getGuide_star_param() );
135 auto ev = std::make_shared<PkCommands::SkyOffset>(
offset_args->clone());
137 m_sm.RegisterDefaultRequestRejectHandler<PkCommands::SkyOffset>();
141 elt::mal::future<std::string>
ret_rad =
ev->GetPayload().GetReplyFuture();
142 elt::mal::future<std::string>
ret =
ret_rad.then([](elt::mal::future<std::string>
fut_then) {
143 return ContinuationCheckRejection(std::move(
fut_then),
"SkyOffset");
154 auto ev = std::make_shared<PkCommands::SetObservingWavelength>(
wavelength);
155 m_sm.RegisterDefaultRequestRejectHandler<PkCommands::SetObservingWavelength>();
159 elt::mal::future<std::string>
ret_rad =
ev->GetPayload().GetReplyFuture();
160 elt::mal::future<std::string>
ret =
ret_rad.then([](elt::mal::future<std::string>
fut_then) {
161 return ContinuationCheckRejection(std::move(
fut_then),
"SetObservingWavelength");
171 auto ev = std::make_shared<PkCommands::StopTracking>();
172 m_sm.RegisterDefaultRequestRejectHandler<PkCommands::StopTracking>();
175 return ev->GetPayload().GetReplyFuture();
179 rad::SMAdapter& m_sm;
201 static std::string ContinuationCheckRejection(elt::mal::future<std::string>
future, std::string
method_name) {
203 if (
reply.find(
"Request rejected in state") != std::string::npos) {
DataContext class header file.
Definition commandsImpl.hpp:29
elt::mal::future< std::string > SetTargetAltAzPos(const std::shared_ptr< ccsinsif::AltAz > &axes_position) override
Definition commandsImpl.hpp:61
virtual elt::mal::future< std::string > SetObservingWavelength(double wavelength) override
Definition commandsImpl.hpp:150
virtual ~CommandsImpl()
Definition commandsImpl.hpp:57
::elt::mal::future< std::string > SkyOffset(const std::shared_ptr<::ccsinsif::OffsetSkyArgs > &offset_args) override
Definition commandsImpl.hpp:126
virtual elt::mal::future< std::string > StopTracking() override
Definition commandsImpl.hpp:167
elt::mal::future< std::string > SetTargetRaDec(const std::shared_ptr<::ccsinsif::PresetArgs > &preset_args) override
Definition commandsImpl.hpp:87
CommandsImpl(rad::SMAdapter &sm, DataContext &data)
Definition commandsImpl.hpp:31
Definition dataContext.hpp:125
Definition actionMgr.cpp:31
elt::mal::future< T > future
Definition actionsCommands.cpp:103
log4cplus::Logger & GetLogger()
Definition logger.cpp:21
ccsinsdetifllnetio::PointingKernelPositions data
Definition pkp_llnetio_subscriber.cpp:33