Class: TimexDatalinkClient::Protocol4::WristApp
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol4::WristApp
- Defined in:
- lib/timex_datalink_client/protocol_4/wrist_app.rb
Constant Summary collapse
- CPACKET_CLEAR =
[0x93, 0x02]
- CPACKET_SECT =
[0x90, 0x02]
- CPACKET_DATA =
[0x91, 0x02]
- CPACKET_END =
[0x92, 0x02]
- CPACKET_DATA_LENGTH =
32
- WRIST_APP_DELIMITER =
/\xac.*\r\n/n
- WRIST_APP_CODE_INDEX =
18
Instance Attribute Summary collapse
-
#zap_file ⇒ Object
Returns the value of attribute zap_file.
Instance Method Summary collapse
-
#initialize(wrist_app_data: nil, zap_file: nil) ⇒ WristApp
constructor
Create a WristApp instance.
-
#packets ⇒ Array<Array<Integer>>
Compile packets for an alarm.
Methods included from Helpers::CpacketPaginator
Constructor Details
#initialize(wrist_app_data: nil, zap_file: nil) ⇒ WristApp
Create a WristApp instance.
28 29 30 31 |
# File 'lib/timex_datalink_client/protocol_4/wrist_app.rb', line 28 def initialize(wrist_app_data: nil, zap_file: nil) @wrist_app_data = wrist_app_data @zap_file = zap_file end |
Instance Attribute Details
#zap_file ⇒ Object
Returns the value of attribute zap_file.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/wrist_app.rb', line 21 def zap_file @zap_file end |
Instance Method Details
#packets ⇒ Array<Array<Integer>>
Compile packets for an alarm.
36 37 38 |
# File 'lib/timex_datalink_client/protocol_4/wrist_app.rb', line 36 def packets [CPACKET_CLEAR, cpacket_sect] + payloads + [CPACKET_END] end |