Hi all,
i want to display the TEST:PING value in camonitor, which is the return value by ping 127.0.0.1.
i know pcaspy can implement this, but i am newer in it.
below is the pcaspy program i wrote and there is an error.
Could you give me some advice and thanks in advance.
#!/usr/bin/env python
import os
from pcaspy import Driver, SimpleServer
prefix = 'TEST:'
pvdb = {
'PING' : {
a,
},
}
class myDriver(Driver):
def __init__(self):
super(myDriver, self).__init__()
def determine():
a=os.system("ping -c 1 -w 1 127.0.0.1")
if (a==0):
print "communication established !"
if __name__ == '__main__':
server = SimpleServer()
server.createPV(prefix, pvdb)
driver = myDriver()
# process CA transactions
while True:
server.process(0.1)