Skip to content

Commit

Permalink
Replaced asterisk import by a specified list
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoRoos committed Jul 2, 2024
1 parent be74f0c commit 9ba1079
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
58 changes: 57 additions & 1 deletion src/pysoem/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
__version__ = '1.1.6'
from .pysoem import *


# Classes:
from pysoem.pysoem import (
Master,
SdoError,
Emergency,
SdoInfoError,
MailboxError,
PacketError,
ConfigMapError,
EepromError,
WkcError,
SiiOffset,
)

# State constants:
from pysoem.pysoem import (
NONE_STATE,
INIT_STATE,
PREOP_STATE,
BOOT_STATE,
SAFEOP_STATE,
OP_STATE,
STATE_ACK,
STATE_ERROR,
)

# ECT constants:
from pysoem.pysoem import (
ECT_REG_WD_DIV,
ECT_REG_WD_TIME_PDI,
ECT_REG_WD_TIME_PROCESSDATA,
ECT_REG_SM0,
ECT_REG_SM1,
ECT_COEDET_SDO,
ECT_COEDET_SDOINFO,
ECT_COEDET_PDOASSIGN,
ECT_COEDET_PDOCONFIG,
ECT_COEDET_UPLOAD,
ECT_COEDET_SDOCA,
ec_datatype,
)

# Functions:
from pysoem.pysoem import (
find_adapters,
open,
al_status_code_to_string,
)

# Raw Cdefs:
from pysoem.pysoem import (
CdefMaster,
CdefSlave,
CdefCoeObjectEntry,
)
4 changes: 4 additions & 0 deletions src/pysoem/cpysoem.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#
"""PySOEM is a Cython wrapper for the SOEM library."""

#
# This creates a helper library for PySOEM, to be used with `cimport cpysoem`
#

from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t

cdef extern from "ethercat.h":
Expand Down
4 changes: 4 additions & 0 deletions src/pysoem/pysoem.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#
"""PySOEM is a Cython wrapper for the SOEM library."""

#
# This will result in the creation of the `pysoem.pysoem` module.
#

cimport cpysoem

import sys
Expand Down

0 comments on commit 9ba1079

Please sign in to comment.