Initial_commit_SecMPS_v2

This commit is contained in:
2026-05-15 23:22:48 +08:00
commit 23ea4fe05f
13830 changed files with 298675 additions and 0 deletions

View File

@@ -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; }
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -0,0 +1,8 @@
using IntegrationGateway.Core.Models;
namespace IntegrationGateway.Core.Abstractions;
public interface IHasOwnDeviceTree : IIntegrationAdapter
{
Task<List<DeviceTreeNode>> GetObjectTreeAsync();
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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();
}