first commit
This commit is contained in:
commit
b31e9a7261
38 files changed
+3822
No files matched your search
@@ -0,0 +1,103 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Gateway.Api.Domain;
|
||||
|
||||
public enum PointProtocol
|
||||
{
|
||||
Bacnet,
|
||||
OpcUa,
|
||||
Modbus,
|
||||
Knx,
|
||||
Mqtt,
|
||||
Internal
|
||||
}
|
||||
|
||||
public enum PointScope
|
||||
{
|
||||
External,
|
||||
Gateway,
|
||||
Internal
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BACnet object types that the gateway can materialize. Event/Alarm behavior is
|
||||
/// represented by Event Enrollment plus Notification Class, not by a proprietary alarm object.
|
||||
/// </summary>
|
||||
public enum BacnetObjectKind
|
||||
{
|
||||
AnalogInput,
|
||||
AnalogOutput,
|
||||
AnalogValue,
|
||||
BinaryInput,
|
||||
BinaryOutput,
|
||||
BinaryValue,
|
||||
MultiStateInput,
|
||||
MultiStateOutput,
|
||||
MultiStateValue,
|
||||
Schedule,
|
||||
Calendar,
|
||||
EventEnrollment,
|
||||
NotificationClass,
|
||||
TrendLog
|
||||
}
|
||||
|
||||
public sealed record GatewayPoint(
|
||||
Guid Id,
|
||||
string DisplayName,
|
||||
PointProtocol Protocol,
|
||||
PointScope Scope,
|
||||
string ValueType,
|
||||
bool Readable,
|
||||
bool Writable,
|
||||
string? ExternalIdentity,
|
||||
JsonElement Address,
|
||||
DateTimeOffset CreatedAtUtc,
|
||||
BacnetObjectKind? BacnetObjectKind = null,
|
||||
uint? BacnetObjectInstance = null);
|
||||
|
||||
public sealed record CreatePointRequest(
|
||||
string DisplayName,
|
||||
PointProtocol Protocol,
|
||||
PointScope Scope,
|
||||
string ValueType,
|
||||
bool Readable,
|
||||
bool Writable,
|
||||
string? ExternalIdentity,
|
||||
JsonElement Address,
|
||||
BacnetObjectKind? BacnetObjectKind = null,
|
||||
uint? BacnetObjectInstance = null);
|
||||
|
||||
public sealed record PointValue(
|
||||
Guid PointId,
|
||||
JsonElement Value,
|
||||
PointProtocol SourceProtocol,
|
||||
DateTimeOffset UpdatedAtUtc,
|
||||
string? Status);
|
||||
|
||||
public enum MappingDirection
|
||||
{
|
||||
OneWay,
|
||||
Bidirectional
|
||||
}
|
||||
|
||||
public sealed record PointMapping(
|
||||
Guid Id,
|
||||
Guid SourcePointId,
|
||||
Guid TargetPointId,
|
||||
MappingDirection Direction,
|
||||
bool Enabled,
|
||||
int? BacnetPriority,
|
||||
bool AcknowledgeMultipleExternalWriters,
|
||||
JsonElement Transform,
|
||||
DateTimeOffset CreatedAtUtc);
|
||||
|
||||
public sealed record CreateMappingRequest(
|
||||
Guid SourcePointId,
|
||||
Guid TargetPointId,
|
||||
MappingDirection Direction,
|
||||
bool Enabled,
|
||||
int? BacnetPriority,
|
||||
bool AcknowledgeMultipleExternalWriters,
|
||||
JsonElement Transform);
|
||||
|
||||
public sealed record CreateMappingResponse(PointMapping Mapping, IReadOnlyList<string> Warnings);
|
||||
Reference in new issue
Block a user