Commit 39f0a64
committed
fix(opcua): write_data() use 3-arg write_value with data_type_hint + error mapping
Bug fix from review:
- write_data() was calling 2-arg write_value(node_id, value) (bool
return) instead of 3-arg write_value(node_id, value, data_type_hint)
(tl::expected return). This meant writes through standard SOVD
PUT /data/{name} missed the type hint optimization AND collapsed all
errors to generic 502.
- Now matches handle_plc_operations() and execute_operation() which
correctly pass entry->data_type and map WriteError codes to
appropriate HTTP status.
Also: remove redundant `using namespace ros2_medkit_gateway;` inside
the already-open `namespace ros2_medkit_gateway { }` block.1 parent 159efdd commit 39f0a64
1 file changed
Lines changed: 12 additions & 5 deletions
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
747 | 745 | | |
748 | 746 | | |
749 | 747 | | |
750 | | - | |
751 | | - | |
752 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
753 | 760 | | |
754 | 761 | | |
755 | 762 | | |
| |||
0 commit comments