Made two functions private, small tweak
This commit is contained in:
parent
8780c5ddcd
commit
3cec9f5f80
@ -122,7 +122,6 @@ ReturnValue_t DleEncoder::decodeStreamEscaped(const uint8_t *sourceStream, size_
|
|||||||
destStream[decodedIndex] = nextByte;
|
destStream[decodedIndex] = nextByte;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(this->escapeStxEtx) {
|
|
||||||
/* The next byte is a STX, DTX or 0x0D character which
|
/* The next byte is a STX, DTX or 0x0D character which
|
||||||
* was escaped by a DLE character. The actual byte was
|
* was escaped by a DLE character. The actual byte was
|
||||||
* also encoded by adding + 0x40 to prevent having control chars,
|
* also encoded by adding + 0x40 to prevent having control chars,
|
||||||
@ -135,10 +134,6 @@ ReturnValue_t DleEncoder::decodeStreamEscaped(const uint8_t *sourceStream, size_
|
|||||||
return DECODING_ERROR;
|
return DECODING_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return DECODING_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
++encodedIndex;
|
++encodedIndex;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -87,14 +87,14 @@ public:
|
|||||||
size_t sourceStreamLen, size_t *readLen, uint8_t *destStream,
|
size_t sourceStreamLen, size_t *readLen, uint8_t *destStream,
|
||||||
size_t maxDestStreamlen, size_t *decodedLen);
|
size_t maxDestStreamlen, size_t *decodedLen);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
ReturnValue_t decodeStreamEscaped(const uint8_t *sourceStream, size_t sourceStreamLen,
|
ReturnValue_t decodeStreamEscaped(const uint8_t *sourceStream, size_t sourceStreamLen,
|
||||||
size_t *readLen, uint8_t *destStream, size_t maxDestStreamlen, size_t *decodedLen);
|
size_t *readLen, uint8_t *destStream, size_t maxDestStreamlen, size_t *decodedLen);
|
||||||
|
|
||||||
ReturnValue_t decodeStreamNonEscaped(const uint8_t *sourceStream, size_t sourceStreamLen,
|
ReturnValue_t decodeStreamNonEscaped(const uint8_t *sourceStream, size_t sourceStreamLen,
|
||||||
size_t *readLen, uint8_t *destStream, size_t maxDestStreamlen, size_t *decodedLen);
|
size_t *readLen, uint8_t *destStream, size_t maxDestStreamlen, size_t *decodedLen);
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
bool escapeStxEtx;
|
bool escapeStxEtx;
|
||||||
bool escapeCr;
|
bool escapeCr;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user