public async Task InitSessionAsync() { await this.ConnectSlaveAsync().ConfigureAwait(false); foreach (var operation in this.config.Operations.Values) { operation.RequestLength = this.RequestSize; operation.Request = new byte[this.RequestSize]; operation.Decoder = DataDecoderFactory.CreateDecoder(operation.FunctionCode, operation.DataType); this.EncodeRead(operation); } }
public DeviceQuery(DriverFactory driverFactory, DataDecoderFactory decoderFactory) { _driverFactory = driverFactory; _decoderFactory = decoderFactory; }