Something like this?
python:
htsp_subscription_signal_status(htsp_subscription_t *hs, signal_status_t *sig)
{
htsmsg_t *m = htsmsg_create_map();
htsmsg_add_str(m, "method", "signalStatus");
htsmsg_add_u32(m, "subscriptionId", hs->hs_sid);
if (!htsp_anonymize(hs->hs_htsp)) {
htsmsg_add_str(m, "feStatus", sig->status_text);
if((sig->snr != -2) && (sig->snr_scale == SIGNAL_STATUS_SCALE_RELATIVE))
htsmsg_add_u32(m, "feSNR", sig->snr);
if((sig->snr != -2) && (sig->snr_scale == SIGNAL_STATUS_SCALE_DECIBEL))
htsmsg_add_u32(m, "feSNRDb", sig->snr);
if((sig->signal != -2) && (sig->signal_scale == SIGNAL_STATUS_SCALE_RELATIVE))
htsmsg_add_u32(m, "feSignal", sig->signal);
if((sig->signal != -2) && (sig->signal_scale == SIGNAL_STATUS_SCALE_DECIBEL))
htsmsg_add_u32(m, "feSignalDb", sig->signal);
if(sig->ber != -2)
htsmsg_add_u32(m, "feBER", sig->ber);
if(sig->unc != -2)
htsmsg_add_u32(m, "feUNC", sig->unc);
} else {
htsmsg_add_str(m, "feStatus", "");
}
htsp_send_message(hs->hs_htsp, m, &hs->hs_htsp->htsp_hmq_qstatus);
}