File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,21 @@ J *Notecard::newRequest(const char *request)
205
205
return NoteNewRequest (request);
206
206
}
207
207
208
+ /* *************************************************************************/
209
+ /* !
210
+ @brief Creates a new command object for population by the host.
211
+ This function accepts a command string (for example, `"note.add"`)
212
+ and initializes a JSON Object to return to the host.
213
+ @param request
214
+ The command name, for example, `note.add`.
215
+ @return A `J` JSON Object populated with the request name.
216
+ */
217
+ /* *************************************************************************/
218
+ J *Notecard::newCommand (const char *request)
219
+ {
220
+ return NoteNewCommand (request);
221
+ }
222
+
208
223
/* *************************************************************************/
209
224
/* !
210
225
@brief Sends a request to the Notecard.
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ class Notecard
128
128
void clearDebugOutputStream (void );
129
129
void i2cTest (int Adjustment);
130
130
J *newRequest (const char *request);
131
+ J *newCommand (const char *request);
131
132
bool sendRequest (J *req);
132
133
J *requestAndResponse (J *req);
133
134
void deleteResponse (J *rsp);
You can’t perform that action at this time.
0 commit comments