#pragma once

#include <map>
#include <vector>
#include <list>
#include "CookConfig.h"

U_NS_BEGIN_CATERING
typedef struct
{
	std::string cmdid;			 //指令序号
	std::string method;          // need to get batcher and stove method
	std::string devindex;        // device address
	std::map<std::string, std::string> par;  //参数值

}output_item_t;


typedef struct
{
	//Get(10101,Enter)==1 and Get(10101,SnrMainT)>30
	std::string devid;     //10101
	std::string sensor;    //Enter
	std::string optcode;   //==   不传
	int triggervalue;      //1    不传，默认-1
	std::string combinecode;//用于级联不同的比较：and、or、not   不传
}trigger_func_t;

typedef struct
{
	std::string cmdid;
	std::string method;
	std::string devindex;
	std::list<trigger_func_t> par;//未定义好
}trigger_item_t;

typedef struct
{
	std::string ssnid;
	std::string vol;
}ingredient_item_t;

typedef struct
{
	std::string id;//步骤id
	std::string time;//耗时
	int visibleStep;//是否可视步骤
	int visibleId;//显示步骤编号
	//步骤
	std::list<output_item_t> output;
	//触发器
	std::list<trigger_item_t> trigger;
	//食材、调料
	std::list<ingredient_item_t> ingredient;
}thread_item_t;

typedef struct
{
	std::string id;
	std::string desc;        //不传
	///需要绑定的设备，<devindex,modle>
	std::map<std::string, std::string> binddev;     //task devs  不传
	std::list<thread_item_t> step;                  //task steps
}task_item_t; /* tasks info */

U_NS_END_CATERING