Ejemplo n.º 1
0
 /// <summary>
 /// This will run when connecting to LoggerNet fails
 /// </summary>
 /// <param name="failure_code"></param>
 private void dataLoggerServerConnectionFailed(CSIDATALOGGERLib.server_failure_type failure_code)
 {
     logResponse("- The connection to the LoggerNet server failed. Failure code: " + failure_code);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This will run when a program that was being sent to the data logger is complete.
 /// This means that the program will be sent & compiled.
 /// 
 /// If the send action failed, we will have the response code and compile result.
 /// </summary>
 /// <param name="successful"></param>
 /// <param name="response_code"></param>
 /// <param name="compile_result"></param>
 private void dataLoggerProgramSentComplete(bool successful, CSIDATALOGGERLib.prog_send_outcome_type response_code, string compile_result)
 {
     if (successful)
     {
         logResponse("+ Successfully sent the program. Complete event.");
     }
     else
     {
         logResponse("- Could not send the program. Response code: " + response_code+ ". Compile result: " + compile_result + ".");
     }
     SentFileArgs fsArgs = new SentFileArgs(successful, response_code, compile_result);
     SentFile(this, fsArgs);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// This will run when we could not connect to a data logger.
 /// </summary>
 private void dataLoggerConnectionFailure(CSIDATALOGGERLib.logger_failure_type fail_code)
 {
     logResponse("- The connection to the logger " + dataLogger.loggerName +" was not successful. Failure code: " + fail_code);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// This will run when whaaat?
 /// </summary>
 private void dataLoggerClockCompleted(bool successful, CSIDATALOGGERLib.clock_outcome_type response_code, DateTime current_date)
 {
     try
     {
         if (successful)
         {
             logResponse("+ Successfully synced clocks to " + current_date + ".");
             // throw event Clock Sync Ok
         }
         else
         {
             logResponse("- Could not get/set clock from data logger. Error code: " + response_code + ".");
             // throw event Clock Sync Failed
         }
         ClockSyncArgs csArgs = new ClockSyncArgs(successful, response_code, current_date);
         ClockSync(this, csArgs);
     }
     catch (Exception excp)
     {
         logResponse("- CSI Datalogger onClockComplete Event : ERROR" + excp.Source + ": " + excp.Message);
         // throw event Clock Sync Failed
     }
 }
Ejemplo n.º 5
0
 public SentFileArgs(bool successful, CSIDATALOGGERLib.prog_send_outcome_type response_code, string compile_result)
 {
     this.successful = successful;
     this.response_code = (int)response_code;
     this.compile_result = compile_result;
 }
Ejemplo n.º 6
0
 public ClockSyncArgs(bool successful, CSIDATALOGGERLib.clock_outcome_type response_code, DateTime current_date)
 {
     this.successful = successful;
     this.current_date = current_date;
     this.response_code = (int)response_code;
 }