Mercurial > code > home > repos > homeauto
view service/iot2/py_read_messages_demo.py @ 1611:a794a150a89b
a little inner-loop performace. same number of iterations, but less time on logging and some stmt filtering
author | drewp@bigasterisk.com |
---|---|
date | Mon, 06 Sep 2021 18:18:42 -0700 |
parents | e3eceee54937 |
children |
line wrap: on
line source
import sys import capnp # (No compile step) messages_capnp = capnp.load('messages.capnp') print(dir(messages_capnp)) report = messages_capnp.Report.new_message() report.sensor = b'hello' report.value = 1.234 print(repr(report.to_bytes()))