| | |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | /** |
| | | * 部分实现Task |
| | | */ |
| | |
| | | private static final Logger log = LogManager.getLogger(TaskSurpport.class.getName()) ; |
| | | |
| | | //当前所处理的上行数据所属RTU的地址 |
| | | public String rtuAddr_inRootTk ;//只在根root任务对象上会付此值 |
| | | //public String rtuAddr_inRootTk ;//只在根root任务对象上会付此值 |
| | | //本节点配置 |
| | | protected TaskConfig conf ; |
| | | //根任务 |
| | |
| | | * @param data 需要处理的数据 |
| | | */ |
| | | @Override |
| | | public abstract void execute(Object data) ; |
| | | public abstract void execute(Object data) throws ParseException; |
| | | |
| | | /** |
| | | * 任务采用对象池,以便重用任务对象, |
| | |
| | | */ |
| | | @Override |
| | | public void cleanMeAndSubs() { |
| | | rtuAddr_inRootTk = null ; |
| | | //rtuAddr_inRootTk = null ; |
| | | taskResult = null ; |
| | | if(this.subTasks != null && this.subTasks.length > 0){ |
| | | for(int i = 0 ; i < this.subTasks.length; i++){ |