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

io.stepfunc.dnp3.Group12Var1 Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
// This library is provided under the terms of a non-commercial license.
// 
// Please refer to the source repository for details:
// 
// https://github.com/stepfunc/dnp3/blob/master/LICENSE.txt
// 
// Please contact Step Function I/O if you are interested in commercial license:
// 
// [email protected]
package io.stepfunc.dnp3;

import org.joou.*;

/**
 * Control Relay Output Block
 */
public final class Group12Var1
{
    /**
     * Control code
     */
    public ControlCode code;
    /**
     * Count
     */
    public UByte count;
    /**
     * Duration the output drive remains active (in milliseconds)
     */
    public UInteger onTime;
    /**
     * Duration the output drive remains non-active (in milliseconds)
     */
    public UInteger offTime;
    /**
     * @param value New value for the 'code' field
     * @return Reference to this instance of the class with the modified value
     */
    public Group12Var1 withCode(ControlCode value)
    {
        this.code = value;
        return this;
    }
    /**
     * @param value New value for the 'count' field
     * @return Reference to this instance of the class with the modified value
     */
    public Group12Var1 withCount(UByte value)
    {
        this.count = value;
        return this;
    }
    /**
     * @param value New value for the 'onTime' field
     * @return Reference to this instance of the class with the modified value
     */
    public Group12Var1 withOnTime(UInteger value)
    {
        this.onTime = value;
        return this;
    }
    /**
     * @param value New value for the 'offTime' field
     * @return Reference to this instance of the class with the modified value
     */
    public Group12Var1 withOffTime(UInteger value)
    {
        this.offTime = value;
        return this;
    }
    
    /**
     * Fully construct {@link Group12Var1} specifying the value of each field
     * 
     * @param code Control code
     * @param count Count
     * @param onTime Duration the output drive remains active (in milliseconds)
     * @param offTime Duration the output drive remains non-active (in milliseconds)
     */
    public Group12Var1(ControlCode code, UByte count, UInteger onTime, UInteger offTime)
    {
            this.code = code;
            this.count = count;
            this.onTime = onTime;
            this.offTime = offTime;
    }
    
    /**
     * Construct a {@link Group12Var1} from a {@link ControlCode}.
     * 
     * 

{@link Group12Var1#count} = 1, {@link Group12Var1#onTime} = 1000 and {@link Group12Var1#offTime} = 1000.

* *

Values are initialized to: *

    *
  • {@link Group12Var1#count} : 1
  • *
  • {@link Group12Var1#onTime} : 1000
  • *
  • {@link Group12Var1#offTime} : 1000
  • *
* * @param code Control code * @return Initialized {@link Group12Var1} instance */ public static Group12Var1 fromCode(ControlCode code) { return new Group12Var1(code, UByte.valueOf(1), UInteger.valueOf(1000L), UInteger.valueOf(1000L)); } void _assertFieldsNotNull() { java.util.Objects.requireNonNull(code, "code cannot be null"); code._assertFieldsNotNull(); java.util.Objects.requireNonNull(count, "count cannot be null"); java.util.Objects.requireNonNull(onTime, "onTime cannot be null"); java.util.Objects.requireNonNull(offTime, "offTime cannot be null"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy