|
Dreamine.PLC.Mitsubishi.MC 1.0.1
Dreamine.PLC.Mitsubishi.MC 산업 자동화 및 I/O 기능을 제공합니다.
|


Public 멤버 함수 | |
| MitsubishiMcTcpSimulatorServer (MitsubishiMcSimulatorServerOptions options) | |
| MitsubishiMcTcpSimulatorServer (MitsubishiMcSimulatorServerOptions options, InMemoryPlcMemory memory) | |
| Task | StartAsync (CancellationToken cancellationToken=default) |
| async Task | StopAsync () |
| async ValueTask | DisposeAsync () |
속성 | |
| bool | IsRunning [get] |
이벤트 | |
| EventHandler< string >? | StatusChanged |
Private 멤버 함수 | |
| async Task | AcceptLoopAsync (CancellationToken cancellationToken) |
| async Task | HandleClientAsync (TcpClient client, CancellationToken cancellationToken) |
| void | OnProtocolStatusChanged (object? sender, string e) |
정적 Private 멤버 함수 | |
| static async Task< byte[]> | ReceiveBinary3EFrameAsync (NetworkStream stream, CancellationToken cancellationToken) |
| static async Task | ReadExactlyAsync (NetworkStream stream, byte[] buffer, CancellationToken cancellationToken) |
| static IPAddress | ParseAddress (string host) |
Private 속성 | |
| readonly MitsubishiMcSimulatorServerOptions | _options |
| readonly MitsubishiMcBinary3ESimulatorProtocol | _protocol |
| readonly List< Task > | _clientTasks = [] |
| readonly object | _syncRoot = new() |
| CancellationTokenSource? | _cts |
| TcpListener? | _listener |
| Task? | _acceptTask |
로컬 및 PC 간 테스트용 최소 Mitsubishi MC Binary 3E TCP 서버를 제공합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 15 번째 라인에서 정의되었습니다.
|
inline |
새 메모리와 지정한 옵션으로 TCP 서버를 초기화합니다.
| options | 시뮬레이터 옵션입니다. |
| ArgumentNullException | 옵션이 null인 경우 발생합니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 104 번째 라인에서 정의되었습니다.
|
inline |
공유 메모리와 옵션으로 TCP 서버를 초기화합니다.
| options | 옵션입니다. |
| memory | 공유 메모리입니다. |
| ArgumentNullException | 옵션 또는 메모리가 null인 경우 발생합니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 139 번째 라인에서 정의되었습니다.
다음을 참조함 : _options, _protocol, OnProtocolStatusChanged().

|
inlineprivate |
TCP 클라이언트를 수락하고 처리 작업을 추적합니다.
| cancellationToken | 취소 토큰입니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 309 번째 라인에서 정의되었습니다.
다음을 참조함 : _clientTasks, _listener, _syncRoot, HandleClientAsync().
다음에 의해서 참조됨 : StartAsync().


|
inline |
프로토콜 이벤트 구독을 해제하고 서버를 중지합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 281 번째 라인에서 정의되었습니다.
다음을 참조함 : OnProtocolStatusChanged(), StopAsync().

|
inlineprivate |
한 클라이언트의 Binary 3E 프레임을 반복 처리합니다.
| client | 클라이언트입니다. |
| cancellationToken | 취소 토큰입니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 366 번째 라인에서 정의되었습니다.
다음을 참조함 : _protocol, ReceiveBinary3EFrameAsync(), StatusChanged.
다음에 의해서 참조됨 : AcceptLoopAsync().


|
inlineprivate |
프로토콜 상태 메시지를 서버 이벤트로 전달합니다.
| sender | 이벤트 원본입니다. |
| e | 상태 메시지입니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 577 번째 라인에서 정의되었습니다.
다음을 참조함 : StatusChanged.
다음에 의해서 참조됨 : DisposeAsync(), MitsubishiMcTcpSimulatorServer().

|
inlinestaticprivate |
바인딩 호스트를 IP 주소로 변환하며 잘못되면 Any를 사용합니다.
| host | 호스트입니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 545 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : StartAsync().

|
inlinestaticprivate |
대상 버퍼가 찰 때까지 스트림을 읽습니다.
| stream | 스트림입니다. |
| buffer | 버퍼입니다. |
| cancellationToken | 취소 토큰입니다. |
| IOException | 버퍼가 차기 전에 연결이 닫힌 경우 발생합니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 508 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : ReceiveBinary3EFrameAsync().

|
inlinestaticprivate |
헤더의 데이터 길이에 맞춰 완전한 Binary 3E 요청을 읽습니다.
| stream | 스트림입니다. |
| cancellationToken | 취소 토큰입니다. |
| InvalidOperationException | 데이터 길이가 잘못된 경우 발생합니다. |
| IOException | 프레임 수신 중 연결이 닫힌 경우 발생합니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 445 번째 라인에서 정의되었습니다.
다음을 참조함 : ReadExactlyAsync().
다음에 의해서 참조됨 : HandleClientAsync().


|
inline |
TCP 수신기와 수락 루프를 시작합니다.
| cancellationToken | 서버 수명 토큰입니다. |
MitsubishiMcTcpSimulatorServer.cs 파일의 189 번째 라인에서 정의되었습니다.
다음을 참조함 : _acceptTask, _cts, _listener, _options, AcceptLoopAsync(), ParseAddress(), StatusChanged.

|
inline |
TCP 수신기를 중지하고 클라이언트 작업 종료를 기다립니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 221 번째 라인에서 정의되었습니다.
다음을 참조함 : _acceptTask, _clientTasks, _cts, _listener, _syncRoot, StatusChanged.
다음에 의해서 참조됨 : DisposeAsync().

|
private |
accept Task 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 79 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : StartAsync(), StopAsync().
|
private |
client Tasks 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 43 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AcceptLoopAsync(), StopAsync().
|
private |
cts 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 61 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : StartAsync(), StopAsync().
|
private |
listener 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 70 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AcceptLoopAsync(), StartAsync(), StopAsync().
|
private |
options 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 25 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : MitsubishiMcTcpSimulatorServer(), StartAsync().
|
private |
protocol 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 34 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : HandleClientAsync(), MitsubishiMcTcpSimulatorServer().
|
private |
sync Root 값을 보관합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 52 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AcceptLoopAsync(), StopAsync().
|
get |
서버 실행 여부를 가져옵니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 164 번째 라인에서 정의되었습니다.
| EventHandler<string>? Dreamine.PLC.Mitsubishi.MC.Simulation.MitsubishiMcTcpSimulatorServer.StatusChanged |
서버 상태 메시지가 변경될 때 발생합니다.
MitsubishiMcTcpSimulatorServer.cs 파일의 154 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : HandleClientAsync(), OnProtocolStatusChanged(), StartAsync(), StopAsync().