public class FujiSPHNet extends NetworkDeviceBase
WordLengthAlienSession, isPersistentConn, IsSocketError, isUseAccountCertificate, LogMsgFormatBinary, simpleHybirdLockCoreSocket, fileCacheSize, LogNet, TokenLogNet| 构造器和说明 |
|---|
FujiSPHNet()
实例化一个默认的对象
Instantiate a default object |
FujiSPHNet(String ipAddress,
int port)
指定IP地址和端口号来实例化一个对象
Specify the IP address and port number to instantiate an object |
| 限定符和类型 | 方法和说明 |
|---|---|
static OperateResultExOne<ArrayList<byte[]>> |
BuildReadCommand(byte connectionId,
FujiSPHAddress address,
short length)
构建读取数据的命令报文
|
static OperateResultExOne<ArrayList<byte[]>> |
BuildReadCommand(byte connectionId,
String address,
short length)
构建读取数据的命令报文
|
static OperateResultExOne<byte[]> |
BuildWriteCommand(byte connectionId,
String address,
byte[] data)
构建写入数据的命令报文
|
OperateResult |
CpuBatchInitializeAndStart()
This command is used to initialize and start all the CPUs that exist in a configuration in a batch.
|
OperateResult |
CpuBatchReset()
This command is used to stop all the CPUs that exist in a configuration in a batch.
|
OperateResult |
CpuBatchStart()
This command is used to start all the CPUs that exist in a configuration in a batch.
|
OperateResult |
CpuBatchStop()
This command is used to stop all the CPUs that exist in a configuration in a batch.
|
OperateResult |
CpuIndividualInitializeAndStart()
This command is used to initialize and start an arbitrary CPU existing in a configuration by specifying it.
|
OperateResult |
CpuIndividualReset()
This command is used to reset an arbitrary CPU existing in a configuration by specifying it.
|
OperateResult |
CpuIndividualStart()
This command is used to start an arbitrary CPU existing in a configuration by specifying it.
|
OperateResult |
CpuIndividualStop()
This command is used to stop an arbitrary CPU existing in a configuration by specifying it.
|
static OperateResultExOne<byte[]> |
ExtractActualData(byte[] response)
从PLC返回的报文里解析出实际的数据内容,如果发送了错误,则返回失败信息
|
byte |
getConnectionID()
获取连接的CPU的站号,对于 CPU0-CPU7来说是CPU的站号,分为对应 0xFE-0xF7,对于P/PE link, FL-net是模块站号,分别对应0xF6-0xEF
Get the cpu station: CPU0 to CPU7: SX bus station No. of destination CPU (FEh to F7h); P/PE link, FL-net: SX bus station No. of destination module (F6H to EFH) |
static String |
GetErrorDescription(byte code)
根据错误代号获取详细的错误描述信息
|
protected INetMessage |
GetNewNetMessage()
获取一个新的消息对象的方法,需要在继承类里面进行重写
The method to get a new message object needs to be overridden in the inheritance class |
OperateResultExOne<byte[]> |
Read(String address,
short length)
批量读取PLC的地址数据,长度单位为字。
|
OperateResultExOne<boolean[]> |
ReadBool(String address,
short length)
批量读取位数据的方法,需要传入位地址,读取的位长度,地址示例:M1.100.5,M3.1000.12,M10.1000.0
To read the bit data in batches, you need to pass in the bit address, the length of the read bit, address examples: M1.100.5, M3.1000.12, M10.1000.0 |
void |
setConnectionID(byte connectionID)
设置连接的CPU站号,对于 CPU0-CPU7来说是CPU的站号,分为对应 0xFE-0xF7,对于P/PE link, FL-net是模块站号,分别对应0xF6-0xEF
Set the cpu station: CPU0 to CPU7: SX bus station No. of destination CPU (FEh to F7h); P/PE link, FL-net: SX bus station No. of destination module (F6H to EFH) |
String |
toString()
返回当前对象表示的字符串
Returns the string represented by the current object |
OperateResult |
Write(String address,
boolean[] value)
批量写入位数据的方法,需要传入位地址,等待写入的boo[]数据,地址示例:M1.100.5,M3.1000.12,M10.1000.0
To write bit data in batches, you need to pass in the bit address and wait for the boo[] data to be written. |
OperateResult |
Write(String address,
byte[] value)
批量写入字节数组到PLC的地址里,地址支持M1.1000,M3.1000,M10.1000,返回是否写入成功。
|
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, 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 FujiSPHNet()
public FujiSPHNet(String ipAddress, int port)
ipAddress - Ip地址port - 端口号protected INetMessage GetNewNetMessage()
NetworkDoubleBaseGetNewNetMessage 在类中 NetworkDoubleBasepublic byte getConnectionID()
public void setConnectionID(byte connectionID)
connectionID - 连接ID信息public OperateResultExOne<byte[]> Read(String address, short length)
Read 在接口中 IReadWriteNetRead 在类中 NetworkDeviceBaseaddress - PLC的地址,支持M1.1000,M3.1000,M10.1000length - 读取的长度信息,按照字为单位public OperateResult Write(String address, byte[] value)
Write 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - PLC的地址,支持M1.1000,M3.1000,M10.1000value - 写入的原始字节数据public OperateResultExOne<boolean[]> ReadBool(String address, short length)
ReadBool 在接口中 IReadWriteNetReadBool 在类中 NetworkDeviceBaseaddress - PLC的地址,示例:M1.100.5,M3.1000.12,M10.1000.0length - 读取的bool长度信息public OperateResult Write(String address, boolean[] value)
Write 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - PLC的地址,示例:M1.100.5,M3.1000.12,M10.1000.0value - 等待写入的bool数组public OperateResult CpuBatchStart()
public OperateResult CpuBatchInitializeAndStart()
public OperateResult CpuBatchStop()
public OperateResult CpuBatchReset()
public OperateResult CpuIndividualStart()
public OperateResult CpuIndividualInitializeAndStart()
public OperateResult CpuIndividualStop()
public OperateResult CpuIndividualReset()
public String toString()
NetworkBasetoString 在类中 NetworkDeviceBasepublic static String GetErrorDescription(byte code)
code - 错误码public static OperateResultExOne<ArrayList<byte[]>> BuildReadCommand(byte connectionId, String address, short length)
connectionId - 连接IDaddress - 读取的PLC的地址length - 读取的长度信息,按照字为单位public static OperateResultExOne<ArrayList<byte[]>> BuildReadCommand(byte connectionId, FujiSPHAddress address, short length)
connectionId - 连接IDaddress - 读取的PLC的地址length - 读取的长度信息,按照字为单位public static OperateResultExOne<byte[]> BuildWriteCommand(byte connectionId, String address, byte[] data)
connectionId - 连接IDaddress - 写入的PLC的地址data - 原始数据内容public static OperateResultExOne<byte[]> ExtractActualData(byte[] response)
response - PLC返回的报文信息Copyright © 2022. All rights reserved.