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
Currently, the get/set_holdings_from_* and get/set_inputs_from_* functions need to be implemented manually for every one of the supported types if you want a custom ModbusContext. I think default implementations can be provided directly in the trait for the functions handling u8, f32, u64 and u32 since they are repeated usages of the get/set functions for u16.
Additionally, the set/get bulk functions could also have default implementations because they only need to repeatedly call the single read/write functions.
Adding the default implementations will make creating a custom ModbusContext implementation easier. Would you be interested in adding this if I implement the default implementations and made a PR? I can do that if you are.
The text was updated successfully, but these errors were encountered:
Currently, the
get/set_holdings_from_*
andget/set_inputs_from_*
functions need to be implemented manually for every one of the supported types if you want a customModbusContext
. I think default implementations can be provided directly in the trait for the functions handlingu8
,f32
,u64
andu32
since they are repeated usages of theget/set
functions foru16
.Additionally, the set/get bulk functions could also have default implementations because they only need to repeatedly call the single read/write functions.
Adding the default implementations will make creating a custom
ModbusContext
implementation easier. Would you be interested in adding this if I implement the default implementations and made a PR? I can do that if you are.The text was updated successfully, but these errors were encountered: