summaryrefslogtreecommitdiff
path: root/daemons/gptp/linux/src/daemon_cl.cpp
diff options
context:
space:
mode:
authorLevi Pearson <levipearson@gmail.com>2018-06-19 14:52:52 -0600
committerGitHub <noreply@github.com>2018-06-19 14:52:52 -0600
commit5b95644093b857b2dc886e29871519edd7d66b67 (patch)
tree0e593f3b76dcffe86e73d54b7c39dd831e5915a5 /daemons/gptp/linux/src/daemon_cl.cpp
parent247413605cc4cda855ea89cc6b5c4168a247a91a (diff)
parentb66379611283f1daae1008f9fb8f084bf115a531 (diff)
downloadOpen-AVB-5b95644093b857b2dc886e29871519edd7d66b67.tar.gz
Merge pull request #795 from christopher-s-hall/open-avb-next
gptp: Add monotonic raw clock option
Diffstat (limited to 'daemons/gptp/linux/src/daemon_cl.cpp')
-rw-r--r--daemons/gptp/linux/src/daemon_cl.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/daemons/gptp/linux/src/daemon_cl.cpp b/daemons/gptp/linux/src/daemon_cl.cpp
index 3a6d95e5..53a8f9a4 100644
--- a/daemons/gptp/linux/src/daemon_cl.cpp
+++ b/daemons/gptp/linux/src/daemon_cl.cpp
@@ -150,6 +150,7 @@ int main(int argc, char **argv)
LinuxIPCArg *ipc_arg = NULL;
bool use_config_file = false;
char config_file_path[512];
+ const char *systemClockDesc = NULL;
memset(config_file_path, 0, 512);
GPTPPersist *pGPTPPersist = NULL;
@@ -424,6 +425,11 @@ int main(int argc, char **argv)
portInit.syncReceiptThreshold =
iniParser.getSyncReceiptThresh();
+ if( strnlen( iniParser.getSystemClockDesc(),
+ MAX_CLOCK_DESC_LEN ) != 0 )
+ systemClockDesc =
+ iniParser.getSystemClockDesc();
+
/*Only overwrites phy_delay default values if not input_delay switch enabled*/
if(!input_delay)
{
@@ -433,6 +439,14 @@ int main(int argc, char **argv)
}
+ if( systemClockDesc != NULL )
+ {
+ if( timestamper->HWTimestamper_setsystemclock
+ ( systemClockDesc ))
+ GPTP_LOG_INFO
+ ( "Using system Clock: %s", systemClockDesc );
+ }
+
pPort = new EtherPort(&portInit);
if (!pPort->init_port()) {