public class FanucInterfaceNet extends NetworkDeviceBase implements IReadWriteNet
| 限定符和类型 | 字段和说明 |
|---|---|
int |
ClientId
获取或设置当前客户端的ID信息,默认为1024
Gets or sets the ID information of the current client. |
WordLengthAlienSession, isPersistentConn, IsSocketError, isUseAccountCertificate, LogMsgFormatBinary, simpleHybirdLockCoreSocket, fileCacheSize, LogNet, TokenLogNet| 构造器和说明 |
|---|
FanucInterfaceNet()
实例化一个默认的对象
|
FanucInterfaceNet(String ipAddress,
int port)
指定ip及端口来实例化一个默认的对象,端口默认60008
Specify the IP and port to instantiate a default object, the port defaults to 60008 |
| 限定符和类型 | 方法和说明 |
|---|---|
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(byte select,
int address,
short length)
按照字为单位批量读取设备的原始数据,需要指定数据块地址,偏移地址及长度,主要针对08, 10, 12的数据块,注意地址的起始为1
Read the raw data of the device in batches in units of words. |
OperateResultExOne<byte[]> |
Read(String address) |
OperateResultExOne<byte[]> |
Read(String address,
short length)
按照字为单位批量读取设备的原始数据,需要指定地址及长度,地址示例:D1,AI1,AQ1,共计3个区的数据,注意地址的起始为1
Read the raw data of the device in batches in units of words. |
OperateResultExOne<boolean[]> |
ReadBool(byte select,
int address,
short length)
按照位为单位批量读取设备的原始数据,需要指定数据块地址,偏移地址及长度,主要针对70, 72, 76的数据块,注意地址的起始为1
|
OperateResultExOne<boolean[]> |
ReadBool(String address,
short length)
按照位为单位批量读取设备的原始数据,需要指定地址及长度,地址示例:M1,I1,Q1,共计3个区的数据,注意地址的起始为1
Read the raw data of the device in batches in units of boolean. |
OperateResultExOne<FanucData> |
ReadFanucData()
读取机器人的详细信息,返回解析后的数据类型
Read the details of the robot and return the resolved data type |
OperateResultExOne<short[]> |
ReadGI(int address,
short length)
读取机器人的GI信息
|
OperateResultExOne<short[]> |
ReadGO(int address,
short length)
读取机器人的GO信息
|
OperateResultExOne<boolean[]> |
ReadPMCR2(int address,
short length)
读取机器人的PMCR2信息
|
OperateResultExOne<boolean[]> |
ReadRDI(int address,
short length)
读取机器人的RDI信息
|
OperateResultExOne<boolean[]> |
ReadRDO(int address,
short length)
读取机器人的RDO信息
|
OperateResultExOne<boolean[]> |
ReadSDI(int address,
short length)
读取机器人的SDI信息
Read the SDI information of the robot |
OperateResultExOne<boolean[]> |
ReadSDO(int address,
short length)
读取机器人的SDO信息
Read the SDO information of the robot |
OperateResultExOne<boolean[]> |
ReadSI(int address,
short length)
读取机器人的SI信息
|
OperateResultExOne<boolean[]> |
ReadSO(int address,
short length)
读取机器人的SO信息
|
OperateResultExOne<boolean[]> |
ReadUI(int address,
short length)
读取机器人的UI信息
|
OperateResultExOne<boolean[]> |
ReadUO(int address,
short length)
读取机器人的UO信息
|
String |
toString()
返回当前对象表示的字符串
Returns the string represented by the current object |
OperateResult |
Write(byte select,
int address,
byte[] value)
写入原始的byte数组数据到指定的地址,返回是否写入成功,,需要指定数据块地址,偏移地址,主要针对08, 10, 12的数据块,注意起始的起始为1
Write the original byte array data to the specified address, and return whether the writing is successful. |
OperateResult |
Write(String address,
boolean[] value)
|
OperateResult |
Write(String address,
byte[] value)
写入原始的byte数组数据到指定的地址,返回是否写入成功,地址示例:D1,AI1,AQ1,共计3个区的数据,注意起始的起始为1
Write the original byte array data to the specified address, and return whether the write was successful. |
OperateResult |
WriteBool(byte select,
int address,
boolean[] value)
批量写入
Boolean数组数据,返回是否写入成功,需要指定数据块地址,偏移地址,主要针对70, 72, 76的数据块,注意起始的起始为1 |
OperateResult |
WriteGI(int address,
short[] value)
写入机器人的GI信息
|
OperateResult |
WriteGO(int address,
short[] value)
写入机器人的GO信息
|
OperateResult |
WritePMCR2(int address,
boolean[] value)
写入机器人的PMCR2信息
|
OperateResult |
WriteRDI(int address,
boolean[] value)
写入机器人的RDI信息
|
OperateResult |
WriteRDO(int address,
boolean[] value)
写入机器人的RDO信息
|
OperateResult |
WriteRJoint(int address,
float[] joint,
short UserFrame,
short UserTool)
写入机器人的Joint信息
|
OperateResult |
WriteRXyzwpr(int Address,
float[] Xyzwpr,
short[] Config,
short UserFrame,
short UserTool)
写入机器人的Rxyzwpr信息,谨慎调用,
|
OperateResult |
WriteSDI(int address,
boolean[] value)
写入机器人的SDI信息
Write the SDI information of the robot |
OperateResult |
WriteSDO(int address,
boolean[] value)
写入机器人的SDO信息
Write the SDO information of the robot |
OperateResult |
WriteSO(int address,
boolean[] value)
写入机器人的SO信息
|
OperateResult |
WriteUO(int address,
boolean[] value)
写入机器人的UO信息
|
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, 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, waitConnectClose, getConnectionId, ReadBool, ReadCustomer, ReadDouble, ReadDouble, ReadFloat, ReadFloat, ReadInt16, ReadInt16, ReadInt32, ReadInt32, ReadInt64, ReadInt64, ReadString, ReadString, ReadUInt16, ReadUInt16, ReadUInt32, ReadUInt32, setConnectionId, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, Write, WriteCustomerReadFromCoreServerpublic int ClientId
public FanucInterfaceNet()
public FanucInterfaceNet(String ipAddress, int port)
ipAddress - ip地址port - 端口号protected INetMessage GetNewNetMessage()
NetworkDoubleBaseGetNewNetMessage 在类中 NetworkDoubleBaseprotected OperateResult InitializationOnConnect(Socket socket)
NetworkDoubleBaseInitializationOnConnect 在类中 NetworkDoubleBasesocket - 网络套接字public OperateResultExOne<byte[]> Read(String address)
public OperateResultExOne<byte[]> Read(String address, short length)
Read 在接口中 IReadWriteNetRead 在类中 NetworkDeviceBaseaddress - 起始地址,地址示例:D1,AI1,AQ1,共计3个区的数据,注意起始的起始为1length - 读取的长度,字为单位public OperateResult Write(String address, byte[] value)
Write 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址,地址示例:D1,AI1,AQ1,共计3个区的数据,注意起始的起始为1value - 写入值public OperateResultExOne<boolean[]> ReadBool(String address, short length)
ReadBool 在接口中 IReadWriteNetReadBool 在类中 NetworkDeviceBaseaddress - 起始地址,地址示例:M1,I1,Q1,共计3个区的数据,注意地址的起始为1length - 读取的长度,位为单位public OperateResult Write(String address, boolean[] value)
Boolean数组数据,返回是否写入成功,需要指定起始地址,地址示例:M1,I1,Q1,共计3个区的数据,注意地址的起始为1Boolean array data in batches. If the write success is returned, you need to specify the starting address.
Example address: M1, I1, Q1, a total of 3 areas of data. Note that the starting address is 1.Write 在接口中 IReadWriteNetWrite 在类中 NetworkDeviceBaseaddress - 起始地址,地址示例:M1,I1,Q1,共计3个区的数据,注意地址的起始为1value - 等待写入的数据值public OperateResultExOne<byte[]> Read(byte select, int address, short length)
select - 数据块信息address - 偏移地址length - 读取的长度,字为单位public OperateResult Write(byte select, int address, byte[] value)
select - 数据块信息address - 偏移地址value - 原始数据内容public OperateResultExOne<boolean[]> ReadBool(byte select, int address, short length)
select - 数据块信息address - 偏移地址length - 读取的长度,字为单位public OperateResult WriteBool(byte select, int address, boolean[] value)
Boolean数组数据,返回是否写入成功,需要指定数据块地址,偏移地址,主要针对70, 72, 76的数据块,注意起始的起始为1select - 数据块信息address - 偏移地址value - 原始的数据内容public OperateResultExOne<FanucData> ReadFanucData()
public OperateResultExOne<boolean[]> ReadSDO(int address, short length)
address - 偏移地址length - 读取的长度public OperateResult WriteSDO(int address, boolean[] value)
address - 偏移地址value - 数据值public OperateResultExOne<boolean[]> ReadSDI(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WriteSDI(int address, boolean[] value)
address - 偏移地址value - 数据值public OperateResultExOne<boolean[]> ReadRDI(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WriteRDI(int address, boolean[] value)
address - 偏移地址value - 数据值public OperateResultExOne<boolean[]> ReadUI(int address, short length)
address - 偏移地址length - 读取长度public OperateResultExOne<boolean[]> ReadUO(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WriteUO(int address, boolean[] value)
address - 偏移地址value - 数据值public OperateResultExOne<boolean[]> ReadSI(int address, short length)
address - 偏移地址length - 读取长度public OperateResultExOne<boolean[]> ReadSO(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WriteSO(int address, boolean[] value)
address - 偏移地址value - 数据值public OperateResultExOne<short[]> ReadGI(int address, short length)
address - 偏移地址length - 数据长度public OperateResult WriteGI(int address, short[] value)
address - 偏移地址value - 数据值public OperateResultExOne<short[]> ReadGO(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WriteGO(int address, short[] value)
address - 偏移地址value - 数据值public OperateResultExOne<boolean[]> ReadPMCR2(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WritePMCR2(int address, boolean[] value)
address - 偏移信息value - 数据值public OperateResultExOne<boolean[]> ReadRDO(int address, short length)
address - 偏移地址length - 读取长度public OperateResult WriteRDO(int address, boolean[] value)
address - 偏移地址value - 数据值public OperateResult WriteRXyzwpr(int Address, float[] Xyzwpr, short[] Config, short UserFrame, short UserTool)
Address - 偏移地址Xyzwpr - 姿态信息Config - 设置信息UserFrame - 参考系UserTool - 工具public OperateResult WriteRJoint(int address, float[] joint, short UserFrame, short UserTool)
address - 偏移地址joint - 关节坐标UserFrame - 参考系UserTool - 工具public String toString()
NetworkBasetoString 在类中 NetworkDeviceBaseCopyright © 2022. All rights reserved.