I added the ability to read strings by modifying 'parseReadMessageResponse(data)' method. I add this to the case/ switch: case 672: this.controller_value = data.toString('ascii', 8); break;
See original GitHub issueIssue Description
Current Behavior
Expected Behavior
Possible Solution (Optional)
Context
Steps to Reproduce (for bugs only)
Your Environment
- Package version (Use
npm list
- e.g. 1.0.6): - Node Version (Use
node --version
- e.g. 9.8.0): - Operating System and version:
- Controller Type (eg 1756-L83E/B):
- Controller Firmware (eg 30.11):
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Strings in switch Statements
The switch statement compares the String object in its expression with the expressions associated with each case label as if it were using...
Read more >String in Switch Case in Java - GeeksforGeeks
It provides an easy way to dispatch execution to different parts of code based on the value of the expression. Basically, the expression...
Read more >c++ - Why can't the switch statement be applied to strings?
I vote down because i don't understand how could the compiler knows how to compare 2 string values in if statements but forget...
Read more >node-ethernet-ip - Bountysource
I added the ability to read strings by modifying 'parseReadMessageResponse(data)' method. I add this to the case/ switch: case 672: ...
Read more >Can we use Switch statement with Strings in java?
Each value is called a case, and the variable being switched on is checked for each case. Syntax. switch(expression) { case value :...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
go to ethernet-ip/src/tag/index.js
go to method ‘parseReadMessageResponse(data)’ //Line 304
under the ‘break’ of case BOOL, I added another case
case 672: this.controller_value = data.toString(‘ascii’, 8); break;
any know how to write string?