mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-17 16:51:44 +08:00
Merge branch 'stable-1.7' into fix-formatted-read-into-char-buf
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
filter=-build/header_guard
|
||||
filter=-build/include_order
|
||||
filter=-build/include_subdir
|
||||
filter=-build/include_what_you_use
|
||||
filter=-readability/alt_tokens
|
||||
filter=-readability/braces
|
||||
filter=-readability/casting
|
||||
filter=-readability/multiline_comment
|
||||
filter=-runtime/int
|
||||
filter=-runtime/printf
|
||||
filter=-runtime/string
|
||||
filter=-whitespace/braces
|
||||
filter=-whitespace/comments
|
||||
filter=-whitespace/empty_loop_body
|
||||
filter=-whitespace/indent
|
||||
filter=-whitespace/newline
|
||||
linelength=78
|
||||
|
||||
@@ -204,6 +204,8 @@ int ec_soe_request_append_data(
|
||||
|
||||
if (new_total_size > req->mem_size) {
|
||||
size_t new_size;
|
||||
uint8_t *new_data = NULL;
|
||||
|
||||
if (req->mem_size * 2 >= new_total_size) {
|
||||
// just double it to reduce the number of re-allocations
|
||||
new_size = req->mem_size * 2;
|
||||
@@ -212,7 +214,7 @@ int ec_soe_request_append_data(
|
||||
new_size = new_total_size;
|
||||
}
|
||||
|
||||
uint8_t *new_data = (uint8_t *) kmalloc(new_size, GFP_KERNEL);
|
||||
new_data = (uint8_t *) kmalloc(new_size, GFP_KERNEL);
|
||||
if (!new_data) {
|
||||
EC_ERR("Failed to allocate %zu bytes of SoE memory.\n",
|
||||
new_size);
|
||||
|
||||
+15
-12
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -21,12 +21,17 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
||||
#include "Command.h"
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include "NumberListParser.h"
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::map;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -82,7 +87,7 @@ class ConfigAliasParser:
|
||||
public NumberListParser
|
||||
{
|
||||
public:
|
||||
ConfigAliasParser(unsigned int maxAlias):
|
||||
explicit ConfigAliasParser(unsigned int maxAlias):
|
||||
maxAlias(maxAlias) {}
|
||||
|
||||
protected:
|
||||
@@ -98,7 +103,7 @@ class PositionParser:
|
||||
public NumberListParser
|
||||
{
|
||||
public:
|
||||
PositionParser(unsigned int count):
|
||||
explicit PositionParser(unsigned int count):
|
||||
count(count) {}
|
||||
|
||||
protected:
|
||||
@@ -116,7 +121,7 @@ class AliasPositionParser:
|
||||
public NumberListParser
|
||||
{
|
||||
public:
|
||||
AliasPositionParser(const AliasMap &aliasMap):
|
||||
explicit AliasPositionParser(const AliasMap &aliasMap):
|
||||
aliasMap(aliasMap) {}
|
||||
|
||||
protected:
|
||||
@@ -306,7 +311,7 @@ Command::MasterIndexList Command::getMasterIndices() const
|
||||
stringstream err;
|
||||
err << "Failed to obtain number of masters: " << e.what();
|
||||
throwCommandException(err);
|
||||
} catch (runtime_error &e) {
|
||||
} catch (std::runtime_error &e) {
|
||||
stringstream err;
|
||||
err << "Invalid master argument '" << masters << "': " << e.what();
|
||||
throwInvalidUsageException(err);
|
||||
@@ -358,10 +363,9 @@ Command::SlaveList Command::selectedSlaves(MasterDevice &m)
|
||||
NumberListParser::List::const_iterator ai;
|
||||
|
||||
for (ai = aliasList.begin(); ai != aliasList.end(); ai++) {
|
||||
|
||||
// gather slaves with that alias (and following)
|
||||
uint16_t lastAlias = 0;
|
||||
vector<ec_ioctl_slave_t> aliasSlaves;
|
||||
std::vector<ec_ioctl_slave_t> aliasSlaves;
|
||||
|
||||
for (i = 0; i < master.slave_count; i++) {
|
||||
m.getSlave(&slave, i);
|
||||
@@ -440,7 +444,6 @@ Command::ConfigList Command::selectedConfigs(MasterDevice &m)
|
||||
NumberListParser::List::const_iterator ai;
|
||||
|
||||
for (ai = aliasList.begin(); ai != aliasList.end(); ai++) {
|
||||
|
||||
ConfigMap::iterator ci = configs.find(*ai);
|
||||
if (ci == configs.end()) {
|
||||
continue;
|
||||
|
||||
+51
-52
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "../master/ioctl.h"
|
||||
|
||||
@@ -35,34 +34,34 @@ class MasterDevice;
|
||||
/****************************************************************************/
|
||||
|
||||
class InvalidUsageException:
|
||||
public runtime_error
|
||||
public std::runtime_error
|
||||
{
|
||||
friend class Command;
|
||||
|
||||
protected:
|
||||
/** Constructor with stringstream parameter. */
|
||||
InvalidUsageException(
|
||||
const stringstream &s /**< Message. */
|
||||
): runtime_error(s.str()) {}
|
||||
const std::stringstream &s): /**< Message. */
|
||||
std::runtime_error(s.str()) {}
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
class CommandException:
|
||||
public runtime_error
|
||||
public std::runtime_error
|
||||
{
|
||||
friend class Command;
|
||||
|
||||
protected:
|
||||
/** Constructor with char * parameter. */
|
||||
CommandException(
|
||||
const string &msg /**< Message. */
|
||||
): runtime_error(msg) {}
|
||||
const std::string &msg): /**< Message. */
|
||||
std::runtime_error(msg) {}
|
||||
|
||||
/** Constructor with stringstream parameter. */
|
||||
CommandException(
|
||||
const stringstream &s /**< Message. */
|
||||
): runtime_error(s.str()) {}
|
||||
const std::stringstream &s): /**< Message. */
|
||||
std::runtime_error(s.str()) {}
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
@@ -70,16 +69,16 @@ class CommandException:
|
||||
class Command
|
||||
{
|
||||
public:
|
||||
Command(const string &, const string &);
|
||||
Command(const std::string &, const std::string &);
|
||||
virtual ~Command();
|
||||
|
||||
const string &getName() const;
|
||||
const string &getBriefDescription() const;
|
||||
const std::string &getName() const;
|
||||
const std::string &getBriefDescription() const;
|
||||
|
||||
typedef list<unsigned int> MasterIndexList;
|
||||
void setMasters(const string &);
|
||||
typedef std::list<unsigned int> MasterIndexList;
|
||||
void setMasters(const std::string &);
|
||||
MasterIndexList getMasterIndices() const;
|
||||
unsigned int getSingleMasterIndex() const;
|
||||
unsigned int getSingleMasterIndex() const;
|
||||
|
||||
enum Verbosity {
|
||||
Quiet,
|
||||
@@ -89,15 +88,15 @@ class Command
|
||||
void setVerbosity(Verbosity);
|
||||
Verbosity getVerbosity() const;
|
||||
|
||||
void setAliases(const string &);
|
||||
void setPositions(const string &);
|
||||
void setAliases(const std::string &);
|
||||
void setPositions(const std::string &);
|
||||
|
||||
void setDomains(const string &);
|
||||
typedef list<unsigned int> DomainIndexList;
|
||||
void setDomains(const std::string &);
|
||||
typedef std::list<unsigned int> DomainIndexList;
|
||||
DomainIndexList getDomainIndices() const;
|
||||
|
||||
void setDataType(const string &);
|
||||
const string &getDataType() const;
|
||||
void setDataType(const std::string &);
|
||||
const std::string &getDataType() const;
|
||||
|
||||
void setEmergency(bool);
|
||||
bool getEmergency() const;
|
||||
@@ -105,67 +104,67 @@ class Command
|
||||
void setForce(bool);
|
||||
bool getForce() const;
|
||||
|
||||
void setOutputFile(const string &);
|
||||
const string &getOutputFile() const;
|
||||
void setOutputFile(const std::string &);
|
||||
const std::string &getOutputFile() const;
|
||||
|
||||
void setSkin(const string &);
|
||||
const string &getSkin() const;
|
||||
void setSkin(const std::string &);
|
||||
const std::string &getSkin() const;
|
||||
|
||||
bool matchesSubstr(const string &) const;
|
||||
bool matchesAbbrev(const string &) const;
|
||||
bool matchesSubstr(const std::string &) const;
|
||||
bool matchesAbbrev(const std::string &) const;
|
||||
|
||||
virtual string helpString(const string &) const = 0;
|
||||
virtual std::string helpString(const std::string &) const = 0;
|
||||
|
||||
typedef vector<string> StringVector;
|
||||
typedef std::vector<std::string> StringVector;
|
||||
virtual void execute(const StringVector &) = 0;
|
||||
|
||||
static string numericInfo();
|
||||
static std::string numericInfo();
|
||||
|
||||
protected:
|
||||
enum {BreakAfterBytes = 16};
|
||||
|
||||
void throwInvalidUsageException(const stringstream &) const;
|
||||
void throwCommandException(const string &) const;
|
||||
void throwCommandException(const stringstream &) const;
|
||||
void throwInvalidUsageException(const std::stringstream &) const;
|
||||
void throwCommandException(const std::string &) const;
|
||||
void throwCommandException(const std::stringstream &) const;
|
||||
void throwSingleSlaveRequired(unsigned int) const;
|
||||
|
||||
typedef list<ec_ioctl_slave_t> SlaveList;
|
||||
typedef std::list<ec_ioctl_slave_t> SlaveList;
|
||||
SlaveList selectedSlaves(MasterDevice &);
|
||||
typedef list<ec_ioctl_config_t> ConfigList;
|
||||
typedef std::list<ec_ioctl_config_t> ConfigList;
|
||||
ConfigList selectedConfigs(MasterDevice &);
|
||||
typedef list<ec_ioctl_domain_t> DomainList;
|
||||
typedef std::list<ec_ioctl_domain_t> DomainList;
|
||||
DomainList selectedDomains(MasterDevice &, const ec_ioctl_master_t &);
|
||||
int emergencySlave() const;
|
||||
|
||||
static string alStateString(uint8_t);
|
||||
static std::string alStateString(uint8_t);
|
||||
|
||||
private:
|
||||
string name;
|
||||
string briefDesc;
|
||||
string masters;
|
||||
std::string name;
|
||||
std::string briefDesc;
|
||||
std::string masters;
|
||||
Verbosity verbosity;
|
||||
string aliases;
|
||||
string positions;
|
||||
string domains;
|
||||
string dataType;
|
||||
std::string aliases;
|
||||
std::string positions;
|
||||
std::string domains;
|
||||
std::string dataType;
|
||||
bool emergency;
|
||||
bool force;
|
||||
string outputFile;
|
||||
string skin;
|
||||
std::string outputFile;
|
||||
std::string skin;
|
||||
|
||||
Command();
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
inline const string &Command::getName() const
|
||||
inline const std::string &Command::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
inline const string &Command::getBriefDescription() const
|
||||
inline const std::string &Command::getBriefDescription() const
|
||||
{
|
||||
return briefDesc;
|
||||
}
|
||||
@@ -179,7 +178,7 @@ inline Command::Verbosity Command::getVerbosity() const
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
inline const string &Command::getDataType() const
|
||||
inline const std::string &Command::getDataType() const
|
||||
{
|
||||
return dataType;
|
||||
}
|
||||
@@ -200,14 +199,14 @@ inline bool Command::getForce() const
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
inline const string &Command::getOutputFile() const
|
||||
inline const std::string &Command::getOutputFile() const
|
||||
{
|
||||
return outputFile;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
inline const string &Command::getSkin() const
|
||||
inline const std::string &Command::getSkin() const
|
||||
{
|
||||
return skin;
|
||||
}
|
||||
|
||||
+11
-6
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,14 +19,19 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandAlias.h"
|
||||
|
||||
#include "sii_crc.h"
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandAlias.h"
|
||||
#include "sii_crc.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cerr;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -83,7 +88,7 @@ void CommandAlias::execute(const StringVector &args)
|
||||
|
||||
strAlias << args[0];
|
||||
strAlias
|
||||
>> resetiosflags(ios::basefield) // guess base from prefix
|
||||
>> resetiosflags(std::ios::basefield) // guess base from prefix
|
||||
>> number;
|
||||
if (strAlias.fail() || number < 0x0000 || number > 0xffff) {
|
||||
err << "Invalid alias '" << args[0] << "'!";
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandAlias:
|
||||
public:
|
||||
CommandAlias();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
+15
-5
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -21,13 +21,23 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandCStruct.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <string.h>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandCStruct.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::dec;
|
||||
using std::hex;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
using std::cout;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandCStruct:
|
||||
public:
|
||||
CommandCStruct();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
+20
-8
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -22,15 +22,27 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandConfig.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include <arpa/inet.h>
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::dec;
|
||||
using std::hex;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
using std::min;
|
||||
using std::right;
|
||||
using std::left;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -55,11 +67,13 @@ string CommandConfig::helpString(const string &binaryBaseName) const
|
||||
<< "1001:0 0x0000003b/0x02010000 3 OP" << endl
|
||||
<< "| | | |" << endl
|
||||
<< "| | | \\- Application-layer" << endl
|
||||
<< "| | | state of the attached" << endl
|
||||
<< "| | | state of the attached"
|
||||
<< endl
|
||||
<< "| | | slave, or '-', if no" << endl
|
||||
<< "| | | slave is attached." << endl
|
||||
<< "| | \\- Absolute decimal ring" << endl
|
||||
<< "| | position of the attached" << endl
|
||||
<< "| | position of the attached"
|
||||
<< endl
|
||||
<< "| | slave, or '-' if none" << endl
|
||||
<< "| | attached." << endl
|
||||
<< "| \\- Expected vendor ID and product code (both" << endl
|
||||
@@ -157,7 +171,6 @@ void CommandConfig::showDetailedConfigs(
|
||||
for (configIter = configList.begin();
|
||||
configIter != configList.end();
|
||||
configIter++) {
|
||||
|
||||
cout << indent
|
||||
<< "Alias: "
|
||||
<< dec << configIter->alias << endl << indent
|
||||
@@ -377,7 +390,7 @@ void CommandConfig::listConfigs(
|
||||
ConfigList::const_iterator configIter;
|
||||
stringstream str;
|
||||
Info info;
|
||||
typedef list<Info> InfoList;
|
||||
typedef std::list<Info> InfoList;
|
||||
InfoList list;
|
||||
InfoList::const_iterator iter;
|
||||
unsigned int maxAliasWidth = 0, maxPosWidth = 0,
|
||||
@@ -388,7 +401,6 @@ void CommandConfig::listConfigs(
|
||||
for (configIter = configList.begin();
|
||||
configIter != configList.end();
|
||||
configIter++) {
|
||||
|
||||
str << dec << configIter->alias;
|
||||
info.alias = str.str();
|
||||
str.clear();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -23,7 +23,6 @@
|
||||
#define __COMMANDCONFIG_H__
|
||||
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
#include "Command.h"
|
||||
#include "SoeCommand.h"
|
||||
@@ -37,16 +36,16 @@ class CommandConfig:
|
||||
public:
|
||||
CommandConfig();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
struct Info {
|
||||
string alias;
|
||||
string pos;
|
||||
string ident;
|
||||
string slavePos;
|
||||
string state;
|
||||
std::string alias;
|
||||
std::string pos;
|
||||
std::string ident;
|
||||
std::string slavePos;
|
||||
std::string state;
|
||||
};
|
||||
|
||||
void showDetailedConfigs(MasterDevice &, const ConfigList &, bool);
|
||||
|
||||
+14
-8
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2017 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,13 +19,19 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandCrc.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandCrc.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::setw;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -75,10 +81,12 @@ void CommandCrc::execute(const StringVector &args)
|
||||
if (args.size() == 1) {
|
||||
string arg = args[0];
|
||||
transform(arg.begin(), arg.end(),
|
||||
arg.begin(), (int (*) (int)) std::tolower);
|
||||
arg.begin(),
|
||||
(int (*) (int)) std::tolower); // NOLINT(whitespace/parens)
|
||||
if (arg != "reset") {
|
||||
stringstream err;
|
||||
err << "'" << getName() << "' takes either no or 'reset' argument!";
|
||||
err << "'" << getName()
|
||||
<< "' takes either no or 'reset' argument!";
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
@@ -104,7 +112,6 @@ void CommandCrc::execute(const StringVector &args)
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < master.slave_count; i++) {
|
||||
|
||||
io.slave_position = i;
|
||||
try {
|
||||
m.writeReg(&io);
|
||||
@@ -128,7 +135,6 @@ void CommandCrc::execute(const StringVector &args)
|
||||
cout << endl;
|
||||
|
||||
for (unsigned int i = 0; i < master.slave_count; i++) {
|
||||
|
||||
ec_ioctl_slave_t slave;
|
||||
m.getSlave(&slave, i);
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2017 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -34,7 +34,7 @@ class CommandCrc:
|
||||
public:
|
||||
CommandCrc();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -21,12 +21,17 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandData.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
CommandData::CommandData():
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandData:
|
||||
public:
|
||||
CommandData();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
+11
-7
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -21,12 +21,16 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandDebug.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandDebug.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -62,7 +66,7 @@ string CommandDebug::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandDebug::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
stringstream str;
|
||||
int debugLevel;
|
||||
|
||||
@@ -73,7 +77,7 @@ void CommandDebug::execute(const StringVector &args)
|
||||
}
|
||||
|
||||
str << args[0];
|
||||
str >> resetiosflags(ios::basefield) // guess base from prefix
|
||||
str >> resetiosflags(std::ios::basefield) // guess base from prefix
|
||||
>> debugLevel;
|
||||
|
||||
if (str.fail()) {
|
||||
@@ -82,7 +86,7 @@ void CommandDebug::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = masterIndices.begin();
|
||||
mi != masterIndices.end(); mi++) {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandDebug:
|
||||
public:
|
||||
CommandDebug();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
+17
-7
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,12 +19,21 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandDomains.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandDomains.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::dec;
|
||||
using std::hex;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -50,7 +59,8 @@ string CommandDomains::helpString(const string &binaryBaseName) const
|
||||
<< endl << endl
|
||||
<< "The domain's base address for the logical datagram" << endl
|
||||
<< "(LRD/LWR/LRW) is displayed followed by the domain's" << endl
|
||||
<< "process data size in byte. The last values are the current" << endl
|
||||
<< "process data size in byte. The last values are the current"
|
||||
<< endl
|
||||
<< "datagram working counter sum and the expected working" << endl
|
||||
<< "counter sum. If the values are equal, all PDOs were" << endl
|
||||
<< "exchanged during the last cycle." << endl
|
||||
@@ -84,7 +94,7 @@ string CommandDomains::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandDomains::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
bool doIndent;
|
||||
DomainList domains;
|
||||
DomainList::const_iterator di;
|
||||
@@ -95,7 +105,7 @@ void CommandDomains::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
doIndent = masterIndices.size() > 1;
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = masterIndices.begin();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandDomains:
|
||||
public:
|
||||
CommandDomains();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -19,12 +19,20 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandDownload.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandDownload.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::ios;
|
||||
using std::hex;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -154,9 +162,9 @@ void CommandDownload::execute(const StringVector &args)
|
||||
}
|
||||
|
||||
if (args[valueIndex] == "-") {
|
||||
ostringstream tmp;
|
||||
std::ostringstream tmp;
|
||||
|
||||
tmp << cin.rdbuf();
|
||||
tmp << std::cin.rdbuf();
|
||||
string const &contents = tmp.str();
|
||||
|
||||
if (!contents.size()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandDownload:
|
||||
public:
|
||||
CommandDownload();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
+15
-7
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,14 +19,22 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandEoe.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <list>
|
||||
#include <string.h>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandEoe.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::dec;
|
||||
using std::setw;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -55,7 +63,7 @@ string CommandEoe::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandEoe::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
ec_ioctl_master_t master;
|
||||
unsigned int i;
|
||||
ec_ioctl_eoe_handler_t eoe;
|
||||
@@ -68,7 +76,7 @@ void CommandEoe::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
doIndent = masterIndices.size();
|
||||
indent = doIndent ? " " : "";
|
||||
MasterIndexList::const_iterator mi;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandEoe:
|
||||
public:
|
||||
CommandEoe();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
+15
-7
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,15 +19,23 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandFoeRead.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
#include "foe.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandFoeRead.h"
|
||||
#include "foe.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
using std::hex;
|
||||
using std::cout;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -118,10 +126,10 @@ void CommandFoeRead::execute(const StringVector &args)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO --output-file
|
||||
// TODO(fp) --output-file
|
||||
for (i = 0; i < data.data_size; i++) {
|
||||
uint8_t *w = data.buffer + i;
|
||||
cout << *(uint8_t *) w ;
|
||||
cout << *(uint8_t *) w;
|
||||
}
|
||||
|
||||
delete [] data.buffer;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandFoeRead:
|
||||
public:
|
||||
CommandFoeRead();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,17 +19,26 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandFoeWrite.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
#include "foe.h"
|
||||
|
||||
#include <libgen.h> // basename()
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandFoeWrite.h"
|
||||
#include "foe.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::ifstream;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
using std::hex;
|
||||
using std::cerr;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -87,7 +96,7 @@ void CommandFoeWrite::execute(const StringVector &args)
|
||||
}
|
||||
|
||||
if (args[0] == "-") {
|
||||
loadFoeData(&data, cin);
|
||||
loadFoeData(&data, std::cin);
|
||||
if (getOutputFile().empty()) {
|
||||
err << "Please specify a filename for the slave side"
|
||||
<< " with --output-file!";
|
||||
@@ -167,11 +176,11 @@ void CommandFoeWrite::execute(const StringVector &args)
|
||||
|
||||
void CommandFoeWrite::loadFoeData(
|
||||
ec_ioctl_slave_foe_t *data,
|
||||
const istream &in
|
||||
const std::istream &in
|
||||
)
|
||||
{
|
||||
stringstream err;
|
||||
ostringstream tmp;
|
||||
std::ostringstream tmp;
|
||||
|
||||
tmp << in.rdbuf();
|
||||
string const &contents = tmp.str();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,11 +32,11 @@ class CommandFoeWrite:
|
||||
public:
|
||||
CommandFoeWrite();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
void loadFoeData(ec_ioctl_slave_foe_t *, const istream &);
|
||||
void loadFoeData(ec_ioctl_slave_foe_t *, const std::istream &);
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
+14
-6
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,13 +19,21 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandGraph.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandGraph.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::vector;
|
||||
using std::map;
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -111,7 +119,8 @@ void CommandGraph::execute(const StringVector &args)
|
||||
if (args.size() == 1) {
|
||||
string arg = args[0];
|
||||
transform(arg.begin(), arg.end(),
|
||||
arg.begin(), (int (*) (int)) std::toupper);
|
||||
arg.begin(),
|
||||
(int (*) (int)) std::toupper); // NOLINT(whitespace/parens)
|
||||
if (arg == "DC") {
|
||||
info = DC;
|
||||
}
|
||||
@@ -132,7 +141,6 @@ void CommandGraph::execute(const StringVector &args)
|
||||
for (unsigned int i = 0; i < master.slave_count; i++) {
|
||||
m.getSlave(&slave, i);
|
||||
slaves.push_back(slave);
|
||||
|
||||
}
|
||||
|
||||
if (info == CRC) {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandGraph:
|
||||
public:
|
||||
CommandGraph();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
+9
-4
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2014 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -21,16 +21,21 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandIp.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandIp.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2014 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,13 +32,13 @@ class CommandIp:
|
||||
public:
|
||||
CommandIp();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
void parseMac(unsigned char [6], const string &);
|
||||
void parseIpv4Prefix(ec_ioctl_eoe_ip_t *, const string &);
|
||||
void resolveIpv4(struct in_addr *, const string &);
|
||||
void parseMac(unsigned char [6], const std::string &);
|
||||
void parseIpv4Prefix(ec_ioctl_eoe_ip_t *, const std::string &);
|
||||
void resolveIpv4(struct in_addr *, const std::string &);
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
+20
-8
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,15 +19,26 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandMaster.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
#define MAX_TIME_STR_SIZE 50
|
||||
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
using std::setw;
|
||||
using std::setfill;
|
||||
using std::setprecision;
|
||||
using std::fixed;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
CommandMaster::CommandMaster():
|
||||
@@ -46,7 +57,8 @@ string CommandMaster::helpString(const string &binaryBaseName) const
|
||||
<< getBriefDescription() << endl
|
||||
<< endl
|
||||
<< "Command-specific options:" << endl
|
||||
<< " --master -m <indices> Master indices. A comma-separated" << endl
|
||||
<< " --master -m <indices> Master indices. A comma-separated"
|
||||
<< endl
|
||||
<< " list with ranges is supported." << endl
|
||||
<< " Example: 1,4,5,7-9. Default: - (all)."
|
||||
<< endl << endl
|
||||
@@ -59,7 +71,7 @@ string CommandMaster::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandMaster::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
ec_ioctl_master_t data;
|
||||
stringstream err;
|
||||
unsigned int dev_idx, j;
|
||||
@@ -72,7 +84,7 @@ void CommandMaster::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = masterIndices.begin();
|
||||
mi != masterIndices.end(); mi++) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandMaster:
|
||||
public:
|
||||
CommandMaster();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
private:
|
||||
|
||||
+16
-6
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,13 +19,23 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandPdos.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cstring>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandPdos.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::hex;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
using std::dec;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -91,7 +101,7 @@ string CommandPdos::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandPdos::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
SlaveList slaves;
|
||||
SlaveList::const_iterator si;
|
||||
bool showHeader, multiMaster;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandPdos:
|
||||
public:
|
||||
CommandPdos();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
+10
-4
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2024 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,12 +19,18 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandRegRead.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandRegRead.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::ios;
|
||||
using std::cout;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -34,7 +34,7 @@ class CommandRegRead:
|
||||
public:
|
||||
CommandRegRead();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
@@ -19,14 +19,24 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandRegWrite.h"
|
||||
|
||||
#include "sii_crc.h"
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandRegWrite.h"
|
||||
#include "sii_crc.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::ostringstream;
|
||||
using std::endl;
|
||||
using std::ios;
|
||||
using std::ifstream;
|
||||
using std::istream;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -34,11 +34,11 @@ class CommandRegWrite:
|
||||
public:
|
||||
CommandRegWrite();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
private:
|
||||
void loadRegData(ec_ioctl_slave_reg_t *, const istream &);
|
||||
void loadRegData(ec_ioctl_slave_reg_t *, const std::istream &);
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
+10
-6
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -21,12 +21,16 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandRescan.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandRescan.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -56,7 +60,7 @@ string CommandRescan::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandRescan::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
|
||||
if (args.size() != 0) {
|
||||
stringstream err;
|
||||
@@ -64,7 +68,7 @@ void CommandRescan::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = masterIndices.begin();
|
||||
mi != masterIndices.end(); mi++) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandRescan:
|
||||
public:
|
||||
CommandRescan();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
+17
-7
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,12 +19,21 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandSdos.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandSdos.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -81,7 +90,7 @@ string CommandSdos::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandSdos::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
SlaveList slaves;
|
||||
SlaveList::const_iterator si;
|
||||
bool showHeader, multiMaster;
|
||||
@@ -92,7 +101,7 @@ void CommandSdos::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
multiMaster = masterIndices.size() > 1;
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = masterIndices.begin();
|
||||
@@ -151,7 +160,8 @@ void CommandSdos::listSlaveSdos(
|
||||
<< (entry.read_access[EC_SDO_ENTRY_ACCESS_PREOP] ? "r" : "-")
|
||||
<< (entry.write_access[EC_SDO_ENTRY_ACCESS_PREOP] ? "w" : "-")
|
||||
<< (entry.read_access[EC_SDO_ENTRY_ACCESS_SAFEOP] ? "r" : "-")
|
||||
<< (entry.write_access[EC_SDO_ENTRY_ACCESS_SAFEOP] ? "w" : "-")
|
||||
<< (entry.write_access[EC_SDO_ENTRY_ACCESS_SAFEOP] ?
|
||||
"w" : "-")
|
||||
<< (entry.read_access[EC_SDO_ENTRY_ACCESS_OP] ? "r" : "-")
|
||||
<< (entry.write_access[EC_SDO_ENTRY_ACCESS_OP] ? "w" : "-")
|
||||
<< ", ";
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandSdos:
|
||||
public:
|
||||
CommandSdos();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -18,14 +19,24 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandSiiCaching.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <cstdlib>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandSiiCaching.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -44,9 +55,11 @@ string CommandCache::helpString(const string &binaryBaseName) const
|
||||
<< endl
|
||||
<< getBriefDescription() << endl
|
||||
<< endl
|
||||
<< "This command configures cache level to speed up scanning process" << endl
|
||||
<< "This command configures cache level to speed up scanning process"
|
||||
<< endl
|
||||
<< endl
|
||||
<< "Caching fields are specified as a decimal number that is a"
|
||||
<< endl
|
||||
<< "Caching fields are specified as a decimal number that is a" << endl
|
||||
<< "combination of the following flags:" << endl
|
||||
<< " 0 - Disable SII caching" << endl
|
||||
<< " 1 - Use vendor ID" << endl
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -30,7 +32,7 @@ class CommandCache:
|
||||
public:
|
||||
CommandCache();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
};
|
||||
|
||||
|
||||
+16
-4
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,12 +19,24 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandSiiRead.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
#include <algorithm>
|
||||
|
||||
#include "CommandSiiRead.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
using std::flush;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
using std::min;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class CommandSiiRead:
|
||||
public:
|
||||
CommandSiiRead();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -19,14 +19,26 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandSiiWrite.h"
|
||||
|
||||
#include "sii_crc.h"
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandSiiWrite.h"
|
||||
#include "sii_crc.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::ostringstream;
|
||||
using std::endl;
|
||||
using std::ifstream;
|
||||
using std::istream;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::hex;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,11 +32,11 @@ class CommandSiiWrite:
|
||||
public:
|
||||
CommandSiiWrite();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
void loadSiiData(ec_ioctl_slave_sii_t *, const istream &);
|
||||
void loadSiiData(ec_ioctl_slave_sii_t *, const std::istream &);
|
||||
void checkSiiData(const ec_ioctl_slave_sii_t *data);
|
||||
};
|
||||
|
||||
|
||||
+19
-6
@@ -19,14 +19,27 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "CommandSlaves.h"
|
||||
|
||||
#include "MasterDevice.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <list>
|
||||
#include <string.h>
|
||||
using namespace std;
|
||||
|
||||
#include "CommandSlaves.h"
|
||||
#include "MasterDevice.h"
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::endl;
|
||||
using std::cout;
|
||||
using std::list;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
using std::left;
|
||||
using std::right;
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -100,7 +113,7 @@ string CommandSlaves::helpString(const string &binaryBaseName) const
|
||||
|
||||
void CommandSlaves::execute(const StringVector &args)
|
||||
{
|
||||
MasterIndexList masterIndices;
|
||||
MasterIndexList masterIndices;
|
||||
SlaveList slaves;
|
||||
bool doIndent;
|
||||
|
||||
@@ -110,7 +123,7 @@ void CommandSlaves::execute(const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
masterIndices = getMasterIndices();
|
||||
masterIndices = getMasterIndices();
|
||||
doIndent = masterIndices.size() > 1;
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = masterIndices.begin();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
* Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH
|
||||
*
|
||||
* This file is part of the IgH EtherCAT Master.
|
||||
*
|
||||
@@ -32,24 +32,24 @@ class CommandSlaves:
|
||||
public:
|
||||
CommandSlaves();
|
||||
|
||||
string helpString(const string &) const;
|
||||
std::string helpString(const std::string &) const;
|
||||
void execute(const StringVector &);
|
||||
|
||||
protected:
|
||||
struct Info {
|
||||
string pos;
|
||||
string alias;
|
||||
string relPos;
|
||||
string state;
|
||||
string flag;
|
||||
string name;
|
||||
std::string pos;
|
||||
std::string alias;
|
||||
std::string relPos;
|
||||
std::string state;
|
||||
std::string flag;
|
||||
std::string name;
|
||||
unsigned int device;
|
||||
};
|
||||
|
||||
void listSlaves(MasterDevice &, const SlaveList &, bool);
|
||||
void showSlaves(MasterDevice &, const SlaveList &);
|
||||
|
||||
static bool slaveInList( const ec_ioctl_slave_t &, const SlaveList &);
|
||||
static bool slaveInList(const ec_ioctl_slave_t &, const SlaveList &);
|
||||
};
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user