Example #1
0
        public async Task SendValueAsync(string streamId, DataPointType value)
        {
            // Send DataPointType values
            OmfDataMessage dataMessage = OmfMessageCreator.CreateDataMessage(streamId, value);

            await SendOmfMessageAsync(dataMessage);

            Console.WriteLine($"Sent data point: Time: {value.Timestamp}, Value: {value.Value}");
        }
Example #2
0
        public async Task SendValueAsync(string streamId, DataPointType value)
        {
            if (value == null)
            {
                throw new ArgumentException("Value cannot be null.", nameof(value));
            }

            // Send DataPointType values
            OmfDataMessage dataMessage = OmfMessageCreator.CreateDataMessage(streamId, value);

            await SendOmfMessageAsync(dataMessage).ConfigureAwait(false);

            Console.WriteLine($"Sent data point: Time: {value.Timestamp}, Value: {value.Value}");
        }
Example #3
0
 /// <summary>
 /// Sends OMF data messages for a dictionary of OMF data keyed by the stream ID to the configured OMF endpoints
 /// </summary>
 /// <typeparam name="T">OMF type of the OMF data to be sent</typeparam>
 /// <param name="data">Dictionary of OMF data keyed by the stream ID</param>
 internal void SendOmfData <T>(Dictionary <string, IEnumerable <T> > data)
 {
     SendOmfMessage(OmfMessageCreator.CreateDataMessage(data));
 }