Commit 8fdffeee authored by Adam Wujek's avatar Adam Wujek 💬

lib/snmp: add wrpcSpllStatusGroup

add:
-- wrpcSpllMode
-- wrpcSpllIrqCnt
-- wrpcSpllSeqState
-- wrpcSpllAlignState
-- wrpcSpllHlock
-- wrpcSpllMlock
-- wrpcSpllHY
-- wrpcSpllMY
-- wrpcSpllDelCnt
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 1a5a6376
......@@ -210,105 +210,105 @@ wrpcSystemUptime OBJECT-TYPE
-- ****************************************************************************
--x wrpcSpllStatusGroup OBJECT IDENTIFIER ::= { wrpcCore 4 }
--x wrpcSpllMode OBJECT-TYPE
--x SYNTAX INTEGER {
--x na(0),
--x grandmaster(1),
--x master(2),
--x slave(3)
--x }
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "Mode of Soft PLL (values taken from softpll_ng.h)"
--x ::= { wrpcSpllStatusGroup 1 }
--x wrpcSpllIrqCnt OBJECT-TYPE
--x SYNTAX Counter32
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "Number of interrupts in Soft PLL"
--x ::= { wrpcSpllStatusGroup 2 }
--x wrpcSpllSeqState OBJECT-TYPE
--x SYNTAX INTEGER {
--x startExt(1),
--x waitExt(2),
--x startHelper(3),
--x waitHelper(4),
--x startMain(5),
--x waitMain(6),
--x disabled(7),
--x ready(8),
--x clearDacs(9),
--x waitClearDacs(10)
--x }
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "Sequence state of Soft PLL (values taken from file softpll_ng.c in wrpc-sw repo)"
--x ::= { wrpcSpllStatusGroup 3 }
wrpcSpllStatusGroup OBJECT IDENTIFIER ::= { wrpcCore 4 }
wrpcSpllMode OBJECT-TYPE
SYNTAX INTEGER {
na(0),
grandmaster(1),
master(2),
slave(3)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Mode of Soft PLL (values taken from softpll_ng.h)"
::= { wrpcSpllStatusGroup 1 }
--x wrpcSpllAlignState OBJECT-TYPE
--x SYNTAX INTEGER {
--x extOff(0),
--x start(1),
--x initCsync(2),
--x waitCsync(3),
--x waitSample(4),
--x compensateDelay(5),
--x locked(6),
--x startAlignment(7),
--x startMain(8)
--x }
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "Align state of Soft PLL (values taken from file spll_external.c in wrpc-sw repo)"
--x ::= { wrpcSpllStatusGroup 4 }
wrpcSpllIrqCnt OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of interrupts in Soft PLL"
::= { wrpcSpllStatusGroup 2 }
wrpcSpllSeqState OBJECT-TYPE
SYNTAX INTEGER {
startExt(1),
waitExt(2),
startHelper(3),
waitHelper(4),
startMain(5),
waitMain(6),
disabled(7),
ready(8),
clearDacs(9),
waitClearDacs(10)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Sequence state of Soft PLL (values taken from file softpll_ng.c in wrpc-sw repo)"
::= { wrpcSpllStatusGroup 3 }
wrpcSpllAlignState OBJECT-TYPE
SYNTAX INTEGER {
extOff(0),
start(1),
initCsync(2),
waitCsync(3),
waitSample(4),
compensateDelay(5),
locked(6),
startAlignment(7),
startMain(8)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Align state of Soft PLL (values taken from file spll_external.c in wrpc-sw repo)"
::= { wrpcSpllStatusGroup 4 }
--x wrpcSpllHlock OBJECT-TYPE
--x SYNTAX Counter32
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "HLock in Soft PLL"
--x ::= { wrpcSpllStatusGroup 5 }
wrpcSpllHlock OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"HLock in Soft PLL"
::= { wrpcSpllStatusGroup 5 }
--x wrpcSpllMlock OBJECT-TYPE
--x SYNTAX Counter32
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "MLock at Soft PLL"
--x ::= { wrpcSpllStatusGroup 6 }
wrpcSpllMlock OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"MLock at Soft PLL"
::= { wrpcSpllStatusGroup 6 }
--x wrpcSpllHY OBJECT-TYPE
--x SYNTAX Integer32
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "H_y at Soft PLL"
--x ::= { wrpcSpllStatusGroup 7 }
wrpcSpllHY OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"H_y at Soft PLL"
::= { wrpcSpllStatusGroup 7 }
--x wrpcSpllMY OBJECT-TYPE
--x SYNTAX Integer32
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "M_y at Soft PLL"
--x ::= { wrpcSpllStatusGroup 8 }
wrpcSpllMY OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"M_y at Soft PLL"
::= { wrpcSpllStatusGroup 8 }
--x wrpcSpllDelCnt OBJECT-TYPE
--x SYNTAX Counter32
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "Del counter at Soft PLL"
--x ::= { wrpcSpllStatusGroup 9 }
wrpcSpllDelCnt OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Del counter at Soft PLL"
::= { wrpcSpllStatusGroup 9 }
-- ****************************************************************************
......
......@@ -19,6 +19,7 @@
#include "hw/memlayout.h"
#include "hw/etherbone-config.h"
#include "revision.h"
#include "softpll_ng.h"
#ifndef htons
#define htons(x) x
......@@ -154,6 +155,15 @@ static uint8_t oid_wrpcVersionSwBuildDate[] = {0x2B,6,1,4,1,96,101,1,1,4,0};
static uint8_t oid_wrpcDateTAI[] = {0x2B,6,1,4,1,96,101,1,2,1,0};
static uint8_t oid_wrpcDateTAIString[] = {0x2B,6,1,4,1,96,101,1,2,2,0};
static uint8_t oid_wrpcSystemUptime[] = {0x2B,6,1,4,1,96,101,1,2,3,0};
static uint8_t oid_wrpcSpllMode[] = {0x2B,6,1,4,1,96,101,1,4,1,0};
static uint8_t oid_wrpcSpllIrqCnt[] = {0x2B,6,1,4,1,96,101,1,4,2,0};
static uint8_t oid_wrpcSpllSeqState[] = {0x2B,6,1,4,1,96,101,1,4,3,0};
static uint8_t oid_wrpcSpllAlignState[] = {0x2B,6,1,4,1,96,101,1,4,4,0};
static uint8_t oid_wrpcSpllHlock[] = {0x2B,6,1,4,1,96,101,1,4,5,0};
static uint8_t oid_wrpcSpllMlock[] = {0x2B,6,1,4,1,96,101,1,4,6,0};
static uint8_t oid_wrpcSpllHY[] = {0x2B,6,1,4,1,96,101,1,4,7,0};
static uint8_t oid_wrpcSpllMY[] = {0x2B,6,1,4,1,96,101,1,4,8,0};
static uint8_t oid_wrpcSpllDelCnt[] = {0x2B,6,1,4,1,96,101,1,4,9,0};
/* NOTE: to have SNMP_GET_NEXT working properly this array has to be sorted by
OIDs */
......@@ -165,6 +175,15 @@ static struct snmp_oid oid_array[] = {
OID_FIELD_VAR( oid_wrpcDateTAI, get_time, NO_SET, ASN_COUNTER64, TAI_NUM),
OID_FIELD_VAR( oid_wrpcDateTAIString, get_time, NO_SET, ASN_OCTET_STR, TAI_STRING),
OID_FIELD_VAR( oid_wrpcSystemUptime, get_time, NO_SET, ASN_TIMETICKS, UPTIME_NUM),
OID_FIELD_VAR( oid_wrpcSpllMode, get_p, NO_SET, ASN_INTEGER, &stats.mode),
OID_FIELD_VAR( oid_wrpcSpllIrqCnt, get_p, NO_SET, ASN_COUNTER, &stats.irq_cnt),
OID_FIELD_VAR( oid_wrpcSpllSeqState, get_p, NO_SET, ASN_INTEGER, &stats.seq_state),
OID_FIELD_VAR( oid_wrpcSpllAlignState, get_p, NO_SET, ASN_INTEGER, &stats.align_state),
OID_FIELD_VAR( oid_wrpcSpllHlock, get_p, NO_SET, ASN_COUNTER, &stats.H_lock),
OID_FIELD_VAR( oid_wrpcSpllMlock, get_p, NO_SET, ASN_COUNTER, &stats.M_lock),
OID_FIELD_VAR( oid_wrpcSpllHY, get_p, NO_SET, ASN_INTEGER, &stats.H_y),
OID_FIELD_VAR( oid_wrpcSpllMY, get_p, NO_SET, ASN_INTEGER, &stats.M_y),
OID_FIELD_VAR( oid_wrpcSpllDelCnt, get_p, NO_SET, ASN_COUNTER, &stats.del_cnt),
{ 0, }
};
......
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