public class OmronHostLinkOverTcp extends NetworkDeviceBase
| 限定符和类型 | 字段和说明 |
|---|---|
byte |
DA2 |
byte |
ICF |
int |
ReadSplits
进行字读取的时候对于超长的情况按照本属性进行切割,默认260。
|
byte |
ResponseWaitTime
The response wait time sets the time from when the CPU Unit receives a command block until it starts
to return a response.It can be set from 0 to F in hexadecimal, in units of 10 ms.
|
byte |
SA2 |
byte |
SID |
byte |
UnitNumber
PLC设备的站号信息
PLC device station number information |
WordLengthAlienSession, isPersistentConn, IsSocketError, isUseAccountCertificate, LogMsgFormatBinary, simpleHybirdLockCoreSocket, fileCacheSize, LogNet, TokenLogNet| 构造器和说明 |
|---|
OmronHostLinkOverTcp() |
OmronHostLinkOverTcp(String ipAddress,
int port) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
GetErrorText(int error)
根据错误信息获取当前的文本描述信息
|
protected INetMessage |
GetNewNetMessage()
获取一个新的消息对象的方法,需要在继承类里面进行重写
The method to get a new message object needs to be overridden in the inheritance class |
OperateResultExOne<byte[]> |
Read(String[] address)
从欧姆龙PLC中读取多个地址的数据,返回读取结果,每个地址按照字为单位读取,地址格式为"D100","C100","W100","H100","A100"
|
OperateResultExOne<byte[]> |
Read(String address,
short length)
批量读取字节数组信息,需要指定地址和长度,返回原始的字节数组
Batch read byte array information, need to specify the address and length, return the original byte array |
OperateResultExOne<boolean[]> |
ReadBool(String address,
short length)
|
static OperateResultExOne<byte[]> |
ResponseValidAnalysis(byte[] send,
byte[] response)
验证欧姆龙的Fins-TCP返回的数据是否正确的数据,如果正确的话,并返回所有的数据内容
|
String |
toString()
返回当前对象表示的字符串
Returns the string represented by the current object |
static byte[] |
TransBoolsArray(boolean[] values) |
protected OperateResultExOne<byte[]> |
UnpackResponseContent(byte[] send,
byte[] response)
根据对方返回的报文命令,对命令进行基本的拆包,例如各种Modbus协议拆包为统一的核心报文,还支持对报文的验证
|
OperateResult |
Write(String address,
boolean[] values)
|
OperateResult |
Write(String address,
byte[] value)
写入原始的byte数组数据到指定的地址,返回是否写入成功
Write the original byte array data to the specified address, and return whether the write was successful |
ReadBool, ReadCustomer, ReadDouble, ReadDouble, ReadFloat, ReadFloat, ReadInt16, ReadInt16, ReadInt32, ReadInt32, ReadInt64, ReadInt64, ReadString, ReadString, ReadUInt16, ReadUInt16, ReadUInt32, ReadUInt32, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, WriteCustomer, WriteUnicodeString, WriteUnicodeStringAccountCertificate, ConnectClose, ConnectServer, ConnectServer, ExtraAfterReadFromCoreServer, ExtraOnDisconnect, GetAvailableSocket, getByteTransform, getConnectionId, getConnectTimeOut, getIpAddress, getPort, getReceiveTimeOut, getSleepTime, InitializationOnConnect, IpAddressPing, PackCommandWithHeader, ReadFromCoreServer, ReadFromCoreServer, ReadFromCoreServer, setByteTransform, setConnectionId, setConnectTimeOut, setIpAddress, SetLoginAccount, SetPersistentConnection, setPort, setReceiveTimeOut, setSleepTimeCheckRemoteToken, CloseSocket, CreateSocketAndConnect, CreateSocketAndConnect, CreateSocketAndConnect, ReadStream, Receive, Receive, Receive, ReceiveAndCheckBytes, ReceiveByMessage, ReceiveByMessage, ReceiveBytesContentFromSocket, ReceiveBytesContentFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveFrameWebSocketPayload, ReceiveHslMessage, ReceiveMqttMessage, ReceiveRedisCommand, ReceiveRedisCommandString, ReceiveStringArrayContentFromSocket, ReceiveStringArrayContentFromSocket, ReceiveStringContentFromSocket, ReceiveStringContentFromSocket, ReceiveWebSocketPayload, Send, Send, SendAccountAndCheckReceive, SendBaseAndCheckReceive, SendBytesAndCheckReceive, SendStreamToSocket, SendStringAndCheckReceive, SendStringAndCheckReceive, ThreadPoolCheckTimeOut, WriteStream, WriteStreamFromSocketclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitReadFromCoreServerConnectClose, getConnectionId, setConnectionIdpublic byte ICF
public byte DA2
public byte SA2
public byte SID
public byte ResponseWaitTime
public byte UnitNumber
public int ReadSplits
public OmronHostLinkOverTcp()
public OmronHostLinkOverTcp(String ipAddress, int port)
protected INetMessage GetNewNetMessage()
NetworkDoubleBaseGetNewNetMessage 在类中 NetworkDoubleBaseprotected OperateResultExOne<byte[]> UnpackResponseContent(byte[] send, byte[] response)
NetworkDoubleBaseUnpackResponseContent 在类中 NetworkDoubleBasesend - 发送的原始报文数据response - 设备方反馈的原始报文内容public OperateResultExOne<byte[]> Read(String address, short length)
IReadWriteNetRead 在接口中 IReadWriteNetRead 在类中 NetworkDeviceBaseaddress - 数据地址length - 数据长度public OperateResultExOne<byte[]> Read(String[] address)
address - 从欧姆龙PLC中读取多个地址的数据,返回读取结果,每个地址按照字为单位读取,地址格式为"D100","C100","W100","H100","A100"public OperateResult Write(String address, byte[] value)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址value - 写入值public OperateResultExOne<boolean[]> ReadBool(String address, short length)
IReadWriteNetBoolean 数组信息,需要指定地址和长度,返回 Boolean 数组Boolean array information, need to specify the address and length, return Boolean arrayReadBool 在接口中 IReadWriteNetReadBool 在类中 NetworkDeviceBaseaddress - 数据地址length - 数据长度public OperateResult Write(String address, boolean[] values)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址values - 写入值public String toString()
NetworkBasetoString 在类中 NetworkDeviceBasepublic static OperateResultExOne<byte[]> ResponseValidAnalysis(byte[] send, byte[] response)
send - 发送的报文信息response - 来自欧姆龙返回的数据内容public static String GetErrorText(int error)
error - 错误代号public static byte[] TransBoolsArray(boolean[] values)
Copyright © 2022. All rights reserved.