20 #define BRP_FRAME_INVALID_SIZE ((size_t) -1) 36 typedef struct brp_frame_t
47 #define BRP_FRAME_PTR(frm) ((frm)->ptr) 53 #define BRP_FRAME_SIZE(frm) ((frm)->act_size) 61 typedef struct brp_frame_reader_t
72 BRP_LIB
void brp_frame_reader_start
74 brp_frame_reader * frame_rdr,
82 BRP_LIB
brp_buf brp_frame_reader_next
84 brp_frame_reader * frame_rdr,
92 BRP_LIB
void brp_frame_init(brp_frame frame);
98 BRP_LIB
void brp_frame_deinit(brp_frame frame);
110 BRP_LIB
void brp_frame_write_start(brp_frame frame);
117 BRP_LIB
bool brp_frame_write_err(brp_frame frame);
124 BRP_LIB
void brp_frame_write(brp_frame frame,
brp_buf data,
size_t data_len);
131 BRP_LIB
void brp_frame_write_int8(brp_frame frame,
unsigned value);
138 BRP_LIB
void brp_frame_write_int16(brp_frame frame,
unsigned value);
145 BRP_LIB
void brp_frame_write_int24(brp_frame frame,
unsigned value);
152 BRP_LIB
void brp_frame_write_int32(brp_frame frame,
unsigned value);
159 BRP_LIB
void brp_frame_write_frm(
160 brp_frame dst_frame, brp_frame_reader * src_frame_rdr,
size_t cnt);
167 BRP_LIB
void brp_frame_write_frm_rest(
168 brp_frame dst_frame, brp_frame_reader * src_frame_rdr);
174 BRP_LIB
void brp_frame_write_fill(brp_frame frame,
int val,
size_t cnt);
186 BRP_LIB
brp_buf brp_frame_write_buf
197 BRP_LIB
void brp_frame_read_start(brp_frame_reader *frame_rdr, brp_frame frame);
204 BRP_LIB
void brp_frame_read(
205 brp_frame_reader * frame_rdr,
brp_buf data,
size_t data_len);
212 BRP_LIB
void brp_frame_read_var(brp_frame_reader * frame_rdr,
brp_buf data,
213 size_t max_data_len,
size_t * data_len_ptr);
219 BRP_LIB
void brp_frame_skip(brp_frame_reader * frame_rdr,
size_t cnt);
226 BRP_LIB
unsigned brp_frame_read_int8(brp_frame_reader * frame_rdr);
233 BRP_LIB
unsigned brp_frame_read_int16(brp_frame_reader * frame_rdr);
240 BRP_LIB
unsigned brp_frame_read_int24(brp_frame_reader * frame_rdr);
247 BRP_LIB
unsigned brp_frame_read_int32(brp_frame_reader * frame_rdr);
254 BRP_LIB
void brp_frame_read_frm(
255 brp_frame_reader * frame_rdr, brp_frame dst_frame,
size_t cnt);
262 BRP_LIB
void brp_frame_read_frm_rest(
263 brp_frame_reader * frame_rdr, brp_frame dst_frame);
269 BRP_LIB
bool brp_frame_read_err(brp_frame_reader * frame_rdr);
275 BRP_LIB
size_t brp_frame_rest(brp_frame_reader * frame_rdr);
281 BRP_LIB
bool brp_frame_read_eof(brp_frame_reader * frame_rdr);
287 BRP_LIB
size_t brp_frame_read_diff(
288 brp_frame_reader * new_rdr, brp_frame_reader * old_rdr);
294 BRP_LIB
void brp_frame_unread(brp_frame_reader * frame_rdr,
size_t byte_cnt);
Contains the basic defines that are required throughout the BRP library.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.