HamBook – Blame information for rev 46
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
38 | office | 1 | using System; |
2 | using System.Collections.Generic; |
||
3 | using System.ComponentModel; |
||
4 | using System.IO.Ports; |
||
5 | using System.Linq; |
||
6 | using System.Text; |
||
7 | using System.Threading.Tasks; |
||
8 | using HamBook.Radios.Generic; |
||
9 | using static HamBook.Radios.Yaesu.FT_891.Constants; |
||
10 | using RJCP.IO.Ports; |
||
11 | using System.Threading; |
||
12 | |||
13 | namespace HamBook.Radios.Yaesu.FT_891.CAT |
||
14 | { |
||
15 | [Radio("Yaesu FT-891")] |
||
16 | public class SV : Generic.CAT.SV |
||
17 | { |
||
18 | public override CatLength CatLength => new CatLength { Set = 3 }; |
||
19 | |||
20 | public SV(SerialPortStream serialPort) : base(serialPort) |
||
21 | { |
||
22 | } |
||
23 | |||
24 | public override void Set() |
||
25 | { |
||
46 | office | 26 | SerialPort.Write($"{Name}{Constants.EOT}"); |
38 | office | 27 | } |
28 | |||
29 | public override async Task WriteAsync(CancellationToken cancellationToken) |
||
30 | { |
||
46 | office | 31 | var payload = Constants.Encoding.GetBytes($"{Name}{Constants.EOT}"); |
38 | office | 32 | |
33 | await SerialPort.WriteAsync(payload, 0, payload.Length, cancellationToken); |
||
34 | } |
||
35 | } |
||
36 | } |