|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Go to the source code of this file.
Classes | |
| struct | fake_t |
Macros | |
| #define | CHECK(condition) |
Variables | |
| static const idle_port_t | port = {fake_battery, fake_usb, fake_send, fake_poll} |
| #define CHECK | ( | condition | ) |
Definition at line 7 of file test_idle.c.
Referenced by fake_battery(), fake_send(), push_command(), setup(), test_arm_requested_without_heartbeat(), test_battery_read_before_transmit(), test_clock_and_sequence_wraparound(), test_command_drain_is_bounded(), test_conversion(), test_disarm_stays_idle(), test_disarm_then_arm_in_one_wake(), test_early_lsi_wake_within_tolerance(), test_failure_count_saturates(), test_first_wake_sends_heartbeat(), test_hysteresis(), test_init_rejects_bad_input(), test_invalid_battery_still_sends(), test_long_gap_sends_one_heartbeat(), test_radio_wake_does_not_delay_heartbeat(), test_send_failure_counted_and_sleep_continues(), test_sixty_seconds_gives_six_heartbeats(), test_thresholds(), test_usb_is_never_battery_health(), and test_wake_before_enter_is_error().
|
static |
Definition at line 80 of file test_idle.c.
Referenced by setup(), test_init_rejects_bad_input(), and test_wake_before_enter_is_error().
|
static |
Definition at line 16 of file test_idle.c.
Referenced by set_mv().
|
static |
Definition at line 42 of file test_idle.c.
References b, fake_t::battery, fake_t::battery_calls, CHECK, fake_t::expected_budget, and note().
|
static |
Definition at line 69 of file test_idle.c.
References fake_t::command_count, fake_t::command_next, fake_t::commands, IDLE_CMD_NONE, and fake_t::poll_calls.
|
static |
Definition at line 59 of file test_idle.c.
References CHECK, fake_t::expected_budget, note(), fake_t::send_calls, fake_t::send_reply, and fake_t::sent.
|
static |
Definition at line 53 of file test_idle.c.
References note(), and fake_t::usb.
| int main | ( | void | ) |
Definition at line 471 of file test_idle.c.
References test_arm_requested_without_heartbeat(), test_battery_read_before_transmit(), test_clock_and_sequence_wraparound(), test_command_drain_is_bounded(), test_conversion(), test_disarm_stays_idle(), test_disarm_then_arm_in_one_wake(), test_early_lsi_wake_within_tolerance(), test_failure_count_saturates(), test_first_wake_sends_heartbeat(), test_hysteresis(), test_init_rejects_bad_input(), test_invalid_battery_still_sends(), test_long_gap_sends_one_heartbeat(), test_radio_wake_does_not_delay_heartbeat(), test_send_failure_counted_and_sleep_continues(), test_sixty_seconds_gives_six_heartbeats(), test_thresholds(), test_usb_is_never_battery_health(), and test_wake_before_enter_is_error().
|
static |
Definition at line 36 of file test_idle.c.
References fake_t::order, and fake_t::order_count.
Referenced by fake_battery(), fake_send(), and fake_usb().
|
static |
Definition at line 105 of file test_idle.c.
References CHECK, fake_t::command_count, and fake_t::commands.
Referenced by test_arm_requested_without_heartbeat(), test_command_drain_is_bounded(), test_disarm_stays_idle(), and test_disarm_then_arm_in_one_wake().
|
static |
Definition at line 89 of file test_idle.c.
References fake_t::battery, counts_for_mv(), and SELF_TEST_PASS.
Referenced by setup(), test_hysteresis(), test_invalid_battery_still_sends(), test_thresholds(), and test_usb_is_never_battery_health().
Definition at line 95 of file test_idle.c.
References CHECK, config(), fake_t::expected_budget, idle, idle_enter(), idle_init(), port, self_test_reply_t::result, SELF_TEST_PASS, fake_t::send_reply, and set_mv().
|
static |
Definition at line 351 of file test_idle.c.
References fake_t::battery_calls, CHECK, idle, IDLE_CMD_ARM, IDLE_EVENT_ARM_REQUESTED, idle_on_wake(), push_command(), r, fake_t::send_calls, and setup().
Referenced by main().
|
static |
Definition at line 202 of file test_idle.c.
References CHECK, idle, idle_on_wake(), fake_t::order, fake_t::order_count, and setup().
Referenced by main().
|
static |
Definition at line 439 of file test_idle.c.
References CHECK, idle, idle_on_wake(), r, fake_t::send_calls, fake_t::sent, idle_heartbeat_t::sequence, and setup().
Referenced by main().
|
static |
Definition at line 383 of file test_idle.c.
References CHECK, idle, IDLE_CMD_DISARM, IDLE_EVENT_SLEEP, IDLE_MAX_COMMANDS_PER_WAKE, idle_on_wake(), fake_t::poll_calls, push_command(), r, and setup().
Referenced by main().
|
static |
Definition at line 112 of file test_idle.c.
References CHECK, and idle_counts_to_mv().
Referenced by main().
|
static |
Definition at line 363 of file test_idle.c.
References CHECK, idle, IDLE_CMD_DISARM, IDLE_EVENT_SLEEP, idle_on_wake(), push_command(), r, and setup().
Referenced by main().
|
static |
Definition at line 374 of file test_idle.c.
References CHECK, idle, IDLE_CMD_ARM, IDLE_CMD_DISARM, IDLE_EVENT_ARM_REQUESTED, idle_on_wake(), push_command(), and setup().
Referenced by main().
|
static |
Definition at line 413 of file test_idle.c.
References CHECK, idle, idle_on_wake(), r, and setup().
Referenced by main().
|
static |
Definition at line 458 of file test_idle.c.
References CHECK, idle, idle_last_heartbeat(), idle_on_wake(), self_test_reply_t::result, SELF_TEST_FAIL, fake_t::send_reply, and setup().
Referenced by main().
|
static |
Definition at line 169 of file test_idle.c.
References idle_heartbeat_t::battery, CHECK, idle, IDLE_BATT_OK, IDLE_EVENT_SLEEP, idle_on_wake(), idle_heartbeat_t::previous_send, r, SELF_TEST_PENDING, fake_t::send_calls, fake_t::sent, idle_heartbeat_t::sequence, setup(), and idle_heartbeat_t::uptime_ms.
Referenced by main().
|
static |
Definition at line 242 of file test_idle.c.
References idle_heartbeat_t::battery, CHECK, idle, IDLE_BATT_FAIL, IDLE_BATT_OK, IDLE_BATT_WARN, idle_on_wake(), fake_t::sent, set_mv(), and setup().
Referenced by main().
|
static |
Definition at line 123 of file test_idle.c.
References idle_config_t::battery_fail_mv, idle_config_t::callback_budget_ms, CHECK, config(), idle_config_t::heartbeat_interval_ms, idle, IDLE_EVENT_ERROR, idle_init(), idle_last_heartbeat(), idle_on_wake(), NULL, p, port, and idle_config_t::wake_tolerance_ms.
Referenced by main().
|
static |
Definition at line 299 of file test_idle.c.
References fake_t::battery, idle_heartbeat_t::battery, CHECK, idle, IDLE_BATT_INVALID, idle_on_wake(), r, self_test_battery_t::raw_counts, self_test_battery_t::reply, self_test_reply_t::result, SELF_TEST_TIMEOUT, fake_t::sent, set_mv(), setup(), idle_heartbeat_t::supply_mv, and self_test_battery_t::valid.
Referenced by main().
|
static |
Definition at line 428 of file test_idle.c.
References CHECK, idle, idle_on_wake(), r, fake_t::send_calls, and setup().
Referenced by main().
|
static |
Definition at line 397 of file test_idle.c.
References fake_t::battery_calls, CHECK, idle, idle_on_wake(), r, fake_t::send_calls, and setup().
Referenced by main().
|
static |
Definition at line 321 of file test_idle.c.
References CHECK, idle_heartbeat_t::consecutive_send_failures, idle, IDLE_EVENT_SLEEP, idle_on_wake(), idle_heartbeat_t::previous_send, r, self_test_reply_t::result, SELF_TEST_FAIL, SELF_TEST_PASS, SELF_TEST_TIMEOUT, fake_t::send_calls, fake_t::send_reply, fake_t::sent, and setup().
Referenced by main().
|
static |
Definition at line 184 of file test_idle.c.
References fake_t::battery_calls, CHECK, idle, IDLE_EVENT_SLEEP, idle_on_wake(), r, fake_t::send_calls, fake_t::sent, idle_heartbeat_t::sequence, and setup().
Referenced by main().
|
static |
Definition at line 214 of file test_idle.c.
References fake_t::battery, idle_heartbeat_t::battery, CHECK, idle, IDLE_BATT_FAIL, IDLE_BATT_OK, IDLE_BATT_WARN, idle_on_wake(), self_test_battery_t::raw_counts, fake_t::sent, set_mv(), setup(), and idle_heartbeat_t::supply_mv.
Referenced by main().
|
static |
Definition at line 283 of file test_idle.c.
References idle_heartbeat_t::battery, CHECK, idle, IDLE_BATT_USB, idle_on_wake(), fake_t::sent, set_mv(), setup(), idle_heartbeat_t::supply_mv, and fake_t::usb.
Referenced by main().
|
static |
Definition at line 152 of file test_idle.c.
References CHECK, config(), fake_t::expected_budget, idle, idle_enter(), IDLE_EVENT_ERROR, idle_init(), idle_on_wake(), fake_t::poll_calls, port, r, self_test_reply_t::result, SELF_TEST_PASS, fake_t::send_calls, and fake_t::send_reply.
Referenced by main().
|
static |
Definition at line 78 of file test_idle.c.