37#ifndef _ACTISENSE_READER_H_
38#define _ACTISENSE_READER_H_
61 #define MAX_STREAM_MSG_BUF_LEN 300
#define MAX_STREAM_MSG_BUF_LEN
Maximum length of the stream message buffer.
This File contains the class tN2kMsg and all necessary functions to handle a NMEA2000 Message.
This File contains an I/O stream used in the NMEA2000 libraries.
Streaming Class to handle all Streams generated by the Library.
Class for reading Actisense format messages.
bool EscapeReceived
Escape character has been received.
bool Handling() const
Indicates if still message handling is needed.
void SetDefaultSource(unsigned char source)
Set the default source address for the messages.
bool GetMessageFromStream(tN2kMsg &N2kMsg, bool ReadOut=true)
Read Actisense formatted NMEA2000 message from stream.
tActisenseReader()
Constructor for the class Initialize all class attributes and clear the buffer.
void SetReadStream(N2kStream *_stream)
Set the Read Stream object.
void SetMsgHandler(void(*_MsgHandler)(const tN2kMsg &N2kMsg))
Set the Msg Handler object.
int byteSum
Sum of all bytes is used as kind of check sum.
bool IsStart(char ch)
Checks if character is start of Actisense format.
void ParseMessages()
Parse messages from stream.
unsigned char DefaultSource
Default source of the N2k message.
bool AddByteToBuffer(char NewByte)
Adds a new Byte to the buffer.
void ClearBuffer()
Clears the buffer.
unsigned char MsgBuf[MAX_STREAM_MSG_BUF_LEN]
Buffer for incoming messages from stream.
int MsgWritePos
Current write position inside the buffer.
bool CheckMessage(tN2kMsg &N2kMsg)
Checks is Actisense message read from stream valid and builds tN2kMsg message from it.
bool MsgIsComing
A Message is coming.
bool StartOfTextReceived
Start of text has been received.
void(* MsgHandler)(const tN2kMsg &N2kMsg)
N2kStream * ReadStream
Stream to read from.
This class contains all the data of an NMEA2000 message.