-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add long sms concat info for received sms #73
base: master
Are you sure you want to change the base?
Conversation
add `concat` property for received sms //get Concantion from pdu `smsDict['udh']`
Add `concat` property for `ReceivedSms`: - Get Concantion from pdu `smsDict['udh']` - Update examples/sms_handler_demo.py
@@ -18,7 +18,9 @@ | |||
from gsmmodem.modem import GsmModem | |||
|
|||
def handleSms(sms): | |||
print(u'== SMS message received ==\nFrom: {0}\nTime: {1}\nMessage:\n{2}\n'.format(sms.number, sms.time, sms.text)) | |||
# long sms Concatenation support: reference, parts, number | |||
concat = sms.concat.__dict__ if sms.concat else {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to have this line here?
Could you move this logic to the module?
Just thinking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this process just for print purpose,
in GsmModem, the sms.concat
property will be:
- dict (for long sms)
- None (for normal sms)
I think None
is more clear than {}
for normal sms 's concat
info,
what do you think about it?
There is a small conflict to resolve. Do you feel you can resolve it? (I'm sure you can, the conflicts seem pretty self-explanatory.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your additions!
I have now resolved the merge conflict - if you please could confirm, @yurenchen000, that those changes reflect your proposal.
COPY from faucamp#93
Add
concat
property forReceivedSms
:smsDict['udh']
examples/sms_handler_demo.py
test output of sms_handler_demo.py