using System.Diagnostics.CodeAnalysis; namespace Modbus.Message { /// /// A message built by the master (client) that initiates a Modbus transaction. /// public interface IModbusMessage { /// /// The function code tells the server what kind of action to perform. /// byte FunctionCode { get; set; } /// /// Address of the slave (server). /// byte SlaveAddress { get; set; } /// /// Composition of the slave address and protocol data unit. /// [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] byte[] MessageFrame { get; } /// /// Composition of the function code and message data. /// [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] byte[] ProtocolDataUnit { get; } /// /// A unique identifier assigned to a message when using the IP protocol. /// ushort TransactionId { get; set; } /// /// Initializes a modbus message from the specified message frame. /// /// The frame. void Initialize(byte[] frame); } }