diff --git a/groundStation/src/backend/commands.c b/groundStation/src/backend/commands.c index 1c451d39bf6b6eb415e7d5b163d4fdc543dbc533..1cef27dc9cd60f1cf8ff4efc06912b609846e286 100644 --- a/groundStation/src/backend/commands.c +++ b/groundStation/src/backend/commands.c @@ -75,6 +75,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "debug", + // Type of the command data + stringType, // Function pointer &cb_debug }, @@ -82,6 +84,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "packetlog", + // Type of the command data + stringType, // Function pointer &cb_packetlog }, @@ -89,6 +93,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "getpacketlogs", + // Type of the command data + stringType, // Function pointer &cb_getpacketlogs }, @@ -96,6 +102,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "update", + // Type of the command data + stringType, // Function pointer &cb_update }, @@ -103,6 +111,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "beginupdate", + // Type of the command data + stringType, // Function pointer &cb_beginupdate }, @@ -110,6 +120,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "log", + // Type of the command data + stringType, // Function pointer &cb_log }, @@ -117,6 +129,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "response", + // Type of the command data + stringType, // Function pointer &cb_response }, @@ -124,6 +138,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "setcontrol", + // Type of the command data + floatType, // Function pointer &cb_setcontrol }, @@ -131,6 +147,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "getcontrol", + // Type of the command data + floatType, // Function pointer &cb_getcontrol }, @@ -138,6 +156,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // Command text "respcontrol", + // Type of the command data + floatType, // Function pointer &cb_respcontrol } diff --git a/groundStation/src/backend/commands.h b/groundStation/src/backend/commands.h index a3ef5d75297dce9ea2526289617b6b5ad7d10b69..9fda24a711d60750f733710f017bdf20b5f92103 100644 --- a/groundStation/src/backend/commands.h +++ b/groundStation/src/backend/commands.h @@ -14,6 +14,17 @@ enum Message{ END_CHAR = 0xED }; +/* + * Enumeration of the data types that a callback function may use + * doubleType should get added here at some point + */ +enum DataType +{ + floatType, // 00 + intType, // 01 + stringType // 02 +}; + /* * Message type IDs used to know what kind of message we are dealing with * Enumeration used to index the MessageTypes array in commands.c @@ -64,6 +75,7 @@ enum ControllerValueID{ */ struct MessageType{ char cmdText[MAX_CMD_TEXT_LENGTH]; + char cmdDataType; command_cb * functionPtr; };