MATLAB DISTRIBUTED COMPUTING SERVER 4 - SYSTEM ADMINISTRATORS GUIDE Manual do Utilizador Página 48

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 148
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 47
2 Netw ork Administration
The following example shows how to use the Java class inside MATLAB.
Start MATLA B on two machines (e.g.,
host1name and h ost2 name)forwhich
youwanttotestmulticast. IneachMATLABsession,enterthefollowing
commands:
m = com.mathworks.toolbox.distcomp.test.MulticastTester('239.1.1.1', 9999);
m.startSendingThread;
m.startListeningThread;
These instructions cause each MATLAB session to issue a stream of multicas t
test packets, and to listen for test packets. If multicast is working between
the machines, you see a stream of lines like the following:
0 : ho st1n ame : 0
1 : hos t2na me : 0
2 : hos t2na me : 1
3 : hos t2na me : 2
The number on the left in each string is the line number for the received
packet. The text in the center is the host from which the packet is received.
The number on the right is the packet number sent by the sending host. It is
normal for a host to report a test packet from itself.
If either machine does not receiv e a stream of test packets, or if the remote
host is not included in either stream, then multicast communication is not
operating properly.
To terminate the test stream, execute the following in both MATLA B sessions:
m.stopSendingThread;
m.stopListeningThread;
2-30
Vista de página 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 147 148

Comentários a estes Manuais

Sem comentários