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
6c4ef8f0
Commit
6c4ef8f0
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Userlib.
parent
883d2434
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
documentation/ethercat_doc.tex
+18
-16
18 additions, 16 deletions
documentation/ethercat_doc.tex
with
18 additions
and
16 deletions
documentation/ethercat_doc.tex
+
18
−
16
View file @
6c4ef8f0
...
...
@@ -300,7 +300,7 @@ Lesser General Public License (LGPL \cite{lgpl})\index{LGPL}, version 2.1.
%------------------------------------------------------------------------------
\chapter
{
Architecture
}
\label
{
sec
:arch
}
\label
{
chap
:arch
}
\index
{
Master
!
Architecture
}
The EtherCAT master is integrated into the Linux
2
.
6
kernel. This was
...
...
@@ -2212,7 +2212,7 @@ installation prefix as \textit{libethercat.a} (for static linking),
\textit
{
libethercat.la
}
(for the use with
\textit
{
libtool
}
) and
\textit
{
libethercat.so
}
(for dynamic linking).
\subsection
{
Us
age
}
\subsection
{
Us
ing the Library
}
The application interface header
\textit
{
ecrt.h
}
can be used both in kernel
and in user context.
...
...
@@ -2256,7 +2256,8 @@ gcc -static ectest.c -o ectest -I/opt/etherlab/include \
\label
{
sec:userimp
}
Basically the kernel API was transferred into userspace via the master
character device (see sec.~
\ref
{
sec:cdev
}
).
character device (see chap.~
\ref
{
chap:arch
}
, fig.~
\ref
{
fig:arch
}
and
sec.~
\ref
{
sec:cdev
}
).
The function calls of the kernel API are mapped to the userspace via an
\lstinline
+ioctl()+ interface. Each function has its own
\lstinline
+ioctl()+
...
...
@@ -2264,19 +2265,20 @@ call. The kernel part of the interface calls the according API functions
directly, what results in a minimum additional delay (see
sec.~
\ref
{
sec:usertiming
}
).
Also for performance reasons, the actual domain process data (see
chap.~
\ref
{
chap:api
}
) are not copied between kernel and user memory on every
access: Instead, the data are memory-mapped to the userspace application. Once
the master is configured and activated, the master module creates one big
process data memory area for all domains and maps it to userspace, so that the
application can directly access the process data. For that, there is no
additional delay when accessing the process data from userspace.
\paragraph
{
Differences
}
Because of the memory-mapping of the process data, the
memory is managed internally by the library functions. As a result, it is not
possible to provide external memory for domains, like in the kernel API. The
corresponding functions are only available in kernelspace. This is the only
difference when using the application interface in userspace.
For performance reasons, the actual domain process data (see
sec.~
\ref
{
sec:processdata
}
) are not copied between kernel and user memory on
every access: Instead, the data are memory-mapped to the userspace
application. Once the master is configured and activated, the master module
creates one process data memory area spanning all domains and maps it to
userspace, so that the application can directly access the process data. As a
result, there is no additional delay when accessing process data from
userspace.
\paragraph
{
Kernel/User API Differences
}
Because of the memory-mapping of the
process data, the memory is managed internally by the library functions. As a
result, it is not possible to provide external memory for domains, like in the
kernel API. The corresponding functions are only available in kernelspace.
This is the only difference when using the application interface in userspace.
\subsection
{
Timing
}
\label
{
sec:usertiming
}
...
...
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