There are certain commnads in ROS that print some info in console, but do not return it as a variable.
There is for example command
/interface lte info lte1 once
which returns something like this in console
pin-status: no password required
functionality: full
registration-status: registered
manufacturer: "MikroTik"
model: "R11e-LTE"
revision: "MikroTik_CP_2.160.000_v012"
current-operator: MegaFon
lac: 00000
current-cellid: 000000000
enb-id: 000000
sector-id: 24
phy-cellid: 487
access-technology: Evolved 3G (LTE)
session-uptime: 6m19s
imei: 000000000000000
imsi: 000000000000000
uicc: 0000000000000000000
subscriber-number: +CME ERROR: 100
earfcn: 3048 (band 7, bandwidth 20Mhz)
rsrp: -112dBm
rsrq: -11dB
sinr: 3dB
I need to collect this data into a variable but it always returns empty string (or array?).
There is also no obvious way to access this data by value-name or in any other way.
I was searching for roughly an hour, and found only this topic: http://forum.mikrotik.com/t/how-do-save-interface-lte-cell-monitor-in-file-or-variable/124631/1
It seems the solution wasn’t found.
Since I’m using ansible for the task, I can grab that output and parse it somehow. But the question remains: how could this be done in ROS itself?