Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
namespace RobotNet10.CANOpen.Models;
public readonly struct ObjectDictionaryAddress(ushort index, byte subIndex = 0)
{
public ushort Index { get; init; } = index;
public byte SubIndex { get; init; } = subIndex;
public override string ToString() => $"0x{Index:X4}:{SubIndex:X2}";
public static bool operator ==(ObjectDictionaryAddress left, ObjectDictionaryAddress right)
=> left.Index == right.Index && left.SubIndex == right.SubIndex;
public static bool operator !=(ObjectDictionaryAddress left, ObjectDictionaryAddress right)
=> !(left == right);
public override bool Equals(object? obj)
=> obj is ObjectDictionaryAddress address && this == address;
public override int GetHashCode()
=> HashCode.Combine(Index, SubIndex);
}