/// <summary> /// Sends a StartStreaming message to a producer. /// </summary> /// <param name="extension">The message header extension.</param> /// <returns>The sent message on success; <c>null</c> otherwise.</returns> public virtual EtpMessage <StartStreaming> StartStreaming(IMessageHeaderExtension extension = null) { var body = new StartStreaming { }; return(SendRequest(body, extension: extension)); }
/// <summary> /// Sends a StartStreaming message to a producer. /// </summary> /// <returns>The message identifier.</returns> public virtual long StartStreaming() { var header = CreateMessageHeader(Protocols.ChannelStreaming, MessageTypes.ChannelStreaming.StartStreaming); var start = new StartStreaming(); ChannelMetadataRecords.Clear(); return(Session.SendMessage(header, start)); }
/// <summary> /// Handles the StartStreaming message from a consumer. /// </summary> /// <param name="header">The message header.</param> /// <param name="startStreaming">The StartStreaming message.</param> protected virtual void HandleStartStreaming(IMessageHeader header, StartStreaming startStreaming) { Notify(OnStartStreaming, header, startStreaming); }
protected override void HandleStartStreaming(IMessageHeader header, StartStreaming startStreaming) { base.HandleStartStreaming(header, startStreaming); var channelMetaData = new List <ChannelMetadataRecord>() { new ChannelMetadataRecord() { Uri = "eml://witsml20/Channel(test)", Id = 1, Indexes = new List <IndexMetadataRecord>() { new IndexMetadataRecord() { IndexKind = ChannelIndexKind.Depth, Interval = new Datatypes.Object.IndexInterval { StartIndex = new IndexValue { Item = 0L }, EndIndex = new IndexValue { Item = 0L }, Uom = "m", DepthDatum = string.Empty, }, Direction = IndexDirection.Increasing, Name = "Depth", }, }, ChannelName = "test", DataType = "double", Uom = "m", Status = ChannelStatusKind.Active, AxisVectorLengths = new int[0], Source = "ETP DevKit", MeasureClass = "TestClass", CustomData = new Dictionary <string, DataValue>(), AttributeMetadata = new AttributeMetadataRecord[0], }, }; ChannelMetadata(header, channelMetaData); var dataItems = new List <DataItem> { new DataItem() { Indexes = new List <IndexValue> { new IndexValue { Item = 0L } }, ChannelId = 1, Value = new DataValue { Item = 1 }, ValueAttributes = new DataAttribute[0], } }; ChannelData(header, dataItems, MessageFlags.MultiPartAndFinalPart); }