org.mbari.siam.tests.moos.devices
Class TestNodeService

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.mbari.siam.tests.moos.devices.TestNodeService
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, MOOSNode, Node, RemoteService

public class TestNodeService
extends java.rmi.server.UnicastRemoteObject
implements MOOSNode

TestNodeService implements the Node interface; instantiate, initialize, and run a device service. The service bytecode, any related classes, and properties file are contained within a standard SIAM instrument jar file or PUCK.

Author:
oreilly
See Also:
Serialized Form

Field Summary
static java.lang.String INSTRUMENT_URL
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface org.mbari.siam.distributed.Node
SERVER_NAME
 
Constructor Summary
TestNodeService()
           
 
Method Summary
 void addEventCallback(NodeEventCallback callback)
          Register to receive notification of node events.
 byte[] addSchedule(byte[] port, byte[] scheduleName, byte[] schedule, boolean overwrite)
          Add Schedule
 void annotate(byte[] annotation)
          Append annotation to node data stream.
 void cpuLease(int requestorID, long when, long howLong)
          Request that the CPU come on at a certain time in the future and/or remain on for a certain duration.
 void enterSafeMode()
          Put node and its devices into "safe" mode.
 void enterSafeMode(long wait)
          Put node and its devices into "safe" mode.
 int establishLease(long leaseMillisec, byte[] clientNote)
          Request a lease of the Node's primary comms medium
 int establishLease(long leaseMillisec, byte[] clientNote, boolean usePrimary)
          Request a lease of the Node's primary or auxillary comms medium
 void exitApplication()
          Shutdown all services and exits the SIAM application.
 void exitApplication(boolean doSafemode, boolean doHalt, boolean enableBackups, boolean doNotify, boolean recursive, int quitDelaySec, int haltDelaySec, java.lang.String msg)
          Shutdown all services and exits the SIAM application.
 Device getDevice(byte[] commPortName)
          Get device service (if any) associated with specified port.
 Device getDevice(long deviceId)
          Get specified device service proxy.
 DevicePacketSet getDevicePackets(long sensorID, long startTime, long endTime)
          Get DevicePacket objects, from specified sensor, within specified time window.
 DevicePacketSet getDevicePackets(long sensorID, long startTime, long endTime, int typeMask)
          Get DevicePacket objects, from specified sensor, within specified time window; only return packets of type specified in typemask parameter.
 Device[] getDevices()
          Get all device service proxies.
 DpaPortStatus[] getDpaPortStatus()
          Get status of all DPA ports.
 DpaPortStatus getDpaPortStatus(byte[] commPortName)
          Get status of DPA port associated with specified comm port.
 long getId()
          Unique identifier for Node instance
 LeaseDescription[] getLeases(boolean usePrimary)
          Get list of all active leases managed by the node.
 org.mbari.isi.interfaces.Location getLocation()
          Return Location of Node.
 byte[] getMetadata()
          Get Node metadata.
 byte[] getName()
          Name of Node service class.
 PortConfiguration[] getPortConfiguration()
          Get configuration of Node ports.
 Port[] getPorts()
          Get array of Node's Port objects.
 PowerSwitch[] getPowerSwitches()
          Get array of Node's power switches.
 byte[] getProperties()
          Return byte-string representation of service's NodeProperties object.
 RemoteSerialPort getRemoteSerialPort(byte[] portName)
          Get remote serial port.
 RemoteSerialPort getRemoteSerialPort(byte[] portName, int timeout)
          Get remote serial port with specified timeout in milliseconds.
 byte[] getSchedule()
          Get Printable Schedule
 byte[] getSchedule(byte[] port, long lookAheadSeconds)
          Get Printable Schedule for a specified device, lookahead
 byte[] getSchedule(long lookAheadSeconds)
          Get Printable Schedule
 byte[] getStatus(boolean logPacket)
          Return byte string with node health/status information.
 Subnode[] getSubnodeObjects()
          Get list of immediate subnodes.
 java.net.InetAddress[] getSubnodes()
          Get list of immediate subnodes.
 java.net.InetAddress host()
          Return InetAddress of device service host.
 void initialize()
          Initialize the device.
static void main(java.lang.String[] args)
           
 void powerDownPort(byte[] commPortName)
          Power down specified port and enable the comms if a service is not already using it
 int powerOff()
          Turn Node power off.
 void powerUpPort(byte[] commPortName, int currentLimit)
          Power up specified port and enable the comms if a service is not already using it
 byte[] readWDT()
          Read watchdog time (WDT) status
 byte[] removeSchedule(byte[] port, byte[] scheduleName)
          Remove Schedule
 void removeSubnode(java.net.InetAddress address)
          Remove specified subnode from list.
 void renewLease(int leaseID, long leaseMillisec)
          Renew a lease with the Node's primary comms medium
 void renewLease(int leaseID, long leaseMillisec, boolean usePrimary)
          Renew a lease with the Node's primary or secondary comms medium
 byte[] renewWDT()
          Keep watchdog from waking up and resetting Node
 void restartService(byte[] portName)
          Restart service (if any) associated with specified port.
 void resumeNormalMode()
          Return from "safe" mode; resume normal operations.
 byte[] resumeSchedule(byte[] port, byte[] scheduleName)
          Resume Schedule Entry
 void resumeService(byte[] portName)
          Resume service (if any) associated with specified port.
 void run(java.lang.String jarFileName, java.lang.String portName, java.lang.String codebaseDirectory)
          Run the test.
 byte[] runCommand(byte[] cmd, int timeoutSec)
          Tell node to execute a Linux or shell command.
 void scanPort(byte[] commPortName)
          Scan specified ports, load service.
 void scanPort(byte[] commPortName, byte[] source)
          Scan specified ports, load service.
 void scanPorts()
          Scan all ports, load services.
 void shoreLinkDownCallback(java.net.InetAddress localAddress, java.net.InetAddress remoteAddress)
          Called when IP link to shore is disconnected
 void shoreLinkUpCallback(java.net.InetAddress localAddress, java.net.InetAddress remoteAddress)
          Called when IP link to shore is connected
 byte[] shutdownDeviceService(byte[] commPortName)
          Shutdown and remove device service from specified port.
 NodeSessionInfo startSession(boolean renewWDT, byte[] initScript, int scriptTimeoutSec)
          Prepare for telemetry retrieval session
 boolean summarizing(long deviceID)
          Return true if specified device can supply Summary packets.
 byte[] suspendSchedule(byte[] port, byte[] scheduleName)
          Suspend Schedule Entry
 void suspendService(byte[] portName)
          Suspend service (if any) associated with specified port.
 byte[] syncSchedule(byte[] port, byte[] scheduleName, long delayMillis)
          Synchronize a (default sample) schedule entry
 void terminateLease(int leaseID)
          Terminate the session with the primary communications link.
 void terminateLease(int leaseID, boolean usePrimary)
          Terminate the session with the communications link.
 int test()
          Run Node's self-test routine.
 void wakeupAllNodes()
          Send signal to wakeup all nodes.
 void wakeupNode(java.net.InetAddress node)
          Send signal to wakeup specified node.
 
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.Node
getDevicePackets, getDevicePackets, getNodeInfo, instrumentRegistryStatus, lookupService, readLog4jConfig, setProperties, shoreLinkDownCallback, shoreLinkUpCallback, terminateLeases
 
Methods inherited from interface org.mbari.siam.distributed.RemoteService
ping
 

Field Detail

INSTRUMENT_URL

public static final java.lang.String INSTRUMENT_URL
See Also:
Constant Field Values
Constructor Detail

TestNodeService

public TestNodeService()
                throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

run

public void run(java.lang.String jarFileName,
                java.lang.String portName,
                java.lang.String codebaseDirectory)
         throws java.lang.Exception
Run the test.

Throws:
java.lang.Exception

summarizing

public boolean summarizing(long deviceID)
                    throws DeviceNotFound,
                           java.rmi.RemoteException
Return true if specified device can supply Summary packets.

Specified by:
summarizing in interface Node
Throws:
DeviceNotFound
java.rmi.RemoteException

host

public java.net.InetAddress host()
                          throws java.rmi.RemoteException,
                                 java.net.UnknownHostException
Return InetAddress of device service host.

Specified by:
host in interface Node
Throws:
java.rmi.RemoteException
java.net.UnknownHostException

getName

public byte[] getName()
               throws java.rmi.RemoteException
Name of Node service class.

Specified by:
getName in interface Node
Throws:
java.rmi.RemoteException

getId

public long getId()
           throws java.rmi.RemoteException
Unique identifier for Node instance

Specified by:
getId in interface Node
Throws:
java.rmi.RemoteException

initialize

public void initialize()
                throws java.rmi.RemoteException,
                       InitializeException
Initialize the device.

Specified by:
initialize in interface Node
Throws:
java.rmi.RemoteException
InitializeException

powerOff

public int powerOff()
             throws java.rmi.RemoteException
Turn Node power off.

Specified by:
powerOff in interface Node
Throws:
java.rmi.RemoteException

getPortConfiguration

public PortConfiguration[] getPortConfiguration()
                                         throws java.rmi.RemoteException
Get configuration of Node ports.

Specified by:
getPortConfiguration in interface Node
Throws:
java.rmi.RemoteException

getDevice

public Device getDevice(long deviceId)
                 throws java.rmi.RemoteException,
                        DeviceNotFound
Get specified device service proxy.

Specified by:
getDevice in interface Node
Throws:
java.rmi.RemoteException
DeviceNotFound

getDevices

public Device[] getDevices()
                    throws java.rmi.RemoteException
Get all device service proxies.

Specified by:
getDevices in interface Node
Throws:
java.rmi.RemoteException

shutdownDeviceService

public byte[] shutdownDeviceService(byte[] commPortName)
                             throws java.rmi.RemoteException,
                                    PortNotFound,
                                    DeviceNotFound
Shutdown and remove device service from specified port.

Specified by:
shutdownDeviceService in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound

scanPorts

public void scanPorts()
               throws java.rmi.RemoteException
Scan all ports, load services.

Specified by:
scanPorts in interface Node
Throws:
java.rmi.RemoteException

scanPort

public void scanPort(byte[] commPortName)
              throws java.rmi.RemoteException,
                     PortNotFound,
                     DeviceNotFound,
                     java.io.IOException,
                     PortOccupiedException,
                     DuplicateIdException
Scan specified ports, load service.

Specified by:
scanPort in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound
java.io.IOException
PortOccupiedException
DuplicateIdException

scanPort

public void scanPort(byte[] commPortName,
                     byte[] source)
              throws java.rmi.RemoteException,
                     PortNotFound,
                     DeviceNotFound,
                     java.io.IOException,
                     PortOccupiedException,
                     DuplicateIdException
Scan specified ports, load service.

Specified by:
scanPort in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound
java.io.IOException
PortOccupiedException
DuplicateIdException

getDevice

public Device getDevice(byte[] commPortName)
                 throws java.rmi.RemoteException,
                        PortNotFound,
                        DeviceNotFound
Get device service (if any) associated with specified port.

Specified by:
getDevice in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound

getPorts

public Port[] getPorts()
                throws java.rmi.RemoteException
Get array of Node's Port objects.

Specified by:
getPorts in interface Node
Throws:
java.rmi.RemoteException

getPowerSwitches

public PowerSwitch[] getPowerSwitches()
                               throws java.rmi.RemoteException
Get array of Node's power switches.

Specified by:
getPowerSwitches in interface Node
Throws:
java.rmi.RemoteException

getDevicePackets

public DevicePacketSet getDevicePackets(long sensorID,
                                        long startTime,
                                        long endTime)
                                 throws java.rmi.RemoteException,
                                        DeviceNotFound,
                                        NoDataException
Get DevicePacket objects, from specified sensor, within specified time window.

Specified by:
getDevicePackets in interface Node
Throws:
java.rmi.RemoteException
DeviceNotFound
NoDataException

getDevicePackets

public DevicePacketSet getDevicePackets(long sensorID,
                                        long startTime,
                                        long endTime,
                                        int typeMask)
                                 throws java.rmi.RemoteException,
                                        DeviceNotFound,
                                        NoDataException
Get DevicePacket objects, from specified sensor, within specified time window; only return packets of type specified in typemask parameter.

Specified by:
getDevicePackets in interface Node
Throws:
java.rmi.RemoteException
DeviceNotFound
NoDataException

suspendService

public void suspendService(byte[] portName)
                    throws java.rmi.RemoteException,
                           PortNotFound,
                           DeviceNotFound
Suspend service (if any) associated with specified port.

Specified by:
suspendService in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound

resumeService

public void resumeService(byte[] portName)
                   throws java.rmi.RemoteException,
                          PortNotFound,
                          DeviceNotFound
Resume service (if any) associated with specified port.

Specified by:
resumeService in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound

restartService

public void restartService(byte[] portName)
                    throws java.rmi.RemoteException,
                           PortNotFound,
                           DeviceNotFound,
                           java.lang.Exception
Restart service (if any) associated with specified port.

Specified by:
restartService in interface Node
Throws:
java.rmi.RemoteException
PortNotFound
DeviceNotFound
java.lang.Exception

getRemoteSerialPort

public RemoteSerialPort getRemoteSerialPort(byte[] portName)
                                     throws java.rmi.RemoteException,
                                            java.net.UnknownHostException,
                                            PortNotFound,
                                            PortOccupiedException,
                                            java.io.IOException
Get remote serial port.

Specified by:
getRemoteSerialPort in interface Node
Throws:
java.rmi.RemoteException
java.net.UnknownHostException
PortNotFound
PortOccupiedException
java.io.IOException

getRemoteSerialPort

public RemoteSerialPort getRemoteSerialPort(byte[] portName,
                                            int timeout)
                                     throws java.rmi.RemoteException,
                                            java.net.UnknownHostException,
                                            PortNotFound,
                                            PortOccupiedException,
                                            RangeException,
                                            java.io.IOException
Get remote serial port with specified timeout in milliseconds.

Specified by:
getRemoteSerialPort in interface Node
Throws:
java.rmi.RemoteException
java.net.UnknownHostException
PortNotFound
PortOccupiedException
RangeException
java.io.IOException

test

public int test()
         throws java.rmi.RemoteException
Run Node's self-test routine.

Specified by:
test in interface Node
Throws:
java.rmi.RemoteException

getLocation

public org.mbari.isi.interfaces.Location getLocation()
                                              throws java.rmi.RemoteException,
                                                     UnknownLocationException
Return Location of Node.

Specified by:
getLocation in interface Node
Throws:
java.rmi.RemoteException
UnknownLocationException

getMetadata

public byte[] getMetadata()
                   throws java.rmi.RemoteException
Get Node metadata.

Specified by:
getMetadata in interface Node
Throws:
java.rmi.RemoteException

getSchedule

public byte[] getSchedule()
                   throws java.rmi.RemoteException
Get Printable Schedule

Specified by:
getSchedule in interface Node
Throws:
java.rmi.RemoteException

getSchedule

public byte[] getSchedule(long lookAheadSeconds)
                   throws java.rmi.RemoteException
Get Printable Schedule

Specified by:
getSchedule in interface Node
Throws:
java.rmi.RemoteException

getSchedule

public byte[] getSchedule(byte[] port,
                          long lookAheadSeconds)
                   throws java.rmi.RemoteException
Get Printable Schedule for a specified device, lookahead

Specified by:
getSchedule in interface Node
Throws:
java.rmi.RemoteException

addSchedule

public byte[] addSchedule(byte[] port,
                          byte[] scheduleName,
                          byte[] schedule,
                          boolean overwrite)
                   throws java.rmi.RemoteException
Add Schedule

Specified by:
addSchedule in interface Node
Throws:
java.rmi.RemoteException

removeSchedule

public byte[] removeSchedule(byte[] port,
                             byte[] scheduleName)
                      throws java.rmi.RemoteException
Remove Schedule

Specified by:
removeSchedule in interface Node
Throws:
java.rmi.RemoteException

suspendSchedule

public byte[] suspendSchedule(byte[] port,
                              byte[] scheduleName)
                       throws java.rmi.RemoteException
Suspend Schedule Entry

Specified by:
suspendSchedule in interface Node
Throws:
java.rmi.RemoteException

resumeSchedule

public byte[] resumeSchedule(byte[] port,
                             byte[] scheduleName)
                      throws java.rmi.RemoteException
Resume Schedule Entry

Specified by:
resumeSchedule in interface Node
Throws:
java.rmi.RemoteException

syncSchedule

public byte[] syncSchedule(byte[] port,
                           byte[] scheduleName,
                           long delayMillis)
                    throws java.rmi.RemoteException
Synchronize a (default sample) schedule entry

Specified by:
syncSchedule in interface Node
Throws:
java.rmi.RemoteException

addEventCallback

public void addEventCallback(NodeEventCallback callback)
                      throws java.rmi.RemoteException
Register to receive notification of node events.

Specified by:
addEventCallback in interface Node
Throws:
java.rmi.RemoteException

shoreLinkUpCallback

public void shoreLinkUpCallback(java.net.InetAddress localAddress,
                                java.net.InetAddress remoteAddress)
                         throws java.rmi.RemoteException,
                                java.lang.Exception
Called when IP link to shore is connected

Throws:
java.rmi.RemoteException
java.lang.Exception

shoreLinkDownCallback

public void shoreLinkDownCallback(java.net.InetAddress localAddress,
                                  java.net.InetAddress remoteAddress)
                           throws java.rmi.RemoteException,
                                  java.lang.Exception
Called when IP link to shore is disconnected

Throws:
java.rmi.RemoteException
java.lang.Exception

establishLease

public int establishLease(long leaseMillisec,
                          byte[] clientNote)
                   throws java.rmi.RemoteException,
                          LeaseRefused
Request a lease of the Node's primary comms medium

Specified by:
establishLease in interface Node
Parameters:
leaseMillisec - lease period in milliseconds
clientNote - note attached by client
Returns:
leaseID for use with renewLease(), terminateLease(). Will always be >= 1.
Throws:
java.rmi.RemoteException
LeaseRefused

establishLease

public int establishLease(long leaseMillisec,
                          byte[] clientNote,
                          boolean usePrimary)
                   throws java.rmi.RemoteException,
                          LeaseRefused
Request a lease of the Node's primary or auxillary comms medium

Specified by:
establishLease in interface Node
Throws:
java.rmi.RemoteException
LeaseRefused

renewLease

public void renewLease(int leaseID,
                       long leaseMillisec)
                throws java.rmi.RemoteException,
                       LeaseRefused
Renew a lease with the Node's primary comms medium

Specified by:
renewLease in interface Node
Parameters:
leaseID - lease ID returned by establishLease()
leaseMillisec - lease period in milliseconds
Throws:
java.rmi.RemoteException
LeaseRefused

renewLease

public void renewLease(int leaseID,
                       long leaseMillisec,
                       boolean usePrimary)
                throws java.rmi.RemoteException,
                       LeaseRefused
Renew a lease with the Node's primary or secondary comms medium

Specified by:
renewLease in interface Node
Parameters:
leaseID - lease ID returned by establishLease()
leaseMillisec - lease period in milliseconds
Throws:
java.rmi.RemoteException
LeaseRefused

terminateLease

public void terminateLease(int leaseID)
                    throws java.rmi.RemoteException
Terminate the session with the primary communications link.

Specified by:
terminateLease in interface Node
Parameters:
leaseID - lease ID returned by establishLease()
Throws:
java.rmi.RemoteException

terminateLease

public void terminateLease(int leaseID,
                           boolean usePrimary)
                    throws java.rmi.RemoteException
Terminate the session with the communications link.

Specified by:
terminateLease in interface Node
Parameters:
leaseID - lease ID returned by establishLease()
Throws:
java.rmi.RemoteException

cpuLease

public void cpuLease(int requestorID,
                     long when,
                     long howLong)
              throws java.rmi.RemoteException
Request that the CPU come on at a certain time in the future and/or remain on for a certain duration.

Specified by:
cpuLease in interface Node
Parameters:
requestorID - Unique ID (externally assigned) to identify who is requesting the CPU to remain on. Allows for multiple requestors each requesting that the CPU be on.
when - Milliseconds until the requestor needs the CPU on. Use 0 (zero) to request that the CPU remain on starting now.
howLong - Number of milliseconds that the CPU should remain on. Use 0 (zero) to cancel an earlier request.
Throws:
java.rmi.RemoteException

getStatus

public byte[] getStatus(boolean logPacket)
                 throws java.rmi.RemoteException
Return byte string with node health/status information.

Specified by:
getStatus in interface Node
Throws:
java.rmi.RemoteException

exitApplication

public void exitApplication()
                     throws java.rmi.RemoteException
Shutdown all services and exits the SIAM application.

Specified by:
exitApplication in interface Node
Throws:
java.rmi.RemoteException

powerUpPort

public void powerUpPort(byte[] commPortName,
                        int currentLimit)
                 throws java.rmi.RemoteException,
                        PortOccupiedException,
                        PortNotFound,
                        RangeException,
                        NotSupportedException
Power up specified port and enable the comms if a service is not already using it

Specified by:
powerUpPort in interface Node
Throws:
java.rmi.RemoteException
PortOccupiedException
PortNotFound
RangeException
NotSupportedException

powerDownPort

public void powerDownPort(byte[] commPortName)
                   throws java.rmi.RemoteException,
                          PortOccupiedException,
                          PortNotFound
Power down specified port and enable the comms if a service is not already using it

Specified by:
powerDownPort in interface Node
Throws:
java.rmi.RemoteException
PortOccupiedException
PortNotFound

getSubnodes

public java.net.InetAddress[] getSubnodes()
                                   throws java.rmi.RemoteException
Get list of immediate subnodes.

Specified by:
getSubnodes in interface Node
Throws:
java.rmi.RemoteException

getSubnodeObjects

public Subnode[] getSubnodeObjects()
                            throws java.rmi.RemoteException
Get list of immediate subnodes.

Specified by:
getSubnodeObjects in interface Node
Throws:
java.rmi.RemoteException

removeSubnode

public void removeSubnode(java.net.InetAddress address)
                   throws java.rmi.RemoteException,
                          java.lang.Exception
Remove specified subnode from list.

Specified by:
removeSubnode in interface Node
Throws:
java.rmi.RemoteException
java.lang.Exception

getLeases

public LeaseDescription[] getLeases(boolean usePrimary)
                             throws java.rmi.RemoteException
Get list of all active leases managed by the node.

Specified by:
getLeases in interface Node
Throws:
java.rmi.RemoteException

renewWDT

public byte[] renewWDT()
                throws java.rmi.RemoteException,
                       java.io.IOException,
                       java.io.FileNotFoundException
Keep watchdog from waking up and resetting Node

Specified by:
renewWDT in interface MOOSNode
Throws:
java.rmi.RemoteException
java.io.IOException
java.io.FileNotFoundException

readWDT

public byte[] readWDT()
               throws java.rmi.RemoteException,
                      java.io.IOException,
                      java.io.FileNotFoundException
Read watchdog time (WDT) status

Specified by:
readWDT in interface MOOSNode
Throws:
java.rmi.RemoteException
java.io.IOException
java.io.FileNotFoundException

getDpaPortStatus

public DpaPortStatus getDpaPortStatus(byte[] commPortName)
                               throws NotSupportedException,
                                      DeviceNotFound,
                                      java.rmi.RemoteException
Get status of DPA port associated with specified comm port. Throws NotSupportedException if no power port is associated with specified comm port.

Specified by:
getDpaPortStatus in interface MOOSNode
Throws:
NotSupportedException
DeviceNotFound
java.rmi.RemoteException

getDpaPortStatus

public DpaPortStatus[] getDpaPortStatus()
                                 throws java.rmi.RemoteException
Get status of all DPA ports.

Specified by:
getDpaPortStatus in interface MOOSNode
Throws:
java.rmi.RemoteException

getProperties

public byte[] getProperties()
                     throws java.rmi.RemoteException
Return byte-string representation of service's NodeProperties object.

Specified by:
getProperties in interface Node
Throws:
java.rmi.RemoteException

wakeupNode

public void wakeupNode(java.net.InetAddress node)
                throws java.rmi.RemoteException,
                       java.io.IOException
Send signal to wakeup specified node.

Specified by:
wakeupNode in interface MOOSNode
Throws:
java.rmi.RemoteException
java.io.IOException

wakeupAllNodes

public void wakeupAllNodes()
                    throws java.rmi.RemoteException,
                           java.io.IOException
Send signal to wakeup all nodes.

Specified by:
wakeupAllNodes in interface MOOSNode
Throws:
java.rmi.RemoteException
java.io.IOException

runCommand

public byte[] runCommand(byte[] cmd,
                         int timeoutSec)
                  throws java.rmi.RemoteException,
                         java.io.IOException,
                         TimeoutException
Tell node to execute a Linux or shell command.

Specified by:
runCommand in interface Node
Throws:
java.rmi.RemoteException
java.io.IOException
TimeoutException

enterSafeMode

public void enterSafeMode()
                   throws java.rmi.RemoteException,
                          java.lang.Exception
Put node and its devices into "safe" mode.

Specified by:
enterSafeMode in interface Node
Throws:
java.rmi.RemoteException
java.lang.Exception

enterSafeMode

public void enterSafeMode(long wait)
                   throws java.rmi.RemoteException,
                          java.lang.Exception
Put node and its devices into "safe" mode.

Specified by:
enterSafeMode in interface Node
Throws:
java.rmi.RemoteException
java.lang.Exception

resumeNormalMode

public void resumeNormalMode()
                      throws java.rmi.RemoteException,
                             java.lang.Exception
Return from "safe" mode; resume normal operations.

Specified by:
resumeNormalMode in interface Node
Throws:
java.rmi.RemoteException
java.lang.Exception

annotate

public void annotate(byte[] annotation)
              throws java.rmi.RemoteException
Append annotation to node data stream.

Specified by:
annotate in interface Node
Throws:
java.rmi.RemoteException

exitApplication

public void exitApplication(boolean doSafemode,
                            boolean doHalt,
                            boolean enableBackups,
                            boolean doNotify,
                            boolean recursive,
                            int quitDelaySec,
                            int haltDelaySec,
                            java.lang.String msg)
                     throws java.rmi.RemoteException,
                            java.lang.Exception
Shutdown all services and exits the SIAM application.

Specified by:
exitApplication in interface Node
Throws:
java.rmi.RemoteException
java.lang.Exception

startSession

public NodeSessionInfo startSession(boolean renewWDT,
                                    byte[] initScript,
                                    int scriptTimeoutSec)
                             throws java.lang.Exception
Prepare for telemetry retrieval session

Specified by:
startSession in interface Node
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.