diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-10-26 16:44:17 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-10-26 16:44:17 (GMT) |
commit | 79d64f400391ce81b4eda73977cb40099256b348 (patch) | |
tree | 47afaed270cf59335dbaf4eb7965eac64a02a687 /xpa/python/PythonXPA/server/test_XPAS.py | |
parent | 1377ae8b2142276c24d28d65865e459038984c62 (diff) | |
download | blt-79d64f400391ce81b4eda73977cb40099256b348.zip blt-79d64f400391ce81b4eda73977cb40099256b348.tar.gz blt-79d64f400391ce81b4eda73977cb40099256b348.tar.bz2 |
upgrade XPA
Diffstat (limited to 'xpa/python/PythonXPA/server/test_XPAS.py')
-rwxr-xr-x | xpa/python/PythonXPA/server/test_XPAS.py | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/xpa/python/PythonXPA/server/test_XPAS.py b/xpa/python/PythonXPA/server/test_XPAS.py deleted file mode 100755 index fe4f1a2..0000000 --- a/xpa/python/PythonXPA/server/test_XPAS.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/python - -################################ -####### testing: # -################################ - -from XPAServer import * - -import time - -print "Poll" -n = x.XPAPoll(10000, 0) -print "got %d" % n - -EXIT_FLAG = False - - -############################## -# setting up Info Point # -############################## - -def py_infocb_func(a, b, c): - global EXIT_FLAG - print ">>> INFO:" - print "params:", c - print "info:", a - print "XPA.name", b[0].name - print "<<<" - if (c[0:4] == "exit"): - print "setting EXIT_FLAG" - EXIT_FLAG = True - return 0 - -infocb_func = INFOCBFUNC(py_infocb_func) - -xpa = XPAInfoNew("XPA", "i_test", infocb_func, "my info", "") - -############################## - - - - -####################################### -# setting up AccessPoint Get/Set # -####################################### - -def py_sendcb_func(data, call_data, param, buf, len): - print "inside send_callback" - print "param:", param - print "buf:", string_at(buf) - buf[0] = cast("this is test only\n", c_byte_p) - len[0] = 19 - return 0 - -sendcb_func = SENDCBFUNC(py_sendcb_func) - - -def py_rcvcb_func(data, call_data, param, buf, len): - print "inside rcv_callback" - print "param:", param - print "got %d bytes" % len - print "buf:", string_at(buf) - return 0 - -rcvcb_func = RCVCBFUNC(py_rcvcb_func) - - -xpa2 = XPANew("XPA", "myxpa", "this is great help", - sendcb_func, - "SEND_DATA", "freebuf=false", - rcvcb_func, - "", "") - - - - - -############################## -print "Entering loop" - -while EXIT_FLAG == False: - n = XPAPoll(1000, 1) - print "got:", n - -print "loop finished" -############################## - - -print "calling XPAFree" -XPAFree(xpa) -XPAFree(xpa2) |