
#ifndef _commands_h
#define _commands_h

#include "RBPXPLRTERM_config.h"
#include "display.h"
#include "logBuffer.h"

//
// menu command types 

#define MCMD_MENU   1025  // selecting the item leads to another menu <newMenu>
#define MCMD_FUNC   1026  // selecting the item executes the cmdFunction()


typedef struct {
  uint8_t menuid;
  uint8_t itemid;
  String itemname;
  uint8_t commandId;
  uint16_t commandType;
  uint8_t newMenu;
  long int longParam;
  DFuncIntParStrPtr cmdFunction;
} MenuItem;

#define CMD_MAXAHDOPT 9
#define CMD_MINAHDOPTCHAR '0'

void registerTimeMarker(String item, String params);
void displayFolded(String data);
void popUpTimeout(int p);
void stopPopUpTimeout();
void startPopUpTimer();
void displayPopUp(String data);
void displayData(int dpar);
void displayHelp();
void handleCharCommand(char c);
void handleInputChar(char c);
void initCommands();
int getHashCollector();

// end of _commands_h
#endif
