mirror of
https://github.com/OpenLogics/MewtocolNet.git
synced 2025-12-06 11:11:23 +00:00
Added string value to register base for viewmodel support
- counted up version number
This commit is contained in:
@@ -19,11 +19,37 @@ namespace MewtocolNet.Registers {
|
||||
public event Action<object> ValueChanged;
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// The register name or null of not defined
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// The registers memory adress if not a special register
|
||||
/// </summary>
|
||||
public int MemoryAdress { get; set; }
|
||||
/// <summary>
|
||||
/// The rgisters memory length
|
||||
/// </summary>
|
||||
public int MemoryLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The value of the register auto converted to a string
|
||||
/// </summary>
|
||||
public string StringValue => GetValueString();
|
||||
|
||||
/// <summary>
|
||||
/// The name the register would have in the PLC
|
||||
/// </summary>
|
||||
public string RegisterPLCName => GetRegisterPLCName();
|
||||
|
||||
internal bool isUsedBitwise { get; set; }
|
||||
|
||||
internal Register () {
|
||||
ValueChanged += (obj) => {
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(StringValue)));
|
||||
};
|
||||
}
|
||||
|
||||
public virtual string BuildMewtocolIdent() {
|
||||
|
||||
StringBuilder asciistring = new StringBuilder("D");
|
||||
|
||||
Reference in New Issue
Block a user