// Limit - When there is a ceiling to resource usage
#define LIMIT RED
+// Define colors for incoming/outgoing traffic
+#define COLOR_RX GREEN
+#define COLOR_TX RED
+
// Macro to make colours transparent
#define COLOR_WITH_ALPHA(base, alpha) base alpha
} while (0)
#define DRAW_BANDWIDTH_INCOMING(args, object, rx_bytes) \
- __DRAW_BANDWIDTH(args, object, rx_bytes, GREEN, _("Incoming Traffic"))
+ __DRAW_BANDWIDTH(args, object, rx_bytes, COLOR_RX, _("Incoming Traffic"))
#define DRAW_BANDWIDTH_OUTGOING(args, object, tx_bytes) \
- __DRAW_BANDWIDTH(args, object, tx_bytes, RED, _("Outgoing Traffic"))
+ __DRAW_BANDWIDTH(args, object, tx_bytes, COLOR_TX, _("Outgoing Traffic"))
#define __DRAW_BANDWIDTH(args, object, bytes, color, label) \
do { \
PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
// Receive Rate
- DRAW_LINE2_WITH_LABEL(args, "rx_rate", object, GREEN, _("Receive Rate"));
+ DRAW_LINE2_WITH_LABEL(args, "rx_rate", object, COLOR_RX, _("Receive Rate"));
PRINT_CAMM(args, "rx_rate", object, BPS, _("Bps"));
// Transmit Rate
- DRAW_LINE2_WITH_LABEL(args, "tx_rate", object, RED, _("Transmit Rate"));
+ DRAW_LINE2_WITH_LABEL(args, "tx_rate", object, COLOR_TX, _("Transmit Rate"));
PRINT_CAMM(args, "tx_rate", object, BPS, _("Bps"));
return 0;