Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
434fab95
Commit
434fab95
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Added 'ethercat version' command.
parent
e2935666
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
TODO
+3
-3
3 additions, 3 deletions
TODO
tool/CommandVersion.cpp
+39
-0
39 additions, 0 deletions
tool/CommandVersion.cpp
tool/CommandVersion.h
+26
-0
26 additions, 0 deletions
tool/CommandVersion.h
tool/Makefile.am
+9
-2
9 additions, 2 deletions
tool/Makefile.am
tool/main.cpp
+5
-3
5 additions, 3 deletions
tool/main.cpp
with
82 additions
and
8 deletions
TODO
+
3
−
3
View file @
434fab95
...
...
@@ -14,10 +14,7 @@ Version 1.4.0:
* Get original driver for r8169.
* Race in jiffies frame timeout?
* ethercat tool:
- Data type abbreviations.
- Add a -n (numeric) switch.
- Check for options, remove global variables.
- Add 'etherlab version'.
Future issues:
...
...
@@ -36,6 +33,9 @@ Future issues:
* Interface/buffers for asynchronous domain IO.
* Make scanning and configuration run parallel (each).
* File access over EtherCAT (FoE).
* ethercat tool:
- Data type abbreviations.
- Add a -n (numeric) switch.
Smaller issues:
...
...
This diff is collapsed.
Click to expand it.
tool/CommandVersion.cpp
0 → 100644
+
39
−
0
View file @
434fab95
/*****************************************************************************
*
* $Id$
*
****************************************************************************/
#include
<iostream>
using
namespace
std
;
#include
"CommandVersion.h"
/*****************************************************************************/
CommandVersion
::
CommandVersion
()
:
Command
(
"version"
,
"Show version information."
)
{
}
/****************************************************************************/
string
CommandVersion
::
helpString
()
const
{
stringstream
str
;
str
<<
getName
()
<<
" [OPTIONS]"
<<
endl
<<
endl
<<
getBriefDescription
()
<<
endl
;
return
str
.
str
();
}
/****************************************************************************/
void
CommandVersion
::
execute
(
MasterDevice
&
m
,
const
StringVector
&
args
)
{
cout
<<
"IgH EtherCAT master "
<<
EC_MASTER_VERSION
<<
endl
;
}
/*****************************************************************************/
This diff is collapsed.
Click to expand it.
tool/CommandVersion.h
0 → 100644
+
26
−
0
View file @
434fab95
/*****************************************************************************
*
* $Id$
*
****************************************************************************/
#ifndef __COMMANDVERSION_H__
#define __COMMANDVERSION_H__
#include
"Command.h"
/****************************************************************************/
class
CommandVersion
:
public
Command
{
public:
CommandVersion
();
string
helpString
()
const
;
void
execute
(
MasterDevice
&
,
const
StringVector
&
);
};
/****************************************************************************/
#endif
This diff is collapsed.
Click to expand it.
tool/Makefile.am
+
9
−
2
View file @
434fab95
...
...
@@ -37,9 +37,9 @@ bin_PROGRAMS = ethercat
ethercat_SOURCES
=
\
MasterDevice.cpp MasterDevice.h
\
Command.cpp
\
CommandAlias.cpp
\
CommandConfig.cpp
\
Command.cpp
\
CommandData.cpp
\
CommandDebug.cpp
\
CommandDomains.cpp
\
...
...
@@ -52,11 +52,18 @@ ethercat_SOURCES = \
CommandSlaves.cpp
\
CommandStates.cpp
\
CommandUpload.cpp
\
CommandVersion.cpp
\
CommandXml.cpp
\
coe_datatypes.cpp
\
sii_crc.cpp
\
main.cpp
ethercat_CXXFLAGS
=
-I
../master
-Wall
REV
=
`
if
test
-s
$(
srcdir
)
/../svnrevision
;
then
\
cat
$(
srcdir
)
/../svnrevision
;
\
else
\
svnversion
$(
srcdir
)
/.. 2>/dev/null
||
echo
"unknown"
;
\
fi
`
ethercat_CXXFLAGS
=
-I
../master
-Wall
-DSVNREV
=
$(
REV
)
#------------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
tool/main.cpp
+
5
−
3
View file @
434fab95
...
...
@@ -16,15 +16,16 @@ using namespace std;
#include
"CommandData.h"
#include
"CommandDebug.h"
#include
"CommandDomains.h"
#include
"CommandDownload.h"
#include
"CommandMaster.h"
#include
"CommandPdos.h"
#include
"CommandSdos.h"
#include
"CommandDownload.h"
#include
"CommandUpload.h"
#include
"CommandSlaves.h"
#include
"CommandSiiRead.h"
#include
"CommandSiiWrite.h"
#include
"CommandSlaves.h"
#include
"CommandStates.h"
#include
"CommandUpload.h"
#include
"CommandVersion.h"
#include
"CommandXml.h"
/*****************************************************************************/
...
...
@@ -268,6 +269,7 @@ int main(int argc, char **argv)
commandList
.
push_back
(
new
CommandSlaves
());
commandList
.
push_back
(
new
CommandStates
());
commandList
.
push_back
(
new
CommandUpload
());
commandList
.
push_back
(
new
CommandVersion
());
commandList
.
push_back
(
new
CommandXml
());
getOptions
(
argc
,
argv
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment