private void SpeechToAction(string text) { if (_db == null) { return; } if (_db[text] == null) { this.label2.ForeColor = Color.Red; this.label2.Font = _nonrecognized_font; this.label2.Text = text; return; } //text found in Data base this.label2.ForeColor = Color.Black; this.label2.Font = _recognized_font; this.label2.Text = text; //read the message + confirmed //ReadAloud(text + " confirmed"); //send the telegram here... KNX.EIBTelegram telegram = (KNX.EIBTelegram)_db[text]; int res = _server.SendEIBNetwork(telegram.DestAddress.RawAddress, telegram.APCI, CGenericServerWrapper.SendMode.WaitForConfirm); if (res == 0) { _logger.Log(String.Format("Sending command to {0} Failed.", ((KNX.EIBTelegram)_db[text]).DestAddress.ToString())); } else { _logger.Log(String.Format("Sending command to {0} Success.", ((KNX.EIBTelegram)_db[text]).DestAddress.ToString())); } }
public SingleRecord() { _telegram = new EIBTelegram(); }