public class ModbusAddress extends DeviceAddressBase
| 构造器和说明 |
|---|
ModbusAddress()
实例化一个默认的对象
Instantiate a default object
|
ModbusAddress(String address)
实例化一个对象,使用指定的地址初始化
Instantiate an object, initialize with the specified address
|
ModbusAddress(String address,
byte function)
实例化一个对象,使用指定的地址及功能码初始化
Instantiate an object and initialize it with the specified address and function code
|
ModbusAddress(String address,
byte station,
byte function)
实例化一个对象,使用指定的地址,站号,功能码来初始化
Instantiate an object, use the specified address, station number, function code to initialize
|
| 限定符和类型 | 方法和说明 |
|---|---|
ModbusAddress |
AddressAdd()
地址偏移1,返回一个新的地址对象
The address is offset by 1 and a new address object is returned
|
ModbusAddress |
AddressAdd(int value)
地址偏移指定的位置,返回一个新的地址对象
The address is offset by the specified position and a new address object is returned
|
int |
getFunction()
获取当前地址携带的功能码
Get the function code carried by the current address
|
int |
getStation()
获取当前地址的站号信息
Get the station number information of the current address
|
void |
Parse(String address)
解析字符串的地址
Parse the address of the string
|
void |
setFunction(int function)
设置当前地址携带的功能码
Set the function code carried by the current address
|
void |
setStation(int station)
设置当前地址的站号信息
Set the station number information of the current address
|
String |
toString()
返回表示当前对象的字符串
|
getAddress, setAddresspublic ModbusAddress()
public ModbusAddress(String address)
address - 传入的地址信息,支持富地址,例如s=2;x=3;100public ModbusAddress(String address, byte function)
address - 传入的地址信息,支持富地址,例如s=2;x=3;100function - 默认的功能码信息public ModbusAddress(String address, byte station, byte function)
address - 传入的地址信息,支持富地址,例如s=2;x=3;100station - 站号信息function - 默认的功能码信息public int getStation()
public void setStation(int station)
station - 站号信息public int getFunction()
public void setFunction(int function)
function - 功能码public void Parse(String address)
DeviceAddressBaseParse 在类中 DeviceAddressBaseaddress - 地址信息public String toString()
DeviceAddressBasetoString 在类中 DeviceAddressBasepublic ModbusAddress AddressAdd(int value)
value - 数据值信息public ModbusAddress AddressAdd()
Copyright © 2022. All rights reserved.