Skip to content

Commit 3dc62e2

Browse files
authored
rename command/state handles to command/state interfaces (#223)
Signed-off-by: Karsten Knese <[email protected]>
1 parent 3466439 commit 3dc62e2

File tree

12 files changed

+162
-161
lines changed

12 files changed

+162
-161
lines changed

hardware_interface/include/hardware_interface/components/actuator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ class Actuator final
4545
return_type configure(const HardwareInfo & actuator_info);
4646

4747
HARDWARE_INTERFACE_PUBLIC
48-
std::vector<StateHandle> export_state_handles();
48+
std::vector<StateInterface> export_state_interfaces();
4949

5050
HARDWARE_INTERFACE_PUBLIC
51-
std::vector<CommandHandle> export_command_handles();
51+
std::vector<CommandInterface> export_command_interfaces();
5252

5353
HARDWARE_INTERFACE_PUBLIC
5454
return_type start();

hardware_interface/include/hardware_interface/components/actuator_interface.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,29 @@ class ActuatorInterface
5050
virtual
5151
return_type configure(const HardwareInfo & actuator_info) = 0;
5252

53-
/// Exports all state handles for this actuator.
53+
/// Exports all state interfaces for this actuator.
5454
/**
55-
* The state handles have to be created and transfered according
55+
* The state interfaces have to be created and transfered according
5656
* to the actuator info passed in for the configuration.
5757
*
58-
* Note the ownership over the state handles must be released.
58+
* Note the ownership over the state interfaces is transfered to the caller.
5959
*
60-
* \return vector of state handles
60+
* \return vector of state interfaces
6161
*/
6262
virtual
63-
std::vector<StateHandle> export_state_handles() = 0;
63+
std::vector<StateInterface> export_state_interfaces() = 0;
6464

65-
/// Exports all command handles for this actuator.
65+
/// Exports all command interfaces for this actuator.
6666
/**
67-
* The command handles have to be created and transfered according
67+
* The command interfaces have to be created and transfered according
6868
* to the actuator info passed in for the configuration.
6969
*
70-
* Note the ownership over the command handles must be released.
70+
* Note the ownership over the state interfaces is transfered to the caller.
7171
*
72-
* \return vector of command handles
72+
* \return vector of command interfaces
7373
*/
7474
virtual
75-
std::vector<CommandHandle> export_command_handles() = 0;
75+
std::vector<CommandInterface> export_command_interfaces() = 0;
7676

7777
/**
7878
* \brief Start exchange data with the hardware.
@@ -101,8 +101,8 @@ class ActuatorInterface
101101
/// Read the current state values from the actuator.
102102
/**
103103
* The data readings from the physical hardware has to be updated
104-
* and reflected accordingly in the exported state handles.
105-
* That is, the data pointed by the handles shall be updated.
104+
* and reflected accordingly in the exported state interfaces.
105+
* That is, the data pointed by the interfaces shall be updated.
106106
*
107107
* \return return_type::OK if the read was successful, return_type::ERROR otherwise.
108108
*/
@@ -112,7 +112,7 @@ class ActuatorInterface
112112
/// Write the current command values to the actuator.
113113
/**
114114
* The physical hardware shall be updated with the latest value from
115-
* the exported command handles.
115+
* the exported command interfaces.
116116
*
117117
* \return return_type::OK if the read was successful, return_type::ERROR otherwise.
118118
*/

hardware_interface/include/hardware_interface/components/sensor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Sensor final
4747
return_type configure(const HardwareInfo & sensor_info);
4848

4949
HARDWARE_INTERFACE_PUBLIC
50-
std::vector<StateHandle> export_state_handles();
50+
std::vector<StateInterface> export_state_interfaces();
5151

5252
HARDWARE_INTERFACE_PUBLIC
5353
return_type start();

hardware_interface/include/hardware_interface/components/sensor_interface.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ class SensorInterface
5050
virtual
5151
return_type configure(const HardwareInfo & sensor_info) = 0;
5252

53-
/// Exports all state handles for this sensor.
53+
/// Exports all state interfaces for this sensor.
5454
/**
55-
* The state handles have to be created and transfered according
55+
* The state interfaces have to be created and transfered according
5656
* to the sensor info passed in for the configuration.
5757
*
58-
* Note the ownership over the state handles must be released.
58+
* Note the ownership over the state interfaces is transfered to the caller.
5959
*
60-
* \return vector of state handles
60+
* \return vector of state interfaces
6161
*/
6262
virtual
63-
std::vector<StateHandle> export_state_handles() = 0;
63+
std::vector<StateInterface> export_state_interfaces() = 0;
6464

6565
/**
6666
* \brief Start exchange data with the hardware.
@@ -89,8 +89,8 @@ class SensorInterface
8989
/// Read the current state values from the sensor.
9090
/**
9191
* The data readings from the physical hardware has to be updated
92-
* and reflected accordingly in the exported state handles.
93-
* That is, the data pointed by the handles shall be updated.
92+
* and reflected accordingly in the exported state interfaces.
93+
* That is, the data pointed by the interfaces shall be updated.
9494
*
9595
* \return return_type::OK if the read was successful, return_type::ERROR otherwise.
9696
*/

hardware_interface/include/hardware_interface/components/system.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ class System final
4545
return_type configure(const HardwareInfo & system_info);
4646

4747
HARDWARE_INTERFACE_PUBLIC
48-
std::vector<StateHandle> export_state_handles();
48+
std::vector<StateInterface> export_state_interfaces();
4949

5050
HARDWARE_INTERFACE_PUBLIC
51-
std::vector<CommandHandle> export_command_handles();
51+
std::vector<CommandInterface> export_command_interfaces();
5252

5353
HARDWARE_INTERFACE_PUBLIC
5454
return_type start();

hardware_interface/include/hardware_interface/components/system_interface.hpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,30 @@ class SystemInterface
5151
virtual
5252
return_type configure(const HardwareInfo & system_info) = 0;
5353

54-
/// Exports all state handles for this system.
54+
/// Exports all state interfaces for this system.
5555
/**
56-
* The state handles have to be created and transfered according
56+
* The state interfaces have to be created and transfered according
5757
* to the system info passed in for the configuration.
5858
*
59-
* Note the ownership over the state handles must be released.
59+
* Note the ownership over the state interfaces is transfered to the caller.
6060
*
61-
* \return vector of state handles
61+
*
62+
* \return vector of state interfaces
6263
*/
6364
virtual
64-
std::vector<StateHandle> export_state_handles() = 0;
65+
std::vector<StateInterface> export_state_interfaces() = 0;
6566

66-
/// Exports all command handles for this system.
67+
/// Exports all command interfaces for this system.
6768
/**
68-
* The command handles have to be created and transfered according
69+
* The command interfaces have to be created and transfered according
6970
* to the system info passed in for the configuration.
7071
*
71-
* Note the ownership over the command handles must be released.
72+
* Note the ownership over the state interfaces is transfered to the caller.
7273
*
73-
* \return vector of command handles
74+
* \return vector of command interfaces
7475
*/
7576
virtual
76-
std::vector<CommandHandle> export_command_handles() = 0;
77+
std::vector<CommandInterface> export_command_interfaces() = 0;
7778

7879
/**
7980
* \brief Start exchange data with the hardware.
@@ -102,8 +103,8 @@ class SystemInterface
102103
/// Read the current state values from the actuators and sensors within the system.
103104
/**
104105
* The data readings from the physical hardware has to be updated
105-
* and reflected accordingly in the exported state handles.
106-
* That is, the data pointed by the handles shall be updated.
106+
* and reflected accordingly in the exported state interfaces.
107+
* That is, the data pointed by the interfaces shall be updated.
107108
*
108109
* \return return_type::OK if the read was successful, return_type::ERROR otherwise.
109110
*/
@@ -113,7 +114,7 @@ class SystemInterface
113114
/// Write the current command values to the actuator within the system.
114115
/**
115116
* The physical hardware shall be updated with the latest value from
116-
* the exported command handles.
117+
* the exported command interfaces.
117118
*
118119
* \return return_type::OK if the read was successful, return_type::ERROR otherwise.
119120
*/

hardware_interface/include/hardware_interface/handle.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,24 @@ class ReadWriteHandle : public ReadOnlyHandle<HandleType>
136136
}
137137
};
138138

139-
class StateHandle : public ReadOnlyHandle<StateHandle>
139+
class StateInterface : public ReadOnlyHandle<StateInterface>
140140
{
141141
public:
142-
StateHandle(const StateHandle & other) = delete;
142+
StateInterface(const StateInterface & other) = delete;
143143

144-
StateHandle(StateHandle && other) = default;
144+
StateInterface(StateInterface && other) = default;
145145

146-
using ReadOnlyHandle<StateHandle>::ReadOnlyHandle;
146+
using ReadOnlyHandle<StateInterface>::ReadOnlyHandle;
147147
};
148148

149-
class CommandHandle : public ReadWriteHandle<CommandHandle>
149+
class CommandInterface : public ReadWriteHandle<CommandInterface>
150150
{
151151
public:
152-
CommandHandle(const CommandHandle & other) = delete;
152+
CommandInterface(const CommandInterface & other) = delete;
153153

154-
CommandHandle(CommandHandle && other) = default;
154+
CommandInterface(CommandInterface && other) = default;
155155

156-
using ReadWriteHandle<CommandHandle>::ReadWriteHandle;
156+
using ReadWriteHandle<CommandInterface>::ReadWriteHandle;
157157
};
158158

159159
} // namespace hardware_interface

hardware_interface/src/components/actuator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ return_type Actuator::configure(const HardwareInfo & actuator_info)
4040
return impl_->configure(actuator_info);
4141
}
4242

43-
std::vector<StateHandle> Actuator::export_state_handles()
43+
std::vector<StateInterface> Actuator::export_state_interfaces()
4444
{
4545
// TODO(karsten1987): Might be worth to do some brief sanity check here
46-
return impl_->export_state_handles();
46+
return impl_->export_state_interfaces();
4747
}
4848

49-
std::vector<CommandHandle> Actuator::export_command_handles()
49+
std::vector<CommandInterface> Actuator::export_command_interfaces()
5050
{
5151
// TODO(karsten1987): Might be worth to do some brief sanity check here
52-
return impl_->export_command_handles();
52+
return impl_->export_command_interfaces();
5353
}
5454

5555
return_type Actuator::start()

hardware_interface/src/components/sensor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ return_type Sensor::configure(const HardwareInfo & sensor_info)
3939
return impl_->configure(sensor_info);
4040
}
4141

42-
std::vector<StateHandle> Sensor::export_state_handles()
42+
std::vector<StateInterface> Sensor::export_state_interfaces()
4343
{
44-
return impl_->export_state_handles();
44+
return impl_->export_state_interfaces();
4545
}
4646

4747
return_type Sensor::start()

hardware_interface/src/components/system.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ return_type System::configure(const HardwareInfo & system_info)
3939
return impl_->configure(system_info);
4040
}
4141

42-
std::vector<StateHandle> System::export_state_handles()
42+
std::vector<StateInterface> System::export_state_interfaces()
4343
{
44-
return impl_->export_state_handles();
44+
return impl_->export_state_interfaces();
4545
}
4646

47-
std::vector<CommandHandle> System::export_command_handles()
47+
std::vector<CommandInterface> System::export_command_interfaces()
4848
{
49-
return impl_->export_command_handles();
49+
return impl_->export_command_interfaces();
5050
}
5151

5252
return_type System::start()

0 commit comments

Comments
 (0)