Commit 042458b
committed
other: reportSlaveId: allow slaves to provide custom responses
At present, function code 17, "Report Slave ID" is hardcoded to reply
with a string joined form of the "device identification" fields from
function code 43, subcode 14 (0x2b, 0x0e)
There's nothing that actually implies these should be related. This
change allows slave contexts to provide custom data to return via the
ModbusServerContext property reportSlaveIdData
If this is not provided, the existing fallback to the device
identification fields is used.
Signed-off-by: Karl Palsson <[email protected]>1 parent 93306bc commit 042458b
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
371 | 376 | | |
372 | 377 | | |
373 | 378 | | |
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
377 | | - | |
| 382 | + | |
378 | 383 | | |
379 | 384 | | |
380 | 385 | | |
| |||
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
433 | | - | |
| 438 | + | |
434 | 439 | | |
435 | 440 | | |
436 | 441 | | |
| |||
0 commit comments