Files
SamplePreSystem-CS/SamplePre.Communication/Communication/ICommunication.cs
2026-04-30 11:34:41 +08:00

41 lines
1020 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SamplePre.Communication
{
public interface ICommunication
{
/// <summary>
/// 下发下位机指令
/// </summary>
/// <param name="Dbno"></param>
/// <param name="start"></param>
/// <param name="bytes"></param>
/// <returns></returns>
bool WriteArraysBtye<T>(int Dbno, int start, T[] bytes);
/// <summary>
/// 读取监控数据,读取数组
/// </summary>
/// <returns></returns>
ushort[] ReadArraysShort(int Dbno, int start, int lenth);
/// <summary>
/// 写入数据
/// </summary>
/// <param name="address">地址(如"M0.0", "DB1.DBW2"</param>
/// <param name="value">要写入的值</param>
/// <returns>是否写入成功</returns>
public bool WriteSingleData(string address, object value);
}
}