示例#1
0
#!/usr/bin/env python3

import pycx4.pycda as cda

import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)


def printval(chan):
    print(chan.val)


chan = cda.Chan("canhw:21.ring_current")
chan.valueMeasured.connect(printval)

cda.main_loop()
示例#2
0
#!/usr/bin/env python
import signal
import pycx4.pycda as cda

signal.signal(signal.SIGINT, signal.SIG_DFL)


def printval(chan):
    print chan.val


text_c = cda.StrChan("localhost:0.msg.1")
text_c.valueMeasured.connect(printval)

cda.main_loop()