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 classCmdBase.BpsAlarmNamestatic classCmdBase.BpsAlarmStatestatic classCmdBase.BpsAlarmValuestatic classCmdBase.BpsBooleanStatestatic classCmdBase.BpsComResultstatic classCmdBase.BpsReplyReply object returned by BPS.static classCmdBase.BpsSwitchStatestatic classCmdBase.BpsType
-
Field Summary
-
Fields inherited from class org.km3net.clb.remote.Control.CommandGroup
ctl, msg
-
-
Method Summary
-
-
-
Method Detail
-
configure
public Response<java.lang.Void> configure()
Configures the base.
-
reset
public Response<java.lang.Void> reset()
Resets the base module.
-
lblCmd
public Response<java.lang.Void> lblCmd(int cmd)
Send a LBL command (see PV bse.lbl_cmd)- Parameters:
cmd-- Returns:
-
bpsSwitchCmd
public Response<CmdBase.BpsSwitchState> bpsSwitchCmd(int switchIdx)
-
bpsSwitchCmd
public Response<CmdBase.BpsSwitchState> bpsSwitchCmd(int switchIdx, CmdBase.BpsSwitchState.State state)
-
bpsAlarmEnableCmd
public Response<CmdBase.BpsAlarmState> bpsAlarmEnableCmd(int alarmIdx)
-
bpsAlarmEnableCmd
public Response<CmdBase.BpsAlarmState> bpsAlarmEnableCmd(int alarmIdx, CmdBase.BpsAlarmState.State state)
-
bpsAlarmSetThreshold
public Response<java.lang.Void> bpsAlarmSetThreshold(int alarmIdx, short value)
-
bpsAlarmGetThreshold
public Response<CmdBase.BpsAlarmValue> bpsAlarmGetThreshold(int alarmIdx)
-
bpsAlarmSetTimeout
public Response<java.lang.Void> bpsAlarmSetTimeout(int alarmIdx, short value)
-
bpsAlarmGetTimeout
public Response<CmdBase.BpsAlarmValue> bpsAlarmGetTimeout(int alarmIdx)
-
bpsAlarmGetMaxCnt
public Response<CmdBase.BpsAlarmValue> bpsAlarmGetMaxCnt(int alarmIdx)
-
bpsAlarmResetMaxCnt
public Response<java.lang.Void> bpsAlarmResetMaxCnt(int alarmIdx)
-
bpsAlarmGetFired
public Response<CmdBase.BpsBooleanState> bpsAlarmGetFired(int alarmIdx)
-
bpsAlarmResetFired
public Response<java.lang.Void> bpsAlarmResetFired(int alarmIdx)
-
bpsAlarmGetFiredCnt
public Response<CmdBase.BpsAlarmValue> bpsAlarmGetFiredCnt(int alarmIdx)
-
bpsAlarmsGetAllEnabled
public Response<CmdBase.BpsAlarmState[]> bpsAlarmsGetAllEnabled()
-
bpsAlarmsGetAllMaxCnt
public Response<CmdBase.BpsAlarmValue[]> bpsAlarmsGetAllMaxCnt()
-
bpsAlarmsGetAllFiredCnt
public Response<CmdBase.BpsAlarmValue[]> bpsAlarmsGetAllFiredCnt()
-
bpsRescueEnableCmd
public Response<java.lang.Boolean> bpsRescueEnableCmd()
-
bpsRescueEnableCmd
public Response<java.lang.Boolean> bpsRescueEnableCmd(boolean state)
-
bpsRescueGetStatus
public Response<java.lang.Boolean> bpsRescueGetStatus()
-
bpsRescueResetFired
public Response<java.lang.Void> bpsRescueResetFired()
-
bpsSetRescueTo
public Response<java.lang.Void> bpsSetRescueTo(short to)
-
bpsGetRescueTo
public Response<java.lang.Short> bpsGetRescueTo()
-
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.
Note: Usage of this function is discourageddata[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.
-
-