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