OpenCPN Partial API docs
Loading...
Searching...
No Matches
FastMessageMap Class Reference

Track fast message fragments eventually forming complete messages. More...

#include <comm_can_util.h>

Classes

class  Entry
 

Public Member Functions

Entry operator[] (int i) const
 
Entryoperator[] (int i)
 Getter.
 
int FindMatchingEntry (const CanHeader header, const unsigned char sid)
 Setter.
 
int AddNewEntry (void)
 Allocate a new, fresh entry and return index to it.
 
bool InsertEntry (const CanHeader header, const unsigned char *data, int index)
 Insert a new entry, first part of a multipart message.
 
bool AppendEntry (const CanHeader hdr, const unsigned char *data, int index)
 Append fragment to existing multipart message.
 
void Remove (int pos)
 Remove entry at pos.
 

Public Attributes

std::vector< Entryentries
 

Detailed Description

Track fast message fragments eventually forming complete messages.

Definition at line 79 of file comm_can_util.h.

Constructor & Destructor Documentation

◆ FastMessageMap()

FastMessageMap::FastMessageMap ( )
inline

Definition at line 103 of file comm_can_util.h.

Member Function Documentation

◆ AddNewEntry()

int FastMessageMap::AddNewEntry ( void  )

Allocate a new, fresh entry and return index to it.

Definition at line 135 of file comm_can_util.cpp.

◆ AppendEntry()

bool FastMessageMap::AppendEntry ( const CanHeader  hdr,
const unsigned char *  data,
int  index 
)

Append fragment to existing multipart message.

Definition at line 193 of file comm_can_util.cpp.

◆ FindMatchingEntry()

int FastMessageMap::FindMatchingEntry ( const CanHeader  header,
const unsigned char  sid 
)

Setter.

Return index to entry matching header and sid or -1 if not found.

Definition at line 122 of file comm_can_util.cpp.

◆ InsertEntry()

bool FastMessageMap::InsertEntry ( const CanHeader  header,
const unsigned char *  data,
int  index 
)

Insert a new entry, first part of a multipart message.

Definition at line 159 of file comm_can_util.cpp.

◆ operator[]() [1/2]

Entry & FastMessageMap::operator[] ( int  i)
inline

Getter.

Definition at line 106 of file comm_can_util.h.

◆ operator[]() [2/2]

Entry FastMessageMap::operator[] ( int  i) const
inline

Definition at line 105 of file comm_can_util.h.

◆ Remove()

void FastMessageMap::Remove ( int  pos)

Remove entry at pos.

Definition at line 241 of file comm_can_util.cpp.

Member Data Documentation

◆ entries

std::vector<Entry> FastMessageMap::entries

Definition at line 124 of file comm_can_util.h.


The documentation for this class was generated from the following files: