[PATCH v6 1/1] ltq-vdsl-app: extent dsl metrics with state_num and power_state_num
Andre Heider
a.heider at gmail.com
Tue Apr 13 10:33:19 BST 2021
On 13/04/2021 11:30, Florian Eckert wrote:
> With the old ubus dsl API, the numbers for the individual line_states and
> power_states were also returned. These were not ported to the new DSL
> C-API. This commit adds the missing information.
>
> For this the internal values are mapped to numbers.
>
> * additional JSON output for state_num:
> "state_num": <map_state_number>
>
> Since not all values are meaningful only the following values are
> implemented, this can be extended if the future.
>
> * LSTATE_MAP_NOT_INITIALIZED
> * LSTATE_MAP_EXCEPTION
> * LSTATE_MAP_IDLE
> * LSTATE_MAP_SILENT
> * LSTATE_MAP_HANDSHAKE
> * LSTATE_MAP_FULL_INIT
> * LSTATE_MAP_SHOWTIME_NO_SYNC
> * LSTATE_MAP_SHOWTIME_TC_SYNC
> * LSTATE_MAP_RESYNC
>
> * additinal JSON output for power_level:
> "power_state_num": <map_power_satte_number>,
>
> Since there are not so many here, all are mapped.
>
> * PSTATE_MAP_NA,
> * PSTATE_MAP_L0,
> * PSTATE_MAP_L1,
> * PSTATE_MAP_L2,
> * PSTATE_MAP_L3,
>
> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
Reviewed-by: Andre Heider <a.heider at gmail.com>
Thanks!
More information about the openwrt-devel
mailing list