Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: inc/global.h
- Revision:
- 149:950c90425f7c
- Parent:
- 148:ee3cbaafe355
- Child:
- 150:4db35c8234b4
--- a/inc/global.h Wed Sep 28 17:57:36 2016 +0000 +++ b/inc/global.h Fri Sep 30 12:22:20 2016 +0000 @@ -12,7 +12,7 @@ #include "ntshell.h" #include "mDot.h" -// file naming prefix conventions +// file naming prefix conventions #define CONTROL_SP_STR "control_sp_" #define CONTROL_TM_STR "control_tm_" #define CONTROL_MN_STR "control_mn_" @@ -45,10 +45,10 @@ char controlFile[64]; } Message_t; -typedef enum { - OFF = 0, - ON = 1 -} State; +typedef enum { + OFF = 0, + ON = 1 +} State; typedef enum output_action { ACTION_NEW, @@ -58,7 +58,7 @@ ACTION_CONTROL_UNREGISTER } OutputAction; -// output control request message +// output control request message typedef struct output_control_req_t { OutputAction action; Control_t controlType; @@ -69,7 +69,7 @@ unsigned int priority; } OutputControlMsg_t; -// analytics logger request message +// analytics logger request message typedef struct analytics_logger_req_t { char timestamp[32]; char log_entry[96]; @@ -88,6 +88,14 @@ extern void func_cb_ntopt(int argc, char **argv); extern mDot *GLOBAL_mdot; +typedef enum register_type_tag { + REG_TYPE_NONE, + REG_TYPE_INPUT, + REG_TYPE_OUTPUT, + REG_TYPE_VINPUT, + REG_TYPE_VOUTPUT, +} RegisterType_t; + struct ModbusRegister { std::string name; std::string units; @@ -100,7 +108,8 @@ int size; int order; int rfreq; - bool input; + RegisterType_t regType; + std::string vcmd; std::string fmt; float float_value; uint32_t uint32_value; @@ -109,6 +118,13 @@ bool simulated; }; +struct VirtualCommand { + float constant; + std::string opl; + std::string opr; + std::string op; +}; + struct SimulateInput { float start_value; float min; @@ -137,7 +153,7 @@ char inputTag[32]; char outputTag[32]; float inputValue; - float outputValue; + float outputValue; } EventReasonStruct_t; extern std::map<std::string,ModbusRegister> ModbusRegisterMap;