Ejemplo n.º 1
0
        /// <summary>
        /// Performs the transmission of time-series data for the <paramref name="export"/>.
        /// </summary>
        /// <param name="export"><see cref="Export"/> whose time-series data os to be transmitted.</param>
        /// <param name="dataToTransmit">Collection of time-series data to be transmitted.</param>
        protected override void TransmitData(Export export, IList <IDataPoint> dataToTransmit)
        {
            // Retrieve the export context.
            ExportContext context = null;

            lock (m_contexts)
            {
                m_contexts.TryGetValue(export.Name, out context);
            }

            // Transmit export data if export context exists and socket is connected.
            if (context != null && context.Socket.CurrentState == ServerState.Running)
            {
                context.TransmitHandler(context, dataToTransmit);
            }
        }