|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.mbari.siam.utils.ShoreMessagingService
org.mbari.siam.devices.nalModem.NALMessagingService
public abstract class NALMessagingService
Implements ShoreMessaging with NAL Research Iridium modem.
| Nested Class Summary | |
|---|---|
protected class |
NALMessagingService.ConnectionTimer
ConnectionTimer keeps track of time elapsed since connection started |
| Nested classes/interfaces inherited from class org.mbari.siam.utils.ShoreMessagingService |
|---|
ShoreMessagingService.ShutdownTask |
| Field Summary | |
|---|---|
protected byte[] |
_aggregateMsg
Aggregate message buffer |
protected boolean |
_checkForUplinks
|
protected NALMessagingService.ConnectionTimer |
_connectionTimer
|
protected static org.apache.log4j.Logger |
_log4j
|
protected int |
_nPendingUplinks
Number of uplinks pending on shore; may be StoreAndFwdIF::Unknown |
protected java.lang.String |
_serialPortName
|
protected ShoreMessagingHelper.Message |
_uplinkMsg
|
protected static int |
MAX_CONSEC_DOWNLINK_FAILED
Maximum consecutive downlink failures; give up, try later, if exceeded |
protected static int |
MAX_CONSEC_UPLINK_FAILED
Maximum consecutive uplink failures; give up, try later, if exceeded |
protected static int |
MAX_UPLINKS_PER_SESSION
Maximum uplinks per session |
static int |
PROFILE_NUMBER
|
protected static int |
READ_TIMEOUT_MSEC
|
| Fields inherited from class org.mbari.siam.utils.ShoreMessagingService |
|---|
_downlinkMsgQ |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Constructor Summary | |
|---|---|
NALMessagingService(java.lang.String serialPortName)
|
|
| Method Summary | |
|---|---|
protected void |
configureModem(java.io.InputStream input,
java.io.OutputStream output)
Configure modem for use by this driver |
void |
connect(int timeoutSec)
Connect modem, exchange messages with shore |
protected void |
downlinkMsg(gnu.io.SerialPort serialPort,
byte[] msg,
int nMsgBytes,
java.io.InputStream inStream,
java.io.DataOutputStream outStream)
Downlink a message |
protected int |
getUplinkMsgs(gnu.io.SerialPort serialPort,
java.io.InputStream inStream,
java.io.OutputStream outStream)
Get uplinked message(s) through modem and add to uplink queue |
protected int |
nPendingUplinks()
Return number of uplinks pending on shore; may return StoreAndFwdIF::Unknown |
protected gnu.io.SerialPort |
openSerialPort(int baud)
Initialize serial port |
protected int |
receivedSignalStrength(gnu.io.SerialPort serialPort,
java.io.InputStream inStream,
java.io.OutputStream outStream)
Return modem signal quality (0-5), -1 on error |
protected void |
restoreModem(java.io.OutputStream output)
Restore modem to "default" configuration, for use by other applications - assumes profile #0 is default |
protected void |
retrieveAndQueueUplink(int nUplinkBytes)
Retrieve uplink message from modem and queue it for clients |
protected void |
sleep(int sleepSec)
Sleep for specified number of seconds |
| Methods inherited from class org.mbari.siam.utils.ShoreMessagingService |
|---|
nQueuedDownlinkMsgs, ping, queueDownlinkMessage, shutdown |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mbari.siam.distributed.ShoreMessaging |
|---|
maxDownlinkMsgBytes, nQueuedDownlinkMsgs, queueDownlinkMessage, shutdown |
| Methods inherited from interface org.mbari.siam.distributed.RemoteService |
|---|
ping |
| Field Detail |
|---|
protected static org.apache.log4j.Logger _log4j
public static final int PROFILE_NUMBER
protected static final int READ_TIMEOUT_MSEC
protected java.lang.String _serialPortName
protected ShoreMessagingHelper.Message _uplinkMsg
protected boolean _checkForUplinks
protected static final int MAX_UPLINKS_PER_SESSION
protected static final int MAX_CONSEC_UPLINK_FAILED
protected static final int MAX_CONSEC_DOWNLINK_FAILED
protected byte[] _aggregateMsg
protected int _nPendingUplinks
protected NALMessagingService.ConnectionTimer _connectionTimer
| Constructor Detail |
|---|
public NALMessagingService(java.lang.String serialPortName)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
protected int receivedSignalStrength(gnu.io.SerialPort serialPort,
java.io.InputStream inStream,
java.io.OutputStream outStream)
throws java.lang.Exception
java.lang.Exception
protected void configureModem(java.io.InputStream input,
java.io.OutputStream output)
throws java.lang.Exception
java.lang.Exception
protected void restoreModem(java.io.OutputStream output)
throws java.lang.Exception
java.lang.Exceptionprotected int nPendingUplinks()
public void connect(int timeoutSec)
throws ShoreMessagingHelper.ConnectFailed
connect in interface ShoreMessagingShoreMessagingHelper.ConnectFailed
protected void downlinkMsg(gnu.io.SerialPort serialPort,
byte[] msg,
int nMsgBytes,
java.io.InputStream inStream,
java.io.DataOutputStream outStream)
throws java.lang.Exception
java.lang.Exception
protected int getUplinkMsgs(gnu.io.SerialPort serialPort,
java.io.InputStream inStream,
java.io.OutputStream outStream)
throws java.lang.Exception
java.lang.Exception
protected void retrieveAndQueueUplink(int nUplinkBytes)
throws java.lang.Exception
java.lang.Exception
protected gnu.io.SerialPort openSerialPort(int baud)
throws gnu.io.PortInUseException,
gnu.io.UnsupportedCommOperationException,
java.lang.Exception
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
java.lang.Exceptionprotected void sleep(int sleepSec)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||