/* * Copyright (C) 2014 Pavel Kirienko */ #pragma once #include #include #include namespace uavcan { /** * This class provides statistics about the transport layer performance on the local node. * The user's application does not deal with this class directly because it's instantiated by the node class. */ class UAVCAN_EXPORT TransportStatsProvider : Noncopyable { typedef MethodBinder GetTransportStatsCallback; ServiceServer srv_; void handleGetTransportStats(const protocol::GetTransportStats::Request&, protocol::GetTransportStats::Response& resp) const; public: explicit TransportStatsProvider(INode& node) : srv_(node) { } /** * Once started, this class requires no further attention. * Returns negative error code. */ int start(); }; }