Campbell-scientific Java PakBus Software Development Kit Manual do Utilizador Página 23

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 30
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 22
Java PakBus® Software Development Kit
import java.io.IOException;
import com.campbellsci.pakbus.*;
import java.io.*;
import java.net.*;
public class Example6_3
implements SendFileClient, FileControlClient, GetProgStatsClient
{
public Example6_3(
String[] args) throws Exception
{
if(args.length < 4)
throw new Exception("Not enough arguments");
complete = false;
} // constructor
public void on_complete(SendFileTran transaction, int outcome)
throws Exception
{
if(outcome == SendFileTran.outcome_success)
{
datalogger.add_transaction(
new FileControlTran(
this,
FileControlTran.command_stop_delete_compile_power_up,
program_name));
}
else
{
System.out.println("File send failed: " + outcome);
complete = true;
}
} // on_complete
public boolean on_progress(
SendFileTran transaction,
int bytes_to_send,
int bytes_sent)
{
System.out.println("Sent " + bytes_sent + " bytes of " +
bytes_to_send);
return true;
} // on_progress
public void on_complete(
FileControlTran transaction,
int outcome,
int hold_off) throws Exception
{
if(outcome == FileControlTran.outcome_success)
{
// The datalogger is going to reset itself. This
// example is written assuming
// that we are connected directly to the logger with
// TCP. Because of that, we
// need to close the current link to the logger and
// wait for the time period
15
Vista de página 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 29 30

Comentários a estes Manuais

Sem comentários

3d-robotics Video Benutzerhandbücher

Beginnend mit G

Klicken Sie auf den Alphabet unten, um zur vollständigen Liste der Modelle zu gelangen, die mit diesem Buchstaben beginnen

Modelle Dokumententyp
GoPro HERO3 stabilization system
Bedienungsanleitung   3D Robotics GoPro HERO3 stabilization system User Manual, 4 Seiten