public int telegramFromMainWin(Telegram telegram) { TelegramContainer container = new TelegramContainer(); container.addTelegram(telegram); return telegramSeriesFromMainWin(container, SeriesExecutionState.Run, true); }
private void sendLabelDataChanges(int nodeNumber) { Telegram telegram = new Telegram(5); TelegramContainer container = new TelegramContainer(); telegram.uniqId = GlobalServices.uniqTelegramId(); telegram.parentUniqId = -1; telegram.type = TelegramType.Command; telegram.protocol = Protocol.DCP2; telegram.DCPCmdSet = 0x24; telegram.lastReplyPrecondition = LastReplyPrecondition.Indication; telegram.portHandler = this._ioph; telegram.mainWin = this; telegram.clearEventHandler(); telegram.CallbackEvent += new Telegram.Callback(this.processReplyData); telegram.data.copy(new byte[1]); byte[] buf = this._shelfLabelDescriptorSet[nodeNumber].getUpdatePayload(); telegram.data.append(buf, buf.Length); telegram.UserDataExt.addUserData("NodeNumber", nodeNumber); container.addTelegram(telegram); if (!this._adtRec.isSimuation && (this._ioph.telegramSeriesFromMainWin(container, SeriesExecutionState.Run, true) == -1)) { MessageBox.Show("Device is BUSY!"); } }