ModBusTCP with some fixes
Revision 5:1bf121618c2f, committed 2020-12-03
- Comitter:
- kcherneha_aitheon
- Date:
- Thu Dec 03 14:01:33 2020 +0000
- Parent:
- 4:41ee166a0e6c
- Commit message:
- fixed error jump to case label [-fpermissive]
Changed in this revision
ModBus-Req.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ModBus-Req.cpp Fri Jun 30 10:40:06 2017 +0000 +++ b/ModBus-Req.cpp Thu Dec 03 14:01:33 2020 +0000 @@ -41,6 +41,7 @@ switch(fc) { case 0x04: //return mb_read_register(data_in, length); + { //Read Requet received // Getting Start Address and Length @@ -69,11 +70,15 @@ _handler[i].funcCgiRead(id, start_adress, number_of_registers); break; + } case 0x10: //return mb_write_register(data_in, length); + { break; - - default: mb_exception_handler(id, buffer, size, 0x01); - + } + default: + { + mb_exception_handler(id, buffer, size, 0x01); + } } }