Re: Detecting the absence/removal of board (USB device)
Michael K via Linux-gpib-general <[email protected]> Mon, 28 Feb 2022 02:12:09 +0000 (UTC)
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <[email protected]> |
If I use "YACC=bison" on the configure that problem is solved but now I get a stack of other errors ... like
gpib.c: In function ‘zif_iberr’:gpib.c:73:45: error: expected ‘)’ before ‘TSRMLS_CC’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ~ ^~~~~~~~~gpib.c:430:6: note: in expansion of macro ‘FUN_ACCESSOR’ 430 | FUN_ACCESSOR(iberr) | ^~~~~~~~~~~~gpib.c:73:7: error: too few arguments to function ‘zend_parse_parameters’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ^~~~~~~~~~~~~~~~~~~~~gpib.c:430:6: note: in expansion of macro ‘FUN_ACCESSOR’ 430 | FUN_ACCESSOR(iberr) | ^~~~~~~~~~~~In file included from /usr/include/php/main/php.h:35, from gpib.c:65:/usr/include/php/Zend/zend_API.h:304:22: note: declared here 304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...); | ^~~~~~~~~~~~~~~~~~~~~gpib.c: In function ‘zif_ibcnt’:gpib.c:73:45: error: expected ‘)’ before ‘TSRMLS_CC’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ~ ^~~~~~~~~gpib.c:431:6: note: in expansion of macro ‘FUN_ACCESSOR’ 431 | FUN_ACCESSOR(ibcnt) | ^~~~~~~~~~~~gpib.c:73:7: error: too few arguments to function ‘zend_parse_parameters’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ^~~~~~~~~~~~~~~~~~~~~gpib.c:431:6: note: in expansion of macro ‘FUN_ACCESSOR’ 431 | FUN_ACCESSOR(ibcnt) | ^~~~~~~~~~~~In file included from /usr/include/php/main/php.h:35, from gpib.c:65:/usr/include/php/Zend/zend_API.h:304:22: note: declared here 304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...); | ^~~~~~~~~~~~~~~~~~~~~gpib.c: In function ‘zif_ibsta’:gpib.c:73:45: error: expected ‘)’ before ‘TSRMLS_CC’ 73 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) \ | ~ ^~~~~~~~~gpib.c:432:6: note: in expansion of macro ‘FUN_ACCESSOR’ 432 | FUN_ACCESSOR(ibsta) | ^~~~~~~~~~~~
On Sunday, February 27, 2022, 09:00:41 PM EST, Michael K via Linux-gpib-general <[email protected]> wrote:
That's great but I'm now having trouble compiling the SVN.
I bootstrap, configure and the make but for some odd reason the makefile generates an invalid option for yacc.Any idea whats going on here?
/bin/sh /home/michael/CatLab/GPIB/linux-gpib-code/linux-gpib-user/missing yacc -Wno-yacc -d -p gpib_yy -o ./ibConfYacc.c ibConfYacc.yyacc: invalid option -- 'W'Usage: yacc [options] filename
if I remove the option from the Makefile.ac I get this error when building (after bootsrat and configure)
/bin/sh /home/michael/CatLab/GPIB/linux-gpib-code/linux-gpib-user/missing yacc -d -p gpib_yy -o ./ibConfYacc.c ibConfYacc.yyacc: e - line 115 of "ibConfYacc.y", syntax error%define api.pure full^
$ yacc -Vyacc - 2.0 20210328
thanks, Michael On Sunday, February 27, 2022, 12:47:55 PM EST, dave penkler <[email protected]> wrote:
Normally I would suggest using iblines(). But the agilent driver has a bug returning no error even if there is no board.It is fixed in the SVN and now returns ibcntl = 19 which is ENODEVHere is a log of ibtest with the "board" disconnected:
$ ibtest
Do you wish to open a (d)evice or an interface (b)oard?
(you probably want to open a device): b
enter name of interface board (or device) you wish to open: hpusb
trying to open board named 'hpusb'
You can:
w(a)it for an event
write (c)ommand bytes to bus (system controller only)
send (d)evice clear (device only)
change remote (e)nable line (system controller only)
(g)o to standby (release ATN line, system controller only)
send (i)nterface clear (system controller only)
ta(k)e control (assert ATN line, system controller only)
get bus (l)ine status (board only)
go to local (m)ode
change end (o)f transmission configuration
(q)uit
(r)ead string
perform (s)erial poll (device only)
change (t)imeout on io operations
request ser(v)ice (board only)
(w)rite data string
send group e(x)ecute trigger (device only)
: l
gpib status is:
ibsta = 0x8120 < ERR CMPL CIC >
iberr= 0
EDVR 0: OS error
ibcntl = 19
You can:...
On Sun, 27 Feb 2022 at 16:43, Michael K via Linux-gpib-general <[email protected]> wrote:
I'm using an Keysight 82357B "board" (USB device).If the drivers (gpib_common and agilent_82357a) are loaded, ibfind will always find the device even after the USB device has been removed.(the drivers are loaded upon connection but do not unload when the USB device is removed)Is there a way to determine if the board is still connected using the API?_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general