Go to the documentation of this file.
5 #ifndef UAVCAN_PROTOCOL_RESTART_REQUEST_SERVER_HPP_INCLUDED
6 #define UAVCAN_PROTOCOL_RESTART_REQUEST_SERVER_HPP_INCLUDED
11 #include <uavcan/protocol/RestartNode.hpp>
31 virtual bool handleRestartRequest(
NodeID request_source) = 0;
48 protocol::RestartNode::Response& response)
const
52 if (request.magic_number == protocol::RestartNode::Request::MAGIC_NUMBER)
62 UAVCAN_TRACE(
"RestartRequestServer",
"Invalid magic number 0x%llx",
63 static_cast<unsigned long long>(request.magic_number));
92 #endif // UAVCAN_PROTOCOL_RESTART_REQUEST_SERVER_HPP_INCLUDED
const std::string response
void handleRestartNode(const ReceivedDataStructure< protocol::RestartNode::Request > &request, protocol::RestartNode::Response &response) const
RestartRequestServer(INode &node)
virtual bool handleRestartRequest(NodeID request_source)=0
ServiceServer< protocol::RestartNode, RestartNodeCallback > srv_
void setHandler(IRestartRequestHandler *handler)
#define UAVCAN_TRACE(...)
virtual ~IRestartRequestHandler()
int start(const Callback &callback)
IRestartRequestHandler * getHandler() const
NodeID getSrcNodeID() const
IRestartRequestHandler * handler_