Elight.Utility/EasyModBus/ModbusClient.cs
(开头部分) 83KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using EasyModbus.Exceptions;
using System;
using System.IO.Ports;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Reflection;
using System.Text;
using System.Threading;
namespace EasyModbus
{
public class ModbusClient
{
public enum RegisterOrder
{
LowHigh,
HighLow
}
public delegate void ReceiveDataChangedHandler(object sender);
public delegate void SendDataChangedHandler(object sender);
public delegate void ConnectedChangedHandler(object sender);
private bool debug = false;
private TcpClient tcpClient;
private string ipAddress = "127.0.0.1";
private int port = 502;
private uint transactionIdentifierInternal = 0u;
private byte[] transactionIdentifier = new byte[2];
private byte[] protocolIdentifier = new byte[2];
private byte[] crc = new byte[2];
private byte[] length = new byte[2];
private byte unitIdentifier = 1;
private byte functionCode;
private byte[] startingAddress = new byte[2];
private byte[] quantity = new byte[2];
private bool udpFlag = false;
private int portOut;
private int baudRate = 9600;
private int connectTimeout = 1000;
后面还有 3427 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。