mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 01:50:46 +02:00
changed URCommander to use templated version of URStream
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright 2019, FZI Forschungszentrum Informatik (templating)
|
||||||
|
*
|
||||||
* Copyright 2017, 2018 Simon Rasmussen (refactor)
|
* Copyright 2017, 2018 Simon Rasmussen (refactor)
|
||||||
*
|
*
|
||||||
* Copyright 2015, 2016 Thomas Timm Andersen (original version)
|
* Copyright 2015, 2016 Thomas Timm Andersen (original version)
|
||||||
@@ -21,20 +23,21 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "ur_rtde_driver/comm/stream.h"
|
#include "ur_rtde_driver/comm/stream.h"
|
||||||
|
#include "ur_rtde_driver/primary/package_header.h"
|
||||||
|
|
||||||
namespace ur_driver
|
namespace ur_driver
|
||||||
{
|
{
|
||||||
class URCommander
|
class URCommander
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
comm::URStream& stream_;
|
comm::URStream<primary_interface::PackageHeader>& stream_;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool write(const std::string& s);
|
bool write(const std::string& s);
|
||||||
void formatArray(std::ostringstream& out, std::array<double, 6>& values);
|
void formatArray(std::ostringstream& out, std::array<double, 6>& values);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
URCommander(comm::URStream& stream) : stream_(stream)
|
URCommander(comm::URStream<primary_interface::PackageHeader>& stream) : stream_(stream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +56,7 @@ public:
|
|||||||
class URCommander_V1_X : public URCommander
|
class URCommander_V1_X : public URCommander
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
URCommander_V1_X(comm::URStream& stream) : URCommander(stream)
|
URCommander_V1_X(comm::URStream<primary_interface::PackageHeader>& stream) : URCommander(stream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +68,7 @@ public:
|
|||||||
class URCommander_V3_X : public URCommander
|
class URCommander_V3_X : public URCommander
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
URCommander_V3_X(comm::URStream& stream) : URCommander(stream)
|
URCommander_V3_X(comm::URStream<primary_interface::PackageHeader>& stream) : URCommander(stream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +80,7 @@ public:
|
|||||||
class URCommander_V3_1__2 : public URCommander_V3_X
|
class URCommander_V3_1__2 : public URCommander_V3_X
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
URCommander_V3_1__2(comm::URStream& stream) : URCommander_V3_X(stream)
|
URCommander_V3_1__2(comm::URStream<primary_interface::PackageHeader>& stream) : URCommander_V3_X(stream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,7 +90,7 @@ public:
|
|||||||
class URCommander_V3_3 : public URCommander_V3_X
|
class URCommander_V3_3 : public URCommander_V3_X
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
URCommander_V3_3(comm::URStream& stream) : URCommander_V3_X(stream)
|
URCommander_V3_3(comm::URStream<primary_interface::PackageHeader>& stream) : URCommander_V3_X(stream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user