chrisdutz commented on issue #1626:
URL: https://github.com/apache/plc4x/issues/1626#issuecomment-2478847685
Well as I said ... it's already there ... and I would love to avoid doing
some file operation to load something ... I'm currently updating the driver to
make use of this function:
```
protected Optional<AdsDataTypeTableEntry> getDataTypeTableEntry(String
name) {
if(dataTypeTable.containsKey(name)) {
return Optional.of(dataTypeTable.get(name));
}
try {
AdsDataType adsDataType = AdsDataType.valueOf(name);
// !It seems that the dataType value differs from system to
system,
// !However, we never really seem to use that value, so I would
say it doesn't matter.
return Optional.of(new AdsDataTypeTableEntry(
128, 1, 0, 0, adsDataType.getNumBytes(), 0,
adsDataType.getValue(), 0, 0, 0,
adsDataType.name(), "", "",
Collections.emptyList(), Collections.emptyList(), new
byte[0]));
} catch (IllegalArgumentException e) {
return Optional.empty();
}
}
```
--
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]