Motorola AT Commands G24-L Informações Técnicas Página 59

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 84
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 58
Chapter 5: JAVA API
July 15, 2008 G24 KJAVA Users Guide 5-17
Standard Classes Deviations
Comm Connections
Package: javax.microedition.io.CommConnection.
Description: Handling serial connection.
Three parallel serial ports are available: UART1, UART2 and USB.
See Table 5-5 for Port to Serial mapping.
Server Socket Connection
Package: javax.microedition.io.ServerSocketConnection.
Description: Handling listen TCP/UDP socket.
Deviations:
1. One client per connection socket (up to 9 sockets).
2. More than one ServerSocketConnection instance may listen on the same port.
Example for handling server socket connection
:
public class TcpConnection extends Thread {
public SocketConnection sc = null;
public ServerSocketConnection scn = null;
public InputStream is = null;
public void run() {
//gets port number from jad file
openConnection(getAppProperty("PORT"));
byte[] ReceiveData = new byte[256];
try {
InputStream is = sc.openInputStream();
Table 5-5: Port to Serial Mapping
Port Identifier Serial
COM0 UART2
COM1 UART1
COM2 UART2
COM3 USB
Vista de página 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 83 84

Comentários a estes Manuais

Sem comentários