Class SerialEchoBlockRead

java.lang.Object
  |
  +--SerialEchoBlockRead

public class SerialEchoBlockRead
extends java.lang.Object

Copyright (C) 1996, 97, 98 Dallas Semiconductor Corporation. All rights Reserved. Printed in U.S.A. This software is protected by copyright laws of the United States and of foreign countries. This material may also be protected by patent laws of the United States and of foreign countries. This software is furnished under a license agreement and/or a nondisclosure agreement and may only be used or copied in accordance with the terms of those agreements. The mere transfer of this software does not imply any licenses of trade secrets, proprietary technology, copyrights, patents, trademarks, maskwork rights, or any other form of intellectual property whatsoever. Dallas Semiconductor retains all ownership rights.


Note that on TINI, by default, only Serial0 is assumed to be RS232. Serial1 is assumed used for external 1Wire network. Serial2 will be the SBX2 external UART.
 Title:        SerialEchoBlockRead
Description: Test the UART on SBX2 Copyright: Copyright (c) 2002 Company: Systronix


Field Summary
static int Sbx2
          Port number of Sbx2 for Tini CommPortIdentifiers.
static int SelectPort
          This class has been written to allow the user to specify any serial port from the command prompt.
static int SimmSerialA
          Port number of SimmSerialA for Tini CommPortIdentifiers.
static int SimmSerialB
          Port number of SimmSerialB for Tini CommPortIdentifiers.
(package private)  javax.comm.SerialPort sp
           
static int TiniSerial0
          Port number of TiniSerial0 for Tini CommPortIdentifiers.
static int TiniSerial1
          Port number of TiniSerial1 for Tini CommPortIdentifiers.
 
Constructor Summary
SerialEchoBlockRead()
          default constructor
 
Method Summary
protected  void finalize()
          TINI doesn't seem to reclaim the port after you kill a process.
static void main(java.lang.String[] args)
          Main takes a command line argument and parses it to an integer to be used in initializing the selected serial port.
 void run()
          This class once extended java.lang.Thread to allow multiple ports to be read at once.
static void setExtUartTiming7()
          Our native method to set stretch bits in CKCON
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

sp

javax.comm.SerialPort sp

SelectPort

public static int SelectPort
This class has been written to allow the user to specify any serial port from the command prompt. the main program parses the command line option to be either invalid, or an integer port number, stored here.

TiniSerial0

public static final int TiniSerial0
Port number of TiniSerial0 for Tini CommPortIdentifiers.

TiniSerial1

public static final int TiniSerial1
Port number of TiniSerial1 for Tini CommPortIdentifiers.

SimmSerialA

public static final int SimmSerialA
Port number of SimmSerialA for Tini CommPortIdentifiers.

SimmSerialB

public static final int SimmSerialB
Port number of SimmSerialB for Tini CommPortIdentifiers.

Sbx2

public static final int Sbx2
Port number of Sbx2 for Tini CommPortIdentifiers.
Constructor Detail

SerialEchoBlockRead

public SerialEchoBlockRead()
default constructor
Method Detail

setExtUartTiming7

public static void setExtUartTiming7()
Our native method to set stretch bits in CKCON

finalize

protected void finalize()
TINI doesn't seem to reclaim the port after you kill a process. Try this.
Overrides:
finalize in class java.lang.Object

main

public static void main(java.lang.String[] args)
Main takes a command line argument and parses it to an integer to be used in initializing the selected serial port. It then reads in information and blocks until a character is recieved. It then echos the character out the same serial port as it was recieved.

run

public void run()
This class once extended java.lang.Thread to allow multiple ports to be read at once. It has been simplified for clarity.