LaManoServida opened a new issue, #150:
URL: https://github.com/apache/plc4x-extras/issues/150
### What happened?
**Summary:**
When using the same addresses in Plc4xSinkRecordProcessor, feeding it
records containing fields not present in the first record causes them to be
ignored. Only fields from the initial record are written to the PLC. This
behavior seems related to the `SchemaCache`.
**Steps to Reproduce:**
1. Configure the Plc4xSinkRecordProcessor with some tag-address pairs. For
example, via address text:
`{"a": "40001:UINT", "b": "40002:UINT", "c": "40003:UINT", "d":
"40004:UINT"}`
2. Send a record containing a subset of the variables used as tags. For
example:
`[{"a": ${random():mod(65535)}, "b": ${random():mod(65535)}}]`. They are
correctly written to the PLC.
3. Now send another record containing different tags. For example:
`[{"c": ${random():mod(65535)}, "d": ${random():mod(65535)}}]`. These are
not written.
In this case, only "a" and "b" are going to be written hereafter, no matter
which subset of {a, b, c, d} is sent to the processor.
**Additional Context:**
- PLC used: ModbusPal 1.6b (though this issue seems protocol-agnostic, and
was initially found using OPC UA and a real PLC)
- NiFi version: 1.21.0
- PLC4X-extras version: latest commit from develop (57bad90)
**Proposed Fix:**
Change how the `SchemaCache` class manages tags and schemas.
### Version
0.13.0-SNAPSHOT
### Programming Languages
- [X] plc4j
- [ ] plc4go
- [ ] plc4c
- [ ] plc4net
### Protocols
- [ ] AB-Ethernet
- [ ] ADS /AMS
- [ ] BACnet/IP
- [ ] CANopen
- [ ] DeltaV
- [ ] DF1
- [ ] EtherNet/IP
- [ ] Firmata
- [ ] KNXnet/IP
- [X] Modbus
- [X] OPC-UA
- [ ] S7
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]