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 ...@@ -210,105 +210,105 @@ wrpcSystemUptime OBJECT-TYPE
-- **************************************************************************** -- ****************************************************************************
--x wrpcSpllStatusGroup OBJECT IDENTIFIER ::= { wrpcCore 4 } wrpcSpllStatusGroup OBJECT IDENTIFIER ::= { wrpcCore 4 }
--x wrpcSpllMode OBJECT-TYPE wrpcSpllMode OBJECT-TYPE
--x SYNTAX INTEGER { SYNTAX INTEGER {
--x na(0), na(0),
--x grandmaster(1), grandmaster(1),
--x master(2), master(2),
--x slave(3) slave(3)
--x } }
--x MAX-ACCESS read-only MAX-ACCESS read-only
--x STATUS current STATUS current
--x DESCRIPTION DESCRIPTION
--x "Mode of Soft PLL (values taken from softpll_ng.h)" "Mode of Soft PLL (values taken from softpll_ng.h)"
--x ::= { wrpcSpllStatusGroup 1 } ::= { 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 }
--x wrpcSpllAlignState OBJECT-TYPE wrpcSpllIrqCnt OBJECT-TYPE
--x SYNTAX INTEGER { SYNTAX Counter32
--x extOff(0), MAX-ACCESS read-only
--x start(1), STATUS current
--x initCsync(2), DESCRIPTION
--x waitCsync(3), "Number of interrupts in Soft PLL"
--x waitSample(4), ::= { wrpcSpllStatusGroup 2 }
--x compensateDelay(5),
--x locked(6), wrpcSpllSeqState OBJECT-TYPE
--x startAlignment(7), SYNTAX INTEGER {
--x startMain(8) startExt(1),
--x } waitExt(2),
--x MAX-ACCESS read-only startHelper(3),
--x STATUS current waitHelper(4),
--x DESCRIPTION startMain(5),
--x "Align state of Soft PLL (values taken from file spll_external.c in wrpc-sw repo)" waitMain(6),
--x ::= { wrpcSpllStatusGroup 4 } 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 wrpcSpllHlock OBJECT-TYPE
--x SYNTAX Counter32 SYNTAX Counter32
--x MAX-ACCESS read-only MAX-ACCESS read-only
--x STATUS current STATUS current
--x DESCRIPTION DESCRIPTION
--x "HLock in Soft PLL" "HLock in Soft PLL"
--x ::= { wrpcSpllStatusGroup 5 } ::= { wrpcSpllStatusGroup 5 }
--x wrpcSpllMlock OBJECT-TYPE wrpcSpllMlock OBJECT-TYPE
--x SYNTAX Counter32 SYNTAX Counter32
--x MAX-ACCESS read-only MAX-ACCESS read-only
--x STATUS current STATUS current
--x DESCRIPTION DESCRIPTION
--x "MLock at Soft PLL" "MLock at Soft PLL"
--x ::= { wrpcSpllStatusGroup 6 } ::= { wrpcSpllStatusGroup 6 }
--x wrpcSpllHY OBJECT-TYPE wrpcSpllHY OBJECT-TYPE
--x SYNTAX Integer32 SYNTAX Integer32
--x MAX-ACCESS read-only MAX-ACCESS read-only
--x STATUS current STATUS current
--x DESCRIPTION DESCRIPTION
--x "H_y at Soft PLL" "H_y at Soft PLL"
--x ::= { wrpcSpllStatusGroup 7 } ::= { wrpcSpllStatusGroup 7 }
--x wrpcSpllMY OBJECT-TYPE wrpcSpllMY OBJECT-TYPE
--x SYNTAX Integer32 SYNTAX Integer32
--x MAX-ACCESS read-only MAX-ACCESS read-only
--x STATUS current STATUS current
--x DESCRIPTION DESCRIPTION
--x "M_y at Soft PLL" "M_y at Soft PLL"
--x ::= { wrpcSpllStatusGroup 8 } ::= { wrpcSpllStatusGroup 8 }
--x wrpcSpllDelCnt OBJECT-TYPE wrpcSpllDelCnt OBJECT-TYPE
--x SYNTAX Counter32 SYNTAX Counter32
--x MAX-ACCESS read-only MAX-ACCESS read-only
--x STATUS current STATUS current
--x DESCRIPTION DESCRIPTION
--x "Del counter at Soft PLL" "Del counter at Soft PLL"
--x ::= { wrpcSpllStatusGroup 9 } ::= { wrpcSpllStatusGroup 9 }
-- **************************************************************************** -- ****************************************************************************
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "hw/memlayout.h" #include "hw/memlayout.h"
#include "hw/etherbone-config.h" #include "hw/etherbone-config.h"
#include "revision.h" #include "revision.h"
#include "softpll_ng.h"
#ifndef htons #ifndef htons
#define htons(x) x #define htons(x) x
...@@ -154,6 +155,15 @@ static uint8_t oid_wrpcVersionSwBuildDate[] = {0x2B,6,1,4,1,96,101,1,1,4,0}; ...@@ -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_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_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_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 /* NOTE: to have SNMP_GET_NEXT working properly this array has to be sorted by
OIDs */ OIDs */
...@@ -165,6 +175,15 @@ static struct snmp_oid oid_array[] = { ...@@ -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_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_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_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, } { 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