Initial_commit_SecMPS_v2
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IAcceptsMetadataPush : IIntegrationAdapter
|
||||
{
|
||||
Task<MetadataPushResult> PushMetadataAsync(string sourceDeviceId, MetadataChangeSet changes);
|
||||
}
|
||||
|
||||
public class MetadataChangeSet
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public string? IpAddress { get; set; }
|
||||
public int? Port { get; set; }
|
||||
public int? StreamMode { get; set; }
|
||||
}
|
||||
|
||||
public class MetadataPushResult
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public List<string> RejectedFields { get; set; } = new();
|
||||
public string? Reason { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using IntegrationGateway.Core.Models;
|
||||
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IHasAlarms : IIntegrationAdapter
|
||||
{
|
||||
Task<PagedResult<StandardAlarm>> GetAlarmsAsync(int page, int size, DateTime from, DateTime to,
|
||||
int? confirmState = null, int? endState = null, List<int>? levels = null);
|
||||
Task ConfirmAlarmAsync(string alarmId);
|
||||
Task EndAlarmAsync(string alarmId);
|
||||
Task<int> GetPendingAlarmCountAsync();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using IntegrationGateway.Core.Models;
|
||||
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IHasFlatDevices : IIntegrationAdapter
|
||||
{
|
||||
Task<PagedResult<StandardDevice>> GetDevicesAsync(int page, int size, string? keyword = null);
|
||||
Task<StandardDevice?> GetDeviceAsync(string sourceDeviceId);
|
||||
Task<List<StandardDevice>> GetAllDevicesAsync();
|
||||
Task<PagedResult<StandardDevice>> GetChannelsAsync(int page, int size, string? parentDeviceId = null);
|
||||
Task<List<StandardDevice>> GetAllChannelsAsync();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using IntegrationGateway.Core.Models;
|
||||
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IHasOwnDeviceTree : IIntegrationAdapter
|
||||
{
|
||||
Task<List<DeviceTreeNode>> GetObjectTreeAsync();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using IntegrationGateway.Core.Models;
|
||||
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IHasPoints : IIntegrationAdapter
|
||||
{
|
||||
Task<List<PointValue>> GetRealtimeValuesAsync(string sourceDeviceId);
|
||||
Task<List<PointValue>> GetMultiPointValuesAsync(List<(string DeviceId, int PointIndex)> points);
|
||||
Task SetPointValueAsync(string sourceDeviceId, int pointIndex, double value);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using IntegrationGateway.Core.Models;
|
||||
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IHasStreams : IIntegrationAdapter
|
||||
{
|
||||
Task<StreamUrls> GetLiveUrlAsync(string channelId);
|
||||
Task<StreamUrls> GetPlaybackUrlAsync(string channelId, DateTime start, DateTime end);
|
||||
Task StopPlayAsync(string channelId);
|
||||
Task<StreamUrls> GetSnapshotAsync(string channelId);
|
||||
Task PtzControlAsync(string channelId, string direction, float speed);
|
||||
Task PtzStopAsync(string channelId);
|
||||
Task<PagedResult<StandardRecording>> GetRecordingsAsync(string channelId, DateTime start, DateTime end, int page, int size);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using IntegrationGateway.Core.Models;
|
||||
|
||||
namespace IntegrationGateway.Core.Abstractions;
|
||||
|
||||
public interface IIntegrationAdapter
|
||||
{
|
||||
string AdapterCode { get; }
|
||||
string DisplayName { get; }
|
||||
AdapterCapabilities Capabilities { get; }
|
||||
Task<bool> HealthCheckAsync();
|
||||
Task InitializeAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user