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
cc217408
Commit
cc217408
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Added ec_master_find_domain_const().
parent
40c3d9d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
master/master.c
+21
-6
21 additions, 6 deletions
master/master.c
master/master.h
+2
-0
2 additions, 0 deletions
master/master.h
with
23 additions
and
6 deletions
master/master.c
+
21
−
6
View file @
cc217408
...
@@ -1124,20 +1124,35 @@ unsigned int ec_master_domain_count(
...
@@ -1124,20 +1124,35 @@ unsigned int ec_master_domain_count(
/*****************************************************************************/
/*****************************************************************************/
#define EC_FIND_DOMAIN \
do { \
list_for_each_entry(domain, &master->domains, list) { \
if (index--) \
continue; \
return domain; \
} \
\
return NULL; \
} while (0)
ec_domain_t
*
ec_master_find_domain
(
ec_domain_t
*
ec_master_find_domain
(
ec_master_t
*
master
,
/**< EtherCAT master. */
ec_master_t
*
master
,
/**< EtherCAT master. */
unsigned
int
index
/**< Domain index. */
unsigned
int
index
/**< Domain index. */
)
)
{
{
ec_domain_t
*
domain
;
ec_domain_t
*
domain
;
EC_FIND_DOMAIN
;
}
list_for_each_entry
(
domain
,
&
master
->
domains
,
list
)
{
/*****************************************************************************/
if
(
index
--
)
continue
;
return
domain
;
}
return
NULL
;
const
ec_domain_t
*
ec_master_find_domain_const
(
const
ec_master_t
*
master
,
/**< EtherCAT master. */
unsigned
int
index
/**< Domain index. */
)
{
const
ec_domain_t
*
domain
;
EC_FIND_DOMAIN
;
}
}
/*****************************************************************************/
/*****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
master/master.h
+
2
−
0
View file @
cc217408
...
@@ -203,6 +203,8 @@ const ec_slave_config_t *ec_master_get_config_const(
...
@@ -203,6 +203,8 @@ const ec_slave_config_t *ec_master_get_config_const(
const
ec_master_t
*
,
unsigned
int
);
const
ec_master_t
*
,
unsigned
int
);
unsigned
int
ec_master_domain_count
(
const
ec_master_t
*
);
unsigned
int
ec_master_domain_count
(
const
ec_master_t
*
);
ec_domain_t
*
ec_master_find_domain
(
ec_master_t
*
,
unsigned
int
);
ec_domain_t
*
ec_master_find_domain
(
ec_master_t
*
,
unsigned
int
);
const
ec_domain_t
*
ec_master_find_domain_const
(
const
ec_master_t
*
,
unsigned
int
);
int
ec_master_debug_level
(
ec_master_t
*
,
int
);
int
ec_master_debug_level
(
ec_master_t
*
,
int
);
...
...
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