Class: TimexDatalinkClient::Protocol9::Eeprom
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol9::Eeprom
- Defined in:
- lib/timex_datalink_client/protocol_9/eeprom.rb,
lib/timex_datalink_client/protocol_9/eeprom/chrono.rb,
lib/timex_datalink_client/protocol_9/eeprom/phone_number.rb
Defined Under Namespace
Classes: Chrono, PhoneNumber
Constant Summary collapse
- CPACKET_MEM =
[0x70]
- CPACKET_JMPMEM =
[0x23]
- CPACKET_SECT =
[0x60]
- CPACKET_DATA =
[0x61]
- CPACKET_END =
[0x62]
- SETUP_PACKETS =
[ CPACKET_MEM + [ 0x02, 0x40, 0x05, 0xa9, 0x22, 0x5f, 0xe6, 0xb2, 0xe8, 0xbb, 0xe7, 0xb2, 0xe8, 0xbb, 0xe7, 0xbb, 0xe8, 0xb2, 0xe7, 0xb2, 0x5c, 0xa3, 0x09, 0x26, 0xed, 0x15, 0xa9, 0x01 ], CPACKET_MEM + [0x02, 0x5a, 0xa9, 0x02, 0x14, 0xa9, 0xb6, 0xa9, 0xa4, 0x07, 0x47, 0xb7, 0xa9, 0xcc, 0x74, 0x6f], CPACKET_JMPMEM + [0x02, 0x40] ]
- PAYLOAD_HEADER =
[0x00, 0x0e, 0x00]
- CPACKET_DATA_LENGTH =
27
- START_INDEX =
14
- APPOINTMENT_NO_NOTIFICATION =
0xff
Instance Attribute Summary collapse
-
#chrono ⇒ Object
Returns the value of attribute chrono.
-
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(chrono: nil, phone_numbers: []) ⇒ Eeprom
constructor
Create an Eeprom instance.
-
#packets ⇒ Array<Array<Integer>>
Compile packets for EEPROM data.
Methods included from Helpers::CpacketPaginator
Constructor Details
#initialize(chrono: nil, phone_numbers: []) ⇒ Eeprom
Create an Eeprom instance.
44 45 46 47 |
# File 'lib/timex_datalink_client/protocol_9/eeprom.rb', line 44 def initialize(chrono: nil, phone_numbers: []) @chrono = chrono || self.class.empty_chrono @phone_numbers = phone_numbers end |
Instance Attribute Details
#chrono ⇒ Object
Returns the value of attribute chrono.
37 38 39 |
# File 'lib/timex_datalink_client/protocol_9/eeprom.rb', line 37 def chrono @chrono end |
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
37 38 39 |
# File 'lib/timex_datalink_client/protocol_9/eeprom.rb', line 37 def phone_numbers @phone_numbers end |
Class Method Details
Instance Method Details
#packets ⇒ Array<Array<Integer>>
Compile packets for EEPROM data.
52 53 54 |
# File 'lib/timex_datalink_client/protocol_9/eeprom.rb', line 52 def packets SETUP_PACKETS + [header] + payloads + [CPACKET_END] end |