/// <summary> /// /// </summary> /// <returns></returns> public override IDeviceResponse ClearDisplay() { if (IgnoreSendMessage) { return(_deviceResponse); } Telegram.Length = 0; Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend2); Telegram.Append(BinBaseAddr.ToString()); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend0); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend7); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend3); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend2); Telegram.Append(AlphaBaseAddr.ToString()); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend0); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend8); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend3); return(TelegramResponse(1, ItemNeeded.STATUS)); }
/// <summary> /// /// </summary> /// <param name="slot"></param> /// <param name="quantity"></param> /// <param name="message"></param> /// <returns></returns> private IDeviceResponse MoveCarousel(Slot slot, int?quantity, string message) { ResetLog(); ClearDisplay(); if (slot != null) { int shelfNum = (int)slot.Bin.Shelf.ShelfNum; Telegram.Length = 0; if (!IgnoreSendMessage) { Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend2); Telegram.Append(BinBaseAddr.ToString()); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend0); Telegram.Append("{"); if (slot.Bin.LeftOffset != null) { Telegram.Append(GetAsciiEncodedPosition((int)slot.Bin.LeftOffset)); } else { Telegram.Append(GetAsciiEncodedPosition((int)slot.Bin.BinNum)); } string slotText = slot.SlotNum.ToString(); if (slotText.Length > 1) { Telegram.Append(" "); } else { Telegram.Append(slotText); } Telegram.Append("}"); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend3); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend2); Telegram.Append(AlphaBaseAddr.ToString()); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend0); Telegram.Append("{0"); message = quantity.ToString(); if (!string.IsNullOrEmpty(slot.DispenseForm)) { message += " " + slot.DispenseForm.Trim(); } if (message.Length > 10) { message = message.Substring(0, 10); } message = message.PadRight(10, ' '); Telegram.Append(message); Telegram.Append("}"); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend3); } Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend2); Telegram.Append(CarAddress); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend9); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend0); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend10); Telegram.Append(shelfNum.ToString(Constants.TelegramAppend.CarWhiteTelegramAppend12)); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend3); Telegram.Append(Constants.TelegramAppend.CarWhiteTelegramAppend6); TargetShelf = shelfNum; return(TelegramResponse(1, ItemNeeded.STATUS)); } else { return(_deviceResponse); } }