This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
137 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
namespace ZapMe.DTOs; | ||
using ZapMe.Enums.Devices; | ||
|
||
namespace ZapMe.DTOs; | ||
|
||
public readonly struct DeviceDto | ||
{ | ||
public Guid Id { get; init; } | ||
|
||
public string Name { get; init; } | ||
|
||
public Guid ModelId { get; init; } | ||
|
||
public string ModelName { get; init; } | ||
|
||
public string ModelNumber { get; init; } | ||
|
||
public string ModelWebsiteUrl { get; init; } | ||
|
||
public Uri IconUrl { get; init; } | ||
|
||
public RfProtocol Protocol { get; init; } | ||
|
||
public Guid ManufacturerId { get; init; } | ||
|
||
public string ManufacturerName { get; init; } | ||
|
||
public string ManufacturerWebsiteUrl { get; init; } | ||
|
||
public DateTime RegisteredAt { get; init; } | ||
} |
44 changes: 44 additions & 0 deletions
44
Common/Database/Documents/DeviceProprietarySpecification.cs
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Marten.Schema; | ||
|
||
namespace ZapMe.Database.Documents; | ||
|
||
/// <summary> | ||
/// The Proprietary RF Protocol specification for a device, used to configure the RF transceiver. | ||
/// </summary> | ||
[DocumentAlias("device_proprietary_spec")] | ||
public sealed class DeviceProprietarySpecification | ||
{ | ||
public Guid Id { get; init; } | ||
|
||
// Carrier wave modulation schemes | ||
public enum ModulationType | ||
{ | ||
ASK, // Amplitude Shift Keying | ||
OOK, // On-Off Keying | ||
GFSK, // Gaussian Frequency Shift Keying | ||
FSK, // Frequency Shift Keying | ||
FSK2, // Frequency Shift Keying 2 | ||
FSK4, // Frequency Shift Keying 4 | ||
MSK, // Minimum Shift Keying | ||
} | ||
|
||
// Bit-level encoding schemes | ||
public enum EncodingType | ||
{ | ||
None, | ||
Proprietary, | ||
Manchester, | ||
} | ||
|
||
public ulong Frequency { get; init; } | ||
|
||
public ModulationType Modulation { get; init; } | ||
|
||
public ulong DataRate { get; init; } | ||
|
||
public ulong PacketSize { get; init; } | ||
|
||
public EncodingType Encoding { get; init; } | ||
|
||
public bool InvertedBits { get; init; } | ||
} |
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
...eModel-And-DeviceManufacturer.Designer.cs → ...eModel-And-DeviceManufacturer.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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