///
/// Copyright (c) 2015-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.GenericDevices
{
public interface IModbus : IComponent
{
///
/// Send an arbitrary modbus message.
/// When the message length is N, however only bytes 1..N-2 have to be set.
/// The last two message bytes (CRC) may be uninitialized or zero.
/// They are calculated inside this function as required by Modbus specification.
///
/// Message incl CRC fields, CRC bytes dont have to be set
void SendMessage(byte[] message);
///
/// Send a structured modbus message.
///
/// Device address (1..255) or 0 = broadcast
/// Function (0..127)
/// Address of data to be transferred (0..65535)
/// Count of data bytes to be transferred (0..65535)
void SendMessage(byte modbusAddress, byte function, ushort dataAddress, ushort dataCount);
Queue[] ReceivedTelegrams { get; }
}
}