/// <summary> /// called when new notification round -> calls core / adds to db /// </summary> /// <param name="msg"></param> public new static void CallBack(ROSBridgeMsg msg) { DebugMsg debug = (DebugMsg)msg; float timeframe = debug.GetTimeFrame(); if (timeframe == 0) // if valid time frame { return; } if (Enum.IsDefined(typeof(DummyStates.State), debug.GetCode())) // if valid error code { Notification note = VRUILogic.Instance.AddNewNotification(DummyStates.MessageType.DEBUG, (DummyStates.State)debug.GetCode(), debug.GetObject(), timeframe); note.AddAdditionalContent(debug.GetExtra()); } }
/// <summary> /// called when new notification round -> calls core / adds to db /// </summary> /// <param name="msg"></param> public new static void CallBack(ROSBridgeMsg msg) { Debug.Log("Found INFO Msg."); InfoMsg info = (InfoMsg)msg; float timeframe = info.GetTimeFrame(); if (timeframe == 0) // if valid time frame { return; } if (Enum.IsDefined(typeof(DummyStates.State), info.GetCode())) // if valid error code { Notification note = VRUILogic.Instance.AddNewNotification(DummyStates.MessageType.INFO, (DummyStates.State)info.GetCode(), info.GetObject(), timeframe); note.AddAdditionalContent(info.GetExtra()); } }
/// <summary> /// called when new notification round -> calls core / adds to db /// </summary> /// <param name="msg"></param> public new static void CallBack(ROSBridgeMsg msg) { Debug.Log("Warning MSg received"); WarningMsg warning = (WarningMsg)msg; float timeframe = warning.GetTimeFrame(); if (timeframe == 0) // if valid time frame { return; } if (Enum.IsDefined(typeof(DummyStates.State), warning.GetCode())) // if valid error code { Debug.Log("Adding ..."); Debug.Log("object: " + warning.GetObject()); Notification note = VRUILogic.Instance.AddNewNotification(DummyStates.MessageType.WARNING, (DummyStates.State)warning.GetCode(), warning.GetObject(), timeframe); note.AddAdditionalContent(warning.GetExtra()); } }