Class CmdBase


  • public class CmdBase
    extends Control.CommandGroup
    This class encapsulates encoding and decoding of all base commands.
    • 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:
      • bpsAlarmSetThreshold

        public Response<java.lang.Void> bpsAlarmSetThreshold​(int alarmIdx,
                                                             short value)
      • bpsAlarmSetTimeout

        public Response<java.lang.Void> bpsAlarmSetTimeout​(int alarmIdx,
                                                           short value)
      • bpsAlarmResetMaxCnt

        public Response<java.lang.Void> bpsAlarmResetMaxCnt​(int alarmIdx)
      • bpsAlarmResetFired

        public Response<java.lang.Void> bpsAlarmResetFired​(int alarmIdx)
      • 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.
         
         data[3] = (byte) 0xA2;       // write unsigned byte (as asigned)
         int code = 0xFF & data[2];   // read signed byte, convert to unsigned.
         
         
        Note: Usage of this function is discouraged
        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.