Exemple #1
0
        /// <summary>
        /// Looks up point tag from measurement <paramref name="key"/> value.
        /// </summary>
        /// <param name="key"><see cref="MeasurementKey"/> to lookup.</param>
        /// <param name="source">Source metadata.</param>
        /// <returns>Point tag name from source metadata.</returns>
        /// <remarks>
        /// This function uses the <see cref="DataTable.Select(string)"/> function which uses a linear
        /// search algorithm that can be slow for large data sets, it is recommended that any results
        /// for calls to this function be cached to improve performance.
        /// </remarks>
        internal static string TagFromKey(this MeasurementKey key, DataSet source)
        {
            DataRow record = GetMetaData(source, "ActiveMeasurements", $"ID = '{key}'");

            return((object)record == null?key.ToString() : record["PointTag"].ToNonNullString(key.ToString()));
        }
Exemple #2
0
 public ActiveMeasurement()
 {
     m_key    = MeasurementKey.Undefined;
     ID       = m_key.ToString();
     SignalID = m_key.SignalID;
 }