1st release (without comment)

Revision:
9:025a189e5082
Parent:
8:f08bb4074bc8
Child:
10:ec0470d18ea4
--- a/RMS_UART.h	Mon Sep 19 04:00:29 2016 +0000
+++ b/RMS_UART.h	Tue Sep 20 07:40:01 2016 +0000
@@ -2,8 +2,8 @@
   ******************************************************************************
   * @file    RMS_UART.cpp
   * @author  Surasak N
-  * @version V1
-  * @date    15/09/2016
+  * @version V2
+  * @date    20/09/2016
   * @brief   Command for Mini-RMS <> RMS via UART
   ******************************************************************************/
   
@@ -22,13 +22,22 @@
 #define CMD_WRITEFILE           "ed"
 #define CMD_DELETEFILE          "df"
 #define CMD_SYS_RESTART         "rs"
-#define CMD_STOP                "sp"
+#define CMD_SYS_PAUSE           "sp"
 #define CMD_HELP                "-h"
+#define CMD_CHECK_ERROR         "ce"
 
 #define FOUND_CSV_FILE          ".csv"
 #define FOUND_XML_FILE          ".xml"
 #define FOUND_LOG_FILE          ".log"
 
+#define FLAG_STATUS_OK          "OK"
+#define FLAG_STATUS_ERROR       "ER"
+#define FLAG_STATUS_END         "*END*"
+
+
+#define RMS_STATUS_LIST_OK      "LK"
+#define RMS_STATUS_READ_OK      "RK"
+
 #define BPS_9600                9600
 
 /** 
@@ -39,15 +48,30 @@
     REQ_LISTDIR,                /** Connect Type : List files as in directory */
     REQ_READ,                   /** Read Type    : Read file as file name */
     REQ_WRITE,                  /** Write Type   : Create/Write as file name and contens */
-    REQ_DELETE                  /** Delete Type  : Delete file as file name */
+    REQ_DELETE,                 /** Delete Type  : Delete file as file name */
+    REQ_FLAG_OK,                /** Flag OK Type " Send "OK" flag via UART */
+    REQ_READ_CHECK              /** Read Check Type : Check available file as in SD card */
 } FileRequest_CMD_Type;
 
+/** 
+  * @brief  Error type definition  
+  */ 
+typedef enum {
+    EC_SUCCESS          = 0,    /** SUCCESS Type        : Do not have an error */
+    EC_CMD_ERROR        = 1,    /** CMD_ERROR Type      : Command not found */
+    EC_FILE_NOT_FOUND   = 2,    /** FILE_NOT_FOUND Type : File not available as in SD card */
+    EC_WRITE_ERROR      = 3,    /** WRITE_ERROR Type    : Do not write the file */
+    EC_FILE_TOO_LARGE   = 4     /** FILE_TOO_LARGE Type : Content is too large over buffer size */
+} Error_Code_Type;
+
 /* ###############  Declare functions extern ################## */
 extern Serial serial_device;
 extern FileRequest_CMD_Type reqFileCmdType;
 extern char FileName[MSG2FILENAME];
 extern char Content_RxBuf[CONTENT_BUF_SIZE + 1];
 extern bool MsgContentManagement;
+extern Error_Code_Type gErrorCode;
+
 
 /* ###############  Function Prototype  ################## */
 /**