summaryrefslogtreecommitdiff
path: root/daemons/gptp/common/gptp_cfg.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/gptp/common/gptp_cfg.hpp')
-rw-r--r--daemons/gptp/common/gptp_cfg.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/daemons/gptp/common/gptp_cfg.hpp b/daemons/gptp/common/gptp_cfg.hpp
index f283a4db..e8801daf 100644
--- a/daemons/gptp/common/gptp_cfg.hpp
+++ b/daemons/gptp/common/gptp_cfg.hpp
@@ -45,6 +45,7 @@ const uint32_t LINKSPEED_2_5G = 2500000;
const uint32_t LINKSPEED_1G = 1000000;
const uint32_t LINKSPEED_100MB = 100000;
const uint32_t INVALID_LINKSPEED = UINT_MAX;
+const uint8_t MAX_CLOCK_DESC_LEN = 64;
/**
* @brief Returns name given numeric link speed
@@ -68,6 +69,9 @@ class GptpIniParser
/*ptp data set*/
unsigned char priority1;
+ /* Clock data set */
+ char systemClockDesc[MAX_CLOCK_DESC_LEN+1];
+
/*port data set*/
unsigned int announceReceiptTimeout;
unsigned int syncReceiptTimeout;
@@ -93,6 +97,15 @@ class GptpIniParser
*/
int parserError(void);
+ /**
+ * @brief Read SystemClock description
+ * @return pointer to c-string representing system clock
+ */
+ const char *getSystemClockDesc(void)
+ {
+ return _config.systemClockDesc;
+ }
+
/**
* @brief Reads priority1 config value
* @param void