mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-12 11:00:47 +02:00
Put everyting into ur_rtde_driver namespace
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#include "ur_rtde_driver/ur/commander.h"
|
||||
#include "ur_rtde_driver/log.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
bool URCommander::write(const std::string& s)
|
||||
{
|
||||
size_t len = s.size();
|
||||
@@ -168,3 +170,4 @@ bool URCommander_V3_3::speedj(std::array<double, 6>& speeds, double acceleration
|
||||
std::string s(out.str());
|
||||
return write(s);
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ur_rtde_driver/ur/master_board.h"
|
||||
#include "ur_rtde_driver/ur/consumer.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
bool SharedMasterBoardData::parseWith(BinParser& bp)
|
||||
{
|
||||
bp.parse(analog_input_range0);
|
||||
@@ -118,4 +120,5 @@ bool MasterBoardData_V3_0__1::consumeWith(URStatePacketConsumer& consumer)
|
||||
bool MasterBoardData_V3_2::consumeWith(URStatePacketConsumer& consumer)
|
||||
{
|
||||
return consumer.consume(*this);
|
||||
}
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ur_rtde_driver/ur/messages.h"
|
||||
#include "ur_rtde_driver/ur/consumer.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
bool VersionMessage::parseWith(BinParser& bp)
|
||||
{
|
||||
bp.parse(project_name);
|
||||
@@ -34,4 +36,5 @@ bool VersionMessage::parseWith(BinParser& bp)
|
||||
bool VersionMessage::consumeWith(URMessagePacketConsumer& consumer)
|
||||
{
|
||||
return consumer.consume(*this);
|
||||
}
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ur_rtde_driver/ur/robot_mode.h"
|
||||
#include "ur_rtde_driver/ur/consumer.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
bool SharedRobotModeData::parseWith(BinParser& bp)
|
||||
{
|
||||
bp.parse(timestamp);
|
||||
@@ -100,3 +102,4 @@ bool RobotModeData_V3_5::consumeWith(URStatePacketConsumer& consumer)
|
||||
{
|
||||
return consumer.consume(*this);
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ur_rtde_driver/ur/rt_state.h"
|
||||
#include "ur_rtde_driver/ur/consumer.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
void RTShared::parse_shared1(BinParser& bp)
|
||||
{
|
||||
bp.parse(time);
|
||||
@@ -132,4 +134,5 @@ bool RTState_V3_0__1::consumeWith(URRTPacketConsumer& consumer)
|
||||
bool RTState_V3_2__3::consumeWith(URRTPacketConsumer& consumer)
|
||||
{
|
||||
return consumer.consume(*this);
|
||||
}
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <cstring>
|
||||
#include "ur_rtde_driver/log.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
URServer::URServer(int port) : port_(port)
|
||||
{
|
||||
}
|
||||
@@ -149,3 +151,4 @@ bool URServer::readLine(char* buffer, size_t buf_len)
|
||||
*current_pointer = '\0';
|
||||
return true;
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "ur_rtde_driver/log.h"
|
||||
#include "ur_rtde_driver/ur/stream.h"
|
||||
|
||||
namespace ur_rtde_driver
|
||||
{
|
||||
bool URStream::write(const uint8_t* buf, size_t buf_len, size_t& written)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(write_mutex_);
|
||||
@@ -59,4 +61,5 @@ bool URStream::read(uint8_t* buf, size_t buf_len, size_t& total)
|
||||
}
|
||||
|
||||
return remainder == 0;
|
||||
}
|
||||
}
|
||||
} // namespace ur_rtde_driver
|
||||
|
||||
Reference in New Issue
Block a user