points
is an array. Your message should be something like:
Code: Select all
local msg={
header=...,
points={{x=p[1], y=p[2] ,z=p[3]}}
}
points
is an array. Your message should be something like:
Code: Select all
local msg={
header=...,
points={{x=p[1], y=p[2] ,z=p[3]}}
}
Code: Select all
--lua
cbor=require'cbor'
buf=cbor.encode{{1,2,3},{3,4,5}}
-- send buf...
Code: Select all
#python
# receive buf...
import cbor
print(cbor.loads(buf))
# prints [[1, 2, 3], [3, 4, 5]]