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
488f1840
Commit
488f1840
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Debug messaged on configuring assignment and mapping.
parent
6011c1ed
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
master/fsm_pdo_assign.c
+8
-5
8 additions, 5 deletions
master/fsm_pdo_assign.c
master/fsm_pdo_assign.h
+2
-1
2 additions, 1 deletion
master/fsm_pdo_assign.h
master/fsm_pdo_mapping.c
+6
-4
6 additions, 4 deletions
master/fsm_pdo_mapping.c
master/fsm_pdo_mapping.h
+1
-0
1 addition, 0 deletions
master/fsm_pdo_mapping.h
with
17 additions
and
10 deletions
master/fsm_pdo_assign.c
+
8
−
5
View file @
488f1840
...
...
@@ -152,6 +152,7 @@ void ec_fsm_pdo_assign_state_start(
}
fsm
->
dir
=
(
ec_direction_t
)
-
1
;
// next is EC_DIR_OUTPUT
fsm
->
num_configured_dirs
=
0
;
ec_fsm_pdo_assign_next_dir
(
fsm
);
}
...
...
@@ -191,6 +192,8 @@ void ec_fsm_pdo_assign_next_dir(
return
;
}
fsm
->
num_configured_dirs
++
;
if
(
fsm
->
slave
->
master
->
debug_level
)
{
EC_DBG
(
"Changing Pdo assignment for SM%u of slave %u.
\n
"
,
fsm
->
sync
->
index
,
fsm
->
slave
->
ring_position
);
...
...
@@ -215,9 +218,9 @@ void ec_fsm_pdo_assign_next_dir(
return
;
}
if
(
fsm
->
slave
->
master
->
debug_level
)
EC_DBG
(
"Pdo assignment
finished for slave %u.
\n
"
,
fsm
->
slave
->
ring_position
);
if
(
fsm
->
slave
->
master
->
debug_level
&&
!
fsm
->
num_configured_dirs
)
EC_DBG
(
"Pdo assignment
s of slave %u are already configured"
" correctly.
\n
"
,
fsm
->
slave
->
ring_position
);
fsm
->
state
=
ec_fsm_pdo_assign_state_end
;
}
...
...
@@ -348,8 +351,8 @@ void ec_fsm_pdo_assign_state_pdo_count(
}
if
(
fsm
->
slave
->
master
->
debug_level
)
EC_DBG
(
"Successfully
set
Pdo assignment for SM%u of
slave %u.
\n
"
,
fsm
->
sync
->
index
,
fsm
->
slave
->
ring_position
);
EC_DBG
(
"Successfully
configured
Pdo assignment for SM%u of
"
" slave %u.
\n
"
,
fsm
->
sync
->
index
,
fsm
->
slave
->
ring_position
);
// assignment for this direction finished
ec_fsm_pdo_assign_next_dir
(
fsm
);
...
...
This diff is collapsed.
Click to expand it.
master/fsm_pdo_assign.h
+
2
−
1
View file @
488f1840
...
...
@@ -63,8 +63,9 @@ struct ec_fsm_pdo_assign
ec_slave_t
*
slave
;
/**< Slave the FSM runs on. */
ec_direction_t
dir
;
/**< Current direction. */
const
ec_sync_t
*
sync
;
/**< Current sync manager. */
const
ec_pdo_list_t
*
pdos
;
/**< Target Pdo assignment. */
const
ec_sync_t
*
sync
;
/**< Current sync manager. */
unsigned
int
num_configured_dirs
;
/**< Number of configured directions. */
const
ec_pdo_t
*
pdo
;
/**< Current Pdo. */
ec_sdo_request_t
request
;
/**< Sdo request. */
...
...
This diff is collapsed.
Click to expand it.
master/fsm_pdo_mapping.c
+
6
−
4
View file @
488f1840
...
...
@@ -149,6 +149,7 @@ void ec_fsm_pdo_mapping_state_start(
}
fsm
->
pdo
=
NULL
;
fsm
->
num_configured_pdos
=
0
;
ec_fsm_pdo_mapping_next_pdo
(
fsm
);
}
...
...
@@ -169,7 +170,7 @@ void ec_fsm_pdo_mapping_next_pdo(
list_for_each_entry
(
pdo
,
&
pdos
->
list
,
list
)
{
if
(
fsm
->
pdo
)
{
// there was a Pdo mapping changed in the last run
if
(
pdo
==
fsm
->
pdo
)
// this is the
last
Pdo
if
(
pdo
==
fsm
->
pdo
)
// this is the
previously configured
Pdo
fsm
->
pdo
=
NULL
;
// take the next one
}
else
{
if
((
assigned_pdo
=
ec_slave_find_pdo
(
fsm
->
slave
,
pdo
->
index
)))
...
...
@@ -177,15 +178,16 @@ void ec_fsm_pdo_mapping_next_pdo(
continue
;
// Pdo entries mapped correctly
fsm
->
pdo
=
pdo
;
fsm
->
num_configured_pdos
++
;
break
;
}
}
}
if
(
!
fsm
->
pdo
)
{
if
(
fsm
->
slave
->
master
->
debug_level
)
EC_DBG
(
"Pdo mapping
finished for slave %u.
\n
"
,
fsm
->
slave
->
ring_position
);
if
(
fsm
->
slave
->
master
->
debug_level
&&
!
fsm
->
num_configured_pdos
)
EC_DBG
(
"Pdo mapping
s of slave %u are already configured"
" correctly.
\n
"
,
fsm
->
slave
->
ring_position
);
fsm
->
state
=
ec_fsm_pdo_mapping_state_end
;
return
;
}
...
...
This diff is collapsed.
Click to expand it.
master/fsm_pdo_mapping.h
+
1
−
0
View file @
488f1840
...
...
@@ -61,6 +61,7 @@ struct ec_fsm_pdo_mapping
ec_slave_t
*
slave
;
/**< Slave the FSM runs on. */
const
ec_pdo_t
*
pdo
;
/**< Current Pdo to configure. */
unsigned
int
num_configured_pdos
;
/**< Number of configured Pdos. */
const
ec_pdo_entry_t
*
entry
;
/**< Current entry. */
ec_sdo_request_t
request
;
/**< Sdo request. */
...
...
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