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
ee5ba721
Commit
ee5ba721
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Added ec_slave_get_sdo_const().
parent
9bec4838
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
master/slave.c
+28
-1
28 additions, 1 deletion
master/slave.c
master/slave.h
+1
-0
1 addition, 0 deletions
master/slave.h
with
29 additions
and
1 deletion
master/slave.c
+
28
−
1
View file @
ee5ba721
...
...
@@ -1200,7 +1200,34 @@ ec_sdo_t *ec_slave_get_sdo(
ec_sdo_t
*
sdo
;
list_for_each_entry
(
sdo
,
&
slave
->
sdo_dictionary
,
list
)
{
if
(
sdo
->
index
!=
index
)
continue
;
if
(
sdo
->
index
!=
index
)
continue
;
return
sdo
;
}
return
NULL
;
}
/*****************************************************************************/
/**
* Get an Sdo from the dictionary.
*
* const version.
*
* \returns The desired Sdo, or NULL.
*/
const
ec_sdo_t
*
ec_slave_get_sdo_const
(
const
ec_slave_t
*
slave
,
/**< EtherCAT slave */
uint16_t
index
/**< Sdo index */
)
{
const
ec_sdo_t
*
sdo
;
list_for_each_entry
(
sdo
,
&
slave
->
sdo_dictionary
,
list
)
{
if
(
sdo
->
index
!=
index
)
continue
;
return
sdo
;
}
...
...
This diff is collapsed.
Click to expand it.
master/slave.h
+
1
−
0
View file @
ee5ba721
...
...
@@ -223,6 +223,7 @@ ec_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t);
void
ec_slave_sdo_dict_info
(
const
ec_slave_t
*
,
unsigned
int
*
,
unsigned
int
*
);
ec_sdo_t
*
ec_slave_get_sdo
(
ec_slave_t
*
,
uint16_t
);
const
ec_sdo_t
*
ec_slave_get_sdo_const
(
const
ec_slave_t
*
,
uint16_t
);
const
ec_sdo_t
*
ec_slave_get_sdo_by_pos_const
(
const
ec_slave_t
*
,
uint16_t
);
uint16_t
ec_slave_sdo_count
(
const
ec_slave_t
*
);
const
ec_pdo_t
*
ec_slave_find_pdo
(
const
ec_slave_t
*
,
uint16_t
);
...
...
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