From de936044dd951d5f6ca9d87731642ab57fd8874b Mon Sep 17 00:00:00 2001 From: burneykb <burneykb@iastate.edu> Date: Wed, 22 Mar 2017 00:11:02 -0500 Subject: [PATCH] added new commands to be implemented to the common files --- common/commands.c | 18 ++++++++++++++++++ common/commands.h | 27 +++++++++++++++------------ 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/common/commands.c b/common/commands.c index 09f18bcae..ef4c67e3f 100644 --- a/common/commands.c +++ b/common/commands.c @@ -239,6 +239,24 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = // Function pointer &cb_respnodes }, + // ADDNODE + { + // Command text + "addnode", + // Type of the command data + floatType, + // Function pointer + &cb_addnode + }, + // RESPADDNODE + { + // Command text + "respaddnode", + // Type of the command data + floatType, + // Function pointer + &cb_respaddnode + }, // LOG_END { // Command text diff --git a/common/commands.h b/common/commands.h index 86fa2c897..d4b0f2e2c 100644 --- a/common/commands.h +++ b/common/commands.h @@ -42,19 +42,22 @@ enum MessageTypeID{ BEGINUPDATE_ID, // 04 LOG_ID, // 05 RESPONSE_ID, // 06 - SETPARAM_ID, // 07 - Setting controller parameters. Example: PID constants - GETPARAM_ID, // 08 - Getting controller parameters. Example: PID constants - RESPPARAM_ID, // 09 - Responding with controller parameters. Example: PID constants - SETSOURCE_ID, // 10 - Setting controller source Block & id - GETSOURCE_ID, // 11 - Getting controller source Block & id - RESPSOURCE_ID, // 12 - Responding with controller source Block & id - GETOUTPUT_ID, // 13 - Getting controller block output - RESPOUTPUT_ID, // 14 - Responding with controller block output - GETNODES_ID, // 15 - Getting nodes from current comp_graph - RESPNODES_ID, // 16 - Responding with nodes from current comp_graph - LOG_END_ID, // 17 - Responding with controller parameters. Example: PID constants - MAX_TYPE_ID // 18 - Just used to keep track of the size. Must remain at the end + SETPARAM_ID, // 07 - Setting node parameters. + GETPARAM_ID, // 08 - Getting node parameters. + RESPPARAM_ID, // 09 - Responding with node parameters. + SETSOURCE_ID, // 10 - Setting node input source block_id & output_id + GETSOURCE_ID, // 11 - Getting node input source block_id & output_id + RESPSOURCE_ID, // 12 - Responding with node input source block_id & output_id + GETOUTPUT_ID, // 13 - Getting node output + RESPOUTPUT_ID, // 14 - Responding with node output + GETNODES_ID, // 15 - Getting node IDs from current comp_graph + RESPNODES_ID, // 16 - Responding with node IDs from current comp_graph + ADDNODE_ID, // 17 - Add a node of specified type_id + RESPADDNODE_ID, // 18 - Responding with the block_id of the newly added node + LOG_END_ID, // 19 - Responding with controller parameters. Example: PID constants + MAX_TYPE_ID // 20 - Just used to keep track of the size. Must remain at the end }; + /* * Message type struct used to keep track of the callback function * pointers located in commands.c -- GitLab