Class: TimexDatalinkClient::Protocol4::Eeprom
- Inherits:
-
Object
- Object
- TimexDatalinkClient::Protocol4::Eeprom
- Defined in:
- lib/timex_datalink_client/protocol_4/eeprom.rb,
lib/timex_datalink_client/protocol_4/eeprom/list.rb,
lib/timex_datalink_client/protocol_4/eeprom/anniversary.rb,
lib/timex_datalink_client/protocol_4/eeprom/appointment.rb,
lib/timex_datalink_client/protocol_4/eeprom/phone_number.rb
Defined Under Namespace
Classes: Anniversary, Appointment, List, PhoneNumber
Constant Summary collapse
- CPACKET_CLEAR =
[0x93, 0x01]
- CPACKET_SECT =
[0x90, 0x01]
- CPACKET_DATA =
[0x91, 0x01]
- CPACKET_END =
[0x92, 0x01]
- CPACKET_DATA_LENGTH =
32
- START_ADDRESS =
0x0236
- APPOINTMENT_NO_NOTIFICATION =
0xff
Instance Attribute Summary collapse
-
#anniversaries ⇒ Object
Returns the value of attribute anniversaries.
-
#appointment_notification ⇒ Object
Returns the value of attribute appointment_notification.
-
#appointments ⇒ Object
Returns the value of attribute appointments.
-
#lists ⇒ Object
Returns the value of attribute lists.
-
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
Instance Method Summary collapse
-
#initialize(appointments: [], anniversaries: [], phone_numbers: [], lists: [], appointment_notification: APPOINTMENT_NO_NOTIFICATION) ⇒ Eeprom
constructor
Create an Eeprom instance.
-
#packets ⇒ Array<Array<Integer>>
Compile packets for EEPROM data.
Methods included from Helpers::CpacketPaginator
Constructor Details
#initialize(appointments: [], anniversaries: [], phone_numbers: [], lists: [], appointment_notification: APPOINTMENT_NO_NOTIFICATION) ⇒ Eeprom
Create an Eeprom instance.
32 33 34 35 36 37 38 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 32 def initialize(appointments: [], anniversaries: [], phone_numbers: [], lists: [], appointment_notification: APPOINTMENT_NO_NOTIFICATION) @appointments = appointments @anniversaries = anniversaries @phone_numbers = phone_numbers @lists = lists @appointment_notification = appointment_notification end |
Instance Attribute Details
#anniversaries ⇒ Object
Returns the value of attribute anniversaries.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 21 def anniversaries @anniversaries end |
#appointment_notification ⇒ Object
Returns the value of attribute appointment_notification.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 21 def appointment_notification @appointment_notification end |
#appointments ⇒ Object
Returns the value of attribute appointments.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 21 def appointments @appointments end |
#lists ⇒ Object
Returns the value of attribute lists.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 21 def lists @lists end |
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
21 22 23 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 21 def phone_numbers @phone_numbers end |
Instance Method Details
#packets ⇒ Array<Array<Integer>>
Compile packets for EEPROM data.
43 44 45 |
# File 'lib/timex_datalink_client/protocol_4/eeprom.rb', line 43 def packets [CPACKET_CLEAR, header] + payloads + [CPACKET_END] end |