Class DeviceMessageAttribute

Namespace
ProtoTest.Devices
Assembly
ProtoTest.Devices.dll

Declares a text message: an optional leading token and the field separator. Without the attribute a message has no prefix and separates its fields with commas. A checksum goes in DeviceChecksumAttribute<TChecksum>.

[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class DeviceMessageAttribute : Attribute
Inheritance
DeviceMessageAttribute
Inherited Members
Extension Methods

Constructors

DeviceMessageAttribute(string)

Declares a text message: an optional leading token and the field separator. Without the attribute a message has no prefix and separates its fields with commas. A checksum goes in DeviceChecksumAttribute<TChecksum>.

public DeviceMessageAttribute(string prefix = "")

Parameters

prefix string

Properties

Prefix

Gets the leading token, such as $GPGGA, written first and required when parsing.

public string Prefix { get; }

Property Value

string

Separator

Gets or sets the text between fields. Defaults to a comma. An empty separator makes a fixed-width message, where every field needs a Width.

public string Separator { get; set; }

Property Value

string