1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace FLY.OBJComponents.IService
{
/// <summary>
/// PLC代理系统
/// </summary>
public interface IPLCProxySystemService:INotifyPropertyChanged
{
/// <summary>
/// 与PLC连接成功
/// </summary>
bool IsConnectedWithPLC { get; }
/// <summary>
/// 对象名称
/// </summary>
Dictionary<string, INotifyPropertyChanged> ObjNames { get; }
/// <summary>
/// 设置更新计划
/// </summary>
/// <param name="objname">对象名</param>
/// <param name="propertynames">属性名</param>
/// <param name="planID">计划的编号,应该全局唯一,建议使用时间ticks</param>
void SetPlan(string objname, IEnumerable<string> propertynames, long planID);
/// <summary>
/// 设置更新计划
/// </summary>
/// <param name="objname">对象名</param>
/// <param name="propertynames">属性名</param>
/// <param name="planID">计划的编号,应该全局唯一,建议使用时间ticks</param>
void SetPlan(string objname, IEnumerable<string> propertynames, SetPlanReponseHandler setPlanReponse, object context);
/// <summary>
/// 更新计划持续,如果不喂狗,120s后停止更新数据
/// </summary>
/// <param name="planID">计划的编号</param>
void FeedPlan(long planID);
/// <summary>
/// 主动删除某个计划
/// </summary>
/// <param name="planID"></param>
void RemovePlan(long planID);
}
public delegate void SetPlanReponseHandler(long planid, object context);
}