Multiprocotol Terminalprogram (BAT)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB

using System.ComponentModel;
using Library = RJCP.IO.Ports;
namespace MultiTerm.Protocols.Serial;
public enum Parity
{
//
// Summary:
// No parity.
[Description("None")]
None,
//
// Summary:
// Odd parity.
[Description("Odd")]
Odd,
//
// Summary:
// Even parity.
[Description("Even")]
Even,
//
// Summary:
// Mark parity.
[Description("Mark")]
Mark,
//
// Summary:
// Space parity.
[Description("Space")]
Space
}
internal class ParityLibraryEquivalentConverter : ILibraryEquivalentConverter<Parity, Library.Parity>
{
public Library.Parity ConvertToLibraryType(Parity obj)
{
return obj switch
{
Parity.None => Library.Parity.None,
Parity.Odd => Library.Parity.Odd,
Parity.Even => Library.Parity.Even,
Parity.Mark => Library.Parity.Mark,
Parity.Space => Library.Parity.Space,
_ => throw new NotImplementedException(),
};
}
public Parity ConvertToLocalType(Library.Parity obj)
{
throw new NotImplementedException();
}
}