Dreamine.PLC.Core 1.0.1
Dreamine.PLC.Core 산업 자동화 및 I/O 기능을 제공합니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.PLC.Core.Clients.InMemoryPlcClient 클래스 참조sealed

더 자세히 ...

Dreamine.PLC.Core.Clients.InMemoryPlcClient에 대한 상속 다이어그램 :
Dreamine.PLC.Core.Clients.InMemoryPlcClient에 대한 협력 다이어그램:

Public 멤버 함수

 InMemoryPlcClient ()
 InMemoryPlcClient (InMemoryPlcMemory memory)
Dreamine.PLC.Core.Clients.PlcClientBase(으)로부터 상속된 Public 멤버 함수
async Task< PlcResult > ConnectAsync (CancellationToken cancellationToken=default)
async Task< PlcResult > DisconnectAsync (CancellationToken cancellationToken=default)
async Task< PlcResult< bool[]> > ReadBitsAsync (PlcAddress address, int count, CancellationToken cancellationToken=default)
async Task< PlcResult< short[]> > ReadWordsAsync (PlcAddress address, int count, CancellationToken cancellationToken=default)
async Task< PlcResult > WriteBitsAsync (PlcAddress address, IReadOnlyList< bool > values, CancellationToken cancellationToken=default)
async Task< PlcResult > WriteWordsAsync (PlcAddress address, IReadOnlyList< short > values, CancellationToken cancellationToken=default)
virtual async ValueTask DisposeAsync ()

Protected 멤버 함수

override Task< PlcResult > ConnectCoreAsync (CancellationToken cancellationToken)
override Task< PlcResult > DisconnectCoreAsync (CancellationToken cancellationToken)
override Task< PlcResult< bool[]> > ReadBitsCoreAsync (PlcAddress address, int count, CancellationToken cancellationToken)
override Task< PlcResult< short[]> > ReadWordsCoreAsync (PlcAddress address, int count, CancellationToken cancellationToken)
override Task< PlcResult > WriteBitsCoreAsync (PlcAddress address, IReadOnlyList< bool > values, CancellationToken cancellationToken)
override Task< PlcResult > WriteWordsCoreAsync (PlcAddress address, IReadOnlyList< short > values, CancellationToken cancellationToken)
Dreamine.PLC.Core.Clients.PlcClientBase(으)로부터 상속된 Protected 멤버 함수
Task< PlcResult > ConnectCoreAsync (CancellationToken cancellationToken)
Task< PlcResult > DisconnectCoreAsync (CancellationToken cancellationToken)
Task< PlcResult< bool[]> > ReadBitsCoreAsync (PlcAddress address, int count, CancellationToken cancellationToken)
Task< PlcResult< short[]> > ReadWordsCoreAsync (PlcAddress address, int count, CancellationToken cancellationToken)
Task< PlcResult > WriteBitsCoreAsync (PlcAddress address, IReadOnlyList< bool > values, CancellationToken cancellationToken)
Task< PlcResult > WriteWordsCoreAsync (PlcAddress address, IReadOnlyList< short > values, CancellationToken cancellationToken)
void SetState (PlcConnectionState state)

속성

InMemoryPlcMemory Memory [get]
Dreamine.PLC.Core.Clients.PlcClientBase(으)로부터 상속된 속성
PlcConnectionState State = PlcConnectionState.Disconnected [get, private set]

Private 속성

readonly InMemoryPlcMemory _memory
bool _isConnected

추가로 상속된 멤버들

Dreamine.PLC.Core.Clients.PlcClientBase(으)로부터 상속된 이벤트
EventHandler< PlcConnectionState >? StateChanged

상세한 설명

테스트, 데모 및 시뮬레이터 기반용 메모리 PLC 클라이언트를 제공합니다.

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

생성자 & 소멸자 문서화

◆ InMemoryPlcClient() [1/2]

Dreamine.PLC.Core.Clients.InMemoryPlcClient.InMemoryPlcClient ( )
inline

새 메모리 저장소로 T:Dreamine.PLC.Core.Clients.InMemoryPlcClient를 초기화합니다.

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

45 : this(new InMemoryPlcMemory())
46 {
47 }

◆ InMemoryPlcClient() [2/2]

Dreamine.PLC.Core.Clients.InMemoryPlcClient.InMemoryPlcClient ( InMemoryPlcMemory memory)
inline

지정한 메모리 저장소로 T:Dreamine.PLC.Core.Clients.InMemoryPlcClient를 초기화합니다.

매개변수
memory메모리 PLC 저장소입니다.
예외
ArgumentNullExceptionmemorynull인 경우 발생합니다.

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

74 {
75 _memory = memory ?? throw new ArgumentNullException(nameof(memory));
76 }

다음을 참조함 : _memory.

멤버 함수 문서화

◆ ConnectCoreAsync()

override Task< PlcResult > Dreamine.PLC.Core.Clients.InMemoryPlcClient.ConnectCoreAsync ( CancellationToken cancellationToken)
inlineprotected

메모리 클라이언트를 연결 상태로 전환합니다.

매개변수
cancellationToken취소 토큰입니다.
반환값
연결 결과입니다.
예외
OperationCanceledException토큰이 취소된 경우 발생합니다.

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

121 {
122 cancellationToken.ThrowIfCancellationRequested();
123
124 _isConnected = true;
125
126 return Task.FromResult(PlcResult.Success());
127 }

다음을 참조함 : _isConnected.

◆ DisconnectCoreAsync()

override Task< PlcResult > Dreamine.PLC.Core.Clients.InMemoryPlcClient.DisconnectCoreAsync ( CancellationToken cancellationToken)
inlineprotected

메모리 클라이언트를 연결 해제 상태로 전환합니다.

매개변수
cancellationToken취소 토큰입니다.
반환값
연결 해제 결과입니다.
예외
OperationCanceledException토큰이 취소된 경우 발생합니다.

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

162 {
163 cancellationToken.ThrowIfCancellationRequested();
164
165 _isConnected = false;
166
167 return Task.FromResult(PlcResult.Success());
168 }

다음을 참조함 : _isConnected.

◆ ReadBitsCoreAsync()

override Task< PlcResult< bool[]> > Dreamine.PLC.Core.Clients.InMemoryPlcClient.ReadBitsCoreAsync ( PlcAddress address,
int count,
CancellationToken cancellationToken )
inlineprotected

연결된 메모리 저장소에서 비트를 읽습니다.

매개변수
address시작 주소입니다.
count읽을 수입니다.
cancellationToken취소 토큰입니다.
반환값
비트 읽기 결과입니다.
예외
OperationCanceledException토큰이 취소된 경우 발생합니다.

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

220 {
221 cancellationToken.ThrowIfCancellationRequested();
222
223 if (!_isConnected)
224 {
225 return Task.FromResult(PlcResult<bool[]>.Failure("The in-memory PLC client is not connected."));
226 }
227
228 return Task.FromResult(_memory.ReadBits(address, count));
229 }

다음을 참조함 : _isConnected, _memory.

◆ ReadWordsCoreAsync()

override Task< PlcResult< short[]> > Dreamine.PLC.Core.Clients.InMemoryPlcClient.ReadWordsCoreAsync ( PlcAddress address,
int count,
CancellationToken cancellationToken )
inlineprotected

연결된 메모리 저장소에서 워드를 읽습니다.

매개변수
address시작 주소입니다.
count읽을 수입니다.
cancellationToken취소 토큰입니다.
반환값
워드 읽기 결과입니다.
예외
OperationCanceledException토큰이 취소된 경우 발생합니다.

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

281 {
282 cancellationToken.ThrowIfCancellationRequested();
283
284 if (!_isConnected)
285 {
286 return Task.FromResult(PlcResult<short[]>.Failure("The in-memory PLC client is not connected."));
287 }
288
289 return Task.FromResult(_memory.ReadWords(address, count));
290 }

다음을 참조함 : _isConnected, _memory.

◆ WriteBitsCoreAsync()

override Task< PlcResult > Dreamine.PLC.Core.Clients.InMemoryPlcClient.WriteBitsCoreAsync ( PlcAddress address,
IReadOnlyList< bool > values,
CancellationToken cancellationToken )
inlineprotected

연결된 메모리 저장소에 비트를 씁니다.

매개변수
address시작 주소입니다.
values쓸 값입니다.
cancellationToken취소 토큰입니다.
반환값
비트 쓰기 결과입니다.
예외
OperationCanceledException토큰이 취소된 경우 발생합니다.

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

342 {
343 cancellationToken.ThrowIfCancellationRequested();
344
345 if (!_isConnected)
346 {
347 return Task.FromResult(PlcResult.Failure("The in-memory PLC client is not connected."));
348 }
349
350 return Task.FromResult(_memory.WriteBits(address, values));
351 }

다음을 참조함 : _isConnected, _memory.

◆ WriteWordsCoreAsync()

override Task< PlcResult > Dreamine.PLC.Core.Clients.InMemoryPlcClient.WriteWordsCoreAsync ( PlcAddress address,
IReadOnlyList< short > values,
CancellationToken cancellationToken )
inlineprotected

연결된 메모리 저장소에 워드를 씁니다.

매개변수
address시작 주소입니다.
values쓸 값입니다.
cancellationToken취소 토큰입니다.
반환값
워드 쓰기 결과입니다.
예외
OperationCanceledException토큰이 취소된 경우 발생합니다.

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

403 {
404 cancellationToken.ThrowIfCancellationRequested();
405
406 if (!_isConnected)
407 {
408 return Task.FromResult(PlcResult.Failure("The in-memory PLC client is not connected."));
409 }
410
411 return Task.FromResult(_memory.WriteWords(address, values));
412 }

다음을 참조함 : _isConnected, _memory.

멤버 데이터 문서화

◆ _isConnected

bool Dreamine.PLC.Core.Clients.InMemoryPlcClient._isConnected
private

is Connected 값을 보관합니다.

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

다음에 의해서 참조됨 : ConnectCoreAsync(), DisconnectCoreAsync(), ReadBitsCoreAsync(), ReadWordsCoreAsync(), WriteBitsCoreAsync(), WriteWordsCoreAsync().

◆ _memory

readonly InMemoryPlcMemory Dreamine.PLC.Core.Clients.InMemoryPlcClient._memory
private

memory 값을 보관합니다.

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

다음에 의해서 참조됨 : InMemoryPlcClient(), ReadBitsCoreAsync(), ReadWordsCoreAsync(), WriteBitsCoreAsync(), WriteWordsCoreAsync().

속성 문서화

◆ Memory

InMemoryPlcMemory Dreamine.PLC.Core.Clients.InMemoryPlcClient.Memory
get

메모리 PLC 저장소를 가져옵니다.

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


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