All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.xingshuangs.iot.protocol.s7.service.MultiAddressRead Maven / Gradle / Ivy

package com.github.xingshuangs.iot.protocol.s7.service;


import com.github.xingshuangs.iot.protocol.s7.model.RequestItem;
import com.github.xingshuangs.iot.protocol.s7.utils.AddressUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 地址的包装类
 *
 * @author xingshuang
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class MultiAddressRead {

    /**
     * 请求项列表
     */
    List requestItems = new ArrayList<>();

    public MultiAddressRead addData(String address, int count){
        this.requestItems.add(AddressUtil.parseByte(address, count));
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy