Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
bfc2904c
Commit
bfc2904c
authored
4 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Add ARMARX_TRACE
parent
e6fe4a4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/ArmarXEtherCAT/EtherCAT.cpp
+9
-0
9 additions, 0 deletions
source/RobotAPI/libraries/ArmarXEtherCAT/EtherCAT.cpp
with
9 additions
and
0 deletions
source/RobotAPI/libraries/ArmarXEtherCAT/EtherCAT.cpp
+
9
−
0
View file @
bfc2904c
...
...
@@ -91,6 +91,7 @@ EtherCAT::EtherCAT() : expectedWKC(-1),
*/
bool
EtherCAT
::
startBus
(
bool
createDevices
)
{
ARMARX_TRACE
;
//if the bus runs already do nothing
if
(
isSDOWorking
)
{
...
...
@@ -149,6 +150,7 @@ bool EtherCAT::startBus(bool createDevices)
return
false
;
}
ARMARX_TRACE
;
//wait to be sure
osal_usleep
(
500000
);
//we are up and running for SDO's
...
...
@@ -189,6 +191,7 @@ bool EtherCAT::startBus(bool createDevices)
ARMARX_TRACE
;
for
(
auto
slave
:
slaves
)
{
slave
->
prepareForSafeOp
();
...
...
@@ -259,6 +262,7 @@ bool EtherCAT::startBus(bool createDevices)
ec_send_processdata
();
ec_receive_processdata
(
EC_TIMEOUTRET
);
ARMARX_TRACE
;
//request all slaves to transit to OP-Mode
int
stateRet
=
ec_writestate
(
0
);
if
(
stateRet
==
1
)
...
...
@@ -298,6 +302,7 @@ bool EtherCAT::startBus(bool createDevices)
//returning with an error
return
false
;
}
ARMARX_TRACE
;
ARMARX_INFO
<<
"All Slaves in OP now!"
<<
std
::
endl
;
...
...
@@ -321,6 +326,7 @@ bool EtherCAT::startBus(bool createDevices)
ARMARX_INFO
<<
deactivateSpam
(
1
)
<<
"Waiting for "
<<
(
slaves
.
size
()
-
slaveReadyCounter
)
<<
"/"
<<
slaves
.
size
()
<<
" slaves to get ready: "
<<
missingSlaves
;
updatePDO
();
}
ARMARX_TRACE
;
ARMARX_DEBUG
<<
"PDOs updated."
;
std
::
stringstream
slaveInfo
;
for
(
AbstractSlavePtr
&
slave
:
slaves
)
...
...
@@ -374,6 +380,7 @@ std::string ec_errorToString(ec_errort const& error)
*/
bool
EtherCAT
::
setPDOMappings
()
{
ARMARX_TRACE
;
bool
retVal
=
true
;
int
byteSum
=
0
;
for
(
std
::
shared_ptr
<
AbstractSlave
>&
slave
:
slaves
)
...
...
@@ -425,6 +432,7 @@ bool EtherCAT::setPDOMappings()
*/
std
::
pair
<
std
::
vector
<
ControlDevicePtr
>
,
std
::
vector
<
SensorDevicePtr
>>
EtherCAT
::
createDevices
()
{
ARMARX_TRACE
;
std
::
set
<
ControlDevicePtr
>
ctrlDevs
;
std
::
set
<
SensorDevicePtr
>
sensDevs
;
if
(
deviceContainerPtr
==
nullptr
)
...
...
@@ -518,6 +526,7 @@ void EtherCAT::setIfName(const std::string& ifname)
*/
bool
EtherCAT
::
updateBus
(
bool
doErrorHandling
)
{
ARMARX_TRACE
;
if
(
!
isSDOWorking
)
{
...
...
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