/// <inheritdoc /> /// <summary> /// We just double source vCar parameter values. /// </summary> /// <param name="dataBuffer">The data buffer.</param> /// <returns>Data for output stream.</returns> protected override TelemetryData ProcessData(TelemetryDataBuffer dataBuffer) { var data = dataBuffer.GetData(); var vCar = data.Parameters[0]; // Data can generally be safely modified inline for (var i = 0; i < vCar.AvgValues.Length; i++) { vCar.AvgValues[i] = vCar.AvgValues[i] * 2; } Console.Write("."); return(data); }
/// <summary> /// Processes data here and return new one that would be pushed back to Kafka. /// </summary> /// <param name="dataBuffer">The data buffer.</param> /// <returns></returns> protected abstract TelemetryData ProcessData(TelemetryDataBuffer dataBuffer);