Interface Doc

    • Method Detail

      • of

        static OpenemsTypeDoc<?> of​(OpenemsType type)
        Create a Channel-Doc with a specific OpenemsType.

        use like this:

         Doc.of(OpenemsType.INTEGER)
         
        Parameters:
        type - the OpenemsType
        Returns:
        an instance of OpenemsTypeDoc
      • of

        static EnumDoc of​(OptionsEnum[] options)
        Create a Channel-Doc with specific options defined by an OptionsEnum.

        use like this:

         Doc.of([YourOptionsEnum].values())
         
        Parameters:
        options - the possible options as an OptionsEnum
        Returns:
        an instance of EnumDoc
      • getType

        OpenemsType getType()
        Gets the OpenemsType.
        Returns:
        the OpenemsType
      • getAccessMode

        AccessMode getAccessMode()
        Gets the 'Access-Mode' information.
        Returns:
        the AccessMode
      • getUnit

        Unit getUnit()
        Gets the Unit. Defaults to NONE.
        Returns:
        the unit
      • getPersistencePriority

        PersistencePriority getPersistencePriority()
        Gets the Persistence Priority. Defaults to VERY_LOW.

        This parameter may be used by persistence services to decide, if the Channel should be persisted to the hard disk.

        Returns:
        the PersistencePriority
      • text

        Doc text​(java.lang.String text)
        Sets the descriptive text. Defaults to an empty string.
        Parameters:
        text - the text
        Returns:
        myself
      • getText

        java.lang.String getText()
        Gets the descriptive text. Defaults to empty String.
        Returns:
        the text
      • isDebug

        boolean isDebug()
        Is the more verbose debug mode activated?.
        Returns:
        true for debug mode
      • createChannelInstance

        <C extends Channel<?>> C createChannelInstance​(OpenemsComponent component,
                                                       ChannelId channelId)
        Creates an instance of Channel for the given Channel-ID using its Channel-AbstractDoc.
        Type Parameters:
        C - the type of the Channel
        Parameters:
        component - the OpenemsComponent
        channelId - the Channel-ID
        Returns:
        the Channel