Class: SDN::Message::UnknownMessage
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::UnknownMessage
- Defined in:
- lib/sdn/message.rb
Overview
messages after this point were decoded from UAI+ communication and may be named wrong
Direct Known Subclasses
ILT2::PostMotorSettings, ILT2::SetMotorLimits, ILT2::SetMotorSettings, PostNetworkLock
Instance Attribute Summary collapse
-
#msg ⇒ Object
Returns the value of attribute msg.
-
#params ⇒ Object
Returns the value of attribute params.
Attributes inherited from SDN::Message
#ack_requested, #dest, #node_type, #src
Instance Method Summary collapse
- #class_inspect ⇒ Object
-
#initialize(params = [], **kwargs) ⇒ UnknownMessage
constructor
A new instance of UnknownMessage.
- #serialize ⇒ Object
Methods inherited from SDN::Message
#==, expected_response?, inherited, #inspect, parse
Methods included from Helpers
#checksum, #from_number, #from_string, #is_group_address?, #node_type_from_number, #node_type_to_number, #node_type_to_string, #parse_address, #print_address, #to_number, #to_string, #transform_param
Constructor Details
#initialize(params = [], **kwargs) ⇒ UnknownMessage
Returns a new instance of UnknownMessage.
178 179 180 181 |
# File 'lib/sdn/message.rb', line 178 def initialize(params = [], **kwargs) super(**kwargs) self.params = params end |
Instance Attribute Details
#msg ⇒ Object
Returns the value of attribute msg.
176 177 178 |
# File 'lib/sdn/message.rb', line 176 def msg @msg end |
#params ⇒ Object
Returns the value of attribute params.
176 177 178 |
# File 'lib/sdn/message.rb', line 176 def params @params end |
Instance Method Details
#class_inspect ⇒ Object
191 192 193 194 195 196 197 198 199 200 |
# File 'lib/sdn/message.rb', line 191 def class_inspect result = if self.class == UnknownMessage result = ", @msg=%02xh" % msg else super || "" end return result if params.empty? result << ", @params=#{params.map { |b| "%02x" % b }.join(' ')}" end |
#serialize ⇒ Object
185 186 187 188 189 |
# File 'lib/sdn/message.rb', line 185 def serialize # prevent serializing something we don't know raise NotImplementedError unless params super end |