Package org.km3net.clb.remote
Class CmdBase
- java.lang.Object
-
- org.km3net.clb.remote.Control.CommandGroup
-
- org.km3net.clb.remote.CmdBase
-
public class CmdBase extends Control.CommandGroup
This class encapsulates encoding and decoding of all base commands.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmdBase.BpsReply
Reply object returned by BPS.
-
Field Summary
-
Fields inherited from class org.km3net.clb.remote.Control.CommandGroup
ctl, msg
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response<java.lang.Void>
configure()
Configures the base.Response<CmdBase.BpsReply>
dbgBpsCmdReply(int cmd, byte[] data, int expReply, int expReplyLen)
Sends an BPS command, and returns a BPS reply (if successful).Response<java.lang.String>
dbgEdfaCmd(java.lang.String cmd)
Send an EDFA command, but w/o a reply.Response<java.lang.String>
dbgEdfaCmdReply(java.lang.String cmd)
Send an EDFA command, returning an reply.Response<java.lang.Void>
reset()
Resets the base module.
-
-
-
Method Detail
-
configure
public Response<java.lang.Void> configure()
Configures the base.
-
reset
public Response<java.lang.Void> reset()
Resets the base module.
-
dbgEdfaCmd
public Response<java.lang.String> dbgEdfaCmd(java.lang.String cmd)
Send an EDFA command, but w/o a reply. Note: Usage of this function is discouraged
-
dbgEdfaCmdReply
public Response<java.lang.String> dbgEdfaCmdReply(java.lang.String cmd)
Send an EDFA command, returning an reply. Note: Usage of this function is discouraged
-
dbgBpsCmdReply
public Response<CmdBase.BpsReply> dbgBpsCmdReply(int cmd, byte[] data, int expReply, int expReplyLen)
Sends an BPS command, and returns a BPS reply (if successful). For the data signed bytes are used. However, one can simply interpt these as unsigned.data[3] = (byte) 0xA2; // write unsigned byte (as asigned) int code = 0xFF & data[2]; // read signed byte, convert to unsigned.
- Parameters:
cmd
- The command code.data
- The data attached to the command, or null if there is no data.expReply
- The expected reply code.- Returns:
- A response containing the reply data bytes. Could be an empty array.
-
-