MCPcopy Create free account
hub / github.com/FastLED/FastLED / methods

Method methods

src/fl/remote/rpc/rpc.cpp.hpp:242–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240// =============================================================================
241
242json Rpc::methods() const {
243 json arr = json::array();
244 for (auto it = mRegistry.begin(); it != mRegistry.end(); ++it) {
245 // Format: ["methodName", "returnType", [["param1", "type1"], ["param2", "type2"]], "mode"]
246 json methodTuple = json::array();
247 methodTuple.push_back(it->first.c_str()); // Method name
248 methodTuple.push_back(it->second.mSchemaGenerator->resultTypeName()); // Return type
249 methodTuple.push_back(it->second.mSchemaGenerator->params()); // Params array
250
251 // Add mode (sync or async)
252 const char* modeStr = (it->second.mMode == RpcMode::ASYNC) ? "async" : "sync";
253 methodTuple.push_back(modeStr);
254
255 arr.push_back(methodTuple);
256 }
257 return arr;
258}
259
260// =============================================================================
261// Rpc::schema() - Returns flat schema

Callers

nothing calls this directly

Calls 7

arrayClass · 0.50
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
c_strMethod · 0.45
resultTypeNameMethod · 0.45
paramsMethod · 0.45

Tested by

no test coverage detected