smart-sensor-example/random-sensor-ldmc/get_status.sh

26 lines
651 B
Bash
Raw Permalink Normal View History

#!/bin/sh
RPC_HOST="localhost"
RPC_PORT="8070"
RPC_TAG="0"
echo -n ${RPC_TAG} \
| morph " RpcTag ~
~ <PosInt 10 BigEndian>
~ < Seq~<ValueTerminated 0>
<Digit 10>
~ Char ~ Ascii ~ x86.UInt8
>" \
" RpcTag ~
~ x86.UInt64" \
| nc ${RPC_HOST} ${RPC_PORT} \
| morph " TimePoint
~ <TimeSince UnixEpoch>
~ Duration ~ Seconds
~ ~ <QuantizedLinear 0 1 1000>
~ ~ x86.UInt64" \
" TimePoint
~ ISO8601
~ <Seq Char~Unicode> ~ UTF-8
~ <Seq~<ValueTerminated 0> x86.UInt8>"