Go to the documentation of this file.
11 #ifndef MESH_PACKET_SPLITTER_H
12 #define MESH_PACKET_SPLITTER_H
96 void Restart(uint8_t maxFrameSize_);
183 bool Seek(uint8_t frameIndex);
297 #endif // !MESH_PACKET_SPLITTER_H
bool SeekToEnd()
Seeks (moves) to the end, after last frame, that has to be splitted.
Definition: meshPacketSplitter.cpp:165
bool SplitNew(const MeshPacket &packet, MeshMAC bssid, uint8_t maxFrameSize_)
Starts splitting new packet to frames, this has to be called first before splitting.
Definition: meshPacketSplitter.cpp:3
uint8_t splitDataPos
Definition: meshPacketSplitter.h:292
uint8_t GetFrameSize(uint8_t index) const
Gets size of frame at specific index.
Definition: meshPacketSplitter.cpp:113
MeshFrameHeader lastHeader
Definition: meshPacketSplitter.h:288
uint8_t GetCurrentFrameIndex() const
Gets index of frame, that will be splitted.
Definition: meshPacketSplitter.h:173
void Restart()
Restarts splitting with old packet, which is reused. Alternative name to this method is SeekToBegin()...
Definition: meshPacketSplitter.cpp:82
MeshFrame SplitNextAsFrame()
Splits current frame and moves to another.
Definition: meshPacketSplitter.h:202
MeshPacket && TakeSplittedPacket()
Takes packet, that was splitted and calls clear method.
Definition: meshPacketSplitter.cpp:302
bool SplitCurrentAsFrameHeaderAndData(MeshFrameHeader &header, uint8_t *data, uint8_t &dataSize, bool moveToNext=false)
Splits current frame and does not move to another. Same frame can be splitted multiple times using th...
Definition: meshPacketSplitter.cpp:185
uint8_t carriageFrameCount
Definition: meshPacketSplitter.h:289
bool SplitNextAsFrameRawData(uint8_t *rawData, uint8_t &dataSize)
Splits current frame and moves to another.
Definition: meshPacketSplitter.h:228
uint8_t lastCarriageFrameDataSize
Definition: meshPacketSplitter.h:290
This class supports splitting MeshPacket to multiple MeshFrames in one carriage. MeshPackets are spli...
Definition: meshPacketSplitter.h:50
bool SplitNextAsFrameHeaderAndData(MeshFrameHeader &header, uint8_t *data, uint8_t &dataSize)
Splits current frame and moves to another.
Definition: meshPacketSplitter.h:215
Definition: meshFrame.h:126
This file contains class which can be used to handling mesh packets.
MeshMAC lastBSSID
Definition: meshPacketSplitter.h:287
uint8_t GetRemainingFramesCount() const
Gets count of remaining frames, that will be splitted.
Definition: meshPacketSplitter.h:143
Class, that stores mesh packet with it's data. The size of this class can be slightly bigger then rea...
Definition: meshPacket.h:158
bool SplitNewMove(MeshPacket &packet, MeshMAC bssid, uint8_t maxFrameSize_)
Starts splitting new packet to frames, this has to be called first before splitting.
Definition: meshPacketSplitter.cpp:17
MeshPacket sPacket
Definition: meshPacketSplitter.h:286
uint8_t GetCurrentFrameDataSize() const
Gets size of data part of the current frame, which will be splitted.
Definition: meshPacketSplitter.cpp:104
uint8_t GetCurrentFrameSize() const
Gets size of the current frame, which will be splitted.
Definition: meshPacketSplitter.cpp:98
void Clear()
Clears and releases all rsources and stops splitting.
Definition: meshPacketSplitter.cpp:87
bool SplitCurrentAsFrameRawData(uint8_t *rawData, uint8_t &dataSize, bool moveToNext=false)
Splits current frame and does not move to another. Same frame can be splitted multiple times using th...
Definition: meshPacketSplitter.cpp:237
Structure that represents physical MAC address used in MeshNEt protocol. MeshMAC address unlike MAC a...
Definition: meshHelper.h:207
uint8_t maxFrameSize
Definition: meshPacketSplitter.h:291
uint8_t GetLastCarriageFrameSize() const
Gets size of frame, that will be at the end of carriage. All other frames has size same as GetMaxFram...
Definition: meshPacketSplitter.h:125
MeshFrame SplitCurrentAsFrame(bool moveToNext=false)
Splits current frame and does not move to another. Same frame can be splitted multiple times using th...
Definition: meshPacketSplitter.cpp:174
uint8_t GetFramesCount() const
Gets count of frames into which the packet will be splitted.
Definition: meshPacketSplitter.h:134
bool Seek(uint8_t frameIndex)
Seeks (moves) to the frame set by index. This can be used, when same packet has to be retransmitted a...
Definition: meshPacketSplitter.cpp:128
uint8_t remainingCarriageCount
Definition: meshPacketSplitter.h:293
bool SeekToNext()
Seeks (moves) to the next frame.
Definition: meshPacketSplitter.cpp:147
uint8_t GetMaxFrameSize() const
Gets maximum frame size, that was set in SplitNew(), SplitNewMove() or Restart() method.
Definition: meshPacketSplitter.h:117
uint8_t GetFrameDataSize(uint8_t index) const
Gets size of data part of frame at specific index.
Definition: meshPacketSplitter.cpp:119
const MeshPacket & GetSplittedPacket() const
Gets packet, that is being splitted.
Definition: meshPacketSplitter.h:272