26 #if !defined(_SPANDSP_PRIVATE_HDLC_H_) 27 #define _SPANDSP_PRIVATE_HDLC_H_ 96 hdlc_underflow_handler_t underflow_handler;
bool octet_counting_mode
True if in octet counting mode (e.g. for MTP).
Definition: private/hdlc.h:63
void * status_user_data
An opaque parameter passed to the status callback routine.
Definition: private/hdlc.h:45
int inter_frame_flags
The minimum flag octets to insert between frames.
Definition: private/hdlc.h:100
int crc_bytes
Definition: private/hdlc.h:35
int byte
The current byte being broken into bits for transmission.
Definition: private/hdlc.h:129
size_t max_frame_len
Maximum permitted frame length.
Definition: private/hdlc.h:104
int framing_ok_threshold
The number of consecutive flags which must be seen before framing is declared OK. ...
Definition: private/hdlc.h:50
void * user_data
An opaque parameter passed to the callback routine.
Definition: private/hdlc.h:98
modem_status_func_t status_handler
The callback routine called to report status changes.
Definition: private/hdlc.h:43
unsigned long int rx_aborts
The number of HDLC aborts received.
Definition: private/hdlc.h:84
Definition: private/hdlc.h:91
bool report_bad_frames
True if bad frames are to be reported.
Definition: private/hdlc.h:47
size_t pos
The current send position within the buffer.
Definition: private/hdlc.h:124
int flag_octets
The number of flag octets to send for a timed burst of flags.
Definition: private/hdlc.h:113
int num_bits
The number of bits currently in octets_in_progress.
Definition: private/hdlc.h:109
void * frame_user_data
An opaque parameter passed to the frame callback routine.
Definition: private/hdlc.h:41
int num_bits
The current number of bits in byte_in_progress.
Definition: private/hdlc.h:61
int flags_seen
Number of consecutive flags seen so far.
Definition: private/hdlc.h:54
unsigned long int rx_length_errors
The number of too short and too long frames received.
Definition: private/hdlc.h:82
int abort_octets
The number of abort octets to send for a timed burst of aborts.
Definition: private/hdlc.h:115
hdlc_frame_handler_t frame_handler
The callback routine called to process each good received frame.
Definition: private/hdlc.h:39
size_t len
The length of the message in the buffer.
Definition: private/hdlc.h:122
unsigned long int rx_frames
The number of good frames received.
Definition: private/hdlc.h:78
int octet_count
Octet count, to achieve the functionality needed for things like MTP.
Definition: private/hdlc.h:66
void(* modem_status_func_t)(void *user_data, int status)
Definition: async.h:113
bool tx_end
True if transmission should end on buffer underflow .
Definition: private/hdlc.h:134
unsigned long int rx_crc_errors
The number of frames with CRC errors received.
Definition: private/hdlc.h:80
uint32_t raw_bit_stream
The raw (stuffed) bit stream buffer.
Definition: private/hdlc.h:57
unsigned long int rx_bytes
The number of bytes of good frames received (CRC not included).
Definition: private/hdlc.h:76
#define HDLC_MAXFRAME_LEN
Definition: hdlc.h:46
bool report_flag_underflow
True if the next underflow of timed flag octets should be reported.
Definition: private/hdlc.h:117
uint8_t buffer[HDLC_MAXFRAME_LEN+4]
Buffer for a frame in progress.
Definition: private/hdlc.h:71
uint32_t crc
The running CRC, as data fills the frame buffer.
Definition: private/hdlc.h:126
uint32_t byte_in_progress
The destuffed bit stream buffer.
Definition: private/hdlc.h:59
int octet_count_report_interval
The number of octets to be allowed between octet count reports.
Definition: private/hdlc.h:68
size_t max_frame_len
Maximum permitted frame length.
Definition: private/hdlc.h:37
int idle_octet
The currently rotated state of the flag octet.
Definition: private/hdlc.h:111
Definition: private/hdlc.h:32
size_t len
Length of a frame in progress.
Definition: private/hdlc.h:73
bool progressive
True if frame creation works in progressive mode.
Definition: private/hdlc.h:102
int crc_bytes
Definition: private/hdlc.h:94
int bits
The number of bits remaining in byte.
Definition: private/hdlc.h:131
uint32_t octets_in_progress
The stuffed bit stream being created.
Definition: private/hdlc.h:107
bool framing_ok_announced
True if framing OK has been announced.
Definition: private/hdlc.h:52