예제 #1
0
        public SetEmergency setAs(SetEmergency value)
        {
            m_MsgHeader = value.m_MsgHeader;
            m_Body      = value.m_Body;

            return(this);
        }
예제 #2
0
        public SetEmergency(SetEmergency value)
        {
            /// Initiliaze the protected variables
            m_MsgHeader = new MsgHeader();
            m_Body = new Body();
            m_IsCommand = true;

            /// Copy the values
            m_MsgHeader = value.m_MsgHeader;
            m_Body = value.m_Body;
        }
예제 #3
0
        public SetEmergency(SetEmergency value)
        {
            /// Initiliaze the protected variables
            m_MsgHeader = new MsgHeader();
            m_Body      = new Body();
            m_IsCommand = true;

            /// Copy the values
            m_MsgHeader = value.m_MsgHeader;
            m_Body      = value.m_Body;
        }
        public virtual void sendManagementMessageAction(MenuItemEntered msg)
        {
            Resume resume_msg = new Resume();
            Standby standby_msg = new Standby();
            SetEmergency set_emergency_msg = new SetEmergency();
            ClearEmergency clear_emergency_msg = new ClearEmergency();
            QueryStatus query_status_msg = new QueryStatus();
            ReleaseControl release_control_msg = new ReleaseControl();
            Shutdown shutdown_msg = new Shutdown();

            JausAddress dest = new JausAddress(jausRouter.getJausAddress().getSubsystemID(),
                      jausRouter.getJausAddress().getNodeID(),
                      (byte)160);

            switch (msg.getMenuItemEnteredBody().getMenuItemEnteredRecord().getSelection())
            {
            case 1:
            Console.WriteLine("Sending Resume");
            sendJausMessage(resume_msg, dest);
            break;
            case 2:
            Console.WriteLine("Sending Standby");
            sendJausMessage(standby_msg, dest);
            break;
            case 3:
            Console.WriteLine("Sending SetEmergency");
            sendJausMessage(set_emergency_msg, dest);
            break;
            case 4:
            Console.WriteLine("Sending ClearEmergency");
            sendJausMessage(clear_emergency_msg, dest);
            break;
            case 5:
            Console.WriteLine("Sending QueryStatus");
            sendJausMessage(query_status_msg, dest);
            break;
            case 6:
            Console.WriteLine("Sending Shutdown");
            sendJausMessage(shutdown_msg, dest);
            break;
            case 7:
            Console.WriteLine("Sending ReleaseControl");
            sendJausMessage(release_control_msg, dest);
            break;
            case 8:
            Console.WriteLine("Sending Terminate");
            terminateServiceAction();
            break;
            default:
            Console.WriteLine("Unknown input: " + msg.getMenuItemEnteredBody().getMenuItemEnteredRecord().getSelection());
            break;
            }
        }
예제 #5
0
        public bool  isEqual(SetEmergency value)
        {
            if (!this.getMsgHeader().isEqual(value.getMsgHeader()))
            {
                return(false);
            }
            if (!this.getBody().isEqual(value.getBody()))
            {
                return(false);
            }

            return(true);
        }
예제 #6
0
        public SetEmergency setAs(SetEmergency value)
        {
            m_MsgHeader = value.m_MsgHeader;
            m_Body = value.m_Body;

            return this;
        }
예제 #7
0
 public bool notEquals(SetEmergency value)
 {
     return !this.isEqual(value);
 }
예제 #8
0
        public bool isEqual(SetEmergency value)
        {
            if (!this.getMsgHeader().isEqual(value.getMsgHeader()))
            {
            return false;
            }
            if (!this.getBody().isEqual(value.getBody()))
            {
            return false;
            }

            return true;
        }
예제 #9
0
 public bool  notEquals(SetEmergency value)
 {
     return(!this.isEqual(value));
 }
        public virtual void sendManagementMessageAction(MenuItemEntered msg)
        {
            Resume         resume_msg          = new Resume();
            Standby        standby_msg         = new Standby();
            SetEmergency   set_emergency_msg   = new SetEmergency();
            ClearEmergency clear_emergency_msg = new ClearEmergency();
            QueryStatus    query_status_msg    = new QueryStatus();
            ReleaseControl release_control_msg = new ReleaseControl();
            Shutdown       shutdown_msg        = new Shutdown();

            JausAddress dest = new JausAddress(jausRouter.getJausAddress().getSubsystemID(),
                                               jausRouter.getJausAddress().getNodeID(),
                                               (byte)160);

            switch (msg.getMenuItemEnteredBody().getMenuItemEnteredRecord().getSelection())
            {
            case 1:
                Console.WriteLine("Sending Resume");
                sendJausMessage(resume_msg, dest);
                break;

            case 2:
                Console.WriteLine("Sending Standby");
                sendJausMessage(standby_msg, dest);
                break;

            case 3:
                Console.WriteLine("Sending SetEmergency");
                sendJausMessage(set_emergency_msg, dest);
                break;

            case 4:
                Console.WriteLine("Sending ClearEmergency");
                sendJausMessage(clear_emergency_msg, dest);
                break;

            case 5:
                Console.WriteLine("Sending QueryStatus");
                sendJausMessage(query_status_msg, dest);
                break;

            case 6:
                Console.WriteLine("Sending Shutdown");
                sendJausMessage(shutdown_msg, dest);
                break;

            case 7:
                Console.WriteLine("Sending ReleaseControl");
                sendJausMessage(release_control_msg, dest);
                break;

            case 8:
                Console.WriteLine("Sending Terminate");
                terminateServiceAction();
                break;

            default:
                Console.WriteLine("Unknown input: " + msg.getMenuItemEnteredBody().getMenuItemEnteredRecord().getSelection());
                break;
            }
        }