
/// Copyright 2010 MBARI.                                                    
/// MBARI Proprietary Information. All rights reserved.                      

/// @file commands.h
/// @brief list of all commands and sub-commands for CLI

#ifndef COMMANDS_H
#define COMMANDS_H

#include "script.h"

#define ARG_LICOR "LI"
#define ARG_PUMP0 "P0"
#define ARG_PUMP1 "P1"
#define ARG_ADC0  "A0"
#define ARG_ADC1  "A1"
#define ARG_ADC2  "A2"
#define ARG_XL    "XL"
#define ARG_XH    "XH"
#define ARG_XC    "XC"
#define ARG_HOST  "HO"
#define CMD_ON    "ON"
#define CMD_OFF   "OFF"

#define ACT_UPLOAD_TO_MSEC 15000

typedef return_code_t (*cmd_func)(int argc, char **argv);

/// An entry in a table of commands
typedef struct CmdStruct_s {
    char* name;             ///<command name(what's typed into CLI)
    cmd_func cmd_fn;//return_code_t (*func)(char *);    ///<pointer to function to be called
}CmdStruct;

extern const CmdStruct cmdsRoot[];  /// <base level commands
extern const CmdStruct cmdsGet[];   /// <GET sub-commands
extern const CmdStruct cmdsSet[];   /// <SET sub-commnads
extern const CmdStruct cmdsClr[];   /// <CLEAR sub-commands
//extern const CmdStruct cmdsFl[];    /// <File sub-commnds
extern const CmdStruct cmdsLi[];    /// <licor sub-commnds
extern const CmdStruct cmdsTest[];    /// <licor sub-commnds
//extern const CmdStruct cmdsOrb[];   /// <Orbcomm sub-commands
extern const CmdStruct cmdsPulse[];   /// <Pulse sub-commands
//extern const CmdStruct cmdsMacro[];   /// <Macro sub-commands
extern const ScrCmdStruct cmdsScr[];   /// <Scripting sub-commands
#endif