Dreamine.PLC.Core
Dreamine PLC 통신을 위한 공통 Runtime 패키지입니다.
이 패키지는 InMemory PLC 시뮬레이션, 공통 주소 처리 지원, Simulator Server/Client 기반 구조, 프로토콜 어댑터와 WPF 진단 UI에서 사용하는 공통 Runtime 로직을 제공합니다.
주요 기능
- InMemory PLC Client
- 공통 PLC Memory 모델
- Dreamine TCP Simulator Server/Client
- 기본 Read/Write 명령 흐름
- PC-to-PC 시뮬레이터 테스트 지원
- PLC 패키지군에서 공유하는 Runtime 유틸리티
아키텍처
Dreamine.PLC.Wpf / SampleSmart
↓
Dreamine.PLC.Abstractions
↓
Dreamine.PLC.Core
↓
Protocol Adapters / Simulators
Dreamine.PLC.Core는 벤더 중립으로 유지합니다. Mitsubishi MC와 Omron FINS 세부 프로토콜은 각각의 전용 패키지에 둡니다.
Simulator 프로토콜
내장 Dreamine Simulator는 진단 및 프레임워크 검증용 텍스트 기반 프로토콜입니다.
예시 명령 흐름:
WRITE_WORDS D100 100,200,300,400
READ_WORDS D100 4
WRITE_BITS M10 1,0,1,0
READ_BITS M10 4
이 Simulator는 Mitsubishi MC 프로토콜도 아니고 Omron FINS 프로토콜도 아닙니다.
Mode 매칭 규칙
PC-to-PC 테스트에서는 서버 Mode와 클라이언트 Mode가 반드시 같아야 합니다.
SimulatorTcp ↔ SimulatorTcp
McTcp ↔ McTcp
McUdp ↔ McUdp
FinsTcp ↔ FinsTcp
FinsUdp ↔ FinsUdp
SimulatorTcp 서버는 McTcp, McUdp, FinsTcp, FinsUdp 클라이언트와 통신할 수 없습니다.
PC-to-PC 방화벽 요구사항
PC-to-PC 테스트에서는 서버 PC의 인바운드 포트가 열려 있어야 합니다.
예: 55000 포트 사용 시
New-NetFirewallRule -DisplayName "Dreamine PLC TCP 55000" -Direction Inbound -Protocol TCP -LocalPort 55000 -Action Allow
New-NetFirewallRule -DisplayName "Dreamine PLC UDP 55000" -Direction Inbound -Protocol UDP -LocalPort 55000 -Action Allow
PowerShell은 관리자 권한으로 실행해야 합니다. 이 설정을 하지 않으면 1PC 테스트는 되지만 2PC 테스트가 실패할 수 있습니다.
실제 PLC 주의사항
내장 Simulator는 개발 및 부하 테스트용입니다.
- 1ms Polling은 Simulator 부하 테스트 전용입니다.
- 실제 PLC에 1ms 주기로 통신하지 마십시오.
- 실제 PLC 모니터링 권장 주기: 100ms ~ 500ms
- UI 표시 갱신 권장 주기: 250ms ~ 1000ms
- PLC Write는 상시 주기 전송이 아니라 이벤트 기반으로 처리하는 것을 권장합니다.
검증 상태
다음 항목이 검증되었습니다.
- 1PC Simulator TCP Read/Write 및 Handshake
- 2PC Simulator TCP Read/Write 및 Handshake
- WPF Monitor 공통 흐름
실제 PLC 테스트는 각 프로토콜 패키지에서 별도 진행해야 합니다.
라이선스
MIT License.
구조 다이어그램
classDiagram
class PlcClientBase {
<<abstract>>
#string _host
#int _port
+IsConnected bool
+ConnectAsync() Task
+DisconnectAsync() Task
#SendRequestAsync(byte[]) Task~byte[]~
#BuildReadRequest(PlcAddress, int) byte[]
#ParseReadResponse(byte[], PlcDataType) object
}
class PlcMonitor {
-IPlcClient _client
-List~MonitorItem~ _items
+AddMonitor(string, Action~object~) IDisposable
+StartAsync(int) Task
+StopAsync() Task
}
class PlcAddressParser {
+Parse(string) PlcAddress
+Format(PlcAddress) string
-ParseDevice(string) string
-ParseNumber(string) int
}
class MonitorItem {
+string Address
+PlcDataType DataType
+object LastValue
+Action~object~ Callback
}
class IPlcClient {
<<interface>>
}
IPlcClient <|.. PlcClientBase
PlcMonitor --> IPlcClient
PlcMonitor --> MonitorItem
PlcClientBase --> PlcAddressParserAPI 문서
타입
\if KO 비동기 호환 잠금 기본 요소를 제공합니다. \endif \if EN Provides an asynchronous-compatible lock primitive. \endif
\if KO 기본 PLC 주소 파서를 제공합니다. \endif \if EN Provides the default PLC address parser. \endif
\if KO 테스트, 데모 및 시뮬레이터 기반용 메모리 PLC 클라이언트를 제공합니다. \endif \if EN Provides an in-memory PLC client for tests, demos, and simulator foundations. \endif
\if KO 메모리 기반 PLC 디바이스 저장소를 제공합니다. \endif \if EN Provides an in-memory PLC device memory store. \endif
\if KO PLC 클라이언트의 공통 상태, 검증, 오류 처리 및 동기화를 구현합니다. \endif \if EN Implements common state, validation, error handling, and synchronization for PLC clients. \endif
\if KO PLC 클라이언트 요청 객체용 확장 메서드를 제공합니다. \endif \if EN Provides request-object extension methods for PLC clients. \endif
\if KO TCP PLC 시뮬레이터 클라이언트 옵션을 정의합니다. \endif \if EN Defines TCP PLC simulator client options. \endif
\if KO Dreamine PLC 시뮬레이터 라인 프로토콜 도우미를 제공합니다. \endif \if EN Provides helpers for the Dreamine PLC simulator line protocol. \endif
\if KO 샘플과 PC 간 테스트용 경량 TCP PLC 시뮬레이터 서버를 제공합니다. \endif \if EN Provides a lightweight TCP PLC simulator server for samples and cross-PC tests. \endif
\if KO TCP PLC 시뮬레이터 서버 옵션을 정의합니다. \endif \if EN Defines TCP PLC simulator server options. \endif
\if KO Dreamine TCP PLC 시뮬레이터 프로토콜용 클라이언트를 제공합니다. \endif \if EN Provides a client for the Dreamine TCP PLC simulator protocol. \endif
\if KO 공통 PLC 요청 검증 도우미를 제공합니다. \endif \if EN Provides common PLC request validation helpers. \endif
\if KO 잠금 세마포어를 한 번만 해제하는 핸들입니다. \endif \if EN Represents a handle that releases the lock semaphore once. \endif
AsyncLock
\if KO 비동기 잠금에 진입합니다. \endif \if EN Enters the asynchronous lock. \endif
cancellationToken— \if KO 잠금 대기 취소 토큰입니다. \endif \if EN The lock-wait cancellation token. \endif반환: \if KO 해제 시 잠금을 종료하는 객체입니다. \endif \if EN A disposable releaser that exits the lock. \endif
\if KO semaphore 값을 보관합니다. \endif \if EN Stores the semaphore value. \endif
DefaultPlcAddressParser
\if KO 디바이스 접두사를 PLC 디바이스 타입으로 변환합니다. \endif \if EN Converts a device prefix to a PLC device type. \endif
devicePrefix— \if KO 변환할 접두사입니다. \endif \if EN The prefix to convert. \endif반환: \if KO 대응 타입이며 지원되지 않으면 Unknown입니다. \endif \if EN The matching type, or Unknown when unsupported. \endif
\if KO 알려진 디바이스 접두사 중 텍스트 시작과 일치하는 값을 찾습니다. \endif \if EN Finds a known device prefix matching the start of the text. \endif
text— \if KO 검사할 주소 텍스트입니다. \endif \if EN The address text to inspect. \endif반환: \if KO 일치하는 접두사이며 없으면 입니다. \endif \if EN The matching prefix, or . \endif
\if KO 디바이스 접두사, 오프셋 및 선택적 비트 오프셋으로 PLC 주소를 구문 분석합니다. \endif \if EN Parses a PLC address from its device prefix, offset, and optional bit offset. \endif
text— \if KO PLC 주소 텍스트입니다. \endif \if EN The PLC address text. \endif반환: \if KO 구문 분석된 주소 또는 실패 메시지입니다. \endif \if EN The parsed address or a failure message. \endif
\if KO PLC 주소 텍스트의 구문 분석을 시도합니다. \endif \if EN Attempts to parse PLC address text. \endif
text— \if KO PLC 주소 텍스트입니다. \endif \if EN The PLC address text. \endifaddress— \if KO 성공 시 구문 분석된 주소입니다. \endif \if EN The parsed address on success. \endif반환: \if KO 성공하면 입니다. \endif \if EN when parsing succeeds. \endif
\if KO Known Device Prefixes 값을 보관합니다. \endif \if EN Stores the known device prefixes value. \endif
InMemoryPlcClient
\if KO 새 메모리 저장소로 를 초기화합니다. \endif \if EN Initializes with a new memory store. \endif
\if KO 지정한 메모리 저장소로 를 초기화합니다. \endif \if EN Initializes with the specified memory store. \endif
memory— \if KO 메모리 PLC 저장소입니다. \endif \if EN The in-memory PLC store. \endif\if KO 메모리 클라이언트를 연결 상태로 전환합니다. \endif \if EN Marks the in-memory client as connected. \endif
cancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 연결 결과입니다. \endif \if EN The connection result. \endif
\if KO 메모리 클라이언트를 연결 해제 상태로 전환합니다. \endif \if EN Marks the in-memory client as disconnected. \endif
cancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 연결 해제 결과입니다. \endif \if EN The disconnection result. \endif
\if KO 연결된 메모리 저장소에서 비트를 읽습니다. \endif \if EN Reads bits from the connected memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 읽을 수입니다. \endif \if EN The read count. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 비트 읽기 결과입니다. \endif \if EN The bit-read result. \endif
\if KO 연결된 메모리 저장소에서 워드를 읽습니다. \endif \if EN Reads words from the connected memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 읽을 수입니다. \endif \if EN The read count. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 워드 읽기 결과입니다. \endif \if EN The word-read result. \endif
\if KO 연결된 메모리 저장소에 비트를 씁니다. \endif \if EN Writes bits to the connected memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 쓸 값입니다. \endif \if EN The values to write. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 비트 쓰기 결과입니다. \endif \if EN The bit-write result. \endif
\if KO 연결된 메모리 저장소에 워드를 씁니다. \endif \if EN Writes words to the connected memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 쓸 값입니다. \endif \if EN The values to write. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 워드 쓰기 결과입니다. \endif \if EN The word-write result. \endif
\if KO 메모리 PLC 저장소를 가져옵니다. \endif \if EN Gets the in-memory PLC store. \endif
\if KO is Connected 값을 보관합니다. \endif \if EN Stores the is connected value. \endif
\if KO memory 값을 보관합니다. \endif \if EN Stores the memory value. \endif
InMemoryPlcMemory
\if KO 모든 비트 및 워드 메모리 영역을 지웁니다. \endif \if EN Clears all bit and word memory areas. \endif
\if KO 지정한 디바이스 타입의 비트 영역을 가져오거나 만듭니다. \endif \if EN Gets or creates the bit area for a device type. \endif
deviceType— \if KO 디바이스 타입입니다. \endif \if EN The device type. \endif반환: \if KO 비트 영역 사전입니다. \endif \if EN The bit-area dictionary. \endif
\if KO 지정한 디바이스 타입의 워드 영역을 가져오거나 만듭니다. \endif \if EN Gets or creates the word area for a device type. \endif
deviceType— \if KO 디바이스 타입입니다. \endif \if EN The device type. \endif반환: \if KO 워드 영역 사전입니다. \endif \if EN The word-area dictionary. \endif
\if KO 메모리 저장소에서 비트 값을 읽습니다. \endif \if EN Reads bit values from the memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 읽을 비트 수입니다. \endif \if EN The bit count. \endif반환: \if KO 읽은 비트 결과입니다. \endif \if EN The read-bit result. \endif
\if KO 메모리 저장소에서 워드 값을 읽습니다. \endif \if EN Reads word values from the memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 읽을 워드 수입니다. \endif \if EN The word count. \endif반환: \if KO 읽은 워드 결과입니다. \endif \if EN The read-word result. \endif
\if KO 메모리 저장소에 비트 값을 씁니다. \endif \if EN Writes bit values to the memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 쓸 비트 값입니다. \endif \if EN The bit values to write. \endif반환: \if KO 쓰기 결과입니다. \endif \if EN The write result. \endif
\if KO 메모리 저장소에 워드 값을 씁니다. \endif \if EN Writes word values to the memory store. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 쓸 워드 값입니다. \endif \if EN The word values to write. \endif반환: \if KO 쓰기 결과입니다. \endif \if EN The write result. \endif
\if KO bits 값을 보관합니다. \endif \if EN Stores the bits value. \endif
\if KO sync Root 값을 보관합니다. \endif \if EN Stores the sync root value. \endif
\if KO words 값을 보관합니다. \endif \if EN Stores the words value. \endif
PlcClientBase
\if KO 잠금을 획득하고 구체 전송에 연결하며 상태를 갱신합니다. \endif \if EN Acquires the lock, connects the concrete transport, and updates state. \endif
cancellationToken— \if KO 연결 및 잠금 대기 취소 토큰입니다. \endif \if EN The connection and lock-wait cancellation token. \endif반환: \if KO 연결 결과입니다. \endif \if EN The connection result. \endif
\if KO 구체 PLC 전송에 연결합니다. \endif \if EN Connects to the concrete PLC transport. \endif
cancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 연결 결과입니다. \endif \if EN The connection result. \endif
\if KO 잠금을 획득하고 구체 전송 연결을 해제하며 상태를 갱신합니다. \endif \if EN Acquires the lock, disconnects the concrete transport, and updates state. \endif
cancellationToken— \if KO 연결 해제 및 잠금 대기 취소 토큰입니다. \endif \if EN The disconnection and lock-wait cancellation token. \endif반환: \if KO 연결 해제 결과입니다. \endif \if EN The disconnection result. \endif
\if KO 구체 PLC 전송 연결을 해제합니다. \endif \if EN Disconnects from the concrete PLC transport. \endif
cancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 연결 해제 결과입니다. \endif \if EN The disconnection result. \endif
\if KO 동시 호출을 차단하고 구체 전송 연결을 최선 노력으로 해제합니다. \endif \if EN Blocks concurrent calls and disconnects the concrete transport on a best-effort basis. \endif
반환: \if KO 비동기 해제 작업입니다. \endif \if EN The asynchronous disposal operation. \endif
\if KO 요청과 연결 상태를 검증한 뒤 구체 전송에서 비트를 읽습니다. \endif \if EN Validates the request and connection state, then reads bits from the concrete transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 읽을 비트 수입니다. \endif \if EN The bit count. \endifcancellationToken— \if KO 읽기 취소 토큰입니다. \endif \if EN The read cancellation token. \endif반환: \if KO 비트 읽기 결과입니다. \endif \if EN The bit-read result. \endif
\if KO 구체 PLC 전송에서 비트를 읽습니다. \endif \if EN Reads bits from the concrete PLC transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 비트 수입니다. \endif \if EN The bit count. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 비트 결과입니다. \endif \if EN The bit result. \endif
\if KO 요청과 연결 상태를 검증한 뒤 구체 전송에서 워드를 읽습니다. \endif \if EN Validates the request and connection state, then reads words from the concrete transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 읽을 워드 수입니다. \endif \if EN The word count. \endifcancellationToken— \if KO 읽기 취소 토큰입니다. \endif \if EN The read cancellation token. \endif반환: \if KO 워드 읽기 결과입니다. \endif \if EN The word-read result. \endif
\if KO 구체 PLC 전송에서 워드를 읽습니다. \endif \if EN Reads words from the concrete PLC transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 워드 수입니다. \endif \if EN The word count. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 워드 결과입니다. \endif \if EN The word result. \endif
\if KO 연결 상태를 변경하고 상태 변경 이벤트를 발생시킵니다. \endif \if EN Changes the connection state and raises the state-changed event. \endif
state— \if KO 새 연결 상태입니다. \endif \if EN The new connection state. \endif\if KO 클라이언트가 이미 해제되었으면 예외를 발생시킵니다. \endif \if EN Throws when the client has already been disposed. \endif
\if KO 읽기 주소와 항목 수를 검증합니다. \endif \if EN Validates a read address and item count. \endif
address— \if KO 주소입니다. \endif \if EN The address. \endifcount— \if KO 항목 수입니다. \endif \if EN The item count. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
\if KO 비트 쓰기 주소와 값 컬렉션을 검증합니다. \endif \if EN Validates a bit-write address and value collection. \endif
address— \if KO 주소입니다. \endif \if EN The address. \endifvalues— \if KO 값입니다. \endif \if EN The values. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
\if KO 워드 쓰기 주소와 값 컬렉션을 검증합니다. \endif \if EN Validates a word-write address and value collection. \endif
address— \if KO 주소입니다. \endif \if EN The address. \endifvalues— \if KO 값입니다. \endif \if EN The values. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
\if KO 요청과 연결 상태를 검증한 뒤 구체 전송에 비트를 씁니다. \endif \if EN Validates the request and connection state, then writes bits to the concrete transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 쓸 비트 값입니다. \endif \if EN The bit values. \endifcancellationToken— \if KO 쓰기 취소 토큰입니다. \endif \if EN The write cancellation token. \endif반환: \if KO 비트 쓰기 결과입니다. \endif \if EN The bit-write result. \endif
\if KO 구체 PLC 전송에 비트를 씁니다. \endif \if EN Writes bits to the concrete PLC transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 비트 값입니다. \endif \if EN The bit values. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 쓰기 결과입니다. \endif \if EN The write result. \endif
\if KO 요청과 연결 상태를 검증한 뒤 구체 전송에 워드를 씁니다. \endif \if EN Validates the request and connection state, then writes words to the concrete transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 쓸 워드 값입니다. \endif \if EN The word values. \endifcancellationToken— \if KO 쓰기 취소 토큰입니다. \endif \if EN The write cancellation token. \endif반환: \if KO 워드 쓰기 결과입니다. \endif \if EN The word-write result. \endif
\if KO 구체 PLC 전송에 워드를 씁니다. \endif \if EN Writes words to the concrete PLC transport. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 워드 값입니다. \endif \if EN The word values. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 쓰기 결과입니다. \endif \if EN The write result. \endif
\if KO 현재 PLC 연결 상태를 가져옵니다. \endif \if EN Gets the current PLC connection state. \endif
\if KO disposed 값을 보관합니다. \endif \if EN Stores the disposed value. \endif
\if KO dispose Guard 값을 보관합니다. \endif \if EN Stores the dispose guard value. \endif
\if KO sync Lock 값을 보관합니다. \endif \if EN Stores the sync lock value. \endif
\if KO PLC 연결 상태가 변경될 때 발생합니다. \endif \if EN Occurs when the PLC connection state changes. \endif
PlcClientExtensions
\if KO PLC 읽기 요청을 사용해 비트 값을 읽습니다. \endif \if EN Reads bit values using a PLC read request. \endif
client— \if KO PLC 클라이언트입니다. \endif \if EN The PLC client. \endifrequest— \if KO PLC 읽기 요청입니다. \endif \if EN The PLC read request. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 읽은 비트 결과입니다. \endif \if EN The read-bit result. \endif
\if KO PLC 읽기 요청을 사용해 워드 값을 읽습니다. \endif \if EN Reads word values using a PLC read request. \endif
client— \if KO PLC 클라이언트입니다. \endif \if EN The PLC client. \endifrequest— \if KO PLC 읽기 요청입니다. \endif \if EN The PLC read request. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 읽은 워드 결과입니다. \endif \if EN The read-word result. \endif
\if KO PLC 비트 쓰기 요청을 사용해 비트 값을 씁니다. \endif \if EN Writes bit values using a PLC bit-write request. \endif
client— \if KO PLC 클라이언트입니다. \endif \if EN The PLC client. \endifrequest— \if KO PLC 비트 쓰기 요청입니다. \endif \if EN The PLC bit-write request. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO PLC 작업 결과입니다. \endif \if EN The PLC operation result. \endif
\if KO PLC 워드 쓰기 요청을 사용해 워드 값을 씁니다. \endif \if EN Writes word values using a PLC word-write request. \endif
client— \if KO PLC 클라이언트입니다. \endif \if EN The PLC client. \endifrequest— \if KO PLC 워드 쓰기 요청입니다. \endif \if EN The PLC word-write request. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO PLC 작업 결과입니다. \endif \if EN The PLC operation result. \endif
PlcSimulatorClientOptions
\if KO 밀리초 단위 연결 제한 시간을 가져오거나 설정합니다. \endif \if EN Gets or sets the connection timeout in milliseconds. \endif
\if KO 원격 호스트를 가져오거나 설정합니다. \endif \if EN Gets or sets the remote host. \endif
\if KO 원격 포트를 가져오거나 설정합니다. \endif \if EN Gets or sets the remote port. \endif
PlcSimulatorProtocol
\if KO 개행이 제거된 실패 응답 라인을 만듭니다. \endif \if EN Builds a failure response line with line breaks removed. \endif
message— \if KO 실패 메시지입니다. \endif \if EN The failure message. \endif반환: \if KO 실패 응답 라인입니다. \endif \if EN The failure response line. \endif
\if KO 비트 값을 프로토콜 페이로드로 변환합니다. \endif \if EN Converts bit values to a protocol payload. \endif
values— \if KO 비트 값입니다. \endif \if EN The bit values. \endif반환: \if KO 쉼표로 구분된 페이로드입니다. \endif \if EN The comma-separated payload. \endif
\if KO 워드 값을 프로토콜 페이로드로 변환합니다. \endif \if EN Converts word values to a protocol payload. \endif
values— \if KO 워드 값입니다. \endif \if EN The word values. \endif반환: \if KO 쉼표로 구분된 페이로드입니다. \endif \if EN The comma-separated payload. \endif
\if KO 성공 응답 라인을 만듭니다. \endif \if EN Builds a successful response line. \endif
payload— \if KO 선택적 응답 페이로드입니다. \endif \if EN The optional response payload. \endif반환: \if KO 성공 응답 라인입니다. \endif \if EN The successful response line. \endif
\if KO 0, 1 또는 논리 문자열을 비트 값으로 구문 분석합니다. \endif \if EN Parses 0, 1, or a Boolean literal as a bit value. \endif
text— \if KO 구문 분석할 텍스트입니다. \endif \if EN The text to parse. \endif반환: \if KO 구문 분석된 비트 값입니다. \endif \if EN The parsed bit value. \endif
\if KO 프로토콜 페이로드에서 비트 값을 구문 분석합니다. \endif \if EN Parses bit values from a protocol payload. \endif
payload— \if KO 페이로드 텍스트입니다. \endif \if EN The payload text. \endif반환: \if KO 구문 분석된 비트 값입니다. \endif \if EN The parsed bit values. \endif
\if KO 프로토콜 페이로드에서 워드 값을 구문 분석합니다. \endif \if EN Parses word values from a protocol payload. \endif
payload— \if KO 페이로드 텍스트입니다. \endif \if EN The payload text. \endif반환: \if KO 구문 분석된 워드 값입니다. \endif \if EN The parsed word values. \endif
\if KO 응답 라인에서 성공 페이로드를 추출합니다. \endif \if EN Extracts the successful payload from a response line. \endif
line— \if KO 응답 라인입니다. \endif \if EN The response line. \endif반환: \if KO 응답 페이로드입니다. \endif \if EN The response payload. \endif
\if KO 쉼표로 구분된 페이로드를 공백이 제거된 값으로 나눕니다. \endif \if EN Splits a comma-separated payload into trimmed values. \endif
payload— \if KO 분할할 페이로드입니다. \endif \if EN The payload to split. \endif반환: \if KO 비어 있지 않은 값 배열입니다. \endif \if EN The non-empty value array. \endif
\if KO 비트 읽기 명령 이름입니다. \endif \if EN The read-bit command name. \endif
\if KO 워드 읽기 명령 이름입니다. \endif \if EN The read-word command name. \endif
\if KO 비트 쓰기 명령 이름입니다. \endif \if EN The write-bit command name. \endif
\if KO 워드 쓰기 명령 이름입니다. \endif \if EN The write-word command name. \endif
PlcSimulatorServer
\if KO 새 메모리 저장소와 지정한 옵션으로 서버를 초기화합니다. \endif \if EN Initializes the server with a new memory store and specified options. \endif
options— \if KO 서버 옵션입니다. \endif \if EN The server options. \endif\if KO 지정한 옵션과 공유 메모리 저장소로 서버를 초기화합니다. \endif \if EN Initializes the server with specified options and shared memory. \endif
options— \if KO 서버 옵션입니다. \endif \if EN The server options. \endifmemory— \if KO 공유 PLC 메모리입니다. \endif \if EN The shared PLC memory. \endif\if KO TCP 클라이언트를 수락하고 각 연결 처리 작업을 추적합니다. \endif \if EN Accepts TCP clients and tracks a handling task for each connection. \endif
cancellationToken— \if KO 루프 취소 토큰입니다. \endif \if EN The loop cancellation token. \endif반환: \if KO 수락 루프 작업입니다. \endif \if EN The acceptance-loop task. \endif
\if KO 구성된 트리거에 단일 워드가 기록되면 증가된 자동 응답 값을 씁니다. \endif \if EN Writes an incremented automatic response when one word targets the configured trigger. \endif
writtenAddress— \if KO 기록된 주소입니다. \endif \if EN The written address. \endifvalues— \if KO 기록된 값입니다. \endif \if EN The written values. \endif\if KO TCP 시뮬레이터 서버를 중지하고 리소스를 해제합니다. \endif \if EN Stops the TCP simulator server and releases resources. \endif
반환: \if KO 비동기 해제 작업입니다. \endif \if EN The asynchronous disposal operation. \endif
\if KO 한 프로토콜 명령 라인을 분석하고 성공 또는 오류 응답을 만듭니다. \endif \if EN Parses one protocol command line and builds a success or error response. \endif
line— \if KO 명령 라인입니다. \endif \if EN The command line. \endif반환: \if KO 프로토콜 응답 라인입니다. \endif \if EN The protocol response line. \endif
\if KO 비트 읽기 명령을 실행합니다. \endif \if EN Executes a bit-read command. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifargument— \if KO 읽기 수 인수입니다. \endif \if EN The read-count argument. \endif반환: \if KO 응답 라인입니다. \endif \if EN The response line. \endif
\if KO 워드 읽기 명령을 실행합니다. \endif \if EN Executes a word-read command. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifargument— \if KO 읽기 수 인수입니다. \endif \if EN The read-count argument. \endif반환: \if KO 응답 라인입니다. \endif \if EN The response line. \endif
\if KO 비트 쓰기 명령을 실행합니다. \endif \if EN Executes a bit-write command. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifargument— \if KO 비트 페이로드입니다. \endif \if EN The bit payload. \endif반환: \if KO 응답 라인입니다. \endif \if EN The response line. \endif
\if KO 워드 쓰기 명령을 실행하고 자동 응답을 적용합니다. \endif \if EN Executes a word-write command and applies the automatic response. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifargument— \if KO 워드 페이로드입니다. \endif \if EN The word payload. \endif반환: \if KO 응답 라인입니다. \endif \if EN The response line. \endif
\if KO 한 클라이언트의 라인 명령을 읽고 실행 결과를 응답합니다. \endif \if EN Reads line commands from one client and writes execution responses. \endif
client— \if KO 처리할 TCP 클라이언트입니다. \endif \if EN The TCP client to handle. \endifcancellationToken— \if KO 처리 취소 토큰입니다. \endif \if EN The handling cancellation token. \endif반환: \if KO 클라이언트 처리 작업입니다. \endif \if EN The client-handling task. \endif
\if KO 바인딩 호스트를 IP 주소로 변환하며 비어 있거나 잘못되면 Any를 사용합니다. \endif \if EN Converts a bind host to an IP address, using Any when empty or invalid. \endif
host— \if KO 호스트 텍스트입니다. \endif \if EN The host text. \endif반환: \if KO 바인딩 IP 주소입니다. \endif \if EN The bind IP address. \endif
\if KO TCP 수신기를 시작하고 클라이언트 수락 루프를 실행합니다. \endif \if EN Starts the TCP listener and client-acceptance loop. \endif
cancellationToken— \if KO 서버 수명 취소 토큰입니다. \endif \if EN The server-lifetime cancellation token. \endif반환: \if KO 시작 작업입니다. \endif \if EN The start operation. \endif
\if KO 수신기를 중지하고 수락 및 클라이언트 작업 종료를 기다립니다. \endif \if EN Stops the listener and waits for acceptance and client tasks to end. \endif
반환: \if KO 비동기 중지 작업입니다. \endif \if EN The asynchronous stop operation. \endif
\if KO 양의 읽기 수를 구문 분석합니다. \endif \if EN Parses a positive read count. \endif
text— \if KO 수 텍스트입니다. \endif \if EN The count text. \endifcount— \if KO 구문 분석된 수입니다. \endif \if EN The parsed count. \endiferror— \if KO 실패 메시지입니다. \endif \if EN The failure message. \endif반환: \if KO 성공하면 입니다. \endif \if EN on success. \endif
\if KO 시뮬레이터 서버 실행 여부를 가져옵니다. \endif \if EN Gets whether the simulator server is running. \endif
\if KO accept Task 값을 보관합니다. \endif \if EN Stores the accept task value. \endif
\if KO address Parser 값을 보관합니다. \endif \if EN Stores the address parser value. \endif
\if KO client Tasks 값을 보관합니다. \endif \if EN Stores the client tasks value. \endif
\if KO cts 값을 보관합니다. \endif \if EN Stores the cts value. \endif
\if KO listener 값을 보관합니다. \endif \if EN Stores the listener value. \endif
\if KO memory 값을 보관합니다. \endif \if EN Stores the memory value. \endif
\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif
\if KO sync Root 값을 보관합니다. \endif \if EN Stores the sync root value. \endif
\if KO 서버 상태 메시지가 변경될 때 발생합니다. \endif \if EN Occurs when the server status message changes. \endif
PlcSimulatorServerOptions
\if KO 자동 응답 테스트 응답 워드 주소를 가져오거나 설정합니다. \endif \if EN Gets or sets the response word address for the automatic response test. \endif
\if KO 자동 응답 테스트에 사용할 증가값을 가져오거나 설정합니다. \endif \if EN Gets or sets the increment used by the automatic response test. \endif
\if KO 자동 응답 테스트 트리거 워드 주소를 가져오거나 설정합니다. \endif \if EN Gets or sets the trigger word address for the automatic response test. \endif
\if KO 트리거 워드 기록 후 자동 응답 워드를 쓸지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether an automatic response word is written after a trigger. \endif
\if KO 서버 바인딩 주소를 가져오거나 설정합니다. \endif \if EN Gets or sets the server bind address. \endif
\if KO 서버 포트를 가져오거나 설정합니다. \endif \if EN Gets or sets the server port. \endif
PlcSimulatorTcpClient
\if KO 지정한 옵션으로 를 초기화합니다. \endif \if EN Initializes with the specified options. \endif
options— \if KO 시뮬레이터 클라이언트 옵션입니다. \endif \if EN The simulator client options. \endif\if KO 제한 시간 내 TCP 서버에 연결하고 텍스트 판독기와 작성기를 준비합니다. \endif \if EN Connects to the TCP server within the timeout and prepares text reader and writer. \endif
cancellationToken— \if KO 연결 취소 토큰입니다. \endif \if EN The connection cancellation token. \endif반환: \if KO 연결 결과입니다. \endif \if EN The connection result. \endif
\if KO TCP 판독기, 작성기 및 클라이언트를 해제합니다. \endif \if EN Releases the TCP reader, writer, and client. \endif
cancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 연결 해제 결과입니다. \endif \if EN The disconnection result. \endif
\if KO 비트 읽기 명령을 보내고 응답 페이로드를 구문 분석합니다. \endif \if EN Sends a bit-read command and parses the response payload. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 비트 수입니다. \endif \if EN The bit count. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 비트 결과입니다. \endif \if EN The bit result. \endif
\if KO 워드 읽기 명령을 보내고 응답 페이로드를 구문 분석합니다. \endif \if EN Sends a word-read command and parses the response payload. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifcount— \if KO 워드 수입니다. \endif \if EN The word count. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 워드 결과입니다. \endif \if EN The word result. \endif
\if KO 한 줄 명령을 전송하고 서버의 성공 응답 페이로드를 읽습니다. \endif \if EN Sends a line command and reads the server's successful response payload. \endif
command— \if KO 전송할 명령입니다. \endif \if EN The command to send. \endifcancellationToken— \if KO 송수신 취소 토큰입니다. \endif \if EN The I/O cancellation token. \endif반환: \if KO 성공 응답 페이로드입니다. \endif \if EN The successful response payload. \endif
\if KO 비트 쓰기 명령을 만들어 서버에 보냅니다. \endif \if EN Builds and sends a bit-write command to the server. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 비트 값입니다. \endif \if EN The bit values. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 쓰기 결과입니다. \endif \if EN The write result. \endif
\if KO 워드 쓰기 명령을 만들어 서버에 보냅니다. \endif \if EN Builds and sends a word-write command to the server. \endif
address— \if KO 시작 주소입니다. \endif \if EN The start address. \endifvalues— \if KO 워드 값입니다. \endif \if EN The word values. \endifcancellationToken— \if KO 취소 토큰입니다. \endif \if EN The cancellation token. \endif반환: \if KO 쓰기 결과입니다. \endif \if EN The write result. \endif
\if KO client 값을 보관합니다. \endif \if EN Stores the client value. \endif
\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif
\if KO reader 값을 보관합니다. \endif \if EN Stores the reader value. \endif
\if KO writer 값을 보관합니다. \endif \if EN Stores the writer value. \endif
PlcValidation
\if KO PLC 주소의 디바이스, 오프셋 및 비트 오프셋을 검증합니다. \endif \if EN Validates a PLC address device, offset, and bit offset. \endif
address— \if KO PLC 주소입니다. \endif \if EN The PLC address. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
\if KO PLC 비트 값 컬렉션이 비어 있지 않은지 검증합니다. \endif \if EN Validates that a PLC bit-value collection is not empty. \endif
values— \if KO 비트 값입니다. \endif \if EN The bit values. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
\if KO PLC 읽기 또는 쓰기 항목 수를 검증합니다. \endif \if EN Validates a PLC read or write count. \endif
count— \if KO 요청 항목 수입니다. \endif \if EN The requested item count. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
\if KO PLC 워드 값 컬렉션이 비어 있지 않은지 검증합니다. \endif \if EN Validates that a PLC word-value collection is not empty. \endif
values— \if KO 워드 값입니다. \endif \if EN The word values. \endif반환: \if KO 검증 결과입니다. \endif \if EN The validation result. \endif
Releaser
\if KO 해제할 세마포어로 핸들을 초기화합니다. \endif \if EN Initializes the handle with the semaphore to release. \endif
semaphore— \if KO 해제할 세마포어입니다. \endif \if EN The semaphore to release. \endif\if KO 세마포어를 최초 한 번만 해제합니다. \endif \if EN Releases the semaphore only on the first call. \endif
\if KO disposed 값을 보관합니다. \endif \if EN Stores the disposed value. \endif
\if KO semaphore 값을 보관합니다. \endif \if EN Stores the semaphore value. \endif