Ejemplo n.º 1
0
        /// <summary>
        /// Get dataset message content mask
        /// </summary>
        /// <param name="mask"></param>
        /// <returns></returns>
        private static UadpDataSetMessageContentMask ToUadpStackType(this DataSetContentMask mask)
        {
            var result = UadpDataSetMessageContentMask.None;

            if (0 != (mask & DataSetContentMask.Timestamp))
            {
                result |= UadpDataSetMessageContentMask.Timestamp;
            }
            if (0 != (mask & DataSetContentMask.PicoSeconds))
            {
                result |= UadpDataSetMessageContentMask.PicoSeconds;
            }
            if (0 != (mask & DataSetContentMask.Status))
            {
                result |= UadpDataSetMessageContentMask.Status;
            }
            if (0 != (mask & DataSetContentMask.SequenceNumber))
            {
                result |= UadpDataSetMessageContentMask.SequenceNumber;
            }
            if (0 != (mask & DataSetContentMask.MinorVersion))
            {
                result |= UadpDataSetMessageContentMask.MinorVersion;
            }
            if (0 != (mask & DataSetContentMask.MajorVersion))
            {
                result |= UadpDataSetMessageContentMask.MajorVersion;
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get dataset message content mask
        /// </summary>
        /// <param name="mask"></param>
        /// <returns></returns>
        private static JsonDataSetMessageContentMask ToJsonStackType(this DataSetContentMask mask)
        {
            var result = JsonDataSetMessageContentMask.None;

            if (0 != (mask & DataSetContentMask.Timestamp))
            {
                result |= JsonDataSetMessageContentMask.Timestamp;
            }
            if (0 != (mask & DataSetContentMask.Status))
            {
                result |= JsonDataSetMessageContentMask.Status;
            }
            if (0 != (mask & DataSetContentMask.MetaDataVersion))
            {
                result |= JsonDataSetMessageContentMask.MetaDataVersion;
            }
            if (0 != (mask & DataSetContentMask.SequenceNumber))
            {
                result |= JsonDataSetMessageContentMask.SequenceNumber;
            }
            if (0 != (mask & DataSetContentMask.DataSetWriterId))
            {
                result |= JsonDataSetMessageContentMask.DataSetWriterId;
            }
            return(result);
        }