sigProcLib: Add operator<< to print CorrType to a string.

Change-Id: I3d68cbdab8fb504d7f155029654a576d318a201e
This commit is contained in:
Alexander Chemeris 2017-03-17 15:32:26 -07:00
parent b34e60c105
commit f7717acd0c
2 changed files with 25 additions and 0 deletions

View File

@ -2166,3 +2166,26 @@ fail:
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;
}

View File

@ -41,6 +41,8 @@ enum CorrType{
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,