public class CmdSystem extends Control.CommandGroup
Modifier and Type | Class and Description |
---|---|
static class |
CmdSystem.DateRev
Class enclosing date and revision.
|
static class |
CmdSystem.ImageInfo
Image info class.
|
static class |
CmdSystem.LogData |
static class |
CmdSystem.PersistentLogLines
Helper class to get the last log lies.
|
static class |
CmdSystem.RtConfig |
ctl, msg
Modifier and Type | Method and Description |
---|---|
Response<java.lang.Void> |
boot(int imgNo)
Attempts to boot the provided image number.
|
Response<java.lang.Void> |
consoleTunnelDeinit()
Deinitializes the console tunnel.
|
Response<java.lang.Void> |
consoleTunnelInit(java.net.InetSocketAddress addr)
Initializes a consolse tunnel to the specified Socket address.
|
Response<java.lang.Void> |
consoleTunnelSend(java.lang.String ptp,
java.lang.String secLm)
Sends character data to the PTP and 2nd LM32.
|
void |
consoleTunnelSetRecvHandler(MessageEventHandler<java.lang.String[]> handler)
Sets the console tunnel receive handler.
|
Response<java.lang.Void> |
coreDumpClear()
Send a ping command.
|
Response<CmdSystem.DateRev> |
dateRev()
This command returns the date and revision information of the system,
both the hardware and software version.
|
void |
emitUpdate(int chunkNo,
byte[] chunk)
Emits a single chunk of the update (suitable for multicast).
|
Response<java.lang.Void> |
endUpdate()
Stops an update.
|
Response<java.lang.Void> |
eventTarget()
Configures this controller as the target for events.
|
Response<CmdSystem.ImageInfo[]> |
getImageInfo()
Returns a list of images on the flash.
|
Response<CmdSystem.RtConfig> |
getRtConfig()
Gets the runtime configuration.
|
Response<CmdSystem.LogData> |
logGet(long lastId)
Returns a number of log-lines from the connected CLB.
|
void |
logPersistentGet(int noOfLines,
CmdSystem.PersistentLogLines callback)
Gets a number of persistet log-lines.
|
Response<java.lang.Void> |
ping()
Send a ping command.
|
Response<java.lang.Void> |
sendUpdate(int chunkNo,
byte[] chunk)
Send a single chunk of the update (suitable for unicast).
|
Response<java.lang.Void> |
setEventTarget(java.net.InetSocketAddress sAddr)
Sets or clears an event target with the specified socket address.
|
Response<CmdSystem.RtConfig> |
setRtConfig(CmdSystem.RtConfig rtConfig)
Sets the runtime configuration.
|
Response<java.lang.Void> |
startUpdate(int imgIdx,
int chunkCnt)
Initiates an update.
|
Response<java.lang.Void> |
stopGolden()
Prevents the golden image from booting the runtime image.
|
Response<java.lang.Void> |
unlockGolden()
Unlocks the golden image for writing.
|
Response<java.lang.Boolean> |
verify(int imgNo,
int chunkNo,
byte[] chunk)
Verifies a part of the image.
|
public Response<java.lang.Void> ping()
public Response<CmdSystem.DateRev> dateRev()
System.out.printf("Date & Revision: " +
"Hardware: %08x, Software: %08x\n",
dr.hwDateRev, dr.swDateRev);
public Response<java.lang.Void> eventTarget()
setEventTarget(InetSocketAddress)
public Response<java.lang.Void> setEventTarget(java.net.InetSocketAddress sAddr)
sAddr
- The socket address, or null to clear.public Response<java.lang.Void> startUpdate(int imgIdx, int chunkCnt)
imgIdx
- Image indexchunkCnt
- Chunk countpublic Response<java.lang.Void> sendUpdate(int chunkNo, byte[] chunk)
chunkNo
- The chunk indexchunk
- The chunk data (512 bytes).public void emitUpdate(int chunkNo, byte[] chunk)
chunkNo
- The chunk indexchunk
- The chunk data (512 bytes).public Response<java.lang.Void> endUpdate()
imgIdx
- Image indexchunkCnt
- Chunk countpublic Response<java.lang.Void> unlockGolden()
public Response<java.lang.Void> stopGolden()
public Response<java.lang.Void> boot(int imgNo)
imgNo
- Number to boot.public Response<java.lang.Boolean> verify(int imgNo, int chunkNo, byte[] chunk)
imgNo
- Image numberchunkNo
- Chunk numberchunk
- Data to comparepublic Response<CmdSystem.LogData> logGet(long lastId)
lastId
- The last log-line ID received, or else 0.public void logPersistentGet(int noOfLines, CmdSystem.PersistentLogLines callback)
noOfLines
- the number of lines to return (max).callback
- The callback which handles the lines as they come in.public Response<java.lang.Void> consoleTunnelInit(java.net.InetSocketAddress addr)
addr
- The socket address. Provide null to use this control instance.public Response<java.lang.Void> consoleTunnelDeinit()
public Response<java.lang.Void> consoleTunnelSend(java.lang.String ptp, java.lang.String secLm)
ptp
- The PTP core character data to send. May be empty or null.secLm
- The 2nd LM32 character data to send. May be empty or null.public void consoleTunnelSetRecvHandler(MessageEventHandler<java.lang.String[]> handler)
handler
- The handler, or null to remove the handler.public Response<CmdSystem.ImageInfo[]> getImageInfo()
public Response<CmdSystem.RtConfig> setRtConfig(CmdSystem.RtConfig rtConfig)
rtConfig
- The runtime configuration to applypublic Response<CmdSystem.RtConfig> getRtConfig()
public Response<java.lang.Void> coreDumpClear()