sigProcLib: Add operator<< to print CorrType to a string.
Change-Id: I3d68cbdab8fb504d7f155029654a576d318a201e
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 2de1816..d57f8b4 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -2166,3 +2166,26 @@
sigProcLibDestroy();
return false;
}
+
+std::string corrTypeToString(CorrType corr) {
+ switch (corr) {
+ case OFF:
+ return "OFF";
+ case TSC:
+ return "TSC";
+ case RACH:
+ return "RACH";
+ case EDGE:
+ return "EDGE";
+ case IDLE:
+ return "IDLE";
+ default:
+ return "unknown";
+ }
+}
+
+std::ostream& operator<<(std::ostream& os, CorrType corr)
+{
+ os << corrTypeToString(corr);
+ return os;
+}
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index 04c4757..4f2c13e 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -41,6 +41,8 @@
EDGE, ///< timeslot should contain an EDGE burst
IDLE ///< timeslot is an idle (or dummy) burst
};
+std::string corrTypeToString(CorrType corr);
+std::ostream& operator<<(std::ostream& os, CorrType corr);
enum SignalError {
SIGERR_NONE,