The lease utility establishes and manages comms leases on the node's communications link. When a lease is extablished, the CPU is not allowed to sleep and the wireless network connections will be maintained for a specified duration (specified in seconds).
Any number of leases may be taken out by people, programs, etc. at any given time. As long as any lease is still valid, the communications link will stay active and the CPU will remain awake. When the time that you specified for your lease has elapsed, the lease expires unless it is renewed. If there are no other active leases, the communications link will then be allowed to go down and the CPU may sleep (if enabled to do so).
When a lease is established, lease returns a lease ID which may be used in subsequent transactions for that lease. Once established, a lease may be renewed or terminated using subsequent calls to lease with the appropriate options and lease ID.
Parameters can be in almost any order. The only constraint is that for "-renew", leaseID must occur before time.
When a lease is established on a SIAM subnode, another lease is
automatically established on the surface node as well, to ensure that
the wireless link stays connected for at least as long as the original
lease is in effect.
| Option | Description | Values |
|---|---|---|
| nodeURL | IP address or host name of SIAM node | e.g. 134.89.88.1, mooring.moos.mbari.org |
| -establish durationSec | Establish a communications lease for durationSec seconds | default is 600 sec |
| -renew leaseID durationSec | Renew an existing lease for durationSec seconds | - |
| -terminate leaseID | Terminate the specified lease | - |
| -aux | Use auxilliary shore link (e.g., redundant globalstar) | - |
Example output:
none
The following environment variables must be set:
| Variable | Description | Example |
|---|---|---|
| JAVA_HOME | location of Java installation | /j9, /opt/java/jdk1.3.1, etc. |
| JAVA | Path to JVM command | For MMC $JAVA_HOME/bin/j9 For Sun JVM (e.g. linux, win32, mac OS) $JAVA_HOME/bin/java
|
| SIAM_HOME | top of the SIAM directory tree | - |
| SIAM_CLASSPATH | Path including all SIAM and supporting classes | For MMC $JAVA_HOME/lib/jclMax/classes.zip:$JAVA_HOME/lib/prsnlmot.jar:$JAVA_HOME/lib/RXTXcomm.jar:$SIAM_HOME/classes For linux/win32 $SIAM_HOME/classes |