Skip to content

Commit 70d3ba4

Browse files
committed
Documentation
1 parent 489770c commit 70d3ba4

File tree

127 files changed

+1315
-275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1315
-275
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ZWaveDotNet Copyright (C) 2024
2+
//
3+
// This program is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU Affero General Public License as published by
5+
// the Free Software Foundation, either version 3 of the License, or any later version.
6+
// This program is distributed in the hope that it will be useful,
7+
// but WITHOUT ANY WARRANTY, without even the implied warranty of
8+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9+
// See the GNU Affero General Public License for more details.
10+
// You should have received a copy of the GNU Affero General Public License
11+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
12+
13+
namespace ZWaveDotNet.CommandClassReports
14+
{
15+
/// <summary>
16+
/// An empty report
17+
/// </summary>
18+
public class EmptyReport : ICommandClassReport
19+
{
20+
public override string ToString()
21+
{
22+
return "Empty Report";
23+
}
24+
}
25+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// ZWaveDotNet Copyright (C) 2024
2+
//
3+
// This program is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU Affero General Public License as published by
5+
// the Free Software Foundation, either version 3 of the License, or any later version.
6+
// This program is distributed in the hope that it will be useful,
7+
// but WITHOUT ANY WARRANTY, without even the implied warranty of
8+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9+
// See the GNU Affero General Public License for more details.
10+
// You should have received a copy of the GNU Affero General Public License
11+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
12+
13+
namespace ZWaveDotNet.CommandClassReports
14+
{
15+
/// <summary>
16+
/// Proprietary Information
17+
/// </summary>
18+
public class ProprietaryReport : ICommandClassReport
19+
{
20+
/// <summary>
21+
/// The raw data
22+
/// </summary>
23+
public readonly Memory<byte> Data;
24+
internal ProprietaryReport(Memory<byte> payload)
25+
{
26+
Data = payload;
27+
}
28+
}
29+
}

ZWaveDotNet/CommandClasses/Alarm.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace ZWaveDotNet.CommandClasses
2323
[CCVersion(CommandClass.Alarm, 1, 2)]
2424
public class Alarm : CommandClassBase
2525
{
26+
/// <summary>
27+
/// Unsolicited Alarm Report
28+
/// </summary>
2629
public event CommandClassEvent<AlarmReport>? Updated;
2730

2831
enum AlarmCommand
@@ -34,7 +37,7 @@ enum AlarmCommand
3437
SupportedReport = 0x08
3538
}
3639

37-
public Alarm(Node node, byte endpoint) : base(node, endpoint, CommandClass.Alarm) { }
40+
internal Alarm(Node node, byte endpoint) : base(node, endpoint, CommandClass.Alarm) { }
3841

3942
public async Task<AlarmReport> Get(CancellationToken cancellationToken = default)
4043
{
@@ -54,7 +57,10 @@ public async Task<AlarmSupportedReport> SupportedGet(CancellationToken cancellat
5457
return new AlarmSupportedReport(response.Payload.Span);
5558
}
5659

57-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
60+
///
61+
/// <inheritdoc />
62+
///
63+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
5864
{
5965
if (message.Command == (byte)AlarmCommand.Report)
6066
{

ZWaveDotNet/CommandClasses/AntiTheftUnlock.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ namespace ZWaveDotNet.CommandClasses
2525
[CCVersion(CommandClass.AntiTheftUnlock, 1)]
2626
public class AntiTheftUnlock : CommandClassBase
2727
{
28+
/// <summary>
29+
/// Unsolicited AntiTheft Unlock Report
30+
/// </summary>
2831
public event CommandClassEvent<AntiTheftUnlockReport>? Report;
2932

3033
enum AntiTheftUnlockCommand : byte
@@ -35,7 +38,7 @@ enum AntiTheftUnlockCommand : byte
3538

3639
}
3740

38-
public AntiTheftUnlock(Node node, byte endpoint) : base(node, endpoint, CommandClass.AntiTheftUnlock) { }
41+
internal AntiTheftUnlock(Node node, byte endpoint) : base(node, endpoint, CommandClass.AntiTheftUnlock) { }
3942

4043
/// <summary>
4144
/// <b>Version 1</b>: This command is used to request the locked/unlocked state of the node.
@@ -64,7 +67,7 @@ public async Task Set(byte[] magicCode, CancellationToken cancellationToken = de
6467
await SendCommand(AntiTheftUnlockCommand.Set, cancellationToken, magicCode);
6568
}
6669

67-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
70+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
6871
{
6972
if (message.Command == (byte)AntiTheftUnlockCommand.Report)
7073
{

ZWaveDotNet/CommandClasses/ApplicationCapability.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ public class ApplicationCapability : CommandClassBase
2828
{
2929
public event CommandClassEvent<ApplicationCapabilityReport>? CommandClassUnsupported;
3030

31-
public ApplicationCapability(Node node, byte endpoint) : base(node, endpoint, CommandClass.ApplicationCapability) { }
31+
internal ApplicationCapability(Node node, byte endpoint) : base(node, endpoint, CommandClass.ApplicationCapability) { }
3232

33-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
33+
///
34+
/// <inheritdoc />
35+
///
36+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
3437
{
3538
await FireEvent(CommandClassUnsupported, new ApplicationCapabilityReport(message.Payload.Span));
3639
return SupervisionStatus.Success;

ZWaveDotNet/CommandClasses/ApplicationStatus.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,20 @@ namespace ZWaveDotNet.CommandClasses
2626
public class ApplicationStatus : CommandClassBase
2727
{
2828
public event CommandClassEvent<ApplicationStatusReport>? ApplicationBusy;
29-
public event CommandClassEvent<ReportMessage>? RequestRejected;
29+
public event CommandClassEvent<EmptyReport>? RequestRejected;
3030

3131
enum ApplicationStatusCommands
3232
{
3333
Busy = 0x1,
3434
RejectedRequest = 0x2
3535
}
3636

37-
public ApplicationStatus(Node node, byte endpoint) : base(node, endpoint, CommandClass.ApplicationStatus) { }
37+
internal ApplicationStatus(Node node, byte endpoint) : base(node, endpoint, CommandClass.ApplicationStatus) { }
3838

39-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
39+
///
40+
/// <inheritdoc />
41+
///
42+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
4043
{
4144
switch ((ApplicationStatusCommands)message.Command)
4245
{

ZWaveDotNet/CommandClasses/Association.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enum AssociationCommand
3838
SpecificGroupGet = 0x0B,
3939
SpecificGroupReport = 0x0C
4040
}
41-
public Association(Node node, byte endpoint) : base(node, endpoint, CommandClass.Association) { }
41+
internal Association(Node node, byte endpoint) : base(node, endpoint, CommandClass.Association) { }
4242

4343
/// <summary>
4444
/// <b>Version 1</b>: Request the current destinations of a given association group
@@ -98,13 +98,17 @@ public async Task<AssociationGroupsReport> GetGroups(CancellationToken cancellat
9898
return new AssociationGroupsReport(response.Payload.Span);
9999
}
100100

101+
///
102+
/// <inheritdoc />
103+
///
101104
public override async Task Interview(CancellationToken cancellationToken = default)
102105
{
103106
await Add(LIFELINE_GROUP, cancellationToken, (byte)controller.ID);
104107
Log.Information("Assigned Lifeline Group");
105108
}
106109

107-
protected override Task<SupervisionStatus> Handle(ReportMessage message)
110+
/// <inheritdoc />
111+
internal override Task<SupervisionStatus> Handle(ReportMessage message)
108112
{
109113
//Nothing Unsolicited
110114
return Task.FromResult(SupervisionStatus.NoSupport);

ZWaveDotNet/CommandClasses/AssociationGroupInformation.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace ZWaveDotNet.CommandClasses
2727
[CCVersion(CommandClass.AssociationGroupInformation, 1, 3)]
2828
public class AssociationGroupInformation : CommandClassBase
2929
{
30+
/// <summary>
31+
/// Unsolicited Association Group Info Report
32+
/// </summary>
3033
public event CommandClassEvent<AssociationGroupsInfoReport>? Report;
3134
enum AssociationGroupCommand : byte
3235
{
@@ -38,7 +41,7 @@ enum AssociationGroupCommand : byte
3841
CommandListReport = 0x6,
3942
}
4043

41-
public AssociationGroupInformation(Node node, byte endpoint) : base(node, endpoint, CommandClass.AssociationGroupInformation) { }
44+
internal AssociationGroupInformation(Node node, byte endpoint) : base(node, endpoint, CommandClass.AssociationGroupInformation) { }
4245

4346
/// <summary>
4447
/// <b>Version 1</b>: Request the properties of one or more association group
@@ -88,7 +91,10 @@ public async Task<AssociationGroupCommandListReport> GetCommandList(byte groupNu
8891
return new AssociationGroupCommandListReport(response.Payload.Span);
8992
}
9093

91-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
94+
///
95+
/// <inheritdoc />
96+
///
97+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
9298
{
9399
if (message.Command == (byte)AssociationGroupCommand.InfoReport)
94100
{

ZWaveDotNet/CommandClasses/BarrierOperator.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ enum BarrierOperatorCommand : byte
4242
SignalReport = 0x08
4343
}
4444

45-
public BarrierOperator(Node node, byte endpoint) : base(node, endpoint, CommandClass.BarrierOperator) { }
45+
internal BarrierOperator(Node node, byte endpoint) : base(node, endpoint, CommandClass.BarrierOperator) { }
4646

4747
/// <summary>
4848
/// Request the current state of a barrier operator device
@@ -117,7 +117,10 @@ public async Task<KeyValuePair<BarrierSignal, bool>> SignalGet(BarrierSignal sig
117117
return KeyValuePair.Create((BarrierSignal)response.Payload.Span[0], response.Payload.Span[1] != 0x0);
118118
}
119119

120-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
120+
///
121+
/// <inheritdoc />
122+
///
123+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
121124
{
122125
if (message.Command == (byte)BarrierOperatorCommand.Report)
123126
{

ZWaveDotNet/CommandClasses/Basic.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ namespace ZWaveDotNet.CommandClasses
2525
[CCVersion(CommandClass.Basic, 2)]
2626
public class Basic : CommandClassBase
2727
{
28+
/// <summary>
29+
/// Unsolicited Basic Report
30+
/// </summary>
2831
public event CommandClassEvent<BasicReport>? Report;
2932

3033
enum BasicCommand : byte
@@ -34,7 +37,7 @@ enum BasicCommand : byte
3437
Report = 0x03
3538
}
3639

37-
public Basic(Node node, byte endpoint) : base(node, endpoint, CommandClass.Basic) { }
40+
internal Basic(Node node, byte endpoint) : base(node, endpoint, CommandClass.Basic) { }
3841

3942
/// <summary>
4043
/// <b>Version 1</b>: Request the status of a supporting device
@@ -61,7 +64,7 @@ public async Task Set(byte value, CancellationToken cancellationToken = default)
6164
await SendCommand(BasicCommand.Set, cancellationToken, value);
6265
}
6366

64-
protected override async Task<SupervisionStatus> Handle(ReportMessage message)
67+
internal override async Task<SupervisionStatus> Handle(ReportMessage message)
6568
{
6669
if (message.Command == (byte)BasicCommand.Report)
6770
{

0 commit comments

Comments
 (0)