Commit Graph

31 Commits

Author SHA1 Message Date
3dd07bf2be Dev/define cmd (#1312)
All checks were successful
Build on local RHEL9 / build (push) Successful in 1m25s
Build on RHEL9 / build (push) Successful in 3m15s
Build on local RHEL8 / build (push) Successful in 3m31s
Build on RHEL8 / build (push) Successful in 4m44s
* basic ctb config api for register and bit names

* tests for define and definelist pass. yet to implement using them for reg, setbit, clearbit and getbit

* improved autocomplete for getbit,setbit, clearbit

* validate autocomplete

* definelist has no put

* updating help

* converting char array+int in runtimeerror compiles but throws at runtime.Fixed.Tested for it. Also check if string or int before using getregisterdefinitonbyvalue to see if it threw to call the other function. because both of it can throw and we should differentiate the issues for both

* removed std::vector<std::pair<string,int> to std::map<string, int> for defiitions list

* Dev/define cmd tie bit to reg (#1328)

* strong type

* moved everythign to bit_utils class

* pybindings

* added tests for python

* removed duplicates

* removed bit names in reg

* changed BitPosition to BitAddress

* Using define reg/bit from python (#1344)

* define_bit, define_addr in python. 
* setBit/clearBit takes int or addr

* added example using bits

* split define into 2 commands define_reg and define_bit, definelist into 2: definelist_reg and definelist_bit

* allow string for register and bit names in c++ api

* refactor from github comments

* naming refactoring (getRegisterDefnition to retunr name and address specifically

* added marker for 8 cmd tests connected to define, changed macro to static constexpr

* changed bitPosition from int to uint32_t

* got rid of setbitposition and setaddress, instead overloaded constructor to take in strings so that the conversion from string to bit address members, takes place within the class for easy maintainance in case type changes

* Removing implicit conversions:
RegisterAddresss and RegisterValue: Removed the implicit conversions.
RegisterAddress: Changed member name from address_ to value_ and method as well to value().
RegisterValue: Also added | operator to be able to concatenate with uint32_t. Same in python bindings (but could not find the tests to modify

* Allowed concatenation with other RegisterValue, made them all constexpr

* fix a ctbConfig test

* Maponstack works with integration tests, but need unit tests

* tests on mapstack

* fixed ctb tests and FixedString being initialized with gibberish

* removing parsing from string inside the class RegisterAddress, BitAddress and RegisterValue

* updated python bindings

* fixed bit utils test

* renaming getRegisterDefintiionAddress/Name=>getRegisterAddress/Name and similary for getBitDefinitionAddress/Name

* updated python bindings

* fix tests (format)

* a few python tests added and python bindings corrected

* replaceing str with __str__ for bit.cpp

* repr reimplemented for bit.cpp

* removed make with registerAddress etc

* starting server for tests per session and nor module

* killprocess throws if no process found-> github runs fails, changed to pkill and not throw

* clean shm shouldnt raise, in ci binary not found

* ignoring these tests for CI, which fail on CI because simulators are not generated in CI. This is in another PR, where it should work

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
Co-authored-by: froejdh_e <erik.frojdh@psi.ch>
2026-01-05 15:10:46 +01:00
d83e9385ed updated error message 2025-08-05 11:31:16 +02:00
956103bbd4 fixed imagesize ctb issue (out values not transferred, setting any dbit values was not recalculatign image size in generaldata) 2025-08-04 12:12:30 +02:00
froejdh_e
bc187bb198 moved compiled extension into slsdet 2025-03-18 10:56:03 +01:00
72bec5d62e 1. Dev/update python bindings for port pr (#813)
* updated python bindings for port update from int to uint16_t

* user friendly error message for exception when python arg does not match uint16_t for ports
2023-09-29 11:12:02 +02:00
Erik Frojdh
f31fa92516 fixed hostname not split (+) in python 2023-01-16 13:34:01 +01:00
Erik Fröjdh
045a28b5de Nanosecond times in Python (#522)
* initital implementation

* datetime replaces with sls::Duration in Python C bindings

* using custom type caster

* fix for conversion to seconds

* added set_count in python

* common header for pybind11 includes

authored-by: Erik Frojdh <erik.frojdh@psi.ch>
2022-08-26 11:48:40 +02:00
519b09fcad permission 2021-10-18 15:01:10 +02:00
fada085f0e added .py licenses 2021-10-15 15:54:58 +02:00
Erik Frojdh
afd56703a2 accept tuple for counter list 2021-09-03 15:47:59 +02:00
Erik Frojdh
c0be5ab8cb merge args fix 2020-09-25 11:55:55 +02:00
Erik Frojdh
ec2d6c597f added merge_args 2020-09-25 11:00:14 +02:00
Erik Frojdh
f950e32893 fix to utils 2020-09-25 08:53:35 +02:00
Erik Frojdh
671a2724ac more set_using_dict 2020-09-24 16:55:41 +02:00
Erik Frojdh
18d5c5e26d more element 2020-09-24 14:06:58 +02:00
Erik Frojdh
101f029eef generalized set_using_dict 2020-09-24 11:01:51 +02:00
Erik Frojdh
97fea10ee2 more of @element 2020-09-24 08:39:12 +02:00
Erik Frojdh
d3fbfebeb7 generalized make_ for python 2020-09-23 17:44:19 +02:00
Erik Frojdh
1f31dd667b more element and dict 2020-09-23 17:06:30 +02:00
Erik Frojdh
0b0f5c94d5 master file no index 2020-09-23 16:28:50 +02:00
Erik Frojdh
b6d5efd441 fix for clientversion 2020-09-23 14:54:16 +02:00
Erik Frojdh
330df3463a version prints hex 2020-09-23 14:08:41 +02:00
Erik Frojdh
f6a442fd10 detsize in python 2020-09-21 17:18:31 +02:00
Erik Frojdh
d70090967d python funcs 2020-09-10 16:47:34 +02:00
Erik Frojdh
9ee67f2cfa python rx_jsonpara 2020-09-07 16:23:28 +02:00
Erik Frojdh
47da2540af json 2020-09-03 17:20:38 +02:00
Erik Frojdh
57e0fd805e added support for ~ expansion 2020-08-19 12:03:32 +02:00
Erik Frojdh
6c753f3b50 veto 2020-05-28 08:48:11 +02:00
Erik Frojdh
20bfe92573 gatedelay 2020-05-27 14:02:33 +02:00
Erik Frojdh
b543708d9d exptime 2020-05-27 11:30:11 +02:00
Erik Frojdh
f1bce15a57 replaced udp socket 2020-02-17 17:43:14 +01:00