Realtime DB 추가 및 Historical DB추가
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using ExperionCrawler.Core.Domain.Entities;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ExperionCrawler.Core.Application.Interfaces;
|
||||
|
||||
@@ -54,8 +55,38 @@ public interface IExperionDbService
|
||||
int? minLevel, int? maxLevel, string? nodeClass,
|
||||
IEnumerable<string>? names, string? nodeId, string? dataType,
|
||||
int limit, int offset);
|
||||
|
||||
// ── RealtimeTable ─────────────────────────────────────────────────────────
|
||||
Task<int> BuildRealtimeTableAsync(IEnumerable<string> names, IEnumerable<string> dataTypes);
|
||||
Task<IEnumerable<RealtimePoint>> GetRealtimePointsAsync();
|
||||
Task<RealtimePoint> AddRealtimePointAsync(string nodeId);
|
||||
Task<bool> DeleteRealtimePointAsync(int id);
|
||||
Task<int> UpdateLiveValueAsync(string nodeId, string? value, DateTime timestamp);
|
||||
Task<int> BatchUpdateLiveValuesAsync(IEnumerable<LiveValueUpdate> updates);
|
||||
|
||||
// ── HistoryTable ──────────────────────────────────────────────────────────
|
||||
Task<int> SnapshotToHistoryAsync();
|
||||
Task<IEnumerable<string>> GetTagNamesAsync();
|
||||
Task<HistoryQueryResult> QueryHistoryAsync(
|
||||
IEnumerable<string> tagNames, DateTime? from, DateTime? to, int limit);
|
||||
}
|
||||
|
||||
// ── Realtime Service ─────────────────────────────────────────────────────────
|
||||
|
||||
public interface IExperionRealtimeService
|
||||
{
|
||||
Task StartAsync(ExperionServerConfig cfg);
|
||||
Task StopAsync();
|
||||
RealtimeServiceStatus GetStatus();
|
||||
/// <summary>
|
||||
/// 구독 중이면 MonitoredItem 핫 추가 후 OPC UA 서버 응답 검증.
|
||||
/// 구독 중이지 않으면 (true, "구독 중 아님") 반환.
|
||||
/// </summary>
|
||||
Task<(bool Success, string Message)> AddMonitoredItemAsync(string nodeId);
|
||||
}
|
||||
|
||||
public record RealtimeServiceStatus(bool Running, int SubscribedCount, string Message);
|
||||
|
||||
// ── Status Code ──────────────────────────────────────────────────────────────
|
||||
|
||||
public interface IExperionStatusCodeService
|
||||
@@ -78,3 +109,6 @@ public record ExperionNodeMapEntry(int Level, string NodeClass, string DisplayNa
|
||||
public record ExperionNodeMapResult(bool Success, IEnumerable<ExperionNodeMapEntry> Nodes, int TotalCount, string? ErrorMessage = null);
|
||||
public record NodeMapStats(int Total, int ObjectCount, int VariableCount, int MaxLevel, IEnumerable<string> DataTypes);
|
||||
public record NodeMapQueryResult(int Total, IEnumerable<NodeMapMaster> Items);
|
||||
public record HistoryQueryResult(IEnumerable<string> TagNames, IEnumerable<HistoryRow> Rows);
|
||||
public record HistoryRow(DateTime RecordedAt, IReadOnlyDictionary<string, string?> Values);
|
||||
public record LiveValueUpdate(string NodeId, string? Value, DateTime Timestamp);
|
||||
|
||||
Reference in New Issue
Block a user