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
32702e44
Commit
32702e44
authored
15 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Removed tabs.
parent
bf9eb4b7
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tool/Command.cpp
+12
-10
12 additions, 10 deletions
tool/Command.cpp
tool/CommandConfig.cpp
+4
-2
4 additions, 2 deletions
tool/CommandConfig.cpp
tool/CommandData.cpp
+4
-2
4 additions, 2 deletions
tool/CommandData.cpp
tool/CommandDebug.cpp
+2
-0
2 additions, 0 deletions
tool/CommandDebug.cpp
with
22 additions
and
14 deletions
tool/Command.cpp
+
12
−
10
View file @
32702e44
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the
* EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH.
* industrial property and similar rights of Beckhoff Automation GmbH.
*
*
* vim: expandtab
*
****************************************************************************/
****************************************************************************/
#include
"Command.h"
#include
"Command.h"
...
@@ -189,35 +191,35 @@ void Command::throwSingleSlaveRequired(unsigned int size) const
...
@@ -189,35 +191,35 @@ void Command::throwSingleSlaveRequired(unsigned int size) const
Command
::
MasterIndexList
Command
::
getMasterIndices
()
const
Command
::
MasterIndexList
Command
::
getMasterIndices
()
const
{
{
MasterIndexList
indices
;
MasterIndexList
indices
;
try
{
try
{
MasterIndexParser
p
;
MasterIndexParser
p
;
indices
=
p
.
parse
(
masters
.
c_str
());
indices
=
p
.
parse
(
masters
.
c_str
());
}
catch
(
MasterDeviceException
&
e
)
{
}
catch
(
MasterDeviceException
&
e
)
{
stringstream
err
;
stringstream
err
;
err
<<
"Failed to obtain number of masters: "
<<
e
.
what
();
err
<<
"Failed to obtain number of masters: "
<<
e
.
what
();
throwCommandException
(
err
);
throwCommandException
(
err
);
}
catch
(
runtime_error
&
e
)
{
}
catch
(
runtime_error
&
e
)
{
stringstream
err
;
stringstream
err
;
err
<<
"Invalid master argument '"
<<
masters
<<
"': "
<<
e
.
what
();
err
<<
"Invalid master argument '"
<<
masters
<<
"': "
<<
e
.
what
();
throwInvalidUsageException
(
err
);
throwInvalidUsageException
(
err
);
}
}
return
indices
;
return
indices
;
}
}
/*****************************************************************************/
/*****************************************************************************/
unsigned
int
Command
::
getSingleMasterIndex
()
const
unsigned
int
Command
::
getSingleMasterIndex
()
const
{
{
MasterIndexList
masterIndices
=
getMasterIndices
();
MasterIndexList
masterIndices
=
getMasterIndices
();
if
(
masterIndices
.
size
()
!=
1
)
{
if
(
masterIndices
.
size
()
!=
1
)
{
stringstream
err
;
stringstream
err
;
err
<<
getName
()
<<
" requires to select a single master!"
;
err
<<
getName
()
<<
" requires to select a single master!"
;
throwInvalidUsageException
(
err
);
throwInvalidUsageException
(
err
);
}
}
return
masterIndices
.
front
();
return
masterIndices
.
front
();
}
}
/*****************************************************************************/
/*****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
tool/CommandConfig.cpp
+
4
−
2
View file @
32702e44
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the
* EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH.
* industrial property and similar rights of Beckhoff Automation GmbH.
*
*
* vim: expandtab
*
****************************************************************************/
****************************************************************************/
#include
<list>
#include
<list>
...
@@ -104,7 +106,7 @@ string CommandConfig::helpString() const
...
@@ -104,7 +106,7 @@ string CommandConfig::helpString() const
*/
*/
void
CommandConfig
::
execute
(
const
StringVector
&
args
)
void
CommandConfig
::
execute
(
const
StringVector
&
args
)
{
{
MasterIndexList
masterIndices
;
MasterIndexList
masterIndices
;
bool
doIndent
;
bool
doIndent
;
ConfigList
configs
;
ConfigList
configs
;
...
@@ -114,7 +116,7 @@ void CommandConfig::execute(const StringVector &args)
...
@@ -114,7 +116,7 @@ void CommandConfig::execute(const StringVector &args)
throwInvalidUsageException
(
err
);
throwInvalidUsageException
(
err
);
}
}
masterIndices
=
getMasterIndices
();
masterIndices
=
getMasterIndices
();
doIndent
=
masterIndices
.
size
()
>
1
;
doIndent
=
masterIndices
.
size
()
>
1
;
MasterIndexList
::
const_iterator
mi
;
MasterIndexList
::
const_iterator
mi
;
for
(
mi
=
masterIndices
.
begin
();
for
(
mi
=
masterIndices
.
begin
();
...
...
This diff is collapsed.
Click to expand it.
tool/CommandData.cpp
+
4
−
2
View file @
32702e44
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the
* EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH.
* industrial property and similar rights of Beckhoff Automation GmbH.
*
*
* vim: expandtab
*
****************************************************************************/
****************************************************************************/
#include
<iostream>
#include
<iostream>
...
@@ -66,7 +68,7 @@ string CommandData::helpString() const
...
@@ -66,7 +68,7 @@ string CommandData::helpString() const
void
CommandData
::
execute
(
const
StringVector
&
args
)
void
CommandData
::
execute
(
const
StringVector
&
args
)
{
{
MasterIndexList
masterIndices
;
MasterIndexList
masterIndices
;
DomainList
domains
;
DomainList
domains
;
DomainList
::
const_iterator
di
;
DomainList
::
const_iterator
di
;
...
@@ -76,7 +78,7 @@ void CommandData::execute(const StringVector &args)
...
@@ -76,7 +78,7 @@ void CommandData::execute(const StringVector &args)
throwInvalidUsageException
(
err
);
throwInvalidUsageException
(
err
);
}
}
masterIndices
=
getMasterIndices
();
masterIndices
=
getMasterIndices
();
MasterIndexList
::
const_iterator
mi
;
MasterIndexList
::
const_iterator
mi
;
for
(
mi
=
masterIndices
.
begin
();
for
(
mi
=
masterIndices
.
begin
();
mi
!=
masterIndices
.
end
();
mi
++
)
{
mi
!=
masterIndices
.
end
();
mi
++
)
{
...
...
This diff is collapsed.
Click to expand it.
tool/CommandDebug.cpp
+
2
−
0
View file @
32702e44
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the
* EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH.
* industrial property and similar rights of Beckhoff Automation GmbH.
*
*
* vim: expandtab
*
****************************************************************************/
****************************************************************************/
#include
<sstream>
#include
<sstream>
...
...
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