using FLY.OBJComponents.IService;
using FLY.OBJComponents.OBJ_INTERFACE;
using FObjBase;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace FLY.OBJComponents.Client
{
public class PLCProxySystemServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IPLCProxySystemService
{
protected override Type InterfaceType => typeof(IPLCProxySystemService);
///
/// 与PLC连接成功
///
public bool IsConnectedWithPLC { get; set; } = false;
public PLCProxySystemServiceClient(UInt32 serviceId) : base(serviceId) { }
public PLCProxySystemServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }
#region IPLCProxySystemService
public void FeedPlan(long planID)
{
Call(nameof(FeedPlan), new { planID });
}
public void RemovePlan(long planID)
{
Call(nameof(RemovePlan), new { planID });
}
public void SetPlan(string objname, IEnumerable propertynames, long planID)
{
Call(nameof(SetPlan), new { objname, propertynames, planID });
}
///
/// 设置更新计划
///
/// 对象名
/// 属性名
/// 计划的编号,应该全局唯一,建议使用时间ticks
public void SetPlan(string objname, IEnumerable propertynames, AsyncCBHandler asyncDelegate, object asyncContext)
{
Call(nameof(SetPlan), new { objname, propertynames}, asyncDelegate, asyncContext);
}
#endregion
}
}