aboutsummaryrefslogtreecommitdiffstats
path: root/src/amps/amps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/amps/amps.c')
-rw-r--r--src/amps/amps.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index d180a4f..5d57d63 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -272,12 +272,29 @@ const char *amps_state_name(enum amps_state state)
return invalid;
}
+void amps_display_status(void)
+{
+ sender_t *sender;
+ amps_t *amps;
+ transaction_t *trans;
+
+ display_status_start();
+ for (sender = sender_head; sender; sender = sender->next) {
+ amps = (amps_t *) sender;
+ display_status_channel(amps->sender.kanal, chan_type_short_name(amps->chan_type), amps_state_name(amps->state));
+ for (trans = amps->trans_list; trans; trans = trans->next)
+ display_status_subscriber(amps_min2number(trans->min1, trans->min2), trans_short_state_name(trans->state));
+ }
+ display_status_end();
+}
+
static void amps_new_state(amps_t *amps, enum amps_state new_state)
{
if (amps->state == new_state)
return;
PDEBUG_CHAN(DAMPS, DEBUG_DEBUG, "State change: %s -> %s\n", amps_state_name(amps->state), amps_state_name(new_state));
amps->state = new_state;
+ amps_display_status();
}
static struct amps_channels {