Skip to content

Commit

Permalink
Add all data types to the import list, to not break any existing code
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjmnp committed Jul 14, 2024
1 parent 84eb0b6 commit c78c5ba
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
28 changes: 27 additions & 1 deletion src/pysoem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,33 @@
ECT_COEDET_PDOCONFIG,
ECT_COEDET_UPLOAD,
ECT_COEDET_SDOCA,
ec_datatype,
ECT_BOOLEAN,
ECT_INTEGER8,
ECT_INTEGER16,
ECT_INTEGER32,
ECT_UNSIGNED8,
ECT_UNSIGNED16,
ECT_UNSIGNED32,
ECT_REAL32,
ECT_VISIBLE_STRING,
ECT_OCTET_STRING,
ECT_UNICODE_STRING,
ECT_TIME_OF_DAY,
ECT_TIME_DIFFERENCE,
ECT_DOMAIN,
ECT_INTEGER24,
ECT_REAL64,
ECT_INTEGER64,
ECT_UNSIGNED24,
ECT_UNSIGNED64,
ECT_BIT1,
ECT_BIT2,
ECT_BIT3,
ECT_BIT4,
ECT_BIT5,
ECT_BIT6,
ECT_BIT7,
ECT_BIT8,
)

# Functions:
Expand Down
4 changes: 2 additions & 2 deletions tests/pysoem_coe_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_sdo_info_var(el1259):

assert b'Device type' == obj_0x1000.name
assert obj_0x1000.object_code == 7
assert obj_0x1000.data_type == pysoem.ec_datatype.ECT_UNSIGNED32
assert obj_0x1000.data_type == pysoem.ECT_UNSIGNED32
assert obj_0x1000.bit_length == 32
assert obj_0x1000.obj_access == 0x0007

Expand All @@ -155,7 +155,7 @@ def test_sdo_info_rec(el1259):

entry_vendor_id = obj_0x1018.entries[1]
assert entry_vendor_id.name == b'Vendor ID'
assert entry_vendor_id.data_type == pysoem.ec_datatype.ECT_UNSIGNED32
assert entry_vendor_id.data_type == pysoem.ECT_UNSIGNED32
assert entry_vendor_id.bit_length == 32
assert entry_vendor_id.obj_access == 0x0007

Expand Down

0 comments on commit c78c5ba

Please sign in to comment.