24 #ifndef SMCCONTROLLER_HPP__
25 #define SMCCONTROLLER_HPP__
29 #include <oatpp/core/macro/codegen.hpp>
30 #include <oatpp/core/macro/component.hpp>
31 #include <oatpp/web/server/api/ApiController.hpp>
33 #include "MotionController.hpp"
35 #include OATPP_CODEGEN_BEGIN(ApiController)
39 const std::shared_ptr<oatpp::web::protocol::http::incoming::Request> &request,
41 const T &defaultValue)
43 const oatpp::String param = request->getQueryParameter(name);
48 typename oatpp::data::mapping::type::ObjectWrapperByUnderlyingType<
50 W ret = oatpp::web::server::api::ApiController::TypeInterpretation<
51 decltype(ret)>::fromString(W::Class::CLASS_ID.name, param, success);
53 return ret.getValue(defaultValue);
61 typedef std::shared_ptr<SmcController> Shared;
64 explicit SmcController(OATPP_COMPONENT(std::shared_ptr<ObjectMapper>,
66 oatpp::web::server::api::ApiController(objectMapper)
69 void connect(
const std::shared_ptr<smc::internal::PlatformFactory> &p,
70 const std::shared_ptr<smc::internal::DeviceStore> &d)
76 std::weak_ptr<smc::internal::PlatformFactory> platformFactory;
77 std::weak_ptr<smc::internal::DeviceStore> deviceStore;
80 #include OATPP_CODEGEN_END(ApiController)