-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from bytedreamer/develop
v5.0.0 Beta Release
- Loading branch information
Showing
125 changed files
with
3,321 additions
and
2,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,28 @@ | ||
using System; | ||
using OSDP.Net.Messages.ACU; | ||
using OSDP.Net.Messages; | ||
using OSDP.Net.Messages.SecureChannel; | ||
using OSDP.Net.Model.CommandData; | ||
|
||
namespace Console.Commands | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class InvalidCommand : Command | ||
public class InvalidCommand : CommandData | ||
{ | ||
public InvalidCommand(byte address) | ||
{ | ||
Address = address; | ||
} | ||
|
||
protected override byte CommandCode => 0x59; | ||
|
||
protected override ReadOnlySpan<byte> SecurityControlBlock() | ||
{ | ||
return new byte[] | ||
{ | ||
0x02, | ||
0x15 | ||
}; | ||
} | ||
/// <inheritdoc /> | ||
public override byte Code => 0x59; | ||
|
||
/// <inheritdoc /> | ||
public override CommandType CommandType => CommandType.Poll; | ||
|
||
protected override void CustomCommandUpdate(Span<byte> commandBuffer) | ||
{ | ||
} | ||
/// <inheritdoc /> | ||
public override ReadOnlySpan<byte> SecurityControlBlock() => SecurityBlock.CommandMessageWithNoDataSecurity; | ||
|
||
protected override ReadOnlySpan<byte> Data() | ||
/// <inheritdoc /> | ||
public override byte[] BuildData() | ||
{ | ||
return ReadOnlySpan<byte>.Empty; | ||
return Array.Empty<byte>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,34 @@ | ||
using System; | ||
using OSDP.Net.Messages.ACU; | ||
using OSDP.Net.Messages; | ||
using OSDP.Net.Messages.SecureChannel; | ||
using OSDP.Net.Model.CommandData; | ||
|
||
namespace Console.Commands | ||
{ | ||
/// <summary> | ||
/// Change the CRC on a poll command | ||
/// </summary> | ||
public class InvalidCrcPollCommand : Command | ||
public class InvalidCrcPollCommand : CommandData | ||
{ | ||
public InvalidCrcPollCommand(byte address) | ||
{ | ||
Address = address; | ||
} | ||
|
||
protected override byte CommandCode => 0x60; | ||
/// <inheritdoc /> | ||
public override byte Code => (byte)CommandType; | ||
|
||
/// <inheritdoc /> | ||
public override CommandType CommandType => CommandType.Poll; | ||
|
||
protected override ReadOnlySpan<byte> SecurityControlBlock() | ||
{ | ||
return new byte[] | ||
{ | ||
0x02, | ||
0x15 | ||
}; | ||
} | ||
/// <inheritdoc /> | ||
public override ReadOnlySpan<byte> SecurityControlBlock() => SecurityBlock.CommandMessageWithNoDataSecurity; | ||
|
||
protected override void CustomCommandUpdate(Span<byte> commandBuffer) | ||
/// <inheritdoc /> | ||
public override void CustomMessageUpdate(Span<byte> commandBuffer) | ||
{ | ||
commandBuffer[^1] = (byte)(commandBuffer[^1] + 1); | ||
} | ||
|
||
protected override ReadOnlySpan<byte> Data() | ||
/// <inheritdoc /> | ||
public override byte[] BuildData() | ||
{ | ||
return ReadOnlySpan<byte>.Empty; | ||
return Array.Empty<byte>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
using System; | ||
using OSDP.Net.Messages.ACU; | ||
using OSDP.Net.Messages; | ||
using OSDP.Net.Messages.SecureChannel; | ||
using OSDP.Net.Model.CommandData; | ||
|
||
namespace Console.Commands | ||
{ | ||
/// <summary> | ||
/// Change the length on a poll command | ||
/// </summary> | ||
public class InvalidLengthPollCommand : Command | ||
public class InvalidLengthPollCommand : CommandData | ||
{ | ||
public InvalidLengthPollCommand(byte address) | ||
{ | ||
Address = address; | ||
} | ||
|
||
protected override byte CommandCode => 0x60; | ||
/// <inheritdoc /> | ||
public override byte Code => (byte)CommandType; | ||
|
||
/// <inheritdoc /> | ||
public override CommandType CommandType => CommandType.Poll; | ||
|
||
protected override ReadOnlySpan<byte> SecurityControlBlock() | ||
{ | ||
return new byte[] | ||
{ | ||
0x02, | ||
0x15 | ||
}; | ||
} | ||
/// <inheritdoc /> | ||
public override ReadOnlySpan<byte> SecurityControlBlock() => SecurityBlock.CommandMessageWithNoDataSecurity; | ||
|
||
protected override void CustomCommandUpdate(Span<byte> commandBuffer) | ||
/// <inheritdoc /> | ||
public override void CustomMessageUpdate(Span<byte> commandBuffer) | ||
{ | ||
commandBuffer[2] = (byte)(commandBuffer[2] + 1); | ||
} | ||
|
||
protected override ReadOnlySpan<byte> Data() | ||
/// <inheritdoc /> | ||
public override byte[] BuildData() | ||
{ | ||
return new byte[] { 0x01 }; | ||
return Array.Empty<byte>(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.