BA / Mbed OS BaBoRo1
Embed: (wiki syntax)

« Back to documentation index

fnet_serial_stream Struct Reference

fnet_serial_stream Struct Reference
[Fnet_serial]

Stream control structure. More...

#include <fnet_serial.h>

Data Fields

fnet_index_t id
 The id parameter provides a way for a stream driver to identify a particular device.
void(* putchar )(fnet_index_t stream_id, fnet_char_t character)
 Callback function used for writing the character to the stream.
fnet_int32_t(* getchar )(fnet_index_t stream_id)
 Callback function used for reading a character from the stream.
void(* flush )(fnet_index_t stream_id)
 Callback function used for immediate data sending from internal stream buffer to the steam client.

Detailed Description

Stream control structure.

This structure defines stream-specific parameters. All streams have similar properties independently of the individual characteristics of the media they are associated with.

See also:
fnet_serial_stream_t

Definition at line 102 of file fnet_serial.h.


Field Documentation

void(* flush)(fnet_index_t stream_id)

Callback function used for immediate data sending from internal stream buffer to the steam client.


This function is optional and can be set to zero.
The function only has meaning for buffered streams. UART stream does not have internal buffer and does not use this flush function.

Definition at line 118 of file fnet_serial.h.

fnet_int32_t(* getchar)(fnet_index_t stream_id)

Callback function used for reading a character from the stream.

Definition at line 115 of file fnet_serial.h.

The id parameter provides a way for a stream driver to identify a particular device.


For example it can be used as serial port number or pointer to a stream private structure.
This parameter is passed to fnet_serial_stream.putchar() and to fnet_serial_stream.getchar() as the first parameter.

Definition at line 104 of file fnet_serial.h.

void(* putchar)(fnet_index_t stream_id, fnet_char_t character)

Callback function used for writing the character to the stream.

Definition at line 112 of file fnet_serial.h.