NMEA2000 Library
0.1
Library to handle NMEA 2000 Communication written in C++
|
Streaming Class to handle all Streams generated by the Library. More...
#include <N2kStream.h>
Public Member Functions | |
virtual int | peek ()=0 |
reads a byte from the file without advancing to the next one More... | |
size_t | print (const char *str) |
Print string to stream. More... | |
size_t | print (int val, uint8_t radix=10) |
Print an value to the stream. More... | |
size_t | println (const char *str) |
Print string and newline to stream. More... | |
size_t | println (int val, uint8_t radix=10) |
Print value and newline to stream. More... | |
virtual int | read ()=0 |
reads characters from an incoming stream to the buffer More... | |
virtual size_t | write (const uint8_t *data, size_t size)=0 |
Write data to stream. More... | |
Streaming Class to handle all Streams generated by the Library.
Non Arduino platforms need to implement this class if they want to use functions which operate on streams.
Definition at line 60 of file N2kStream.h.
|
pure virtual |
reads a byte from the file without advancing to the next one
size_t N2kStream::print | ( | const char * | str | ) |
Print string to stream.
str | String data for the stream |
Definition at line 32 of file N2kStream.cpp.
size_t N2kStream::print | ( | int | val, |
uint8_t | radix = 10 |
||
) |
Print an value to the stream.
val | Value for the stream |
radix | Base format to be used (e.g. 10, 16, 8 ,2) |
Definition at line 55 of file N2kStream.cpp.
size_t N2kStream::println | ( | const char * | str | ) |
Print string and newline to stream.
str | String data for the stream |
Definition at line 75 of file N2kStream.cpp.
size_t N2kStream::println | ( | int | val, |
uint8_t | radix = 10 |
||
) |
Print value and newline to stream.
val | Value for the stream |
radix | Base format to be used (e.g. 10, 16, 8 ,2) |
Definition at line 79 of file N2kStream.cpp.
|
pure virtual |
reads characters from an incoming stream to the buffer
|
pure virtual |
Write data to stream.
data | uint8 Array of Data for the stream |
size | size of the Data |