Class: TimexDatalinkClient::Protocol3::SoundTheme
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol3::SoundTheme
- Defined in:
- lib/timex_datalink_client/protocol_3/sound_theme.rb
Constant Summary collapse
- CPACKET_SECT =
[0x90, 0x03]
- CPACKET_DATA =
[0x91, 0x03]
- CPACKET_END =
[0x92, 0x03]
- CPACKET_DATA_LENGTH =
32
- SOUND_DATA_HEADER =
"\x25\x04\x19\x69"
Instance Attribute Summary collapse
-
#spc_file ⇒ Object
Returns the value of attribute spc_file.
Instance Method Summary collapse
-
#initialize(sound_theme_data: nil, spc_file: nil) ⇒ SoundTheme
constructor
Create a SoundTheme instance.
-
#packets ⇒ Array<Array<Integer>>
Compile packets for a sound theme.
Methods included from Helpers::CpacketPaginator
Constructor Details
#initialize(sound_theme_data: nil, spc_file: nil) ⇒ SoundTheme
Create a SoundTheme instance.
26 27 28 29 |
# File 'lib/timex_datalink_client/protocol_3/sound_theme.rb', line 26 def initialize(sound_theme_data: nil, spc_file: nil) @sound_theme_data = sound_theme_data @spc_file = spc_file end |
Instance Attribute Details
#spc_file ⇒ Object
Returns the value of attribute spc_file.
19 20 21 |
# File 'lib/timex_datalink_client/protocol_3/sound_theme.rb', line 19 def spc_file @spc_file end |
Instance Method Details
#packets ⇒ Array<Array<Integer>>
Compile packets for a sound theme.
34 35 36 |
# File 'lib/timex_datalink_client/protocol_3/sound_theme.rb', line 34 def packets [load_sect] + payloads + [CPACKET_END] end |