|
ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
|
Accumulator and state for HDLC bit-offset synchronization. More...
#include <hdlc_sync.h>
Data Fields | |
| uint8_t | buffer [RX_HDLC_SYNC_MAX_BUFFER_SIZE] |
| size_t | position |
| size_t | processed |
| size_t | candidate_start |
| size_t | candidate_end |
| bool | candidate_valid |
| uint8_t | bit_offset |
| bool | align_shift_right |
| HDLC_SYNC_STATE_T | state |
| uint8_t | sync_byte |
| uint32_t | lookahead_wait_syncing |
| uint32_t | lookahead_wait_synced |
| uint32_t | frame_ready_count |
| uint32_t | consume_count |
| uint32_t | hardcap_drop_events |
| uint32_t | hardcap_drop_bytes |
Accumulator and state for HDLC bit-offset synchronization.
Definition at line 53 of file hdlc_sync.h.
| bool HDLC_SYNC_ACCUMULATOR_T::align_shift_right |
Alignment direction for non-zero bit_offset.
Definition at line 70 of file hdlc_sync.h.
Referenced by decode_hdlc_to_udp_tx(), hdlc_sync_acc_init(), hdlc_sync_reset_hunting_state(), hdlc_sync_step_hunting(), hdlc_sync_step_synced(), and hdlc_sync_step_syncing().
| uint8_t HDLC_SYNC_ACCUMULATOR_T::bit_offset |
Bit offset used to align raw bytes into HDLC bytes.
Definition at line 68 of file hdlc_sync.h.
Referenced by decode_hdlc_to_udp_tx(), hdlc_sync_acc_init(), hdlc_sync_acc_poll(), hdlc_sync_reset_hunting_state(), hdlc_sync_step_hunting(), hdlc_sync_step_synced(), hdlc_sync_step_syncing(), and print_status_event().
| uint8_t HDLC_SYNC_ACCUMULATOR_T::buffer[RX_HDLC_SYNC_MAX_BUFFER_SIZE] |
Raw incoming byte buffer.
Definition at line 56 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_process_byte(), hdlc_sync_drop_prefix(), and hdlc_sync_get_aligned_byte().
| size_t HDLC_SYNC_ACCUMULATOR_T::candidate_end |
Candidate frame end index (exclusive).
Definition at line 64 of file hdlc_sync.h.
Referenced by decode_hdlc_to_udp_tx(), hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), hdlc_sync_reset_hunting_state(), hdlc_sync_step_synced(), and print_status_event().
| size_t HDLC_SYNC_ACCUMULATOR_T::candidate_start |
Candidate frame start index.
Definition at line 62 of file hdlc_sync.h.
Referenced by decode_hdlc_to_udp_tx(), hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), hdlc_sync_reject_oversized_candidate(), hdlc_sync_reset_hunting_state(), and hdlc_sync_step_hunting().
| bool HDLC_SYNC_ACCUMULATOR_T::candidate_valid |
Whether a valid candidate is currently available.
Definition at line 66 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), hdlc_sync_reset_hunting_state(), hdlc_sync_step_hunting(), hdlc_sync_step_synced(), poll_hdlc_no_progress(), and print_status_event().
| uint32_t HDLC_SYNC_ACCUMULATOR_T::consume_count |
Definition at line 77 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), and update_statistics().
| uint32_t HDLC_SYNC_ACCUMULATOR_T::frame_ready_count |
Definition at line 76 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_init(), and hdlc_sync_step_synced().
| uint32_t HDLC_SYNC_ACCUMULATOR_T::hardcap_drop_bytes |
Definition at line 79 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), and update_statistics().
| uint32_t HDLC_SYNC_ACCUMULATOR_T::hardcap_drop_events |
Definition at line 78 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), and update_statistics().
| uint32_t HDLC_SYNC_ACCUMULATOR_T::lookahead_wait_synced |
Definition at line 75 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_init(), hdlc_sync_step_synced(), and update_statistics().
| uint32_t HDLC_SYNC_ACCUMULATOR_T::lookahead_wait_syncing |
Definition at line 74 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_init(), hdlc_sync_step_syncing(), and update_statistics().
| size_t HDLC_SYNC_ACCUMULATOR_T::position |
Number of bytes currently stored in buffer.
Definition at line 58 of file hdlc_sync.h.
Referenced by decode_hdlc_to_udp_tx(), hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), hdlc_sync_acc_poll(), hdlc_sync_acc_process_byte(), hdlc_sync_drop_prefix(), hdlc_sync_finalize_poll_no_frame(), hdlc_sync_find_complete_candidate_short(), hdlc_sync_find_opening_candidate(), hdlc_sync_get_aligned_byte(), hdlc_sync_reject_oversized_candidate(), hdlc_sync_step_hunting(), poll_hdlc_idle_timeout(), print_status_event(), and update_rx_drain_stats().
| size_t HDLC_SYNC_ACCUMULATOR_T::processed |
Number of bytes already processed by poll state machine.
Definition at line 60 of file hdlc_sync.h.
Referenced by decode_hdlc_to_udp_tx(), hdlc_sync_acc_consume_candidate(), hdlc_sync_acc_init(), hdlc_sync_acc_poll(), hdlc_sync_drop_prefix(), hdlc_sync_finalize_poll_no_frame(), hdlc_sync_reset_hunting_state(), and print_status_event().
| HDLC_SYNC_STATE_T HDLC_SYNC_ACCUMULATOR_T::state |
Definition at line 71 of file hdlc_sync.h.
Referenced by event_loop_should_drop_hunt_idle_byte(), hdlc_sync_acc_init(), hdlc_sync_acc_poll(), hdlc_sync_finalize_poll_no_frame(), hdlc_sync_reset_hunting_state(), hdlc_sync_step_hunting(), hdlc_sync_step_synced(), hdlc_sync_step_syncing(), poll_hdlc_idle_timeout(), poll_hdlc_no_progress(), and print_status_event().
| uint8_t HDLC_SYNC_ACCUMULATOR_T::sync_byte |
Definition at line 72 of file hdlc_sync.h.
Referenced by hdlc_sync_acc_init(), hdlc_sync_find_complete_candidate_short(), hdlc_sync_find_opening_candidate(), hdlc_sync_step_hunting(), and hdlc_sync_step_synced().