Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pvxput doesn't understand NTEnum #44

Open
ericonr opened this issue May 10, 2023 · 1 comment
Open

pvxput doesn't understand NTEnum #44

ericonr opened this issue May 10, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ericonr
Copy link
Contributor

ericonr commented May 10, 2023

Describe the bug

pvxput to an enum record fails with Error St13runtime_error : Unable to assign value from "0".

To Reproduce

Steps to reproduce the behavior:

  1. Have an IOC serving an mbbo record (mine is using QSRV2, but the same happens with QSRV)
  2. Write to it using pvxput $pvname $integer or pvxput $pvname $string
  3. Get error

An example record is:

record(mbbo,"$(P)$(R)$(TRIGGER_NAME)$(TRIGGER_CHAN)Dir-Sel"){
    field(DTYP,"asynInt32")
    field(DESC,"Set trigger direction")
    field(SCAN,"Passive")
    field(NOBT,"1")
    field(ZRVL,"0")
    field(ONVL,"1")
    field(ZRST,"trn")
    field(ONST,"rcv")
    field(OUT,"@asyn($(PORT),$(ADDR))DIR")
    field(PINI,"YES")
}

Assignments using either the integer values or strings work with pvput, including when specifying pvput -p pva

Expected behavior

For the PV put to work.

Information (please complete the following):

  • PVXS Version or Git commit ID: 1911f2d
  • EPICS Base Version: 5eff3803a83fbc3ea855b63841f5359c09830ade
  • libevent Version: 2.1.12
  • EPICS_HOST_ARCH: linux-x86_64
  • Host OS: Ubuntu 22.04
  • Compiler version: Ubuntu clang version 14.0.0-1ubuntu1

Alternately, from a successful build, include the output of pvxinfo -D.

Network configuration

Effective Client config from environment
    EPICS_PVA_ADDR_LIST="10.0.38.40:5076 10.0.38.46:60000 10.0.38.59:60000 10.10.10.126:5076 10.20.26.78:5076 10.20.26.82:5076 10.15.7.255 172.18.255.255 172.17.255.255"
    EPICS_PVA_AUTO_ADDR_LIST=NO
    EPICS_PVA_BROADCAST_PORT=5076
    EPICS_PVA_SERVER_PORT=5075
    EPICS_PVA_CONN_TMO=30

Additional context

The -d output from the command:

2023-05-10T17:52:07.631060588 DEBUG pvxs.iface refresh after 3485439.3 sec
2023-05-10T17:52:07.631296900 DEBUG pvxs.iface Ignoring interface 'lo' address family=17
2023-05-10T17:52:07.631396541 DEBUG pvxs.iface Ignoring interface 'enp0s31f6' address family=17
2023-05-10T17:52:07.631427027 DEBUG pvxs.iface Ignoring interface 'wlp0s20f3' address family=17
2023-05-10T17:52:07.631449595 DEBUG pvxs.iface Ignoring interface 'br-3083ab0b5a5d' address family=17
2023-05-10T17:52:07.631482172 DEBUG pvxs.iface Ignoring interface 'docker0' address family=17
2023-05-10T17:52:07.631497073 DEBUG pvxs.iface Ignoring interface 'veth2909771' address family=17
2023-05-10T17:52:07.631511065 DEBUG pvxs.iface Ignoring interface 'enx806d97457e12' address family=17
2023-05-10T17:52:07.631584120 DEBUG pvxs.iface Found interface 1 "lo" w/ 2 127.0.0.1
2023-05-10T17:52:07.631617732 DEBUG pvxs.iface Found interface 4 "wlp0s20f3" w/ 2 10.15.2.104
2023-05-10T17:52:07.631634951 DEBUG pvxs.iface Found interface 5 "br-3083ab0b5a5d" w/ 2 172.18.0.1
2023-05-10T17:52:07.631653005 DEBUG pvxs.iface Found interface 6 "docker0" w/ 2 172.17.0.1
2023-05-10T17:52:07.631720389 DEBUG pvxs.iface Found interface 1 "lo" w/ 10 [::1]
2023-05-10T17:52:07.631738253 DEBUG pvxs.iface Found interface 4 "wlp0s20f3" w/ 10 [fe80::a681:86d5:977d:76ec]%4
2023-05-10T17:52:07.631823325 DEBUG pvxs.iface Found interface 5 "br-3083ab0b5a5d" w/ 10 [fc00:f853:ccd:e793::1]
2023-05-10T17:52:07.631871921 DEBUG pvxs.iface Found interface 5 "br-3083ab0b5a5d" w/ 10 [fe80::42:6bff:fea0:7ec9]%5
2023-05-10T17:52:07.631910693 DEBUG pvxs.iface Found interface 5 "br-3083ab0b5a5d" w/ 10 [fe80::1]%5
2023-05-10T17:52:07.631939170 DEBUG pvxs.iface Found interface 26 "veth2909771" w/ 10 [fe80::50d3:73ff:fe7b:c450]%26
2023-05-10T17:52:07.632104212 INFO pvxs.loop Enter loop worker for 0x7f9a80000c00 using epoll
2023-05-10T17:52:07.632314107 INFO pvxs.loop Enter loop worker for 0x7f9a84000bb0 using epoll
2023-05-10T17:52:07.632370946 DEBUG pvxs.client.setup Using UDP Rx port 53864
2023-05-10T17:52:07.632426741 INFO pvxs.client.io Searching to 10.0.38.40:5076 unicast
2023-05-10T17:52:07.632451709 INFO pvxs.client.io Searching to 10.0.38.46:60000 unicast
2023-05-10T17:52:07.632475652 INFO pvxs.client.io Searching to 10.0.38.59:60000 unicast
2023-05-10T17:52:07.632502877 INFO pvxs.client.io Searching to 10.10.10.126:5076 unicast
2023-05-10T17:52:07.632516564 INFO pvxs.client.io Searching to 10.20.26.78:5076 unicast
2023-05-10T17:52:07.632530320 INFO pvxs.client.io Searching to 10.20.26.82:5076 unicast
2023-05-10T17:52:07.632566908 INFO pvxs.client.io Searching to 10.15.7.255:5076
2023-05-10T17:52:07.632581847 INFO pvxs.client.io Searching to 172.18.255.255:5076
2023-05-10T17:52:07.632621765 INFO pvxs.client.io Searching to 172.17.255.255:5076
2023-05-10T17:52:07.632693387 INFO pvxs.udp.setup Bound to UDP 0.0.0.0:5076 as lo
2023-05-10T17:52:07.632748838 INFO pvxs.client.io Listening for beacons on 0.0.0.0:5076
2023-05-10T17:52:07.632803686 INFO pvxs.udp.setup Bound to UDP [::]:41869 as lo
2023-05-10T17:52:07.632819323 DEBUG pvxs.udp.setup Start listening for UDP 0.0.0.0:5076
2023-05-10T17:52:07.632828738 DEBUG pvxs.udp.setup Start listening for UDP [::]:41869
2023-05-10T17:52:07.632862117 DEBUG pvxs.client.setup scheduleInitialSearch()
2023-05-10T17:52:07.632879158 DEBUG pvxs.client.setup hurryUp()
2023-05-10T17:52:07.632924491 DEBUG pvxs.client.io Search tick 0
2023-05-10T17:52:07.645068184 DEBUG pvxs.client.io Search tick 1
0000 : CA028003 0000004C 66696E64 80000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645206682 DEBUG pvxs.client.io Search to 10.0.38.40:5076 ucast
0000 : CA028003 0000004C 66696E64 80000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645233673 DEBUG pvxs.client.io Search to 10.0.38.46:60000 ucast
0000 : CA028003 0000004C 66696E64 80000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645247262 DEBUG pvxs.client.io Search to 10.0.38.59:60000 ucast
0000 : CA028003 0000004C 66696E64 80000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645258347 DEBUG pvxs.client.io Search to 10.10.10.126:5076 ucast
errlog: lost 12 messages
0000 : CA028003 0000004C 66696E64 00000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645304019 DEBUG pvxs.client.io Search to 10.15.7.255:5076 bcast
2023-05-10T17:52:07.645314184 DEBUG pvxs.udp.io UDP 0x7f9a84001870 event 2
0000 : CA028003 0000004C 66696E64 00000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645344493 DEBUG pvxs.client.io Search to 172.18.255.255:5076 bcast
0000 : CA028003 0000004C 66696E64 00000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645361820 DEBUG pvxs.client.io Search to 172.17.255.255:5076 bcast
0000 : CA028003 0000004C 66696E64 00000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645370495 DEBUG pvxs.udp.io UDP Rx 84, 10.15.2.104:53864 -> 10.15.7.255:5076 @4 (0.0.0.0:5076)
0000 : CA028003 0000004C 66696E64 00000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645461904 DEBUG pvxs.udp.io UDP Rx 84, 172.18.0.1:53864 -> 172.18.255.255:5076 @5 (0.0.0.0:5076)
0000 : CA028003 0000004C 66696E64 00000000
0010 : 00000000 00000000 00000000 00000000
0020 : D2680103 74637000 01123456 78264445
0030 : 2D323353 4C31313A 42532D46 4F464243
...
2023-05-10T17:52:07.645473590 DEBUG pvxs.udp.io UDP Rx 84, 172.17.0.1:53864 -> 172.17.255.255:5076 @6 (0.0.0.0:5076)
2023-05-10T17:52:07.650553746 DEBUG pvxs.client.io UDP search Rx event 2
0000 : CA02C004 0000002D 71966CD6 22B326E1
0010 : A2960736 66696E64 00000000 00000000
0020 : 0000FFFF 00000000 13D30374 63700100
0030 : 01123456 78  
2023-05-10T17:52:07.650583647 DEBUG pvxs.client.io UDP search Rx 53 from 10.20.26.82:5076
2023-05-10T17:52:07.650605285 DEBUG pvxs.client.io Search reply for DE-23SL11:BS-FOFBCtrl:SYSIDTrigger-Sel
2023-05-10T17:52:07.650714062 DEBUG pvxs.client.io Connecting to 10.20.26.82:5075, RX readahead 262144
0000 : 00000000 0000000D 00000000 00000000
0010 : 000B0040 00000000 FFFFFFFF 0000008E
0020 : CA028003 0000004C 66696E64 80000000
0030 : 4341533A 20446174 61677261 6D207265
...
2023-05-10T17:52:07.650727873 DEBUG pvxs.client.io Ignore UDP message from 10.0.38.59:60000
2023-05-10T17:52:07.650741271 DEBUG pvxs.client.io UDP search processed 2/40
2023-05-10T17:52:07.653186959 DEBUG pvxs.client.io Connected to 10.20.26.82:5075
0000 : CA024102 00000000  
2023-05-10T17:52:07.655481863 DEBUG pvxs.tcp.io Server 10.20.26.82:5075 Receive header
0000 : CA024001 14000000  
2023-05-10T17:52:07.655495388 DEBUG pvxs.tcp.io Server 10.20.26.82:5075 Receive header
2023-05-10T17:52:07.655502000 DEBUG pvxs.client.io Server 10.20.26.82:5075 begins validation handshake
2023-05-10T17:52:07.655511677 DEBUG pvxs.client.io Server 10.20.26.82:5075 selecting auth 'ca'
2023-05-10T17:52:07.655761729 INFO pvxs.client.io Server 10.20.26.82:5075 'ca' auth as erico.rolim@S-SWC03-L
0000 : CA024009 01000000  
2023-05-10T17:52:07.657881555 DEBUG pvxs.tcp.io Server 10.20.26.82:5075 Receive header
2023-05-10T17:52:07.657905209 DEBUG pvxs.client.io Server 10.20.26.82:5075 accepts auth
2023-05-10T17:52:07.657916990 DEBUG pvxs.client.io Server 10.20.26.82:5075 creating channel 'DE-23SL11:BS-FOFBCtrl:SYSIDTrigger-Sel' (305419896)
0000 : CA024007 09000000  
2023-05-10T17:52:07.659967935 DEBUG pvxs.tcp.io Server 10.20.26.82:5075 Receive header
2023-05-10T17:52:07.660017244 DEBUG pvxs.client.io Server 10.20.26.82:5075 active channel to 'DE-23SL11:BS-FOFBCtrl:SYSIDTrigger-Sel' 305419896:117768961
2023-05-10T17:52:07.660037350 DEBUG pvxs.client.io Server 10.20.26.82:5075 channel 'DE-23SL11:BS-FOFBCtrl:SYSIDTrigger-Sel' op0b INIT
0000 : CA02400B B9000000  
2023-05-10T17:52:07.662106812 DEBUG pvxs.tcp.io Server 10.20.26.82:5075 Receive header
0000 : CA02400B 5A000000  
2023-05-10T17:52:07.664332996 DEBUG pvxs.tcp.io Server 10.20.26.82:5075 Receive header
2023-05-10T17:52:07.664399172 DEBUG pvxs.client.io Server 10.20.26.82:5075 channel DE-23SL11:BS-FOFBCtrl:SYSIDTrigger-Sel op0b state 3 -> 4
Error St13runtime_error : Unable to assign value from "0"
2023-05-10T17:52:07.665023558 DEBUG pvxs.client.setup context 0x5611abaa2130 close
2023-05-10T17:52:07.665440051 DEBUG pvxs.client.io Server 10.20.26.82:5075 detach channel 'DE-23SL11:BS-FOFBCtrl:SYSIDTrigger-Sel' to re-search
2023-05-10T17:52:07.665458039 DEBUG pvxs.client.io Cleaning connection to 10.20.26.82:5075
2023-05-10T17:52:07.665601765 DEBUG pvxs.udp.setup Stop listening for UDP 0.0.0.0:5076
2023-05-10T17:52:07.665679541 DEBUG pvxs.udp.setup Stop listening for UDP [::]:41869
2023-05-10T17:52:07.665724280 INFO pvxs.loop Exit loop worker: 0 for 0x7f9a84000bb0
2023-05-10T17:52:07.665827906 INFO pvxs.loop Exit loop worker: 0 for 0x7f9a80000c00
@mdavidsaver
Copy link
Member

So far the logic behind pvxput is very minimal, and doesn't yet understand NTEnum.

pvxput $pvname value.index=$integer

Should work, but isn't convenient.

At this point, I'm still recommending that end users continue to use the CLI tools from pvAccessCPP.

@mdavidsaver mdavidsaver changed the title pvxput failing to a mbbo record pvxput doesn't understand NTEnum May 10, 2023
@mdavidsaver mdavidsaver added the bug Something isn't working label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants