Beispiel #1
0
        /// <summary>
        /// Step to the next data in the streaming database and process it.
        /// </summary>
        /// <param name="bGetSimpleDatum">When <i>true</i>, specifies to create the SimpleDatum for data visualization.</param>
        /// <param name="nWait">Specifies the amount of time in ms. to wait for data.</param>
        /// <returns>A tuple containing the output data Blob and optionally a SimpleDatum for visualization is returned.</returns>
        public Tuple <Blob <T>, SimpleDatum> Step(bool bGetSimpleDatum, int nWait)
        {
            SimpleDatum sd = m_idb.Query(nWait);

            if (sd == null)
            {
                return(null);
            }

            if (typeof(T) == typeof(float))
            {
                m_extension.Run(Extension <T> .FUNCTION.ADDDATA, sd.RealDataF);
            }
            else
            {
                m_extension.Run(Extension <T> .FUNCTION.ADDDATA, sd.RealDataD);
            }

            return(new Tuple <Blob <T>, SimpleDatum>(m_blobOutput, null));
        }
Beispiel #2
0
        /// <summary>
        /// Step to the next data in the streaming database and process it.
        /// </summary>
        /// <param name="bGetSimpleDatum">When <i>true</i>, specifies to create the SimpleDatum for data visualization.</param>
        /// <param name="nWait">Specifies the amount of time in ms. to wait for data.</param>
        /// <returns>A tuple containing the output data Blob and optionally a SimpleDatum for visualization is returned.</returns>
        public Tuple <Blob <T>, SimpleDatum> Step(bool bGetSimpleDatum, int nWait)
        {
            SimpleDatum sd = m_idb.Query(nWait);

            if (sd == null)
            {
                return(null);
            }

            if (typeof(T) == typeof(float))
            {
                float[] rgParam = sd.RealData.Select(p => (float)p).ToArray();
                m_extension.Run(Extension <T> .FUNCTION.ADDDATA, rgParam);
            }
            else
            {
                m_extension.Run(Extension <T> .FUNCTION.ADDDATA, sd.RealData);
            }

            return(new Tuple <Blob <T>, SimpleDatum>(m_blobOutput, null));
        }