While working on this I noticed, we need to update the ReadRequest a bit … When we call “build” on the ReadRequest builder and that passes all address strings to the tag-handler. If there’s only one invalid address, the entire build() call fails.
I think we need to add a: PlcResponseCode getTagResponseCode(String tagName); To check if a tag in the ReadRequest was OK, if it’s not to simply relay that to the result. Or what do you think would be a better solution? Chris Von: Lukas Ott <ott.lukas...@gmail.com> Datum: Sonntag, 22. September 2024 um 15:30 An: dev@plc4x.apache.org <dev@plc4x.apache.org> Betreff: Re: [DISCUSS] Which return code to give for items that don't exist? +1 for "return INVALID_ADDRESS if the address is syntactically invalid and NOT_FOUND, if the address is formally correct, but the resource could not be found." sounds logical and understandable to me. Luk Christofer Dutz <christofer.d...@c-ware.de> schrieb am So., 22. Sept. 2024, 14:38: > Hi all, > > I have been working a bit on streamlining the return results from our > drivers to be a bit more consistent. > Now I noticed that there is quite a huge difference between > INVALID_ADDRESS and NOT_FOUND. > > Most drivers return an INVALID_ADDRESS if for example a symbolic address > is used, and this does not exist on the PLC. > However the address IS valid, it’s just that the PLC can’t find a resource > with that given name. Similar with S7, if I specify a block number that > does not exist or a byte offset that exceeds the size of the block. > > I think we should probably return INVALID_ADDRESS if the address is > syntactically invalid and NOT_FOUND, if the address is formally correct, > but the resource could not be found. > > What do you think? > > Chris > > >