public class KeyenceNanoSerialOverTcp extends NetworkDeviceBase
| 限定符和类型 | 字段和说明 |
|---|---|
byte |
Station
获取或设置当前的站号信息,在RS232连接模式下,设置为0,如果是RS485/RS422连接下,必须设置正确的站号
Get or set the current station number information. |
boolean |
UseStation
获取或设置当前是否启用站号信息,当不启动站号时,在连接和断开的时候,将不使用站号报文。
|
WordLengthAlienSession, isPersistentConn, IsSocketError, isUseAccountCertificate, LogMsgFormatBinary, simpleHybirdLockCoreSocket, fileCacheSize, LogNet, TokenLogNet| 构造器和说明 |
|---|
KeyenceNanoSerialOverTcp()
实例化一个默认的对象
Instantiate a default object |
KeyenceNanoSerialOverTcp(String ipAddress,
int port)
使用指定的ip地址和端口号来初始化对象
Initialize the object with the specified IP address and port number |
| 限定符和类型 | 方法和说明 |
|---|---|
protected OperateResult |
ExtraOnDisconnect(Socket socket)
根据实际的协议选择是否重写本方法,有些协议在断开连接之前,需要发送一些报文来关闭当前的网络通道
Select whether to rewrite this method according to the actual protocol. |
protected INetMessage |
GetNewNetMessage()
获取一个新的消息对象的方法,需要在继承类里面进行重写
The method to get a new message object needs to be overridden in the inheritance class |
protected OperateResult |
InitializationOnConnect(Socket socket)
根据实际的协议选择是否重写本方法,有些协议在创建连接之后,需要进行一些初始化的信号握手,才能最终建立网络通道。
|
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<String> |
ReadAddressAnnotation(String address) |
OperateResultExOne<boolean[]> |
ReadBool(String address,
short length)
|
OperateResultExOne<byte[]> |
ReadExpansionMemory(byte unit,
short address,
short length) |
OperateResultExOne<Integer> |
ReadPlcMode() |
OperateResultExOne<KeyencePLCS> |
ReadPlcType() |
OperateResult |
SetPlcDateTime(Date dateTime) |
String |
toString()
返回当前对象表示的字符串
Returns the string represented by the current object |
OperateResult |
Write(String address,
boolean value)
|
OperateResult |
Write(String address,
boolean[] value)
|
OperateResult |
Write(String address,
byte[] value)
写入原始的byte数组数据到指定的地址,返回是否写入成功
Write the original byte array data to the specified address, and return whether the write was successful |
OperateResult |
WriteExpansionMemory(byte unit,
short address,
byte[] value) |
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, WriteCustomer, WriteUnicodeString, WriteUnicodeStringAccountCertificate, ConnectClose, ConnectServer, ConnectServer, ExtraAfterReadFromCoreServer, GetAvailableSocket, getByteTransform, getConnectionId, getConnectTimeOut, getIpAddress, getPort, getReceiveTimeOut, getSleepTime, IpAddressPing, PackCommandWithHeader, ReadFromCoreServer, ReadFromCoreServer, ReadFromCoreServer, setByteTransform, setConnectionId, setConnectTimeOut, setIpAddress, SetLoginAccount, SetPersistentConnection, setPort, setReceiveTimeOut, setSleepTime, UnpackResponseContentCheckRemoteToken, 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 Station
public boolean UseStation
public KeyenceNanoSerialOverTcp()
public KeyenceNanoSerialOverTcp(String ipAddress, int port)
ipAddress - Ip地址数据port - 端口号protected INetMessage GetNewNetMessage()
NetworkDoubleBaseGetNewNetMessage 在类中 NetworkDoubleBaseprotected OperateResult InitializationOnConnect(Socket socket)
NetworkDoubleBaseInitializationOnConnect 在类中 NetworkDoubleBasesocket - 网络套接字protected OperateResult ExtraOnDisconnect(Socket socket)
NetworkDoubleBaseExtraOnDisconnect 在类中 NetworkDoubleBasesocket - 网络套接字public OperateResultExOne<byte[]> Read(String address, short length)
IReadWriteNetRead 在接口中 IReadWriteNetRead 在类中 NetworkDeviceBaseaddress - 数据地址length - 数据长度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 value)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址value - 写入值public OperateResult Write(String address, boolean[] value)
IReadWriteNetWrite 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址value - 写入值public OperateResultExOne<KeyencePLCS> ReadPlcType()
public OperateResultExOne<Integer> ReadPlcMode()
public OperateResult SetPlcDateTime(Date dateTime)
public OperateResultExOne<String> ReadAddressAnnotation(String address)
public OperateResultExOne<byte[]> ReadExpansionMemory(byte unit, short address, short length)
public OperateResult WriteExpansionMemory(byte unit, short address, byte[] value)
public String toString()
NetworkBasetoString 在类中 NetworkDeviceBaseCopyright © 2022. All rights reserved.