DiamondLightSource / pythonSoftIOC

Embed an EPICS IOC in a Python process
Apache License 2.0
31 stars 9 forks source link

Add int64in/out record support #161

Closed AlexanderWells-diamond closed 3 months ago

AlexanderWells-diamond commented 3 months ago

Add support for the int64in and int64out record types.

There's two TODOs and some test failures that needs discussion:

Various reference materials: Changelog for introduction of the records: https://github.com/epics-base/epics-base/blob/7.0/documentation/RELEASE_NOTES.md#ioc-database-support-for-64-bit-integers EPICS header file that defines both DBR and DBF codes: https://github.com/epics-base/epics-base/blob/7.0/modules/database/src/ioc/dbStatic/dbFldTypes.h

Closes #160 Closes #118

github-actions[bot] commented 3 months ago

Unit Test Results

       8 files  ±    0         8 suites  ±0   10m 12s :stopwatch: +18s    297 tests +  13     281 :heavy_check_mark: +13    16 :zzz: ±  0  0 :x: ±0  2 376 runs  +104  1 928 :heavy_check_mark: +72  448 :zzz: +32  0 :x: ±0 

Results for commit d38df9bd. ± Comparison against base commit 4bbc9339.

This pull request removes 14 and adds 27 tests. Note that renamed tests count towards both. ``` tests.test_record_values.TestDefaultValue ‑ test_value_default_pre_init[WaveformIn-expected_value12-ndarray] tests.test_record_values.TestDefaultValue ‑ test_value_default_pre_init[WaveformOut-expected_value11-ndarray] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformIn-bytes-[72 69 76 76 79 0 87 79 82 76 68]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformIn-float-[12.345]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformIn-int-[567.]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformOut-bytes-[72 69 76 76 79 0 87 79 82 76 68]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformOut-float-[12.345]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformOut-int-[567.]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_set[WaveformIn-bytes-[72 69 76 76 79 0 87 79 82 76 68]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_set[WaveformIn-float-[12.345]] … ``` ``` tests.test_record_values.TestDefaultValue ‑ test_value_default_pre_init[WaveformIn-expected_value14-ndarray] tests.test_record_values.TestDefaultValue ‑ test_value_default_pre_init[WaveformOut-expected_value13-ndarray] tests.test_record_values.TestDefaultValue ‑ test_value_default_pre_init[int64In-0-int] tests.test_record_values.TestDefaultValue ‑ test_value_default_pre_init[int64Out-0-int] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformIn-list-[72 69 76 76 79 0 87 79 82 76 68]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[WaveformOut-list-[72 69 76 76 79 0 87 79 82 76 68]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[int64In-int-65] tests.test_record_values.TestGetValue ‑ test_value_pre_init_initial_value[int64Out-int-65] tests.test_record_values.TestGetValue ‑ test_value_pre_init_set[WaveformIn-list-[72 69 76 76 79 0 87 79 82 76 68]] tests.test_record_values.TestGetValue ‑ test_value_pre_init_set[WaveformOut-list-[72 69 76 76 79 0 87 79 82 76 68]] … ```

:recycle: This comment has been updated with latest results.

coretl commented 3 months ago

There are a variety of test failures due to caget not being able to transport an int64, instead transporting it as a float. Should I special-case these tests to accept this, or is there a better mechanism to force what we want? I see that caget does NOT claim to support datatype=DBR_INT64.

pvget should support it though, so you can use p4p to do those particular tests

AlexanderWells-diamond commented 3 months ago

Requested changes have been made. Tests are failing due to #158 still waiting for upstream dependencies for Python 3.12.