|
ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
|

Go to the source code of this file.
Functions | |
| static uint8_t | event_queue_count_internal (void) |
| void | event_queue_init (void) |
| Initialize the event queue storage. | |
| bool | event_queue_push (const event_t *event_entry) |
| Enqueue an event. | |
| bool | event_queue_pop (event_t *event_out) |
| Dequeue an event. | |
| bool | event_queue_is_empty (void) |
| Check whether the queue is empty. | |
| bool | event_queue_is_full (void) |
| Check whether the queue is full. | |
| size_t | event_queue_get_count (void) |
| Get current number of queued events. | |
| size_t | event_queue_get_high_water_mark (void) |
| Get peak queue fill count observed since init. | |
| uint32_t | event_queue_get_push_drop_count (void) |
| Get cumulative number of dropped push attempts. | |
| bool | event_get_payload_ptr (const event_t *event, size_t required_size, const void **out) |
| Resolve payload pointer and validate minimum payload size. | |
Variables | |
| static event_t | event_queue [EVENT_QUEUE_CAPACITY] |
| static uint8_t | event_queue_write = 0 |
| static uint8_t | event_queue_read = 0 |
| static uint8_t | event_queue_high_water_mark = 0 |
| static uint32_t | event_queue_push_drops = 0 |
| bool event_get_payload_ptr | ( | const event_t * | event, |
| size_t | required_size, | ||
| const void ** | out | ||
| ) |
Resolve payload pointer and validate minimum payload size.
| event | Event to inspect. |
| required_size | Minimum bytes required by caller. |
| out | Output pointer to payload bytes/object. |
Definition at line 104 of file event_queue.c.
References event_t::bytes, event_t::data, event_t::data_len, event_t::is_inline, and event_t::ptr.
Referenced by event_dispatch(), and print_net_settings_event().

|
static |
Definition at line 31 of file event_queue.c.
References EVENT_QUEUE_CAPACITY, event_queue_read, and event_queue_write.
Referenced by event_queue_get_count(), and event_queue_push().

| size_t event_queue_get_count | ( | void | ) |
Get current number of queued events.
Definition at line 89 of file event_queue.c.
References event_queue_count_internal().
Referenced by update_statistics().


| size_t event_queue_get_high_water_mark | ( | void | ) |
Get peak queue fill count observed since init.
Definition at line 94 of file event_queue.c.
References event_queue_high_water_mark.
Referenced by update_statistics().

| uint32_t event_queue_get_push_drop_count | ( | void | ) |
Get cumulative number of dropped push attempts.
Definition at line 99 of file event_queue.c.
References event_queue_push_drops.
Referenced by update_statistics().

| void event_queue_init | ( | void | ) |
Initialize the event queue storage.
Definition at line 40 of file event_queue.c.
References event_queue, event_queue_high_water_mark, event_queue_push_drops, event_queue_read, and event_queue_write.
Referenced by main().

| bool event_queue_is_empty | ( | void | ) |
Check whether the queue is empty.
Definition at line 78 of file event_queue.c.
References event_queue_read, and event_queue_write.
| bool event_queue_is_full | ( | void | ) |
Check whether the queue is full.
Definition at line 83 of file event_queue.c.
References EVENT_QUEUE_CAPACITY, event_queue_read, and event_queue_write.
| bool event_queue_pop | ( | event_t * | event_out | ) |
Dequeue an event.
| event_out | Destination for the popped event. |
Definition at line 67 of file event_queue.c.
References event_queue, EVENT_QUEUE_CAPACITY, event_queue_read, and event_queue_write.
Referenced by poll_and_dispatch_events().

| bool event_queue_push | ( | const event_t * | event_entry | ) |
Enqueue an event.
| event_entry | Event to push; payload pointer ownership stays with caller. |
Definition at line 49 of file event_queue.c.
References event_queue, EVENT_QUEUE_CAPACITY, event_queue_count_internal(), event_queue_high_water_mark, event_queue_push_drops, event_queue_read, and event_queue_write.
Referenced by cli_poll(), cmd_mem(), cmd_reboot(), cmd_save(), cmd_status(), cmd_wipe(), dispatch_get_request(), dispatch_get_udp_port(), dispatch_ip(), dispatch_set_udp_port(), dispatch_v24_baudrate(), dispatch_v24_polarities(), event_dispatch(), request_save_config(), and subcmd_set_v24_clockmode().


|
static |
Definition at line 25 of file event_queue.c.
Referenced by event_queue_init(), event_queue_pop(), and event_queue_push().
|
static |
Definition at line 28 of file event_queue.c.
Referenced by event_queue_get_high_water_mark(), event_queue_init(), and event_queue_push().
|
static |
Definition at line 29 of file event_queue.c.
Referenced by event_queue_get_push_drop_count(), event_queue_init(), and event_queue_push().
|
static |
Definition at line 27 of file event_queue.c.
Referenced by event_queue_count_internal(), event_queue_init(), event_queue_is_empty(), event_queue_is_full(), event_queue_pop(), and event_queue_push().
|
static |
Definition at line 26 of file event_queue.c.
Referenced by event_queue_count_internal(), event_queue_init(), event_queue_is_empty(), event_queue_is_full(), event_queue_pop(), and event_queue_push().