Interface ChannelId

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static java.lang.String channelIdCamelToUpper​(java.lang.String name)
      Converts a Channel-ID in UPPER_CAMEL format to the UPPER_UNDERSCORE format.
      static java.lang.String channelIdUpperToCamel​(java.lang.String name)
      Converts a Channel-ID in UPPER_UNDERSCORE format (like from an Enum) to the preferred UPPER_CAMEL format.
      Doc doc()
      Gets the Channel Doc for this ChannelId.
      default java.lang.String id()
      Gets the name in CamelCase.
      java.lang.String name()
      Gets the name in format CaseFormat.UPPER_UNDERSCORE.
      static <T extends java.lang.Enum<T>>
      void
      printChannelIdsForInfluxQuery​(ChannelId[] channelIds)
      Lists all Channel-IDs of the given Channel-ID Enum in a form that is suitable for a InfluxDB-Query in a Grafana Dashboard.
    • Method Detail

      • channelIdUpperToCamel

        static java.lang.String channelIdUpperToCamel​(java.lang.String name)
        Converts a Channel-ID in UPPER_UNDERSCORE format (like from an Enum) to the preferred UPPER_CAMEL format.

        Examples: converts "ACTIVE_POWER" to "ActivePower".

        Special reserved Channel-IDs starting with "_" have a special handling: "_PROPERTY_ENABLED" is converted to "_PropertyEnabled".

        Parameters:
        name - a Channel-ID in UPPER_UNDERSCORE format
        Returns:
        the Channel-ID in UPPER_CAMEL format.
      • channelIdCamelToUpper

        static java.lang.String channelIdCamelToUpper​(java.lang.String name)
        Converts a Channel-ID in UPPER_CAMEL format to the UPPER_UNDERSCORE format.

        Examples: converts "ActivePower" to "ACTIVE_POWER".

        Parameters:
        name - Channel-ID in UPPER_CAMEL format.
        Returns:
        the a Channel-ID in UPPER_UNDERSCORE format
      • printChannelIdsForInfluxQuery

        static <T extends java.lang.Enum<T>> void printChannelIdsForInfluxQuery​(ChannelId[] channelIds)
        Lists all Channel-IDs of the given Channel-ID Enum in a form that is suitable for a InfluxDB-Query in a Grafana Dashboard.

        To create a query, call this function like `ChannelId.printChannelIdsForInfluxQuery(FeneconMiniEss.ServiceInfoChannelId.values());`

        Type Parameters:
        T - the actual type
        Parameters:
        channelIds - the ChannelIds, e.g. from ChannelId.values().
      • name

        java.lang.String name()
        Gets the name in format CaseFormat.UPPER_UNDERSCORE. This is available by default for an Enum.

        Names starting with underscore ("_") are reserved for internal usage.

        Returns:
        the name
      • id

        default java.lang.String id()
        Gets the name in CamelCase.
        Returns:
        the Channel-ID in CamelCase
      • doc

        Doc doc()
        Gets the Channel Doc for this ChannelId.
        Returns:
        the Channel-Doc