Beispiel #1
0
        public DateTime ParseRtci(MLVTypes.mlv_rtci_hdr_t rtci)
        {
            ushort tm_year = (ushort)(rtci.tm_year + 1900);
            ushort tm_mon  = rtci.tm_mon;
            ushort tm_mday = rtci.tm_mday;
            ushort tm_hour = rtci.tm_hour;
            ushort tm_min  = rtci.tm_min;
            ushort tm_sec  = rtci.tm_sec;

            if (tm_year > 1900 && tm_mon > 0 && tm_mday > 0)
            {
                try
                {
                    return(new DateTime(tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec));
                }
                catch (Exception e)
                {
                }
            }
            else
            {
            }

            return(DateTime.Now);
        }
Beispiel #2
0
 public void HandleBlock(string type, MLVTypes.mlv_rtci_hdr_t header, byte[] raw_data, int raw_pos, int raw_length)
 {
     RtciHeader = header;
 }