You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public TPoint[] ReadPoints(ushort id, ushort numberOfPoints)
{
_logger.LogDebug($"Received request to read registers with Id {id} and number of points {numberOfPoints}");
// this is the start of the register you are reading from
if (!_dataPollingService.DataMappings.TryGetValue(id, out var mapping))
{
throw new SlaveException($"register {id} does not exist in the mappings file.");
}
}
How can I throw an exception with the specific error response code in modbus? I want to differentiate between invalid address and invalid data value?
The text was updated successfully, but these errors were encountered:
I have the following in my custom ISlaveDatStote:
How can I throw an exception with the specific error response code in modbus? I want to differentiate between invalid address and invalid data value?
The text was updated successfully, but these errors were encountered: