YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ControlBoardServerImpl.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef YARP_DEV_CONTROLBOARDSERVERIMPL_H
7#define YARP_DEV_CONTROLBOARDSERVERIMPL_H
8
9#include <mutex>
10
11#include "ControlBoardMsgs.h"
13
15{
16 private:
17 mutable std::mutex m_mutex;
18 yarp::dev::IJointBrake* m_iJointBrake = nullptr;
19 yarp::dev::IVelocityDirect* m_iVelocityDirect = nullptr;
20
21 public:
23 yarp::dev::IVelocityDirect* IVelocityDirect)
24 {
25 m_iJointBrake = iJointBrake;
26 m_iVelocityDirect = IVelocityDirect;
27 }
28
29 //IJointBrake
30 return_isJointBraked isJointBrakedRPC(const std::int32_t j) const override;
31 yarp::dev::ReturnValue setManualBrakeActiveRPC(const std::int32_t j, const bool active) override;
32 yarp::dev::ReturnValue setAutoBrakeEnabledRPC(const std::int32_t j, const bool enabled) override;
33 return_getAutoBrakeEnabled getAutoBrakeEnabledRPC(const std::int32_t j) const override;
34
35 // IVelocityDirect
36 return_getAxes getAxesRPC() const override;
37 return_getDesiredVelocityOne getDesiredVelocityOneRPC(const std::int32_t j) const override;
39 return_getDesiredVelocityGroup getDesiredVelocityGroupRPC(const std::vector<std::int32_t>& jnts) const override;
40
41 std::mutex* getMutex() {return &m_mutex;}
42};
43
44#endif // YARP_DEV_CONTROLBOARDSERVERIMPL_H
define control board standard interfaces
return_getAxes getAxesRPC() const override
return_getDesiredVelocityOne getDesiredVelocityOneRPC(const std::int32_t j) const override
yarp::dev::ReturnValue setManualBrakeActiveRPC(const std::int32_t j, const bool active) override
return_getDesiredVelocityGroup getDesiredVelocityGroupRPC(const std::vector< std::int32_t > &jnts) const override
yarp::dev::ReturnValue setAutoBrakeEnabledRPC(const std::int32_t j, const bool enabled) override
ControlBoardRPCd(yarp::dev::IJointBrake *iJointBrake, yarp::dev::IVelocityDirect *IVelocityDirect)
return_getDesiredVelocityAll getDesiredVelocityAllRPC() const override
return_isJointBraked isJointBrakedRPC(const std::int32_t j) const override
return_getAutoBrakeEnabled getAutoBrakeEnabledRPC(const std::int32_t j) const override
Interface for controlling a joint equipped with brakes (hardware or simulated).
Definition IJointBrake.h:23
Interface for control boards implementing direct velocity control.