Object FunctionCode.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static FunctionCode of(Integer code) Retrieve the FunctionCode instance by its numerical code
      final static FunctionCode forReading(AddressClass addressClass) Retrieve the read FunctionCode instance which can handle the provided AddressClass
      final static FunctionCode forWritingSingle(AddressClass addressClass) Retrieve the writing FunctionCode instance which can handle the provided AddressClass
      final static FunctionCode forWritingMultiple(AddressClass addressClass) Retrieve the writing FunctionCode instance which can handle the provided AddressClass
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • of

         final static FunctionCode of(Integer code)

        Retrieve the FunctionCode instance by its numerical code

        Parameters:
        code - The numerical modbus function code.
        Returns:

        The requested FunctionCode or null if not found

      • forReading

         final static FunctionCode forReading(AddressClass addressClass)

        Retrieve the read FunctionCode instance which can handle the provided AddressClass

        Parameters:
        addressClass - The class of the address for which to retrieve the FunctionCode.
        Returns:

        The FunctionCode(s) that can be used for reading

      • forWritingSingle

         final static FunctionCode forWritingSingle(AddressClass addressClass)

        Retrieve the writing FunctionCode instance which can handle the provided AddressClass

        Parameters:
        addressClass - The class of the address for which to retrieve the FunctionCode.
        Returns:

        The FunctionCode that can be used for writing a single register

      • forWritingMultiple

         final static FunctionCode forWritingMultiple(AddressClass addressClass)

        Retrieve the writing FunctionCode instance which can handle the provided AddressClass

        Parameters:
        addressClass - The class of the address for which to retrieve the FunctionCode.
        Returns:

        The FunctionCode that can be used for writing a single register