Table of Contents

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

byte

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

IEnumerable<byte>

SlaveAddress

Gets the address of the slave (server). Default is 0.

byte SlaveAddress { get; }

Property Value

byte

TransactionId

Gets a unique identifier assigned to a message when using the IP protocol.

ushort TransactionId { get; }

Property Value

ushort

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.