IPLCProxySystemService.cs 1.76 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
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; }
22

潘栩锋's avatar
潘栩锋 committed
23 24 25 26 27 28 29
        /// <summary>
        /// 设置更新计划
        /// </summary>
        /// <param name="objname">对象名</param>
        /// <param name="propertynames">属性名</param>
        /// <param name="planID">计划的编号,应该全局唯一,建议使用时间ticks</param>
        void SetPlan(string objname, IEnumerable<string> propertynames, long planID);
30

潘栩锋's avatar
潘栩锋 committed
31
        /// <summary>
32 33 34 35 36 37 38 39 40
        /// 设置更新计划
        /// </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后停止更新数据
潘栩锋's avatar
潘栩锋 committed
41 42 43
        /// </summary>
        /// <param name="planID">计划的编号</param>
        void FeedPlan(long planID);
44 45 46 47 48 49

        /// <summary>
        /// 主动删除某个计划
        /// </summary>
        /// <param name="planID"></param>
        void RemovePlan(long planID);
潘栩锋's avatar
潘栩锋 committed
50
    }
51 52

    public delegate void SetPlanReponseHandler(long planid, object context);
潘栩锋's avatar
潘栩锋 committed
53
}