IAdsPlc.cs 917 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.ServiceModel;
  3. using Aitex.Core.RT.Device;
  4. using MECF.Framework.Common.Event;
  5. namespace MECF.Framework.Common.PLC
  6. {
  7. [ServiceContract]
  8. [ServiceKnownType(typeof(float[]))]
  9. [ServiceKnownType(typeof(bool[]))]
  10. [ServiceKnownType(typeof(int[]))]
  11. [ServiceKnownType(typeof(byte[]))]
  12. [ServiceKnownType(typeof(double[]))]
  13. public interface IAdsPlc : IDevice
  14. {
  15. AlarmEventItem AlarmConnectFailed { get; set; }
  16. AlarmEventItem AlarmCommunicationError { get; set; }
  17. event Action OnConnected;
  18. event Action OnDisconnected;
  19. [OperationContract]
  20. bool CheckIsConnected();
  21. [OperationContract]
  22. bool Read(string variable, out object data, string type, int length, out string reason);
  23. [OperationContract]
  24. bool WriteArrayElement(string variable, int index, object value, out string reason);
  25. }
  26. }