Skip to content
Permalink
Browse files

javadoc

  • Loading branch information...
silverailscolo authored and bobjacobsen committed Jun 18, 2019
1 parent 6ae9647 commit 4fea42ceb4132eae6638fb5489543fec219337f3
@@ -191,7 +191,7 @@ public boolean getMdnsConfigure() {

/*
* Set the server's host name and port
* using mdns autoconfiguration.
* using MDNS autoconfiguration.
* Default implementation does nothing.
*/
@Override
@@ -295,7 +295,7 @@ public void recover() {
}

/**
* Attempts to reconnect to a failed Server
* Attempts to reconnect to a failed Server.
*/
public void reconnect() {

@@ -383,7 +383,8 @@ public void run() {
* Set the connection timeout to the specified value.
* If the socket is not null, set the SO_TIMEOUT option on the
* socket as well.
* @param t timeout value in milliseconds.
*
* @param t timeout value in milliseconds
*/
protected void setConnectionTimeout(int t) {
connTimeout = t;
@@ -398,7 +399,8 @@ protected void setConnectionTimeout(int t) {

/*
* Get the connection timeout value.
* @return timeout value in milliseconds.
*
* @return timeout value in milliseconds
*/
protected int getConnectionTimeout() {
return connTimeout;
@@ -150,8 +150,8 @@ public void configureBaudRate(String rate) {
public void configureBaudNumber(String indexString) {
int baudNum;
int index = 0;
String[] rates = validBaudRates();
int[] numbers = validBaudNumbers();
final String[] rates = validBaudRates();
final int[] numbers = validBaudNumbers();
if ((numbers == null) || (numbers.length == 0)) { // simulators return null TODO for SpotBugs make that into an empty array
mBaudRate = null;
log.debug("no serial port speed values received (OK for simulator)");
@@ -278,6 +278,7 @@ public int getCurrentBaudIndex() {
*/
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS",
justification = "null signals incorrect implementation of portcontroller")
@Override
public int[] validBaudNumbers() {
log.error("default validBaudNumber implementation should not be used", new Exception());
return null;
@@ -288,7 +289,7 @@ public int getCurrentBaudIndex() {
* <p>
* Uses the validBaudNumbers() and validBaudRates() methods to do this.
*
* @param currentBaudRate a rate from validBaudRates
* @param currentBaudRate a rate from validBaudRates()
* @return -1 if no match (configuration system should prevent this)
*/
public int currentBaudNumber(String currentBaudRate) {
@@ -49,7 +49,7 @@
public String getCurrentPortName();

/**
* Get an array of valid baud rates; used to display valid options in Connections Preferences.
* Get an array of valid baud rate strings; used to display valid options in Connections Preferences.
*
* @return array of I18N display strings of port speed settings valid for this serial adapter,
* must match order and values from {@link #validBaudNumbers()}
@@ -6,7 +6,7 @@
import jmri.jmrix.can.CanSystemConnectionMemo;

/**
* Abstract base for classes representing a LAWICELL communications port
* Abstract base for classes representing a LAWICELL communications port.
*
* @author Bob Jacobsen Copyright (C) 2001, 2008
* @author Andrew Crosland 2008
@@ -35,5 +35,6 @@ protected PortController(SystemConnectionMemo connectionMemo) {
public CanSystemConnectionMemo getSystemConnectionMemo() {
return (CanSystemConnectionMemo) super.getSystemConnectionMemo();
}

}

@@ -10,8 +10,7 @@
* @author Andrew Crosland Copyright (C) 2008
* @author Bob Jacobsen Copyright (C) 2008, 2010
*/
public class CanUsbDriverAdapter
extends jmri.jmrix.can.adapters.lawicell.SerialDriverAdapter
public class CanUsbDriverAdapter extends jmri.jmrix.can.adapters.lawicell.SerialDriverAdapter
implements jmri.jmrix.SerialPortAdapter {

/**
@@ -23,7 +22,7 @@
}

/**
* And the corresponding values.
* {@inheritDoc}
*/
@Override
public int[] validBaudValues() {
@@ -5,7 +5,7 @@
import jmri.jmrix.cmri.serial.SerialTrafficController;

/**
* Implements SerialPortAdapter for a network connection.
* Implements SerialNetworkPortAdapter for a network connection.
* <p>
* This connects via a telnet connection. Normally
* controlled by the NetworkDriverFrame class.
@@ -20,7 +20,7 @@ public NetworkDriverAdapter() {
}

/**
* set up all of the other objects to operate connected to this port
* Set up all of the other objects to operate connected to this port.
*/
@Override
public void configure() {
@@ -9,7 +9,7 @@
import org.slf4j.LoggerFactory;

/**
* Implements SerialPortAdapter for the DCCppOverTcp system network
* Implements DCCppPortController for the DCCppOverTcp system network
* connection.
* <p>
* This connects a DCC++ via a telnet connection. Normally controlled by the
@@ -7,7 +7,7 @@
import org.slf4j.LoggerFactory;

/**
* Implements SerialPortAdapter for the ECOS system network connection.
* Implements NetworkPortAdapter for the ECOS system network connection.
* <p>
* This connects an ECOS command station via a telnet connection. Normally
* controlled by the NetworkDriverFrame class.
@@ -70,8 +70,6 @@ public void configure() {

/**
* {@inheritDoc}
*
* @return list of value baud rates
*/
@Override
public int[] validBaudNumbers() {
@@ -206,7 +206,8 @@ public String getCurrentBaudRate() {
*/
@Override
public int[] validBaudNumbers() {
return null;
int[] numbers = {0};
return numbers;
}

@Override
@@ -192,7 +192,7 @@ public void configure() {
return null;
}

//@Override
@Override
public int[] validBaudNumbers() {
return null;
}

0 comments on commit 4fea42c

Please sign in to comment.
You can’t perform that action at this time.