4 Commits

Author SHA1 Message Date
89b8775ce3 Add support for specifying the sender id to each call
This parameter is optional, so compatibility shouldn't be affected. Each SLMessage can set its own sender ID which is present on the returned message. This allows callers to fire multiple requests at once, even of the same type, while being able to identify which response went with which request. If not specified, the default value is 0.

Also went ahead and documented some of the helper functions present on SLMessage (so, available on all message instances).

Finally, since I was in and messing with each message anyway, I simplified and removed some repeated code from each derived message and had it call into the super to take advantage of shared decoding functionality.

The lambdas ("arrow functions") in test functions were removed per advice from Mocha's documentation where the implicit `this` rebinding can apparently cause problems. This should probably have been its own commit, but, again, I was already in there messing with stuff, so...oh well.

Closes #43
2020-08-11 22:20:58 -05:00
ee30cd815e GetPumpStatus isRPMs changed to bool to be consistent with SetPumpStatus 2020-06-09 08:42:26 -05:00
bf3902efe8 Updated formatting/semantics, added missing event/method documentation 2020-06-09 08:41:15 -05:00
75d642cbfc GetPumpStatus / SetPumpFlow commands (#28)
* added GetPumpStatus / SetPumpFlow commands

* Updated README.md with GetPumpStatus / SetPumpFlow information

* rename `setPointType` to `isRPMs`

* renamed val0 to pumpType and val1 to isRunning

* added `unknown command` case

* fixed lint error

* Renamed unknown values to pumpUnknown1 and pumpUnknown2

* renamed 30 to unknownCommand
2020-06-09 07:49:24 -05:00