Interface ICustomMessage
- Namespace
- Loehnert.Lisrt.Communication.Modbus
- Assembly
- Loehnert.Lisrt.Communication.Modbus.dll
Represents a message for a Modbus transaction.
public interface ICustomMessage
Properties
FunctionCode
Gets the function code, which tells the server what kind of action to perform.
byte FunctionCode { get; }
Property Value
MessageFrame
Gets the message frame. A composition of the slave address and protocol data unit. Set by Initialize(IEnumerable<byte>).
IEnumerable<byte> MessageFrame { get; }
Property Value
SlaveAddress
Gets the address of the slave (server). Default is 0.
byte SlaveAddress { get; }
Property Value
TransactionId
Gets a unique identifier assigned to a message when using the IP protocol.
ushort TransactionId { get; }
Property Value
Methods
Initialize(IEnumerable<byte>)
Initializes a Modbus message from the specified message frame.
void Initialize(IEnumerable<byte> frame)
Parameters
frame
IEnumerable<byte>Bytes of Modbus frame.