Commit c7da0cf3 authored by Adam Wujek's avatar Adam Wujek

proto-ext-common/wrh-servo: move wrh_servo_state_name to .h file

Some tools (e.g. wr_mon in WRS) would like to translate state number to
a label. However, the wrh_servo_state_name was not exported via shmem.
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent b228593a
......@@ -9,6 +9,7 @@
#include <ppsi/ppsi.h>
// #include "wrs-constants.h"
#include "../proto-standard/common-fun.h"
#include "wrh-servo_state_name.h"
#if CONFIG_ARCH_IS_WRS
#include <libwr/shmem.h>
......@@ -21,15 +22,6 @@
#define SNMP_MAX_OFFSET_PS 500
#define SNMP_MAX_DELTA_RTT_PS 1000
static const char * const wrh_servo_state_name[] = {
[WRH_UNINITIALIZED] = "Uninitialized",
[WRH_SYNC_NSEC] = "SYNC_NSEC",
[WRH_SYNC_TAI] = "SYNC_TAI",
[WRH_SYNC_PHASE] = "SYNC_PHASE",
[WRH_TRACK_PHASE] = "TRACK_PHASE",
[WRH_WAIT_OFFSET_STABLE] = "WAIT_OFFSET_STABLE",
};
/* Enable tracking by default. Disabling the tracking is used for demos. */
static int wrh_tracking_enabled = 1;
......
/*
* Copyright (C) 2023 CERN (www.cern.ch)
* Author: Jean-Claude BAU & Maciej Lipinski
*
* Released according to the GNU LGPL, version 2.1 or any later version.
*/
/* Define wrh_servo_state_name as it is used by some other tools
* (e.g. in WRS) */
static const char * const wrh_servo_state_name[] = {
[WRH_UNINITIALIZED] = "Uninitialized",
[WRH_SYNC_NSEC] = "SYNC_NSEC",
[WRH_SYNC_TAI] = "SYNC_TAI",
[WRH_SYNC_PHASE] = "SYNC_PHASE",
[WRH_TRACK_PHASE] = "TRACK_PHASE",
[WRH_WAIT_OFFSET_STABLE] = "WAIT_OFFSET_STABLE",
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment