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

I see a design fail here #2

Closed
frank-dspeed opened this issue Jun 16, 2017 · 4 comments
Closed

I see a design fail here #2

frank-dspeed opened this issue Jun 16, 2017 · 4 comments

Comments

@frank-dspeed
Copy link

I tested to implament multi devices multi crc on same bus and regonized that this can't work

a Device needs to implament its commands and expected answers as also it needs to send its commands with the right crc checksums

@geloescht
Copy link
Contributor

Thanks for your bug report.
Could you please describe what you expected to work and what didn't work?
Checksums are not implemented yet, if that is what you mean. Please feel free to make a pull request.

@frank-dspeed
Copy link
Author

@geloescht its all ok you solved that via your commandChain Promise. that you execute only one command and so on don't saw it right and it got messed up because i don't understood what you did.

i have done a complet Refactor of this.
we can close this.

@geloescht
Copy link
Contributor

Awesome. I am really interested in expanding this library to support more devices, so if you have any code that you might be able to contribute, please don't hesitate to do so.

@frank-dspeed
Copy link
Author

@geloescht some updates for you we will implament your parser directly into the serialport 5.x+ branches under parsers.cctalk
https://github.com/direktspeed/serialport-parsers-cctalk
serialport/node-serialport#1240

I have only a lot of work i also added complet crc16 support and checksum validation if you create a command from a buffer all this stuff but i need to say that the new version is es7 + so i am not sure if you like that for your lib as you use much functions and prototypes.

i am using normal es6 classes and i am planning to add decorator support for events and commands.

so you can do

@escrow
@corePlus
@BillValidator
class myBillValidator extends CCDevice {}

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

No branches or pull requests

2 participants