get_node_info_mock_server.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Pavel Kirienko <pavel.kirienko@gmail.com>
3  */
4 
5 #pragma once
6 
7 #include <iostream>
11 #include <uavcan/protocol/GetNodeInfo.hpp>
12 
14 {
16  void (GetNodeInfoMockServer::*)(const uavcan::ReceivedDataStructure<uavcan::protocol::GetNodeInfo::Request>&,
17  uavcan::protocol::GetNodeInfo::Response&) const>
19 
21 
22  void handleRequest(const uavcan::ReceivedDataStructure<uavcan::protocol::GetNodeInfo::Request>& req,
23  uavcan::protocol::GetNodeInfo::Response& res) const
24  {
25  res = response;
26  std::cout << "GET NODE INFO:\nREQUEST\n" << req << "RESPONSE\n" << res << std::endl;
27  }
28 
29 public:
30  uavcan::protocol::GetNodeInfo::Response response;
31 
33 
35 };
void handleRequest(const uavcan::ReceivedDataStructure< uavcan::protocol::GetNodeInfo::Request > &req, uavcan::protocol::GetNodeInfo::Response &res) const
uavcan::ServiceServer< uavcan::protocol::GetNodeInfo, GetNodeInfoCallback > server_
GetNodeInfoMockServer(uavcan::INode &node)
uavcan::protocol::GetNodeInfo::Response response
int start(const Callback &callback)
uavcan::MethodBinder< GetNodeInfoMockServer *, void(GetNodeInfoMockServer::*)(const uavcan::ReceivedDataStructure< uavcan::protocol::GetNodeInfo::Request > &, uavcan::protocol::GetNodeInfo::Response &) const > GetNodeInfoCallback


uavcan_communicator
Author(s):
autogenerated on Wed Jan 11 2023 03:59:39