FastLED 3.10.9
Loading...
Searching...
No Matches

◆ outOfMemoryResponse()

fl::string fl::anonymous_namespace{serial.cpp.hpp}::outOfMemoryResponse ( const char * prefix,
fl::size prefixLength )

Definition at line 14 of file serial.cpp.hpp.

14 {
15 static const char error[] =
16 "{\"error\":{\"code\":-32603,\"message\":\"Out of memory\"},"
17 "\"id\":null,\"jsonrpc\":\"2.0\"}";
18 fl::string failure;
19 failure.write(prefix, prefixLength);
20 failure.write(error, sizeof(error) - 1);
21 if (failure.size() == prefixLength + sizeof(error) - 1) {
22 return failure;
23 }
24 return error;
25}
fl::size write(const fl::u8 *data, fl::size n) FL_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, outOfMemoryResponse(), fl::basic_string::size(), and fl::basic_string::write().

Referenced by outOfMemoryResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: