MCPcopy Create free account
hub / github.com/SmingHub/Sming / readMemoryBlock

Method readMemoryBlock

Sming/Core/Data/StreamTransformer.cpp:17–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#define NETWORK_SEND_BUFFER_SIZE 1024
16
17uint16_t StreamTransformer::readMemoryBlock(char* data, int bufSize)
18{
19 if(!isValid()) {
20 return 0;
21 }
22
23 if(tempStream == nullptr) {
24 tempStream.reset(new CircularBuffer(NETWORK_SEND_BUFFER_SIZE + 10));
25 }
26
27 // Use provided buffer as a temporary store for this operation
28 fillTempStream(data, bufSize);
29
30 return tempStream->readMemoryBlock(data, bufSize);
31}
32
33void StreamTransformer::fillTempStream(char* buffer, size_t bufSize)
34{

Callers 3

executeMethod · 0.45
executeMethod · 0.45
fillTempStreamMethod · 0.45

Calls 1

resetMethod · 0.45

Tested by 1

executeMethod · 0.36