diff --git a/ebpfcat/ethercat.py b/ebpfcat/ethercat.py index 6677da0ec405e4951b62cbbeca2295778b90c273..078ea3aa1ff593cd597bc7e68e499c09329d5c56 100644 --- a/ebpfcat/ethercat.py +++ b/ebpfcat/ethercat.py @@ -21,10 +21,20 @@ # users may want to consult a lawyer before using this program. """\ -Low-level access to EtherCAT -============================ +:mod:`ethercat` --- Low-level access to EtherCAT +================================================ this modules contains the code to actually talk to EtherCAT terminals. + +.. autoclass:: EtherCat + :members: + +.. autoclass:: Terminal + :members: + +.. autoclass:: Packet + :members: + """ from asyncio import ensure_future, Event, Future, gather, get_event_loop, Protocol, Queue, Lock from enum import Enum @@ -346,7 +356,27 @@ class EtherCat(Protocol): class Terminal: - """Represent one terminal ("slave") in the loop""" + """Represent one terminal ("slave") in the loop + + Communication with a terminal is done in several ways: process data, which + needs to be updated fast, is directly read or written within one package, + the values are directly in the packet, called the process data object, PDO. + + Slower data is transferred as service data objects (SDO). Requests to + change them are written into a mailbox, which is a specific location in the + packet address space. + + Every terminal has a small EEPROM which contains informations about itself. + + Attributes: + ec: The :class:`EtherCat` object this terminal belongs to. + This will be set once this terminal is added to such an object. + pdo_in_off, pdo_in_sz: The offset and size of the input PDO + pdo_out_off, pdo_out_sz: The offset and size of the output PDO + mbx_in_off, mbx_in_sz: The offset and size of the input mailbox + mbx_out_off, mbx_out_sz: The offset and size of the output mailbox + + """ async def initialize(self, relative, absolute): """Initialize the terminal diff --git a/ebpfcat/ethercat.rst b/ebpfcat/ethercat.rst index 004991e698bad161825e9f0884228c35b4efef7f..a50fa144c9a29ad21ec7627828723596f1494f80 100644 --- a/ebpfcat/ethercat.rst +++ b/ebpfcat/ethercat.rst @@ -101,4 +101,3 @@ Reference Documentation :members: .. automodule:: ebpfcat.ethercat - :members: