27 #ifndef SVHCONTROLCOMMAND_H 28 #define SVHCONTROLCOMMAND_H 30 #include <icl_comm/ByteOrderConversion.h> 101 commands.insert(commands.begin(),positions.begin(),positions.begin()+9);
115 return (commands == other.
commands);
139 o <<
"Pos: " << cc.
position << std::endl;
147 for (std::vector<SVHControlCommand>::const_iterator it = data.
commands.begin() ; it != data.
commands.end(); ++it)
158 for (std::vector<SVHControlCommand>::iterator it = data.
commands.begin() ; it != data.
commands.end(); ++it)
171 for (std::vector<SVHControlCommand>::const_iterator it = cc.
commands.begin() ; it != cc.
commands.end(); ++it)
173 o <<
"Chan " << i <<
" : "<< *it;
181 #endif // SVHCONTROLCOMMAND_H
Structure for transmitting all controllcommands at once.
bool operator==(const SVHControlCommand &other) const
Compares two SVHControlCommand objects.
int32_t position
Returned position value of the motor [Ticks].
icl_comm::ArrayBuilder & operator>>(icl_comm::ArrayBuilder &ab, SVHControlCommand &data)
overload stream operator to easily deserialize control commands for one channel
SVHControlCommandAllChannels(const int32_t &_position0, const int32_t &_position1, const int32_t &_position2, const int32_t &_position3, const int32_t &_position4, const int32_t &_position5, const int32_t &_position6, const int32_t &_position7, const int32_t &_position8)
Constructs a controllcommand adressing all channels at once All.
SVHControlCommandAllChannels()
Constructs an empty SVHControlCommandAllChannels structure pre filled with 9 empty SVHControlCommands...
icl_comm::ArrayBuilder & operator<<(icl_comm::ArrayBuilder &ab, const SVHControlCommand &data)
ControlCommands are given as a single target position for the position controller (given in ticks) ...
SVHControlCommand(const int32_t &_position=0)
Constructs a new control command to comandeer the position of the fingers.
SVHControlCommandAllChannels(const std::vector< int32_t > &positions)
Construct a control command for all channels from a vector. Only the first 9 Values are used...
std::vector< SVHControlCommand > commands
Multiple controllcommands that shall be send at once.