Skip to content
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

Fix for issue #151 - Warnings in message decoder test #152

Merged
merged 1 commit into from
Jun 1, 2013
Merged

Fix for issue #151 - Warnings in message decoder test #152

merged 1 commit into from
Jun 1, 2013

Conversation

mstovenour
Copy link
Collaborator

Corrected bug exposed by warning when running MessageDecoder_test.pl. There are still two sets of messages that generate warnings. Those messages are intentionally used because they are not defined in the message definition hashes. It is reasonable to expect warnings given that those messages are not defined. Additional check logic could be added to prevent the warnings and write out error messages but that seems like a little bit overkill for a debug tool.

Corrected bug exposed by warning when running MessageDecoder_test.pl.  There are still two sets of messages that generate warnings.  Those messages are intentionally used because they are not defined in the message definition hashes.  It is reasonable to expect warnings given that those messages are not defined.  Additional check logic could be added to prevent the warnings and write out error messages but that seems like a little bit overkill for a debug tool.
@jame
Copy link
Contributor

jame commented Apr 5, 2013

I was curious as to how you resolved this and had a chance to look today. The only two issues I'm still seeing are as follows:

PLM Message: 025a15aabbcc
Use of uninitialized value in concatenation (.) or string at ../Insteon/MessageDecoder.pm line 520.
Use of uninitialized value in multiplication (*) at ../Insteon/MessageDecoder.pm line 521.
Use of uninitialized value in multiplication (*) at ../Insteon/MessageDecoder.pm line 524.
Use of uninitialized value in multiplication (*) at ../Insteon/MessageDecoder.pm line 524.
         PLM Command: (025a) 
  Undefined Cmd Data: (15aabbcc)

PLM Message: 0274000000
Use of uninitialized value in concatenation (.) or string at ../Insteon/MessageDecoder.pm line 520.
Use of uninitialized value in multiplication (*) at ../Insteon/MessageDecoder.pm line 521.
Use of uninitialized value in multiplication (*) at ../Insteon/MessageDecoder.pm line 524.
Use of uninitialized value in multiplication (*) at ../Insteon/MessageDecoder.pm line 524.
         PLM Command: (0274) 
  Undefined Cmd Data: (000000)

If those are the two you were referring to, should not the module still handle such PLM messages (i.e., undefined commands like those two) without errors? Or is that PLM messages like those two are not actually likely to be seen?

@mstovenour
Copy link
Collaborator Author

Those PLM messages will never be seen unless SmartLabs adds a new PLM command in the future (they haven’t added a “PLM” command in the past 8 years). I just added the tests to make sure it didn’t cause the code to abort. If you insist that the tests run clean one option is to remove those two tests J but I hardly think that is warranted here. Another option is to remove the tests all together so that the decoder will be like the remainder of MH (i.e. no tests at all) J

@krkeegan krkeegan merged commit 7cd7f05 into hollie:master Jun 1, 2013
@krkeegan
Copy link
Collaborator

krkeegan commented Jun 1, 2013

Merged as #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants