示例#1
0
        private static void TesterUT_SystemReport(object sender, SystemReport pdu)
        {
            Marshall.User("        GPS_FixedSeconds: {0}", pdu.GPS_FixedSeconds);
            Marshall.User("        GPS_BlindSeconds: {0}", pdu.GPS_BlindSeconds);
            Marshall.User("        GPS_Resets: {0}", pdu.GPS_Resets);
            Marshall.User("        MODEM_Resets: {0}", pdu.MODEM_Resets);
            Marshall.User("        NETWORK_UDP_ReceivedBytes: {0}", pdu.NETWORK_UDP_ReceivedBytes);
            Marshall.User("        NETWORK_UDP_SentBytes: {0}", pdu.NETWORK_UDP_SentBytes);
            Marshall.User("        NETWORK_UDP_ReceivedDgrams: {0}", pdu.NETWORK_UDP_ReceivedDgrams);
            Marshall.User("        NETWORK_UDP_SentDgrams: {0}", pdu.NETWORK_UDP_SentDgrams);
            Marshall.User("        NETWORK_Resets: {0}", pdu.NETWORK_Resets);
            Marshall.User("        WatchDogResets: {0}", pdu.WatchDogResets);
            Marshall.User("        SystemResets: {0}", pdu.SystemResets);
            Marshall.User("System Report: ");
            if (fs == null)
            {
                return;
            }
            var report = String.Format("{0:yyyyMMddhhmmss},{1},{2},{3},{4},{5}\r\n",
                                       DateTime.Now, pdu.IdDispositivo, pdu.NETWORK_UDP_ReceivedBytes,
                                       pdu.NETWORK_UDP_ReceivedDgrams, pdu.NETWORK_UDP_SentBytes,
                                       pdu.NETWORK_UDP_SentDgrams);
            var buff = Encoding.ASCII.GetBytes(report);

            fs.BeginWrite(buff, 0, buff.GetLength(0), TesterUT_SystemReport_Commit, null);
        }
示例#2
0
 internal void TesterUT_RFIDDetected(object sender, RFIDDetectado pdu)
 {
     foreach (string s in pdu.TraceFull())
     {
         Marshall.User(s);
     }
     Marshall.User("**** RFID recibido:");
 }
示例#3
0
 internal void TesterUT_AutoReport(object sender, Posicion pdu)
 {
     foreach (string s in pdu.TraceFull())
     {
         Marshall.User(s);
     }
     Marshall.User("**** Autoreporte recibido:");
 }
示例#4
0
 private void TesterUT_ExcesoVelocidad(object sender, ExcesoVelocidad pdu)
 {
     if (pdu.CL == 0x01)
     {
         Marshall.User("El dispositivo {0} exedio la velocida maxima velocidad={1}", pdu.IdDispositivo,
                       pdu.VelocidadMaximaAlcanzada);
     }
     else
     {
         Marshall.User("El dispositivo {0} vuelve a velocidad normal. la velocida maxima velocidad alcanzada={1}", pdu.IdDispositivo, pdu.VelocidadMaximaAlcanzada);
     }
 }
示例#5
0
        private void flashIt_Click_1(object sender, EventArgs e)
        {
            var d = Devices.i().Find(Convert.ToInt16(flashIt.Tag));

            if (d != null)
            {
                ut.FlashOverTheAir(d.Id, firmwareBinaryFilename, Convert.ToInt32(nud_pagina.Value));
                flashIt.Text = String.Format("Flashar Dispositivo id={0}", (object[])flashIt.Tag);
                return;
            }
            Marshall.User("No se encontro el dispositivo seleccionado para Flashear: {0}", flashIt.Tag.ToString());
        }
示例#6
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         var d = listBox1.SelectedItem as Device;
         if (d != null)
         {
             Marshall.User("Dispositivo Seleccionado para Flashear: {0}", d.ToString());
             flashIt.Tag     = d.Id;
             flashIt.Text    = String.Format("Flashar Dispositivo id={0}", d.Id);
             flashIt.Enabled = true;
             return;
         }
     }
     flashIt.Text    = "Debe seleccionar un Dispositivo";
     flashIt.Enabled = false;
 }
示例#7
0
 public TesterUT()
 {
     try
     {
         string filename = String.Format("{0}\\systemreport.csv", Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase));
         filename = filename.Substring(6);
         Marshall.User(filename);
         fs            = File.Open(filename, FileMode.Append, FileAccess.Write, FileShare.Read);
         SystemReport += TesterUT_SystemReport;
     }
     catch (Exception e)
     {
         Marshall.Error(String.Format("SYSTEM REPORT DESHABILITADO!!! ERROR={0}", e));
     }
     AutoReport      += TesterUT_AutoReport;
     RFIDDetected    += TesterUT_RFIDDetected;
     ExcesoVelocidad += TesterUT_ExcesoVelocidad;
 }
示例#8
0
 internal static void TesterUT_SystemReport_Commit(IAsyncResult state)
 {
     Marshall.User("System Report Commited!");
     fs.EndWrite(state);
     fs.Flush();
 }
示例#9
0
 private void devicesTree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     Marshall.User("Nodo Seleccionado: {0}{1}", e.Node.Name, "");
     selected_device = devices_by_imei[e.Node.Name];
     UpdatePanel(selected_device);
 }