Skip to content

Commit 0799876

Browse files
committed
grr
1 parent 25279c1 commit 0799876

File tree

6 files changed

+15
-50
lines changed

6 files changed

+15
-50
lines changed

ArtNetSharp.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlerRDMExample", "Exam
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigExample", "Examples\ConfigExample\ConfigExample.csproj", "{DF3AFD9A-0629-43C9-AAC6-5EF22728C5E8}"
1919
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RDMSharp", "..\RDMSharp\RDMSharp\RDMSharp.csproj", "{B8B6AF43-84E1-B0C5-61AF-870EA9D6C85A}"
21+
EndProject
2022
Global
2123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2224
Debug|Any CPU = Debug|Any CPU
@@ -51,6 +53,10 @@ Global
5153
{DF3AFD9A-0629-43C9-AAC6-5EF22728C5E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
5254
{DF3AFD9A-0629-43C9-AAC6-5EF22728C5E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
5355
{DF3AFD9A-0629-43C9-AAC6-5EF22728C5E8}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{B8B6AF43-84E1-B0C5-61AF-870EA9D6C85A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{B8B6AF43-84E1-B0C5-61AF-870EA9D6C85A}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{B8B6AF43-84E1-B0C5-61AF-870EA9D6C85A}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{B8B6AF43-84E1-B0C5-61AF-870EA9D6C85A}.Release|Any CPU.Build.0 = Release|Any CPU
5460
EndGlobalSection
5561
GlobalSection(SolutionProperties) = preSolution
5662
HideSolutionNode = FALSE

ArtNetSharp/ArtNetSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</ItemGroup>
3434
<ItemGroup>
3535
<PackageReference Include="DMXControlProjects.WellKnownDataTypes" Version="0.0.4" />
36-
<PackageReference Include="RDMSharp" Version="0.0.14" />
36+
<ProjectReference Include="..\..\RDMSharp\RDMSharp\RDMSharp.csproj" />
3737
</ItemGroup>
3838
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
3939
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.5" />

ArtNetTests/Mocks/ControllerInstanceMock.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using ArtNetSharp;
22
using ArtNetSharp.Communication;
33
using org.dmxc.wkdt.Light.RDM;
4-
using RDMSharp.ParameterWrapper;
54

65
namespace ArtNetTests.Mocks
76
{
@@ -13,7 +12,7 @@ public override ushort OEMProductCode
1312
get { return this._oemProductCode; }
1413
}
1514
public override ushort ESTAManufacturerCode => (ushort)Tools.ParseDotNetMajorVersion();
16-
public override UID UID => new UID((ushort)EManufacturer.DMXControlProjects_eV, 12314);
15+
public override UID UID => new UID(0x02b0, 12314);
1716

1817
public ControllerInstanceMock(ArtNet artnet, ushort oemProductCode = Constants.DEFAULT_OEM_CODE) : base(artnet)
1918
{

ArtNetTests/Mocks/RDMDeviceMock.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

ArtNetTests/PackagesSerializeDeserialize.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ public void ArtNzs()
250250
{
251251
PackagesSerializeDeserialize.doTests(new ArtNzs(53, 0xED, 2, new Address(3, 4), new byte[] { 1, 2, 3, 44, 55, 66, 88, 222, 111, 0x33 }));
252252

253-
Assert.Throws(typeof(ArgumentException), () => new ArtNzs(53, Constants.DMX_STARTCODE, 2, new Address(3, 4), new byte[] { 1, 2, 3, 44, 55, 66, 88, 222, 111, 0x33 }));
254-
Assert.Throws(typeof(ArgumentException), () => new ArtNzs(53, Constants.RDM_STARTCODE, 2, new Address(3, 4), new byte[] { 1, 2, 3, 44, 55, 66, 88, 222, 111, 0x33 }));
253+
Assert.Throws(typeof(ArgumentException), () => new ArtNzs(53, ArtNetSharp.Constants.DMX_STARTCODE, 2, new Address(3, 4), new byte[] { 1, 2, 3, 44, 55, 66, 88, 222, 111, 0x33 }));
254+
Assert.Throws(typeof(ArgumentException), () => new ArtNzs(53, ArtNetSharp.Constants.RDM_STARTCODE, 2, new Address(3, 4), new byte[] { 1, 2, 3, 44, 55, 66, 88, 222, 111, 0x33 }));
255255
}
256256
[Test]
257257
public void ArtVlc()

Examples/ControlerRDMExample/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
ArtNet.Instance.AddInstance(controllerInstance);
2424

2525
// Configure Ports
26-
for (ushort i = 1; i <= 4; i++)
26+
for (ushort i = 1; i <= 1; i++)
2727
{
2828
try
2929
{
3030
var outputConfig = new PortConfig((byte)i, new PortAddress((ushort)(i - 1)), true, false) { PortNumber = (byte)i, Type = EPortType.OutputFromArtNet, GoodOutput = new GoodOutput(outputStyle: GoodOutput.EOutputStyle.Continuous, isBeingOutputAsDMX: true), };
31-
outputConfig.AddAdditionalRdmUIDs(generateUIDs());
31+
outputConfig.AddAdditionalRdmUIDs(generateUIDs(i));
3232
controllerInstance.AddPortConfig(outputConfig);
3333
controllerInstance.AddPortConfig(new PortConfig((byte)(i + 4), new PortAddress((ushort)(i - 1)), false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet });
3434
}
@@ -38,12 +38,12 @@
3838
}
3939
}
4040

41-
UID[] generateUIDs()
41+
UID[] generateUIDs(ushort port)
4242
{
43-
UID[] uids = new UID[30];
43+
UID[] uids = new UID[5];
4444
for (int i = 0; i < uids.Length; i++)
4545
{
46-
var uid = new UID(0x9fff, (uint)devices.Count + 1);
46+
var uid = new UID(0x9fff, (uint)(devices.Count + 1 + (1000 * port)));
4747
devices.TryAdd(uid, new TestRDMDevice(uid));
4848
uids[i] = uid;
4949
}

0 commit comments

Comments
 (0)