DreamineVMS 1.0.0.0
Windows PC의 RTSP·USB 카메라 영상을 HLS로 변환해 원격 CCTV Viewer에 전달하는 데스크톱 에이전트입니다.
로딩중...
검색중...
일치하는것 없음
DreamineVMS.Services.Runtime.CameraRuntimeStateService 클래스 참조sealed

더 자세히 ...

DreamineVMS.Services.Runtime.CameraRuntimeStateService에 대한 상속 다이어그램 :
DreamineVMS.Services.Runtime.CameraRuntimeStateService에 대한 협력 다이어그램:

Public 멤버 함수

CameraRuntimeState GetState (string cameraId)
IReadOnlyList< CameraRuntimeStateGetAll ()
void SetState (string cameraId, CameraConnectionState state, string message, string? error=null)
void IncrementRestart (string cameraId, string message)

이벤트

EventHandler< CameraRuntimeState >? StateChanged
DreamineVMS.Services.Runtime.ICameraRuntimeStateService(으)로부터 상속된 이벤트
EventHandler< CameraRuntimeState >? StateChanged

Private 속성

readonly ConcurrentDictionary< string, CameraRuntimeState_states = new()

상세한 설명

메모리 기반 카메라 런타임 상태 관리 서비스입니다.

CameraRuntimeStateService.cs 파일의 14 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ GetAll()

IReadOnlyList< CameraRuntimeState > DreamineVMS.Services.Runtime.CameraRuntimeStateService.GetAll ( )
inline

All 값을 가져옵니다.

반환값
Get All 작업에서 생성한 IReadOnlyList<CameraRuntimeState> 결과입니다.

DreamineVMS.Services.Runtime.ICameraRuntimeStateService를 구현.

CameraRuntimeStateService.cs 파일의 81 번째 라인에서 정의되었습니다.

82 {
83 return _states.Values.OrderBy(state => state.CameraId).ToArray();
84 }

다음을 참조함 : _states.

◆ GetState()

CameraRuntimeState DreamineVMS.Services.Runtime.CameraRuntimeStateService.GetState ( string cameraId)
inline

State 값을 가져옵니다.

매개변수
cameraIdcamera Id에 사용할 string 값입니다.
반환값
Get State 작업에서 생성한 CameraRuntimeState 결과입니다.

DreamineVMS.Services.Runtime.ICameraRuntimeStateService를 구현.

CameraRuntimeStateService.cs 파일의 60 번째 라인에서 정의되었습니다.

61 {
62 return _states.GetOrAdd(cameraId, id => new CameraRuntimeState { CameraId = id });
63 }

다음을 참조함 : _states.

다음에 의해서 참조됨 : IncrementRestart(), SetState().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ IncrementRestart()

void DreamineVMS.Services.Runtime.CameraRuntimeStateService.IncrementRestart ( string cameraId,
string message )
inline

Increment Restart 작업을 수행합니다.

매개변수
cameraIdcamera Id에 사용할 string 값입니다.
message처리할 메시지입니다.

DreamineVMS.Services.Runtime.ICameraRuntimeStateService를 구현.

CameraRuntimeStateService.cs 파일의 169 번째 라인에서 정의되었습니다.

170 {
171 CameraRuntimeState runtimeState = GetState(cameraId);
172 runtimeState.RestartCount++;
173 runtimeState.LastMessage = message;
174 runtimeState.LastUpdated = DateTimeOffset.Now;
175 StateChanged?.Invoke(this, runtimeState);
176 }

다음을 참조함 : GetState(), DreamineVMS.Models.CameraRuntimeState.RestartCount, StateChanged.

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ SetState()

void DreamineVMS.Services.Runtime.CameraRuntimeStateService.SetState ( string cameraId,
CameraConnectionState state,
string message,
string? error = null )
inline

State 값을 설정합니다.

매개변수
cameraIdcamera Id에 사용할 string 값입니다.
statestate에 사용할 CameraConnectionState 값입니다.
message처리할 메시지입니다.
errorerror에 사용할 string? 값입니다.

DreamineVMS.Services.Runtime.ICameraRuntimeStateService를 구현.

CameraRuntimeStateService.cs 파일의 126 번째 라인에서 정의되었습니다.

127 {
128 CameraRuntimeState runtimeState = GetState(cameraId);
129
130 // Connecting은 새 HLS 출력 세션의 시작으로 봅니다.
131 // StopAll → StartAll 후 playlist URL이 같아도 Blazor/hls.js가 새 세션을 구분할 수 있게
132 // RestartCount를 세션 버전으로 함께 사용합니다.
133 if (state == CameraConnectionState.Connecting && runtimeState.State != CameraConnectionState.Connecting)
134 {
135 runtimeState.RestartCount++;
136 }
137
138 runtimeState.State = state;
139 runtimeState.LastMessage = message;
140 runtimeState.LastError = error;
141 runtimeState.LastUpdated = DateTimeOffset.Now;
142 StateChanged?.Invoke(this, runtimeState);
143 }

다음을 참조함 : GetState(), DreamineVMS.Models.CameraRuntimeState.RestartCount, DreamineVMS.Models.CameraRuntimeState.State, StateChanged.

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ _states

readonly ConcurrentDictionary<string, CameraRuntimeState> DreamineVMS.Services.Runtime.CameraRuntimeStateService._states = new()
private

states 값을 보관합니다.

CameraRuntimeStateService.cs 파일의 24 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : GetAll(), GetState().

이벤트 문서화

◆ StateChanged

EventHandler<CameraRuntimeState>? DreamineVMS.Services.Runtime.CameraRuntimeStateService.StateChanged

State Changed 상황이 발생할 때 알립니다.

CameraRuntimeStateService.cs 파일의 34 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : IncrementRestart(), SetState().


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: