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

더 자세히 ...

정적 Public 멤버 함수

static PlcResult ValidateCount (int count)
static PlcResult ValidateAddress (PlcAddress address)
static PlcResult ValidateWordValues (IReadOnlyList< short > values)
static PlcResult ValidateBitValues (IReadOnlyList< bool > values)

상세한 설명

공통 PLC 요청 검증 도우미를 제공합니다.

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

멤버 함수 문서화

◆ ValidateAddress()

PlcResult Dreamine.PLC.Core.Validation.PlcValidation.ValidateAddress ( PlcAddress address)
inlinestatic

PLC 주소의 디바이스, 오프셋 및 비트 오프셋을 검증합니다.

매개변수
addressPLC 주소입니다.
반환값
검증 결과입니다.

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

75 {
76 if (address.DeviceType == PlcDeviceType.Unknown)
77 {
78 return PlcResult.Failure("The PLC device type is unknown.");
79 }
80
81 if (address.Offset < 0)
82 {
83 return PlcResult.Failure("The PLC address offset must be greater than or equal to zero.");
84 }
85
86 if (address.BitOffset.HasValue &&
87 address.BitOffset is < 0 or > 15)
88 {
89 return PlcResult.Failure("The PLC bit offset must be between 0 and 15.");
90 }
91
92 return PlcResult.Success();
93 }

다음에 의해서 참조됨 : Dreamine.PLC.Core.Clients.PlcClientBase.ValidateReadRequest(), Dreamine.PLC.Core.Clients.PlcClientBase.ValidateWriteBitRequest(), Dreamine.PLC.Core.Clients.PlcClientBase.ValidateWriteWordRequest().

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

◆ ValidateBitValues()

PlcResult Dreamine.PLC.Core.Validation.PlcValidation.ValidateBitValues ( IReadOnlyList< bool > values)
inlinestatic

PLC 비트 값 컬렉션이 비어 있지 않은지 검증합니다.

매개변수
values비트 값입니다.
반환값
검증 결과입니다.

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

154 {
155 if (values.Count == 0)
156 {
157 return PlcResult.Failure("The PLC bit value collection must not be empty.");
158 }
159
160 return PlcResult.Success();
161 }

다음에 의해서 참조됨 : Dreamine.PLC.Core.Clients.PlcClientBase.ValidateWriteBitRequest().

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

◆ ValidateCount()

PlcResult Dreamine.PLC.Core.Validation.PlcValidation.ValidateCount ( int count)
inlinestatic

PLC 읽기 또는 쓰기 항목 수를 검증합니다.

매개변수
count요청 항목 수입니다.
반환값
검증 결과입니다.

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

41 {
42 if (count <= 0)
43 {
44 return PlcResult.Failure("The PLC request count must be greater than zero.");
45 }
46
47 return PlcResult.Success();
48 }

다음에 의해서 참조됨 : Dreamine.PLC.Core.Clients.PlcClientBase.ValidateReadRequest().

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

◆ ValidateWordValues()

PlcResult Dreamine.PLC.Core.Validation.PlcValidation.ValidateWordValues ( IReadOnlyList< short > values)
inlinestatic

PLC 워드 값 컬렉션이 비어 있지 않은지 검증합니다.

매개변수
values워드 값입니다.
반환값
검증 결과입니다.

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

120 {
121 if (values.Count == 0)
122 {
123 return PlcResult.Failure("The PLC word value collection must not be empty.");
124 }
125
126 return PlcResult.Success();
127 }

다음에 의해서 참조됨 : Dreamine.PLC.Core.Clients.PlcClientBase.ValidateWriteWordRequest().

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

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