private bool Send_Horizontal(byte hor) { HDLC_tx TempFreq = new HDLC_tx(); TempFreq.cmd = 0x03; TempFreq.Data = new List <byte> { hor }; TempFreq.CreateHDLC(); Globals.Serial.DiscardInBuffer(); Globals.Serial.Write(TempFreq.Buffer, 0, TempFreq.Buffer.Length); return(Aknowledged()); }
private bool Send_Single() { List <byte> TempData = new List <byte> { }; HDLC_tx TempFreq = new HDLC_tx(); TempFreq.cmd = 0x02; TempFreq.Data = TempData; TempFreq.CreateHDLC(); Globals.Serial.DiscardInBuffer(); Globals.Serial.Write(TempFreq.Buffer, 0, TempFreq.Buffer.Length); return(Aknowledged()); }
private bool Send_Trigger(byte trigger, byte Rising_Falling) { HDLC_tx TempFreq = new HDLC_tx(); TempFreq.cmd = 0x04; TempFreq.Data = new List <byte>() { trigger, Rising_Falling }; TempFreq.CreateHDLC(); Globals.Serial.DiscardInBuffer(); Globals.Serial.Write(TempFreq.Buffer, 0, TempFreq.Buffer.Length); return(Aknowledged()); }
private bool Send_RequestData() { List <byte> TempData = new List <byte> { Globals.Trigger }; HDLC_tx TempFreq = new HDLC_tx(); TempFreq.cmd = 0x05; if (radioButton_falling.Checked) { TempFreq.cmd = 0x06; } TempFreq.Data = TempData; TempFreq.CreateHDLC(); Globals.Serial.DiscardInBuffer(); Globals.Serial.Write(TempFreq.Buffer, 0, TempFreq.Buffer.Length); return(Aknowledged()); }
private bool SendRun_Stop(byte flag) { HDLC_tx TempFreq = new HDLC_tx(); TempFreq.cmd = 0x01; TempFreq.Data = new List <byte> { flag }; TempFreq.CreateHDLC(); try { Globals.Serial.Write(TempFreq.Buffer, 0, TempFreq.Buffer.Length); } catch (Exception) { return(false); } return(Aknowledged()); }