private static int CalculatePriority(COM_ROLLINGMSG_TYPE type, byte innerPriority) { int result = 1; if (type == COM_ROLLINGMSG_TYPE.COM_ROLLINGMSG_TYPE_IDIP) { result = (int)(100 + innerPriority); } else if (type == COM_ROLLINGMSG_TYPE.COM_ROLLINGMSG_TYPE_HORN) { result = (int)(10 + innerPriority); } else if (type == COM_ROLLINGMSG_TYPE.COM_ROLLINGMSG_TYPE_EVENT) { result = (int)(1 + innerPriority); } else { DebugHelper.Assert(false, "CalculatePriority.CalculatePriority(): invalid rolling msg type {0}", new object[] { type }); } return(result); }
private static int CalculatePriority(COM_ROLLINGMSG_TYPE type, byte innerPriority) { if (type == COM_ROLLINGMSG_TYPE.COM_ROLLINGMSG_TYPE_IDIP) { return(100 + innerPriority); } if (type == COM_ROLLINGMSG_TYPE.COM_ROLLINGMSG_TYPE_HORN) { return(10 + innerPriority); } if (type == COM_ROLLINGMSG_TYPE.COM_ROLLINGMSG_TYPE_EVENT) { return(1 + innerPriority); } object[] inParameters = new object[] { type }; DebugHelper.Assert(false, "CalculatePriority.CalculatePriority(): invalid rolling msg type {0}", inParameters); return(1); }