YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementJointBrake.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IMPLEMENTJOINTBRAKE_H
7#define YARP_DEV_IMPLEMENTJOINTBRAKE_H
8
10#include <yarp/dev/api.h>
11#include <vector>
12
13namespace yarp::dev {
14class ImplementJointBrake;
15}
16
18{
19protected:
21 void* m_helper=nullptr;
22 std::vector<int> m_buffer_ints;
23 std::vector<double> m_buffer_doubles;
24 mutable std::mutex m_imp_mutex;
25
32 bool initialize (int size, const int *amap);
33
38 bool uninitialize ();
39
40public:
41 /* Constructor.
42 * @param y is the pointer to the class instance inheriting from this
43 * implementation.
44 */
46
50 virtual ~ImplementJointBrake();
51
52 virtual yarp::dev::ReturnValue isJointBraked(int j, bool& braked) const override;
53 virtual yarp::dev::ReturnValue setManualBrakeActive(int j, bool active) override;
54 virtual yarp::dev::ReturnValue setAutoBrakeEnabled(int j, bool enabled) override;
55 virtual yarp::dev::ReturnValue getAutoBrakeEnabled(int j, bool& enabled) const override;
56};
57
58#endif // YARP_DEV_IMPLEMENTJOINTFAULT_H
Interface for controlling a joint equipped with brakes (hardware or simulated).
Definition IJointBrake.h:70
Interface for controlling a joint equipped with brakes (hardware or simulated).
Definition IJointBrake.h:23
virtual yarp::dev::ReturnValue setManualBrakeActive(int j, bool active) override
Enables/Disables manually the joint brake.
virtual yarp::dev::ReturnValue isJointBraked(int j, bool &braked) const override
Check is the joint brake is currently active.
virtual ~ImplementJointBrake()
Destructor.
bool uninitialize()
Clean up internal data and memory.
bool initialize(int size, const int *amap)
Initialize the internal data and alloc memory.
virtual yarp::dev::ReturnValue setAutoBrakeEnabled(int j, bool enabled) override
Enables/Disables the automatic joint brake.
std::vector< double > m_buffer_doubles
virtual yarp::dev::ReturnValue getAutoBrakeEnabled(int j, bool &enabled) const override
checks if the automatic joint brake mode is enabled or disabled.
For streams capable of holding different kinds of content, check what they actually have.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18