Class: OpenHAB::Core::Things::ThingType
- Inherits:
-
AbstractDescriptionType
- Object
- AbstractDescriptionType
- OpenHAB::Core::Things::ThingType
- Defined in:
- lib/openhab/core/things/thing_type.rb
Overview
ThingType contains a list of channel group definitions, channel definitions and further meta information.
This description is used as template definition for the creation of the according concrete Thing object.
Instance Attribute Summary collapse
- #category ⇒ String? readonly
- #channel_definitions ⇒ Array<ChannelDefinition> readonly
- #channel_group_definitions ⇒ Array<ChannelGroupDefinition> readonly
- #listed? ⇒ true, false readonly
- #properties ⇒ Hash<String, String> readonly
- #supported_bridge_type_uids ⇒ Array<String> readonly
- #uid ⇒ ChannelGroupTypeUID readonly
Attributes inherited from AbstractDescriptionType
Instance Method Summary collapse
Instance Attribute Details
#category ⇒ String? (readonly)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openhab/core/things/thing_type.rb', line 34 class ThingType < AbstractDescriptionType class << self # @!visibility private def registry @registry ||= OSGi.service("org.openhab.core.thing.type.ThingTypeRegistry") end end # @!attribute [r] listed? # @return [true, false] alias_method :listed?, :is_listed # @return [String] def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end |
#channel_definitions ⇒ Array<ChannelDefinition> (readonly)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openhab/core/things/thing_type.rb', line 34 class ThingType < AbstractDescriptionType class << self # @!visibility private def registry @registry ||= OSGi.service("org.openhab.core.thing.type.ThingTypeRegistry") end end # @!attribute [r] listed? # @return [true, false] alias_method :listed?, :is_listed # @return [String] def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end |
#channel_group_definitions ⇒ Array<ChannelGroupDefinition> (readonly)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openhab/core/things/thing_type.rb', line 34 class ThingType < AbstractDescriptionType class << self # @!visibility private def registry @registry ||= OSGi.service("org.openhab.core.thing.type.ThingTypeRegistry") end end # @!attribute [r] listed? # @return [true, false] alias_method :listed?, :is_listed # @return [String] def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end |
#listed? ⇒ true, false (readonly)
44 |
# File 'lib/openhab/core/things/thing_type.rb', line 44 alias_method :listed?, :is_listed |
#properties ⇒ Hash<String, String> (readonly)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openhab/core/things/thing_type.rb', line 34 class ThingType < AbstractDescriptionType class << self # @!visibility private def registry @registry ||= OSGi.service("org.openhab.core.thing.type.ThingTypeRegistry") end end # @!attribute [r] listed? # @return [true, false] alias_method :listed?, :is_listed # @return [String] def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end |
#supported_bridge_type_uids ⇒ Array<String> (readonly)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openhab/core/things/thing_type.rb', line 34 class ThingType < AbstractDescriptionType class << self # @!visibility private def registry @registry ||= OSGi.service("org.openhab.core.thing.type.ThingTypeRegistry") end end # @!attribute [r] listed? # @return [true, false] alias_method :listed?, :is_listed # @return [String] def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end |
#uid ⇒ ChannelGroupTypeUID (readonly)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/openhab/core/things/thing_type.rb', line 34 class ThingType < AbstractDescriptionType class << self # @!visibility private def registry @registry ||= OSGi.service("org.openhab.core.thing.type.ThingTypeRegistry") end end # @!attribute [r] listed? # @return [true, false] alias_method :listed?, :is_listed # @return [String] def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end |
Instance Method Details
#inspect ⇒ String
47 48 49 50 51 52 53 |
# File 'lib/openhab/core/things/thing_type.rb', line 47 def inspect r = "#<OpenHAB::Core::Things::ThingType #{uid}" r += " (unlisted)" unless listed? r += " category=#{category.inspect}" if category r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end |
#to_s ⇒ String
56 57 58 |
# File 'lib/openhab/core/things/thing_type.rb', line 56 def to_s uid.to_s end |