Re: [Linuxptp-devel] [PATCH v5 02/13] ts2phc: rename source code files ("master" to "source", "slave" to "sink")

2022-05-15 Thread Richard Cochran
On Tue, Nov 23, 2021 at 02:14:10AM +0200, Vladimir Oltean wrote:
> At the moment, a clock which emits PPS is not synchronizable, and
> therefore called "master", and a clock which timestamps PPS is
> synchronizable, and therefore called "slave".
> 
> The ts2phc program is preparing to decouple the concept of clock
> synchronization from the concept of who emits PPS and who timestamps
> PPS.
> 
> When that will happen, the "master" and "slave" terminology will become
> vague. Rename what is today a "master" to a "PPS source" and a "slave"
> to a "PPS sink". Temporarily, the clock representing the time reference
> still coincides with the "PPS source", and the target clocks for
> synchronization still coincide with the "PPS sinks".
> 
> The change only renames files and their occurrences in the source code
> (include paths and makefile). No functional change intended.
> 
> Suggested-by: Richard Cochran 
> Signed-off-by: Vladimir Oltean 

Applied.  (I made a slight change to keep include directives in alphabetical 
order)

Thanks,
Richard


___
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


[Linuxptp-devel] [PATCH v5 02/13] ts2phc: rename source code files ("master" to "source", "slave" to "sink")

2021-11-22 Thread Vladimir Oltean
At the moment, a clock which emits PPS is not synchronizable, and
therefore called "master", and a clock which timestamps PPS is
synchronizable, and therefore called "slave".

The ts2phc program is preparing to decouple the concept of clock
synchronization from the concept of who emits PPS and who timestamps
PPS.

When that will happen, the "master" and "slave" terminology will become
vague. Rename what is today a "master" to a "PPS source" and a "slave"
to a "PPS sink". Temporarily, the clock representing the time reference
still coincides with the "PPS source", and the target clocks for
synchronization still coincide with the "PPS sinks".

The change only renames files and their occurrences in the source code
(include paths and makefile). No functional change intended.

Suggested-by: Richard Cochran 
Signed-off-by: Vladimir Oltean 
---
v4->v5: patch is new

 makefile   | 4 ++--
 ts2phc.c   | 4 ++--
 ts2phc_generic_master.c => ts2phc_generic_pps_source.c | 4 ++--
 ts2phc_generic_master.h => ts2phc_generic_pps_source.h | 4 ++--
 ts2phc_nmea_master.c => ts2phc_nmea_pps_source.c   | 6 +++---
 ts2phc_nmea_master.h => ts2phc_nmea_pps_source.h   | 4 ++--
 ts2phc_phc_master.c => ts2phc_phc_pps_source.c | 6 +++---
 ts2phc_phc_master.h => ts2phc_phc_pps_source.h | 4 ++--
 ts2phc_slave.c => ts2phc_pps_sink.c| 4 ++--
 ts2phc_slave.h => ts2phc_pps_sink.h| 4 ++--
 ts2phc_master.c => ts2phc_pps_source.c | 8 
 ts2phc_master.h => ts2phc_pps_source.h | 2 +-
 ts2phc_master_private.h => ts2phc_pps_source_private.h | 4 ++--
 13 files changed, 29 insertions(+), 29 deletions(-)
 rename ts2phc_generic_master.c => ts2phc_generic_pps_source.c (94%)
 rename ts2phc_generic_master.h => ts2phc_generic_pps_source.h (81%)
 rename ts2phc_nmea_master.c => ts2phc_nmea_pps_source.c (98%)
 rename ts2phc_nmea_master.h => ts2phc_nmea_pps_source.h (81%)
 rename ts2phc_phc_master.c => ts2phc_phc_pps_source.c (96%)
 rename ts2phc_phc_master.h => ts2phc_phc_pps_source.h (82%)
 rename ts2phc_slave.c => ts2phc_pps_sink.c (99%)
 rename ts2phc_slave.h => ts2phc_pps_sink.h (88%)
 rename ts2phc_master.c => ts2phc_pps_source.c (84%)
 rename ts2phc_master.h => ts2phc_pps_source.h (97%)
 rename ts2phc_master_private.h => ts2phc_pps_source_private.h (86%)

diff --git a/makefile b/makefile
index 33e7ca0f038b..5295b60b5dac 100644
--- a/makefile
+++ b/makefile
@@ -26,8 +26,8 @@ PRG   = ptp4l hwstamp_ctl nsm phc2sys phc_ctl pmc timemaster 
ts2phc
 FILTERS= filter.o mave.o mmedian.o
 SERVOS = linreg.o ntpshm.o nullf.o pi.o servo.o
 TRANSP = raw.o transport.o udp.o udp6.o uds.o
-TS2PHC = ts2phc.o lstab.o nmea.o serial.o sock.o ts2phc_generic_master.o \
- ts2phc_master.o ts2phc_phc_master.o ts2phc_nmea_master.o ts2phc_slave.o
+TS2PHC = ts2phc.o lstab.o nmea.o serial.o sock.o ts2phc_generic_pps_source.o \
+ ts2phc_nmea_pps_source.o ts2phc_phc_pps_source.o ts2phc_pps_sink.o 
ts2phc_pps_source.o
 OBJ= bmc.o clock.o clockadj.o clockcheck.o config.o designated_fsm.o \
  e2e_tc.o fault.o $(FILTERS) fsm.o hash.o interface.o monitor.o msg.o phc.o \
  port.o port_signaling.o pqueue.o print.o ptp4l.o p2p_tc.o rtnl.o $(SERVOS) \
diff --git a/ts2phc.c b/ts2phc.c
index bc410415dfc6..8f2039085812 100644
--- a/ts2phc.c
+++ b/ts2phc.c
@@ -11,8 +11,8 @@
 #include "config.h"
 #include "interface.h"
 #include "print.h"
-#include "ts2phc_master.h"
-#include "ts2phc_slave.h"
+#include "ts2phc_pps_source.h"
+#include "ts2phc_pps_sink.h"
 #include "version.h"
 
 struct interface {
diff --git a/ts2phc_generic_master.c b/ts2phc_generic_pps_source.c
similarity index 94%
rename from ts2phc_generic_master.c
rename to ts2phc_generic_pps_source.c
index ad4f7f1cf1d7..0afea8ec1594 100644
--- a/ts2phc_generic_master.c
+++ b/ts2phc_generic_pps_source.c
@@ -8,8 +8,8 @@
 
 #include "missing.h"
 #include "print.h"
-#include "ts2phc_generic_master.h"
-#include "ts2phc_master_private.h"
+#include "ts2phc_generic_pps_source.h"
+#include "ts2phc_pps_source_private.h"
 #include "util.h"
 
 struct ts2phc_generic_master {
diff --git a/ts2phc_generic_master.h b/ts2phc_generic_pps_source.h
similarity index 81%
rename from ts2phc_generic_master.h
rename to ts2phc_generic_pps_source.h
index ac0ce4f11cb8..94ab29b30bcb 100644
--- a/ts2phc_generic_master.h
+++ b/ts2phc_generic_pps_source.h
@@ -1,12 +1,12 @@
 /**
- * @file ts2phc_generic_master.h
+ * @file ts2phc_generic_pps_source.h
  * @note Copyright (C) 2019 Richard Cochran 
  * @note SPDX-License-Identifier: GPL-2.0+
  */
 #ifndef HAVE_TS2PHC_GENERIC_MASTER_H
 #define HAVE_TS2PHC_GENERIC_MASTER_H
 
-#include "ts2phc_master.h"
+#include "ts2phc_pps_source.h"
 
 struct ts2phc_master *ts2phc_generic_master_create(struct config *cfg,
   const char *dev);
diff --git a/ts2phc_nmea_master.c b/ts2phc_nmea_pps_source.c