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
v4.0 Checklist #242
Comments
@stefanpoeter I know you have a couple of items you wanted to add to the 4.0 milestone. Any thoughts on those? |
A quick one before Work catches me:
I'll come Back to this |
I added some items to the list. Unfortunatly work gets the better of me right now so I'll won't have much time. |
I have been caught up with work as well. Which function codes did you want to tackle? I have not personally used any outside of the main function codes (1-6, 15, 16), so I am wondering how often they are used... |
- added examples that mimic the original javascript examples. going towards issue #242
makes sure that the private properties - _valuesAsArray - _valuesAsBuffer Always return the correct type and never undefined. Instead of returning undefined, the already existing exception message 'InvalidType_MustBeBufferOrArray' will be thrown. going towards issue #242
@stefanpoeter I completed a couple of the items I wanted to get to such as creating working examples in typescript and making sure that the For the CLI tool, were you thinking of using something like commander? If so, I have created CLI tools in the past and would be more than happy to get started on it. As far as additional function codes, I would assume you are talking about FC 7-8, 11-12, 17, 20-24, etc. as listed here Modbus Application Protocol Spec V1.1b? If so do you want this for 4.0 or for future version such as 4.1? (on a selfish note, I would like to get 4.0 out so that my department can start using the typescript based version in production) |
sorry for the late reply. I would use command for the CLI tools thats right. Regarding the other FCs, if you are in a hurry these can be added in later minor versions. Unfortunatly I am still busy with other projects and there is currently not that much time left for this version on my side. |
Sorry I have been held up with work projects... I added the changes you made from #244 into the 4.0 branch. Just fyi, it won't be as clean of a merge when we bring the 4.0 branch into the master, since the new code base is in typescript. I added a basic cli based on what you were describing. It only does read requests over TCP. The template is there, so if you want to add requests for RTU or write requests feel free. Here are the options when you type Usage: jsmodbus [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
fc01 [options] <host> <unitId> <range> Read Coils
fc02 [options] <host> <unitId> <range> Read Discrete Inputs
fc03 [options] <host> <unitId> <range> Read Holding Registers
fc04 [options] <host> <unitId> <range> Read Input Registers Here are the options for the function calls ( Usage: jsmodbus fc03 [options] <host> <unitId> <range>
Read Holding Registers
Options:
-p, --port <port> Modbus Port (502 by default)
-r, --repeat <time> Repeat interval in milliseconds
-b, --buffer Print output as buffer
-t, --timeout <timeout> connection timeout in milliseconds (2000 by default)
-bm, --benchmark show timestamp benchmark information
-h, --help output usage information |
Hey @alexbuczynsky, since you've been investing some time in this i would say it is more than fair to publish this as 4.0. Since I need some time to get used to typescript I would ask you to take care of issues concerning this version. Is that ok for you? |
And by the way, the CLI looks awesome. Great work. :-) |
I am not sure we need to bring this branch into the master. I would simply tag this as v4.0.0 and I assume npm does the rest. So we do not need to merge this into the master branch. But I'll check that. |
I've just published a v3.1 version from the v3.1-dev branch. It seems to work so the v4.0-dev branch is the place to put your changes in and I'll tag and publish it then. |
What about the Standard Code Style in the README. Is there anything like it for TypeScript? |
However you want to handle the release cycle / branch management is for sure your prerogative. Doesn't matter to me as long as NPM can handle the changes :) Yes, I would be fine helping with issues concerning the 4.0 release. I will probably defer to you on when I am not sure about the underlying original code base in cases where I am not sure how it was originally programmed. Standardjs actually supports typescript allegedly... See here https://standardjs.com/#can-i-use-a-javascript-language-variant-like-flow-or-typescript. We would have to use eslint as the linter and install the plugin as they suggest on their website. I would have to test it out first and then get back to you. |
standardjs plugin for tslint was added and now the code base requires these linting practices to be followed just like the former js code did. references #242
I figured out how to add the linting standards. I am using two packages |
I will run a couple checks to make sure that the npm package will compile both the commander file and the dist code base correctly. I will let you know once I have checked the tarball file is correctly packaged and then I should be good to go on my end. |
Had to add the bin folder to the final package. It should be good to go now! |
It's done :-) |
Wanted to consolidate v4.0 discussions and create a common todo list
Todos:
The text was updated successfully, but these errors were encountered: