Commit Graph

34 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
d003a6d8e0 2. Dev/add jf pedestal feature (#807) 2023-09-29 11:25:58 +02: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
b39c64032d clang format 2021-10-19 14:49:43 +02:00
519b09fcad permission 2021-10-18 15:01:10 +02:00
dac60ad76d added .cpp licenses 2021-10-15 15:47:04 +02:00
Erik Frojdh
56b7dd3ca9 added currentsource to python 2021-10-05 17:13:32 +02:00
Erik Frojdh
a6e23b0509 added scanParameters in Python 2020-12-01 18:40:45 +01:00
Erik Frojdh
d9b2a90651 Introduced pattern class 2020-11-27 10:03:15 +01:00
Erik Fröjdh
a15d8dd30a Moving headers into include/sls (#212) 2020-11-02 16:05:28 +01:00
Erik Frojdh
f1bce15a57 replaced udp socket 2020-02-17 17:43:14 +01:00
Erik Fröjdh
ed2a69744b Auto generating Python bindings (#70)
Auto generating python bindings
2020-01-07 15:47:38 +01:00
Dhanya Thattil
995f0924e5 Commandline (#66)
* WIP

* WIP

* removed status to string from defs

* WIP

* WIP

* WIP removed unused functions in multi

* WIP

* print hex in a terrible way

* WIP, loadconfig error

* WIP, type to string

* WIP

* fix to conversion

* WIP, hostname doesnt work

* WIP

* WIP

* WIP

* WIP, threshold

* WIP, threshold

* WIP

* WIP, triggers

* WIP, cycles to triggers

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* rx_udsocksize fx, WIP

* WIP

* WIP

* WIP

* file index (64 bit), WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* merge

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* New python mod
2019-10-21 10:29:06 +02:00
Erik Frojdh
7242a6901a python compiles 2019-09-30 15:00:03 +02:00
Erik Frojdh
c3c3f78c59 removed roflags from python 2019-09-17 09:32:22 +02:00
Erik Frojdh
1980a7d80c python fix 2019-08-28 14:19:54 +02:00
Erik Frojdh
d1ea74120d added string concat to ToString 2019-08-20 12:17:42 +02:00
Erik Frojdh
336f8ceb50 WIP 2019-08-16 10:46:42 +02:00
Erik Frojdh
1f549d51fa fixed merge 2019-08-09 11:45:06 +02:00
Erik Frojdh
ce9f76d017 WIP 2019-08-08 16:48:03 +02:00
Dhanya Thattil
4ceee97c03 Api (#48)
* WIP

* WIP

* WIP

* cleaned up multi

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* split up python module

* WIP

* WIP

* WIP

* WIP

* WIP

* ok

* fixed bugs from rebase

* WIP

* fixed broken test

* WIP

* fixed python

* WIP

* sphinx help

* including new commands

* docs

* WIP

* WIP

* more tests

* added missing public header

* WIP
2019-08-07 11:21:07 +02:00
Dhanya Thattil
b524e0c95f removed online flags, apiversion in shm, ret for ok and fail, bind socket help in exception message (#43)
* removed online flag, removed rxronline flag, added useReceier flag that is set only when rxr hostname is set, removed setonline, setreceiveronline flag, removed ret for ok or fail, using exceptions for this, changed cannot bind socket printout

* fixed python
2019-07-26 16:33:39 +02:00
Erik Frojdh
0fa63f8be2 updated enums in old python 2019-07-22 16:09:35 +02:00
Erik Frojdh
2d3f5a03ca syncclk for python 2019-06-19 17:31:49 +02:00
Erik Frojdh
55229f77a3 python 2019-06-12 10:41:50 +02:00
Erik Frojdh
83c2775d6c fixed python 2019-04-18 15:57:59 +02:00
Erik Frojdh
833ca071c4 fix 2019-04-18 15:40:20 +02:00
Erik Frojdh
202d88d6be experimental python 2019-04-18 15:31:07 +02:00
Erik Frojdh
faf7e0db82 fix 2019-04-18 15:09:36 +02:00
Erik Frojdh
86afb2bd0e more ctb commands 2019-04-18 15:03:01 +02:00
Erik Frojdh
c7259538e9 python commands 2019-04-18 13:39:43 +02:00
Erik Frojdh
7c4aa7f3a7 added commands to python 2019-04-18 10:53:06 +02:00
Erik Frojdh
248306d570 minor 2019-04-15 17:22:31 +02:00
89a06f099c merging refactor (replacing) 2019-04-12 10:53:09 +02:00