  /*######################################################################################  
 ##########################################################################################
## ######################################################## ####################          ##
## ########  #######   ###      ## ########    ######   ### ####### ########  ###      ## ##
## ###    ## ###    #  ####    ### ###    ##  ###   ##  ### ###     ###    ## ####    ### ##
## ###   ### ###    ## #######  ## ###   ### ###     ## ### ###     ###   ### #######  ## ##
## #######   ######### ### ###  ## ########  ###     ## ### ####### #######   ### ###  ## ##
## ###   ### ###    ## ###  ##  ## ###   ### ###     ## ### ###     ###   ### ###  ##  ## ##
## ###    ## ###    ## ###      ## ###    ##  ###   ##  ### ###     ###    ## ###      ## ##
## ###    ## ###    ## ###      ## ########    ######   ### ####### ###    ## ###      ## ##
## #################################################### ### ############################# ##
############################################################################################
##### CURRENT / ramboTerm 2.2_ino / 04-04-2020                                            ##
##### ramboTerm: CLI Tool-set for fire alarm interfacing and communications.              ##
##### Matthew Stroble / matthewstroble@gmail.com / firealarmhackery.com                   ##
 ##                                                                                      ##
  ######################################################################################*/

#ifndef __rt_h__
#define __rt_h__

#include <Arduino.h>

class rTerm{
  public:
    rTerm();
    void rtInit();
    float vBatt();
    float vIn();
    void dipInit();
    void dipCalc();
    bool memReset();
    void memRead();
    void paramReset();
    void usbRx();
    
    // -- FCP FUNCTIONS --
      void fcpRx();
        
    // -- GSM FUNCTIONS --
      bool gsmRx(int rxParse);
      char sigStrength();
      bool smsTx(char inData[160]);
      void procLogFCP();
      void procLogCID();

    // -- LOG FUNCTIONS --
      void dumpLog(char logPath[15]);
      void dumpLogsFCP();
      void dumpLogsCID();
      void flushLogsFCP();
      void flushLogsCID();

    // -- CMD FUNCTIONS --
      bool cmd(char cmdBuff[16]);
      bool isCMD(char inChar);
      
    // -- CONTACT ID CMDS --
      void cidInit();
      void cidRx();
    
    // -- SYS VARS --
      static int opMode;
      static int loopIndex;
      static long fcpBaud;
      static int fcpConfig;
      static char configText[4];
    
    // -- FCP VARS --
      static int fcpEN;
      static int lineIndex;
      static int logIndexFCP;
      
    // -- GSM VARS --
      char csq[3];
      static int destIndex;
      static char telNum[12];
      static int smsEN;
      static int smsFCP;
      static int smsCID;
      static int procIndexFCP;
      static int procIndexCID;
      
    // -- Contact ID VARS --
      static int cidEN;
      static int logIndexCID;
      
};

#endif
