private static MessageIdentifier TranslateStopStatus(StopStatusValue ssv, int devId) { MessageIdentifier res; switch (ssv) { case StopStatusValue.StopStatusActive: res = MessageIdentifier.GarminStopStatusActive; break; case StopStatusValue.StopStatusDone: res = MessageIdentifier.GarminStopStatusDone; break; case StopStatusValue.StopStatusUnreadInactive: res = MessageIdentifier.GarminStopStatusUnreadInactive; break; case StopStatusValue.StopStatusReadInactive: res = MessageIdentifier.GarminStopStatusReadInactive; break; case StopStatusValue.StopStatusDeleted: res = MessageIdentifier.GarminStopStatusDeleted; break; default: res = MessageIdentifier.GarminStopStatusNa; break; } STrace.Debug(typeof(GarminFmi).FullName, devId, String.Format("GARMIN STOP STATUS RECEIVED: {0:d} - {0:G}", res)); return(res); }
public static byte[] EncodeA603StopStatusProtocol(int id, StopStatusValue stopStatus, UInt16 stopIndexInList) { return(FactoryGarminFmi( BitConverter.GetBytes(FmiPacketId.ScStopStatusRequest), BitConverter.GetBytes(id), BitConverter.GetBytes((ushort)stopStatus), (stopIndexInList == 9999 ? BitConverter.GetBytes(0xFFFF) : BitConverter.GetBytes(stopIndexInList)), new byte[] { 0 } )); }
public static byte[] EncodeA603StopStatusProtocol(int id, StopStatusValue stopStatus) { return(EncodeA603StopStatusProtocol(id, stopStatus, 9999)); }