Class: TimexDatalinkClient::Protocol6::Eeprom
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol6::Eeprom
- Defined in:
- lib/timex_datalink_client/protocol_6/eeprom.rb,
lib/timex_datalink_client/protocol_6/eeprom/phone_number.rb
Defined Under Namespace
Classes: PhoneNumber
Constant Summary collapse
- CPACKET_CLEAR =
[0x93, 0x01]
- CPACKET_SECT =
[0x90, 0x01]
- CPACKET_DATA =
[0x91, 0x01]
- CPACKET_END =
[0x92, 0x01]
- CPACKET_DATA_LENGTH =
32
Instance Attribute Summary collapse
-
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
Instance Method Summary collapse
-
#initialize(phone_numbers: []) ⇒ Eeprom
constructor
Create an Eeprom instance.
-
#packets ⇒ Array<Array<Integer>>
Compile packets for EEPROM data.
Methods included from Helpers::LsbMsbFormatter
Methods included from Helpers::CpacketPaginator
Constructor Details
#initialize(phone_numbers: []) ⇒ Eeprom
Create an Eeprom instance.
27 28 29 |
# File 'lib/timex_datalink_client/protocol_6/eeprom.rb', line 27 def initialize(phone_numbers: []) @phone_numbers = phone_numbers end |
Instance Attribute Details
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_6/eeprom.rb', line 21 def phone_numbers @phone_numbers end |
Instance Method Details
#packets ⇒ Array<Array<Integer>>
Compile packets for EEPROM data.
34 35 36 |
# File 'lib/timex_datalink_client/protocol_6/eeprom.rb', line 34 def packets [CPACKET_CLEAR, header] + payloads + [CPACKET_END] end |