|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAdminTarget
IAdminTarget allows data to be sent to and from the admin command processor on a SPOT, either locally via
USB or remotely via the radio. It should be used in the context of executing an ISpotClientCommand
and obtained via ISpotClientCommandHelper.getAdminTarget()
.
Method Summary | |
---|---|
void |
checkResponse()
Wait for a response from the target, and then check whether an error occurred. |
void |
flashFile(Flashable flashable,
String flashCommand,
byte[] params)
Send data with flow control, so that data is not sent faster than the target can handle it. |
DataInputStream |
getDataInputStream()
Answer a DataInputStream over the stream of input from the target. |
IFlashFileInfo |
getFileInfo(String filename)
Get information describing an flashmanagement.FlashFile on the target. |
void |
sendAdminCommand(String command)
Send the command to the target |
void |
sendAdminCommand(String command,
byte[] params)
Send the command to the target with any params as a byte array |
Method Detail |
---|
void sendAdminCommand(String command) throws SpotClientUnknownCommandException, IOException
command
-
SpotClientUnknownCommandException
IOException
void sendAdminCommand(String command, byte[] params) throws SpotClientUnknownCommandException, IOException
command
- params
-
SpotClientUnknownCommandException
IOException
void checkResponse() throws IOException, SpotClientFailureException, SpotClientUnknownCommandException
SpotClientUnknownCommandException
- if the remote SPOT doesn't recognise the command
SpotClientFailureException
- if either the remote SPOT didn't verify the command or
the remote SPOT reported some other error (specified in the exception message)
IOException
IFlashFileInfo getFileInfo(String filename) throws IOException
flashmanagement.FlashFile
on the target.
filename
- The name of the flashmanagement.FlashFile
IOException
void flashFile(Flashable flashable, String flashCommand, byte[] params) throws IOException
IOTACommandHelper.receiveDataWithFlowControl(long, java.io.OutputStream)
and it's callers for examples
of the corresponding SPOT-side code.
flashable
- - the data to be sentflashCommand
- - the admin ISpotClientCommand
associated with this dataparams
- - any parameters for the flashCommand
IOException
DataInputStream getDataInputStream()
DataInputStream
over the stream of input from the target.
DataInputStream
|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |