Module: MaxCube::Messages::TCP::Serializer::MessageN
- Defined in:
- lib/maxcube/messages/tcp/type/n.rb
Overview
Command to set the Cube into pairing mode with optional
timeout
in seconds.
Constant Summary
- OPT_KEYS =
Optional hash keys.
%i[timeout].freeze
Instance Method Summary collapse
- #serialize_tcp_n(hash) ⇒ Object private
Instance Method Details
#serialize_tcp_n(hash) ⇒ Object (private)
38 39 40 41 |
# File 'lib/maxcube/messages/tcp/type/n.rb', line 38 def serialize_tcp_n(hash) return '' unless hash.key?(:timeout) format('%04x', to_int(0, 'timeout', hash[:timeout])) end |