rsked/source.cc
/// Describe the source in the log on a single line.
///
Describe the source in the log on a single line.
Describe the source in the log on a single line .
void Source::describe() const
{
    std::string ftime {""};
    if (m_failedp) {
        ftime = ctime(&m_last_fail);
        ftime.erase( ftime.end()-1, ftime.end() );
    }
    if (m_medium==Medium::radio) {     
        LOG_INFO(Lgr)  << "Source " << m_name
                       << ": medium=" << media_name(m_medium)
                       << ", encoding=" << encoding_name(m_encoding)
                       << ", freq=" << static_cast<double>(m_freq_hz)/1000000.0
                       << ", alt='" << m_alternate
                       << "', ann=" << (m_announcementp ? 'y' : 'n')
                       << ", failed=" << (m_failedp ? "y @ " : "n")
                       << ftime;
    }
    else if (m_medium==Medium::stream) { 
        LOG_INFO(Lgr)  << "Source " << m_name
                       << ": medium=" << media_name(m_medium)
                       << ", encoding=" << encoding_name(m_encoding)
                       << ", url='" << m_resource
                       << "', alt='" << m_alternate
                       << "', repeat=" << (m_repeatp ? 'y' : 'n')
                       << ", dynamic=" << (m_dynamic ? 'y' : 'n')
                       << ", ann=" << (m_announcementp ? 'y' : 'n')
                       << ", failed=" << (m_failedp ? "y @ " : "n")
                       << ftime;
    }
    else {
        LOG_INFO(Lgr)  << "Source " << m_name
                       << ": medium=" << media_name(m_medium)
                       << ", encoding=" << encoding_name(m_encoding)
                       << ", path=\"" << m_resource   
                       << "\", alt='" << m_alternate
                       << "', repeat=" << (m_repeatp ? 'y' : 'n')
                       << ", dur=" << m_duration
                       << ", dynamic=" << (m_dynamic ? 'y' : 'n')
                       << ", ann=" << (m_announcementp ? 'y' : 'n')
                       << ", failed=" << (m_failedp ? "y @ " : "n")
                       << ftime;
    }
}
void Source :: describe ( ) const { std :: string ftime { " " } ; if ( m_failedp ) { ftime = ctime ( & m_last_fail ) ; ftime . erase ( ftime . end ( ) - 1 , ftime . end ( ) ) ; } if ( m_medium == Medium :: radio ) { LOG_INFO ( Lgr ) << " " << m_name << " " << media_name ( m_medium ) << " " << encoding_name ( m_encoding ) << " " << static_cast < double > ( m_freq_hz ) / 1000000.0 << " " << m_alternate << " " << ( m_announcementp ? ' ' : ' ' ) << " " << ( m_failedp ? " " : " " ) << ftime ; } else if ( m_medium == Medium :: stream ) { LOG_INFO ( Lgr ) << " " << m_name << " " << media_name ( m_medium ) << " " << encoding_name ( m_encoding ) << " " << m_resource << " " << m_alternate << " " << ( m_repeatp ? ' ' : ' ' ) << " " << ( m_dynamic ? ' ' : ' ' ) << " " << ( m_announcementp ? ' ' : ' ' ) << " " << ( m_failedp ? " " : " " ) << ftime ; } else { LOG_INFO ( Lgr ) << " " << m_name << " " << media_name ( m_medium ) << " " << encoding_name ( m_encoding ) << " \" " << m_resource << " \" " << m_alternate << " " << ( m_repeatp ? ' ' : ' ' ) << " " << m_duration << " " << ( m_dynamic ? ' ' : ' ' ) << " " << ( m_announcementp ? ' ' : ' ' ) << " " << ( m_failedp ? " " : " " ) << ftime ; } }
Describe the source in the log on a single line.
Describe the source in the log on a single line .
// Frequency // URLs /* relative path */