Go to the documentation of this file.
19 #ifndef LBM_CHANNEL_H_
20 #define LBM_CHANNEL_H_
24 #include <platform_mutex.h>
26 #define TOKENIZER_BUFFER_SIZE 257
28 #define CHANNEL_SUCCESS 1
29 #define CHANNEL_MORE 2
31 #define CHANNEL_FULL 4
33 #define CHANNEL_READER_CLOSED 1000
#define TOKENIZER_BUFFER_SIZE
Definition: lbm_channel.h:26
void(* writer_close)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:86
bool reader_closed
Definition: lbm_channel.h:61
bool lbm_channel_reader_is_closed(lbm_char_channel_t *chan)
Definition: lbm_channel.c:68
bool lbm_channel_may_block(lbm_char_channel_t *chan)
Definition: lbm_channel.c:80
int lbm_channel_write(lbm_char_channel_t *chan, char c)
Definition: lbm_channel.c:56
unsigned int read_pos
Definition: lbm_channel.h:40
Definition: lbm_channel.h:54
void lbm_create_string_char_channel_size(lbm_string_channel_state_t *st, lbm_char_channel_t *chan, char *str, unsigned int size)
Definition: lbm_channel.c:411
unsigned int column
Definition: lbm_channel.h:63
void lbm_channel_writer_close(lbm_char_channel_t *chan)
Definition: lbm_channel.c:60
bool(* more)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:71
bool lbm_channel_drop(lbm_char_channel_t *chan, unsigned int n)
Definition: lbm_channel.c:36
unsigned int write_pos
Definition: lbm_channel.h:58
bool(* read)(struct lbm_char_channel_s *chan, char *res)
Definition: lbm_channel.h:73
bool reader_closed
Definition: lbm_channel.h:43
Definition: lbm_channel.h:68
bool(* drop)(struct lbm_char_channel_s *chan, unsigned int n)
Definition: lbm_channel.h:74
unsigned int length
Definition: lbm_channel.h:56
bool mutex_initialized
Definition: lbm_channel.h:45
bool(* channel_is_empty)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:80
bool(* may_block)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:92
unsigned int row
Definition: lbm_channel.h:47
unsigned int(* column)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:90
int lbm_channel_peek(lbm_char_channel_t *chan, unsigned int n, char *res)
Definition: lbm_channel.c:28
int(* peek)(struct lbm_char_channel_s *chan, unsigned int n, char *res)
Definition: lbm_channel.h:72
unsigned int read_pos
Definition: lbm_channel.h:57
unsigned int lbm_channel_column(lbm_char_channel_t *chan)
Definition: lbm_channel.c:76
bool more
Definition: lbm_channel.h:59
void lbm_channel_reader_close(lbm_char_channel_t *chan)
Definition: lbm_channel.c:64
mutex_t lock
Definition: lbm_channel.h:44
bool lbm_channel_is_empty(lbm_char_channel_t *chan)
Definition: lbm_channel.c:48
unsigned int(* row)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:89
void * state
Definition: lbm_channel.h:70
bool comment
Definition: lbm_channel.h:42
unsigned int lbm_channel_row(lbm_char_channel_t *chan)
Definition: lbm_channel.c:72
bool lbm_channel_more(lbm_char_channel_t *chan)
Definition: lbm_channel.c:24
void(* reader_close)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:77
unsigned int column
Definition: lbm_channel.h:48
bool lbm_channel_read(lbm_char_channel_t *chan, char *res)
Definition: lbm_channel.c:32
int(* write)(struct lbm_char_channel_s *chan, char c)
Definition: lbm_channel.h:85
unsigned int write_pos
Definition: lbm_channel.h:39
bool lbm_channel_comment(lbm_char_channel_t *chan)
Definition: lbm_channel.c:40
unsigned int row
Definition: lbm_channel.h:62
void lbm_create_string_char_channel(lbm_string_channel_state_t *st, lbm_char_channel_t *chan, char *str)
Definition: lbm_channel.c:380
char * str
Definition: lbm_channel.h:55
bool(* comment)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:75
void lbm_channel_set_comment(lbm_char_channel_t *chan, bool comment)
Definition: lbm_channel.c:44
bool more
Definition: lbm_channel.h:41
bool(* channel_is_full)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:81
bool(* reader_is_closed)(struct lbm_char_channel_s *chan)
Definition: lbm_channel.h:82
void(* set_comment)(struct lbm_char_channel_s *chan, bool comment)
Definition: lbm_channel.h:76
struct lbm_char_channel_s lbm_char_channel_t
bool lbm_channel_is_full(lbm_char_channel_t *chan)
Definition: lbm_channel.c:52
void lbm_create_buffered_char_channel(lbm_buffered_channel_state_t *st, lbm_char_channel_t *chan)
Definition: lbm_channel.c:221
Definition: lbm_channel.h:37
bool comment
Definition: lbm_channel.h:60