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