Class: MqttMessageEvent

Inherits:
Event
  • Object
show all
Defined in:
src/events/mqtt_message_event.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#app

Instance Method Summary collapse

Methods inherited from Event

#message?, #reaction?

Instance Attribute Details

#dataString (readonly)

Returns the MQTT message, as a string

Returns:

  • (String)

    the MQTT message, as a string



6
7
8
# File 'src/events/mqtt_message_event.rb', line 6

def data
  @data
end

#topicString (readonly)

Returns the topic this MQTT message was sent on

Returns:

  • (String)

    the topic this MQTT message was sent on



3
4
5
# File 'src/events/mqtt_message_event.rb', line 3

def topic
  @topic
end

Instance Method Details

#mqtt_message?true

Is this an MQTT message?

Returns:

  • (true)


19
20
21
# File 'src/events/mqtt_message_event.rb', line 19

def mqtt_message?
  true
end