public class SampUtils extends Object implements Closeable
| Constructor and Description |
|---|
SampUtils(String name,
boolean autoStartHub)
Create an instance of SampUtils and attempt to connect to a SAMP hub.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
display(File file)
Ask ds9 to display a fits file, assuming that the fits file is directly
readable by ds9 and is mosaic iraf format .
|
List<Object> |
ds9Get(String command,
int timeout)
Send a ds9.get command over SAMP.
|
void |
ds9Set(String command,
URI uri,
int timeout)
Send a ds9.set command over SAMP.
|
List<String> |
getDS9Version()
Get a list of versions of DS9 clients connected to hub.
|
static void |
main(String[] args)
Just for testing
|
public SampUtils(String name, boolean autoStartHub)
name - The name of the subsystem (to be displayed in SAMP hub).autoStartHub - If true attempt to start a hub if one is
not already running.public void display(File file) throws org.astrogrid.samp.client.SampException
file - The file to be displayed.org.astrogrid.samp.client.SampException - If an error occurspublic List<String> getDS9Version() throws org.astrogrid.samp.client.SampException
org.astrogrid.samp.client.SampException - If an errors occurspublic void ds9Set(String command, URI uri, int timeout) throws org.astrogrid.samp.client.SampException
command - The command to be sent to DS9.uri - The optional URI to be sent, or nulltimeout - The timeout (in milliseconds?)org.astrogrid.samp.client.SampException - If an error occurs sending the message (for example
no hub running).public List<Object> ds9Get(String command, int timeout) throws org.astrogrid.samp.client.SampException
command - The command to send.timeout - The timeout (in milliseconds?)org.astrogrid.samp.client.SampException - If an error occurs.public static void main(String[] args) throws org.astrogrid.samp.client.SampException
args - org.astrogrid.samp.client.SampExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016 LSST. All rights reserved.