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
ca7675bb
Commit
ca7675bb
authored
18 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Added missing code documentation.
parent
756a1b3c
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
include/ecdb.h
+4
-0
4 additions, 0 deletions
include/ecdb.h
master/domain.c
+1
-1
1 addition, 1 deletion
master/domain.c
master/fsm.c
+36
-4
36 additions, 4 deletions
master/fsm.c
master/slave.c
+1
-1
1 addition, 1 deletion
master/slave.c
master/slave.h
+5
-7
5 additions, 7 deletions
master/slave.h
with
47 additions
and
13 deletions
include/ecdb.h
+
4
−
0
View file @
ca7675bb
...
@@ -43,12 +43,16 @@
...
@@ -43,12 +43,16 @@
/*****************************************************************************/
/*****************************************************************************/
/** \cond */
#define Beckhoff_EL4132_Output1 0x00000002, 0x10243052, 0x6411, 1
#define Beckhoff_EL4132_Output1 0x00000002, 0x10243052, 0x6411, 1
#define Beckhoff_EL4132_Output2 0x00000002, 0x10243052, 0x6411, 2
#define Beckhoff_EL4132_Output2 0x00000002, 0x10243052, 0x6411, 2
#define Beckhoff_EL5001_Status 0x00000002, 0x13893052, 0x3101, 1
#define Beckhoff_EL5001_Status 0x00000002, 0x13893052, 0x3101, 1
#define Beckhoff_EL5001_Value 0x00000002, 0x13893052, 0x3101, 2
#define Beckhoff_EL5001_Value 0x00000002, 0x13893052, 0x3101, 2
/** \endcond */
/*****************************************************************************/
/*****************************************************************************/
#endif
#endif
This diff is collapsed.
Click to expand it.
master/domain.c
+
1
−
1
View file @
ca7675bb
...
@@ -159,7 +159,7 @@ void ec_domain_clear(struct kobject *kobj /**< kobject of the domain */)
...
@@ -159,7 +159,7 @@ void ec_domain_clear(struct kobject *kobj /**< kobject of the domain */)
int
ec_domain_reg_pdo_entry
(
ec_domain_t
*
domain
,
/**< EtherCAT domain */
int
ec_domain_reg_pdo_entry
(
ec_domain_t
*
domain
,
/**< EtherCAT domain */
ec_slave_t
*
slave
,
/**< slave */
ec_slave_t
*
slave
,
/**< slave */
const
ec_sii_pdo_t
*
pdo
,
const
ec_sii_pdo_t
*
pdo
,
/**< PDO */
const
ec_sii_pdo_entry_t
*
entry
,
const
ec_sii_pdo_entry_t
*
entry
,
/**< PDO registration entry */
/**< PDO registration entry */
void
**
data_ptr
/**< pointer to the process data
void
**
data_ptr
/**< pointer to the process data
...
...
This diff is collapsed.
Click to expand it.
master/fsm.c
+
36
−
4
View file @
ca7675bb
...
@@ -164,6 +164,10 @@ void ec_fsm_execute(ec_fsm_t *fsm /**< finite state machine */)
...
@@ -164,6 +164,10 @@ void ec_fsm_execute(ec_fsm_t *fsm /**< finite state machine */)
/*****************************************************************************/
/*****************************************************************************/
/**
Initializes the master startup state machine.
*/
void
ec_fsm_startup
(
ec_fsm_t
*
fsm
)
void
ec_fsm_startup
(
ec_fsm_t
*
fsm
)
{
{
fsm
->
master_state
=
ec_fsm_startup_start
;
fsm
->
master_state
=
ec_fsm_startup_start
;
...
@@ -171,7 +175,12 @@ void ec_fsm_startup(ec_fsm_t *fsm)
...
@@ -171,7 +175,12 @@ void ec_fsm_startup(ec_fsm_t *fsm)
/*****************************************************************************/
/*****************************************************************************/
int
ec_fsm_startup_running
(
ec_fsm_t
*
fsm
)
/**
Returns the running state of the master startup state machine.
\return non-zero if not terminated yet.
*/
int
ec_fsm_startup_running
(
ec_fsm_t
*
fsm
/**< Finite state machine */
)
{
{
return
fsm
->
master_state
!=
ec_fsm_end
&&
return
fsm
->
master_state
!=
ec_fsm_end
&&
fsm
->
master_state
!=
ec_fsm_error
;
fsm
->
master_state
!=
ec_fsm_error
;
...
@@ -179,13 +188,22 @@ int ec_fsm_startup_running(ec_fsm_t *fsm)
...
@@ -179,13 +188,22 @@ int ec_fsm_startup_running(ec_fsm_t *fsm)
/*****************************************************************************/
/*****************************************************************************/
int
ec_fsm_startup_success
(
ec_fsm_t
*
fsm
)
/**
Returns, if the master startup state machine terminated with success.
\return non-zero if successful.
*/
int
ec_fsm_startup_success
(
ec_fsm_t
*
fsm
/**< Finite state machine */
)
{
{
return
fsm
->
master_state
==
ec_fsm_end
;
return
fsm
->
master_state
==
ec_fsm_end
;
}
}
/*****************************************************************************/
/*****************************************************************************/
/**
Initializes the master configuration state machine.
*/
void
ec_fsm_configuration
(
ec_fsm_t
*
fsm
)
void
ec_fsm_configuration
(
ec_fsm_t
*
fsm
)
{
{
fsm
->
master_state
=
ec_fsm_configuration_start
;
fsm
->
master_state
=
ec_fsm_configuration_start
;
...
@@ -193,7 +211,12 @@ void ec_fsm_configuration(ec_fsm_t *fsm)
...
@@ -193,7 +211,12 @@ void ec_fsm_configuration(ec_fsm_t *fsm)
/*****************************************************************************/
/*****************************************************************************/
int
ec_fsm_configuration_running
(
ec_fsm_t
*
fsm
)
/**
Returns the running state of the master configuration state machine.
\return non-zero if not terminated yet.
*/
int
ec_fsm_configuration_running
(
ec_fsm_t
*
fsm
/**< Finite state machine */
)
{
{
return
fsm
->
master_state
!=
ec_fsm_end
&&
return
fsm
->
master_state
!=
ec_fsm_end
&&
fsm
->
master_state
!=
ec_fsm_error
;
fsm
->
master_state
!=
ec_fsm_error
;
...
@@ -201,7 +224,12 @@ int ec_fsm_configuration_running(ec_fsm_t *fsm)
...
@@ -201,7 +224,12 @@ int ec_fsm_configuration_running(ec_fsm_t *fsm)
/*****************************************************************************/
/*****************************************************************************/
int
ec_fsm_configuration_success
(
ec_fsm_t
*
fsm
)
/**
Returns, if the master confuguration state machine terminated with success.
\return non-zero if successful.
*/
int
ec_fsm_configuration_success
(
ec_fsm_t
*
fsm
/**< Finite state machine */
)
{
{
return
fsm
->
master_state
==
ec_fsm_end
;
return
fsm
->
master_state
==
ec_fsm_end
;
}
}
...
@@ -327,6 +355,10 @@ void ec_fsm_startup_scan(ec_fsm_t *fsm /**< finite state machine */)
...
@@ -327,6 +355,10 @@ void ec_fsm_startup_scan(ec_fsm_t *fsm /**< finite state machine */)
* master configuration state machine
* master configuration state machine
*****************************************************************************/
*****************************************************************************/
/**
Master configuration state machine: START.
*/
void
ec_fsm_configuration_start
(
ec_fsm_t
*
fsm
/**< finite state machine */
)
void
ec_fsm_configuration_start
(
ec_fsm_t
*
fsm
/**< finite state machine */
)
{
{
ec_master_t
*
master
=
fsm
->
master
;
ec_master_t
*
master
=
fsm
->
master
;
...
...
This diff is collapsed.
Click to expand it.
master/slave.c
+
1
−
1
View file @
ca7675bb
...
@@ -916,7 +916,7 @@ uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
...
@@ -916,7 +916,7 @@ uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
\return non-zero if slave is a bus coupler
\return non-zero if slave is a bus coupler
*/
*/
int
ec_slave_is_coupler
(
const
ec_slave_t
*
slave
)
int
ec_slave_is_coupler
(
const
ec_slave_t
*
slave
/**< EtherCAT slave */
)
{
{
// TODO: Better bus coupler criterion
// TODO: Better bus coupler criterion
return
slave
->
sii_vendor_id
==
0x00000002
return
slave
->
sii_vendor_id
==
0x00000002
...
...
This diff is collapsed.
Click to expand it.
master/slave.h
+
5
−
7
View file @
ca7675bb
...
@@ -201,11 +201,11 @@ ec_sdo_entry_t;
...
@@ -201,11 +201,11 @@ ec_sdo_entry_t;
typedef
struct
typedef
struct
{
{
struct
list_head
list
;
struct
list_head
list
;
/**< list item */
uint16_t
index
;
uint16_t
index
;
/**< SDO index */
uint8_t
subindex
;
uint8_t
subindex
;
/**< SDO subindex */
uint8_t
*
data
;
uint8_t
*
data
;
/**< pointer to SDO data */
size_t
size
;
size_t
size
;
/**< size of SDO data */
}
}
ec_sdo_data_t
;
ec_sdo_data_t
;
...
@@ -333,9 +333,7 @@ int ec_slave_locate_string(ec_slave_t *, unsigned int, char **);
...
@@ -333,9 +333,7 @@ int ec_slave_locate_string(ec_slave_t *, unsigned int, char **);
uint16_t
ec_slave_calc_sync_size
(
const
ec_slave_t
*
,
uint16_t
ec_slave_calc_sync_size
(
const
ec_slave_t
*
,
const
ec_sii_sync_t
*
);
const
ec_sii_sync_t
*
);
void
ec_slave_print
(
const
ec_slave_t
*
,
unsigned
int
);
int
ec_slave_is_coupler
(
const
ec_slave_t
*
);
int
ec_slave_is_coupler
(
const
ec_slave_t
*
);
//int ec_slave_check_crc(ec_slave_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