| | |
| | | // 扫码器:每站点16字节,String[14] |
| | | BARCODE("DB101", 0, 16), |
| | | // 称重:每站点4字节,Float |
| | | WEIGHT("DB102", 0, 4), |
| | | WEIGHT("DB102", 0, 4), |
| | | // 尺寸异常:每站点2字节,Bit数组 |
| | | DIMENSION_WORD("DB103", 0, 2); |
| | | |
| | |
| | | private final int offset; |
| | | private final int byteLength; |
| | | |
| | | DeviceField(String addressPattern, int offset, int byteLength) { |
| | | DeviceField(String addressPattern, int offset, int byteLength) { |
| | | this.addressPattern = addressPattern; |
| | | this.offset = offset; |
| | | this.byteLength = byteLength; |
| | |
| | | |
| | | /** |
| | | * 根据 DB 块编号和站点偏移生成具体地址 |
| | | * @param dbBlock DB块编号 |
| | | * |
| | | * @param dbBlock DB块编号 |
| | | * @param stationBaseOffset 站点基址偏移(站点号*站点长度) |
| | | * @return PLC4X 地址字符串,如 "DB100.DBD0" |
| | | */ |