mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 18:10:47 +02:00
Add support for version 3.5
A new undocumented uchar was added to RobotMode
This commit is contained in:
committed by
Simon Rasmussen
parent
6950b3c4bd
commit
bf85755744
@@ -94,8 +94,10 @@ public:
|
|||||||
{
|
{
|
||||||
if (minor_version_ < 3)
|
if (minor_version_ < 3)
|
||||||
return std::unique_ptr<URParser<StatePacket>>(new URStateParser_V3_0__1);
|
return std::unique_ptr<URParser<StatePacket>>(new URStateParser_V3_0__1);
|
||||||
else
|
else if (minor_version_ < 5)
|
||||||
return std::unique_ptr<URParser<StatePacket>>(new URStateParser_V3_2);
|
return std::unique_ptr<URParser<StatePacket>>(new URStateParser_V3_2);
|
||||||
|
else
|
||||||
|
return std::unique_ptr<URParser<StatePacket>>(new URStateParser_V3_5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,3 +103,16 @@ public:
|
|||||||
|
|
||||||
static_assert(RobotModeData_V3_2::SIZE == 41, "RobotModeData_V3_2 has missmatched size");
|
static_assert(RobotModeData_V3_2::SIZE == 41, "RobotModeData_V3_2 has missmatched size");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class RobotModeData_V3_5 : public RobotModeData_V3_2
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool parseWith(BinParser& bp);
|
||||||
|
virtual bool consumeWith(URStatePacketConsumer& consumer);
|
||||||
|
|
||||||
|
unsigned char unknown_internal_use;
|
||||||
|
|
||||||
|
static const size_t SIZE = RobotModeData_V3_2::SIZE + sizeof(unsigned char);
|
||||||
|
|
||||||
|
static_assert(RobotModeData_V3_5::SIZE == 42, "RobotModeData_V3_5 has missmatched size");
|
||||||
|
};
|
||||||
|
|||||||
@@ -96,3 +96,4 @@ public:
|
|||||||
typedef URStateParser<RobotModeData_V1_X, MasterBoardData_V1_X> URStateParser_V1_X;
|
typedef URStateParser<RobotModeData_V1_X, MasterBoardData_V1_X> URStateParser_V1_X;
|
||||||
typedef URStateParser<RobotModeData_V3_0__1, MasterBoardData_V3_0__1> URStateParser_V3_0__1;
|
typedef URStateParser<RobotModeData_V3_0__1, MasterBoardData_V3_0__1> URStateParser_V3_0__1;
|
||||||
typedef URStateParser<RobotModeData_V3_2, MasterBoardData_V3_2> URStateParser_V3_2;
|
typedef URStateParser<RobotModeData_V3_2, MasterBoardData_V3_2> URStateParser_V3_2;
|
||||||
|
typedef URStateParser<RobotModeData_V3_5, MasterBoardData_V3_2> URStateParser_V3_5;
|
||||||
|
|||||||
@@ -54,6 +54,18 @@ bool RobotModeData_V3_2::parseWith(BinParser& bp)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RobotModeData_V3_5::parseWith(BinParser& bp)
|
||||||
|
{
|
||||||
|
if (!bp.checkSize<RobotModeData_V3_5>())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
RobotModeData_V3_2::parseWith(bp);
|
||||||
|
|
||||||
|
bp.parse(unknown_internal_use);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool RobotModeData_V1_X::consumeWith(URStatePacketConsumer& consumer)
|
bool RobotModeData_V1_X::consumeWith(URStatePacketConsumer& consumer)
|
||||||
{
|
{
|
||||||
return consumer.consume(*this);
|
return consumer.consume(*this);
|
||||||
@@ -66,3 +78,7 @@ bool RobotModeData_V3_2::consumeWith(URStatePacketConsumer& consumer)
|
|||||||
{
|
{
|
||||||
return consumer.consume(*this);
|
return consumer.consume(*this);
|
||||||
}
|
}
|
||||||
|
bool RobotModeData_V3_5::consumeWith(URStatePacketConsumer& consumer)
|
||||||
|
{
|
||||||
|
return consumer.consume(*this);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user