You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
namespace Mirle.Component.MPLC.DataBlocks.Interfaces { /// <summary>
/// 資料區塊介面
/// </summary>
public interface IDataBlock { /// <summary>
/// 設置原始資料
/// </summary>
/// <param name="newRawData">原始資料</param>
void SetRawData(byte[] newRawData); /// <summary>
/// 取得原始資料
/// </summary>
/// <returns>原始資料</returns>
byte[] GetRawData(); /// <summary>
/// 取得位元
/// </summary>
/// <param name="address">位置</param>
/// <param name="value">是否成功取得</param>
/// <returns>True/False</returns>
bool TryGetBit(string address, out bool value); /// <summary>
/// 設置位元開啟
/// </summary>
/// <param name="address">位置</param>
/// <returns>True/False</returns>
bool TrySetBitOn(string address); /// <summary>
/// 設置位元關閉
/// </summary>
/// <param name="address">位置</param>
/// <returns>True/False</returns>
bool TrySetBitOff(string address); /// <summary>
/// 取得字元
/// </summary>
/// <param name="address">位置</param>
/// <param name="value">值</param>
/// <returns>True/False</returns>
bool TryGetWord(string address, out int value); /// <summary>
/// 設置字元
/// </summary>
/// <param name="address">位置</param>
/// <param name="value">值</param>
/// <returns>True/False</returns>
bool TrySetWord(string address, int value); /// <summary>
/// 取得多個字元
/// </summary>
/// <param name="address">位置</param>
/// <param name="data">資料集</param>
/// <param name="length">長度</param>
/// <returns>True/False</returns>
bool TryGetWords(string address, out int[] data, int length); /// <summary>
/// 設置多個字元
/// </summary>
/// <param name="address">位置</param>
/// <param name="data">資料集</param>
/// <returns>True/False</returns>
bool TrySetWords(string address, int[] data); } }
|