Esempio n. 1
0
        /// <summary>
        /// called when new notification round -> calls core / adds to db
        /// </summary>
        /// <param name="msg"></param>
        public new static void CallBack(ROSBridgeMsg msg)
        {
            ErrorMsg error     = (ErrorMsg)msg;
            float    timeframe = error.GetTimeFrame();

            if (timeframe == 0) // if valid time frame
            {
                return;
            }
            if (Enum.IsDefined(typeof(DummyStates.State), error.GetCode())) // if valid error code
            {
                Notification note = VRUILogic.Instance.AddNewNotification(DummyStates.MessageType.ERROR, (DummyStates.State)error.GetCode(),
                                                                          error.GetObject(), timeframe);
                note.AddAdditionalContent(error.GetExtra());
            }
        }