Comments (4)
Nice, thanks !
We should protect the buffer write functions before using them, for example here FC6 we should check if values are valid int8
and uint16
before continue to send them to the device.
Can you make a pull request that add this sanity checks before using the buffer write functions ?
from node-modbus-serial.
I am really new to using node nor has I ever done that so I am not entirely sure how to do that actually
from node-modbus-serial.
I am not entirely sure how to do that actually
Before using the address
variable we need to sanity check it ...
Something like this:
// sanity check
if (typeof address === 'undefined' || typeof dataAddress === 'undefined' || typeof value === 'undefined') {
if (next) next(new PortNotOpenError());
return;
}
from node-modbus-serial.
closed by: #121
from node-modbus-serial.
Related Issues (20)
- ServerSerial usage? HOT 1
- Can not listen the "data" event
- ModbusRTU returns ETIMEDOUT even for invalid addresses HOT 3
- Swapped float point HOT 14
- Help needed with register addresses. HOT 1
- ModbusRTU instance emits error events
- Standard modbus programs work but mine doesn't
- Help needed ECONNREFUSED HOT 2
- Illegal invocation (linux)
- Short requests (invalid length) can cause uncaught exceptions
- Latest version does not compile? HOT 8
- Why is the npm package name modbus-serial? HOT 1
- An abstraction layer over the modbus protocol HOT 2
- Port Not Open HOT 2
- Error after updating to 8.0.15 HOT 3
- Usage of isDebugEnabled to check the PDU raw data HOT 3
- Modbus TCP Connection was closed after 100 Seconds of Inactivity HOT 1
- ServerTCP causes uncaught exception if listen fails
- Permission denied, cannot open /dev/ttyUSB0
- Open-close function HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-modbus-serial.