Class: Sim800c::Commands::ListMessages
- Inherits:
-
Object
- Object
- Sim800c::Commands::ListMessages
show all
- Includes:
- Helpers
- Defined in:
- lib/sim800c/commands/list_messages.rb
Instance Method Summary
collapse
Methods included from Helpers
#at_cmd, #parse_cmgl_response, #read_response, #return_or_raise_error!
Constructor Details
Returns a new instance of ListMessages.
8
9
10
|
# File 'lib/sim800c/commands/list_messages.rb', line 8
def initialize(serial)
@serial = serial
end
|
Instance Method Details
#all ⇒ Object
12
13
14
|
# File 'lib/sim800c/commands/list_messages.rb', line 12
def all
perform_message_query('AT+CMGL="ALL"')
end
|
#read ⇒ Object
20
21
22
|
# File 'lib/sim800c/commands/list_messages.rb', line 20
def read
perform_message_query('AT+CMGL="REC READ"')
end
|
#sent ⇒ Object
28
29
30
|
# File 'lib/sim800c/commands/list_messages.rb', line 28
def sent
perform_message_query('AT+CMGL="STO SENT"')
end
|
#unread ⇒ Object
16
17
18
|
# File 'lib/sim800c/commands/list_messages.rb', line 16
def unread
perform_message_query('AT+CMGL="REC UNREAD"')
end
|
#unsent ⇒ Object
24
25
26
|
# File 'lib/sim800c/commands/list_messages.rb', line 24
def unsent
perform_message_query('AT+CMGL="STO UNSENT"')
end
|