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

더 자세히 ...

Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol에 대한 상속 다이어그램 :
Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol에 대한 협력 다이어그램:

Public 멤버 함수

byte[] BuildGetSlaveInfo ()
IoResult< string > ParseSlaveInfo (IReadOnlyList< byte > responseFrame)
byte[] BuildReadDigitalInputs (IReadOnlyList< IoPoint > points)
IoResult< bool[]> ParseDigitalInputs (IReadOnlyList< byte > responseFrame, int count)
byte[] BuildReadDigitalOutputs (IReadOnlyList< IoPoint > points)
IoResult< bool[]> ParseDigitalOutputs (IReadOnlyList< byte > responseFrame, int count)
byte[] BuildWriteDigitalOutputs (IReadOnlyDictionary< IoPoint, bool > values)
byte[] BuildReadAnalogInputs (IReadOnlyList< AnalogIoPoint > points)
IoResult< double[]> ParseAnalogInputs (IReadOnlyList< byte > responseFrame, int count)
byte[] BuildReadAnalogOutputs (IReadOnlyList< AnalogIoPoint > points)
IoResult< double[]> ParseAnalogOutputs (IReadOnlyList< byte > responseFrame, int count)
byte[] BuildWriteAnalogOutputs (IReadOnlyDictionary< AnalogIoPoint, double > values)
IoResult ParseWriteResponse (IReadOnlyList< byte > responseFrame)

Private 멤버 함수

byte[] BuildFrame (byte frameType, IReadOnlyList< byte > data)
IoResult< byte[]> ParseReply (IReadOnlyList< byte > responseFrame, byte expectedFrameType, int minimumPayloadLength)
byte NextSyncNo ()

정적 Private 멤버 함수

static NotSupportedException CreateNotSupportedException (string message)
static IoResult< double[]> CreateUnsupportedAnalogResult (string message)
static bool[] ToInputBits (IReadOnlyList< byte > payload, int count)
static bool[] ToOutputBits (IReadOnlyList< byte > payload, int count)
static uint GetDigital16PointOutputWriteBit (int channel)
static uint ReadUInt32BigEndian (IReadOnlyList< byte > bytes, int offset)
static void WriteUInt32BigEndian (uint value, byte[] bytes, int offset)

Private 속성

readonly object _syncLock = new()
byte _syncNo

정적 Private 속성

const byte Header = 0xAA
const byte Reserved = 0x00
const byte StatusOk = 0x00
const byte GetInputFrameType = 0xC0
const byte GetOutputFrameType = 0xC5
const byte SetOutputFrameType = 0xC6
const byte GetSlaveInfoFrameType = 0x01
const uint Digital16PointResetMask = 0xFFFF_FFFF
const string AnalogInputNotSupportedMessage = "Fastech Ezi-IO Plus-E 16-point DIO protocol does not support analog input."
const string AnalogOutputNotSupportedMessage = "Fastech Ezi-IO Plus-E 16-point DIO protocol does not support analog output."

상세한 설명

Fastech Ezi-IO Plus-E 16점 디지털 I/O UDP 프레임을 생성하고 파싱합니다.

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

멤버 함수 문서화

◆ BuildFrame()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildFrame ( byte frameType,
IReadOnlyList< byte > data )
inlineprivate

헤더, 길이, 동기 번호, 예약 바이트, 프레임 형식 및 데이터로 요청 프레임을 조립합니다.

매개변수
frameTypeFastech 프레임 형식 바이트입니다.
data최대 252바이트의 프레임 데이터입니다.
반환값
조립된 프레임입니다.
예외
ArgumentOutOfRangeException데이터가 252바이트를 초과한 경우 발생합니다.

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

677 {
678 if (data.Count > 252)
679 {
680 throw new ArgumentOutOfRangeException(nameof(data), data.Count, "Fastech frame data must be 252 bytes or less.");
681 }
682
683 var frame = new byte[5 + data.Count];
684 frame[0] = Header;
685 frame[1] = checked((byte)(3 + data.Count));
686 frame[2] = NextSyncNo();
687 frame[3] = Reserved;
688 frame[4] = frameType;
689
690 for (var i = 0; i < data.Count; i++)
691 {
692 frame[5 + i] = data[i];
693 }
694
695 return frame;
696 }

다음을 참조함 : Header, NextSyncNo(), Reserved.

다음에 의해서 참조됨 : BuildGetSlaveInfo(), BuildReadDigitalInputs(), BuildReadDigitalOutputs(), BuildWriteDigitalOutputs().

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

◆ BuildGetSlaveInfo()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildGetSlaveInfo ( )
inline

슬레이브 정보 조회 요청 프레임을 만듭니다.

반환값
슬레이브 정보 요청 프레임입니다.

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

142 {
143 return BuildFrame(GetSlaveInfoFrameType, []);
144 }

다음을 참조함 : BuildFrame(), GetSlaveInfoFrameType.

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

◆ BuildReadAnalogInputs()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildReadAnalogInputs ( IReadOnlyList< AnalogIoPoint > points)
inline

이 16점 DIO 프로토콜에서 지원하지 않는 아날로그 입력 요청을 거부합니다.

매개변수
points요청된 아날로그 입력 지점입니다.
반환값
이 메서드는 반환하지 않습니다.
예외
NotSupportedException항상 발생합니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

452 {
453 throw CreateNotSupportedException(AnalogInputNotSupportedMessage);
454 }

다음을 참조함 : AnalogInputNotSupportedMessage, CreateNotSupportedException().

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

◆ BuildReadAnalogOutputs()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildReadAnalogOutputs ( IReadOnlyList< AnalogIoPoint > points)
inline

이 프로토콜에서 지원하지 않는 아날로그 출력 읽기 요청을 거부합니다.

매개변수
points요청된 출력 지점입니다.
반환값
이 메서드는 반환하지 않습니다.
예외
NotSupportedException항상 발생합니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

526 {
527 throw CreateNotSupportedException(AnalogOutputNotSupportedMessage);
528 }

다음을 참조함 : AnalogOutputNotSupportedMessage, CreateNotSupportedException().

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

◆ BuildReadDigitalInputs()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildReadDigitalInputs ( IReadOnlyList< IoPoint > points)
inline

16점 디지털 입력 전체 조회 프레임을 만듭니다.

매개변수
points결과 매핑에 사용되는 요청 지점입니다.
반환값
입력 조회 프레임입니다.
예외
ArgumentNullExceptionpointsnull인 경우 발생합니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

219 {
220 ArgumentNullException.ThrowIfNull(points);
221
222 return BuildFrame(GetInputFrameType, []);
223 }

다음을 참조함 : BuildFrame(), GetInputFrameType.

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

◆ BuildReadDigitalOutputs()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildReadDigitalOutputs ( IReadOnlyList< IoPoint > points)
inline

16점 디지털 출력 전체 조회 프레임을 만듭니다.

매개변수
points결과 매핑에 사용되는 요청 지점입니다.
반환값
출력 조회 프레임입니다.
예외
ArgumentNullExceptionpointsnull인 경우 발생합니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

301 {
302 ArgumentNullException.ThrowIfNull(points);
303
304 return BuildFrame(GetOutputFrameType, []);
305 }

다음을 참조함 : BuildFrame(), GetOutputFrameType.

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

◆ BuildWriteAnalogOutputs()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildWriteAnalogOutputs ( IReadOnlyDictionary< AnalogIoPoint, double > values)
inline

이 프로토콜에서 지원하지 않는 아날로그 출력 쓰기 요청을 거부합니다.

매개변수
values요청된 출력 값입니다.
반환값
이 메서드는 반환하지 않습니다.
예외
NotSupportedException항상 발생합니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

600 {
601 throw CreateNotSupportedException(AnalogOutputNotSupportedMessage);
602 }

다음을 참조함 : AnalogOutputNotSupportedMessage, CreateNotSupportedException().

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

◆ BuildWriteDigitalOutputs()

byte[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.BuildWriteDigitalOutputs ( IReadOnlyDictionary< IoPoint, bool > values)
inline

0~15 채널 변경 값을 설정/해제 마스크로 인코딩한 출력 쓰기 프레임을 만듭니다.

매개변수
values지점별 출력 상태입니다.
반환값
출력 쓰기 프레임입니다.
예외
ArgumentNullExceptionvaluesnull인 경우 발생합니다.
ArgumentOutOfRangeException채널이 0~15 범위를 벗어난 경우 발생합니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

391 {
392 ArgumentNullException.ThrowIfNull(values);
393
394 uint setMask = 0;
395 uint clearMask = Digital16PointResetMask;
396
397 foreach (var value in values)
398 {
399 if (value.Key.Channel is < 0 or > 15)
400 {
401 throw new ArgumentOutOfRangeException(nameof(values), value.Key.Channel, "Channel must be between 0 and 15.");
402 }
403
404 var bit = GetDigital16PointOutputWriteBit(value.Key.Channel);
405 if (value.Value)
406 {
407 setMask |= bit;
408 clearMask &= ~bit;
409 }
410 }
411
412 var data = new byte[8];
413 WriteUInt32BigEndian(setMask, data, 0);
414 WriteUInt32BigEndian(clearMask, data, 4);
415
416 return BuildFrame(SetOutputFrameType, data);
417 }

다음을 참조함 : BuildFrame(), Digital16PointResetMask, GetDigital16PointOutputWriteBit(), SetOutputFrameType, WriteUInt32BigEndian().

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

◆ CreateNotSupportedException()

NotSupportedException Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.CreateNotSupportedException ( string message)
inlinestaticprivate

지정한 설명의 미지원 예외를 만듭니다.

매개변수
message예외 설명입니다.
반환값
새 예외입니다.

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

723 {
724 return new NotSupportedException(message);
725 }

다음에 의해서 참조됨 : BuildReadAnalogInputs(), BuildReadAnalogOutputs(), BuildWriteAnalogOutputs().

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

◆ CreateUnsupportedAnalogResult()

IoResult< double[]> Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.CreateUnsupportedAnalogResult ( string message)
inlinestaticprivate

아날로그 작업 미지원 실패 결과를 만듭니다.

매개변수
message실패 설명입니다.
반환값
아날로그 배열 실패 결과입니다.

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

752 {
753 return IoResult<double[]>.Failure(message);
754 }

다음에 의해서 참조됨 : ParseAnalogInputs(), ParseAnalogOutputs().

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

◆ GetDigital16PointOutputWriteBit()

uint Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.GetDigital16PointOutputWriteBit ( int channel)
inlinestaticprivate

논리 채널을 Plus-E 16점 출력 쓰기 마스크 비트 위치로 변환합니다.

매개변수
channel0~15 논리 채널입니다.
반환값
해당 단일 비트 마스크입니다.

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

998 {
999 var normalizedChannel = Math.Clamp(channel, 0, 15);
1000 var bitIndex = normalizedChannel < 8
1001 ? 8 + normalizedChannel
1002 : normalizedChannel - 8;
1003
1004 return 1u << bitIndex;
1005 }

다음에 의해서 참조됨 : BuildWriteDigitalOutputs().

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

◆ NextSyncNo()

byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.NextSyncNo ( )
inlineprivate

잠금으로 보호된 다음 8비트 동기 번호를 반환합니다.

반환값
증가된 동기 번호입니다.

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

871 {
872 lock (_syncLock)
873 {
874 _syncNo++;
875 return _syncNo;
876 }
877 }

다음을 참조함 : _syncLock, _syncNo.

다음에 의해서 참조됨 : BuildFrame().

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

◆ ParseAnalogInputs()

IoResult< double[]> Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseAnalogInputs ( IReadOnlyList< byte > responseFrame,
int count )
inline

미지원 아날로그 입력 응답에 실패 결과를 반환합니다.

매개변수
responseFrame무시되는 응답입니다.
count무시되는 지점 수입니다.
반환값
미지원 실패 결과입니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

489 {
490 return CreateUnsupportedAnalogResult(AnalogInputNotSupportedMessage);
491 }

다음을 참조함 : AnalogInputNotSupportedMessage, CreateUnsupportedAnalogResult().

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

◆ ParseAnalogOutputs()

IoResult< double[]> Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseAnalogOutputs ( IReadOnlyList< byte > responseFrame,
int count )
inline

미지원 아날로그 출력 응답에 실패 결과를 반환합니다.

매개변수
responseFrame무시되는 응답입니다.
count무시되는 지점 수입니다.
반환값
미지원 실패 결과입니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

563 {
564 return CreateUnsupportedAnalogResult(AnalogOutputNotSupportedMessage);
565 }

다음을 참조함 : AnalogOutputNotSupportedMessage, CreateUnsupportedAnalogResult().

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

◆ ParseDigitalInputs()

IoResult< bool[]> Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseDigitalInputs ( IReadOnlyList< byte > responseFrame,
int count )
inline

입력 응답을 검증하고 요청 개수만큼 부울 상태로 변환합니다.

매개변수
responseFrame입력 응답 프레임입니다.
count반환할 지점 수입니다.
반환값
입력 상태 배열 결과입니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

258 {
259 var payload = ParseReply(responseFrame, GetInputFrameType, 8);
260 if (!payload.IsSuccess || payload.Value is null)
261 {
262 return IoResult<bool[]>.Failure(payload.Message ?? "Failed to parse Fastech input response.", payload.ErrorCode);
263 }
264
265 return IoResult<bool[]>.Success(ToInputBits(payload.Value, count));
266 }

다음을 참조함 : GetInputFrameType, ParseReply(), ToInputBits().

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

◆ ParseDigitalOutputs()

IoResult< bool[]> Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseDigitalOutputs ( IReadOnlyList< byte > responseFrame,
int count )
inline

출력 응답을 검증하고 요청 개수만큼 부울 상태로 변환합니다.

매개변수
responseFrame출력 응답 프레임입니다.
count반환할 지점 수입니다.
반환값
출력 상태 배열 결과입니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

340 {
341 var payload = ParseReply(responseFrame, GetOutputFrameType, 8);
342 if (!payload.IsSuccess || payload.Value is null)
343 {
344 return IoResult<bool[]>.Failure(payload.Message ?? "Failed to parse Fastech output response.", payload.ErrorCode);
345 }
346
347 return IoResult<bool[]>.Success(ToOutputBits(payload.Value, count));
348 }

다음을 참조함 : GetOutputFrameType, ParseReply(), ToOutputBits().

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

◆ ParseReply()

IoResult< byte[]> Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseReply ( IReadOnlyList< byte > responseFrame,
byte expectedFrameType,
int minimumPayloadLength )
inlineprivate

응답 헤더, 길이, 예약 바이트, 프레임 형식, 상태 및 최소 페이로드 길이를 검증합니다.

매개변수
responseFrame검증할 응답 프레임입니다.
expectedFrameType예상 프레임 형식입니다.
minimumPayloadLength필요한 최소 페이로드 바이트 수입니다.
반환값
검증된 페이로드 또는 설명이 있는 실패 결과입니다.
예외
ArgumentNullExceptionresponseFramenull인 경우 발생합니다.

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

805 {
806 ArgumentNullException.ThrowIfNull(responseFrame);
807
808 if (responseFrame.Count < 6)
809 {
810 return IoResult<byte[]>.Failure("The Fastech response frame is too short.");
811 }
812
813 if (responseFrame[0] != Header)
814 {
815 return IoResult<byte[]>.Failure($"Invalid Fastech response header: 0x{responseFrame[0]:X2}.");
816 }
817
818 if (responseFrame[1] != responseFrame.Count - 2)
819 {
820 return IoResult<byte[]>.Failure($"Invalid Fastech response length: {responseFrame[1]}.");
821 }
822
823 if (responseFrame[3] != Reserved)
824 {
825 return IoResult<byte[]>.Failure($"Invalid Fastech response reserved byte: 0x{responseFrame[3]:X2}.");
826 }
827
828 if (responseFrame[4] != expectedFrameType)
829 {
830 return IoResult<byte[]>.Failure($"Unexpected Fastech response frame type: 0x{responseFrame[4]:X2}.");
831 }
832
833 var status = responseFrame[5];
834 if (status != StatusOk)
835 {
836 return IoResult<byte[]>.Failure($"Fastech communication status error: 0x{status:X2}.", status);
837 }
838
839 var payloadLength = responseFrame.Count - 6;
840 if (payloadLength < minimumPayloadLength)
841 {
842 return IoResult<byte[]>.Failure($"The Fastech response payload length is {payloadLength}, expected at least {minimumPayloadLength}.");
843 }
844
845 var payload = new byte[payloadLength];
846 for (var i = 0; i < payload.Length; i++)
847 {
848 payload[i] = responseFrame[6 + i];
849 }
850
851 return IoResult<byte[]>.Success(payload);
852 }

다음을 참조함 : Header, Reserved, StatusOk.

다음에 의해서 참조됨 : ParseDigitalInputs(), ParseDigitalOutputs(), ParseSlaveInfo(), ParseWriteResponse().

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

◆ ParseSlaveInfo()

IoResult< string > Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseSlaveInfo ( IReadOnlyList< byte > responseFrame)
inline

슬레이브 정보 응답에서 장치 형식과 ASCII 이름을 파싱합니다.

매개변수
responseFrame수신 프레임입니다.
반환값
슬레이브 형식과 이름 텍스트를 포함하는 결과입니다.

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

171 {
172 var payload = ParseReply(responseFrame, GetSlaveInfoFrameType, 1);
173 if (!payload.IsSuccess || payload.Value is null)
174 {
175 return IoResult<string>.Failure(payload.Message ?? "Failed to parse Fastech slave information response.", payload.ErrorCode);
176 }
177
178 var slaveType = payload.Value[0];
179 var name = payload.Value.Length > 1
180 ? System.Text.Encoding.ASCII.GetString(payload.Value, 1, payload.Value.Length - 1).TrimEnd('\0')
181 : string.Empty;
182
183 return IoResult<string>.Success($"SlaveType={slaveType}, Name={name}");
184 }

다음을 참조함 : GetSlaveInfoFrameType, ParseReply().

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

◆ ParseWriteResponse()

IoResult Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ParseWriteResponse ( IReadOnlyList< byte > responseFrame)
inline

디지털 출력 쓰기 응답을 검증하여 성공 또는 실패 결과로 변환합니다.

매개변수
responseFrame쓰기 응답 프레임입니다.
반환값
쓰기 결과입니다.

Dreamine.IO.Fastech.Ethernet.Protocol.IFastechEthernetIoProtocol를 구현.

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

629 {
630 var payload = ParseReply(responseFrame, SetOutputFrameType, 0);
631 return payload.IsSuccess
632 ? IoResult.Success()
633 : IoResult.Failure(payload.Message ?? "Failed to parse Fastech write response.", payload.ErrorCode);
634 }

다음을 참조함 : ParseReply(), SetOutputFrameType.

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

◆ ReadUInt32BigEndian()

uint Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ReadUInt32BigEndian ( IReadOnlyList< byte > bytes,
int offset )
inlinestaticprivate

지정 오프셋에서 big-endian 32비트 부호 없는 정수를 읽습니다.

매개변수
bytes원본 바이트 목록입니다.
offset첫 바이트 오프셋입니다.
반환값
디코딩된 값입니다.

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

1040 {
1041 return ((uint)bytes[offset] << 24)
1042 | ((uint)bytes[offset + 1] << 16)
1043 | ((uint)bytes[offset + 2] << 8)
1044 | bytes[offset + 3];
1045 }

◆ ToInputBits()

bool[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ToInputBits ( IReadOnlyList< byte > payload,
int count )
inlinestaticprivate

입력 페이로드의 첫 두 바이트를 최대 16개 부울 상태로 변환합니다.

매개변수
payload입력 상태 페이로드입니다.
count반환할 상태 수입니다.
반환값
입력 상태 배열입니다.

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

912 {
913 count = Math.Clamp(count, 0, 16);
914 var values = new bool[count];
915
916 for (var i = 0; i < values.Length; i++)
917 {
918 var byteOffset = i < 8 ? 0 : 1;
919 var bitIndex = i % 8;
920 values[i] = (payload[byteOffset] & (1 << bitIndex)) != 0;
921 }
922
923 return values;
924 }

다음에 의해서 참조됨 : ParseDigitalInputs().

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

◆ ToOutputBits()

bool[] Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.ToOutputBits ( IReadOnlyList< byte > payload,
int count )
inlinestaticprivate

출력 페이로드의 상태 바이트를 최대 16개 부울 상태로 변환합니다.

매개변수
payload출력 상태 페이로드입니다.
count반환할 상태 수입니다.
반환값
출력 상태 배열입니다.

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

959 {
960 count = Math.Clamp(count, 0, 16);
961 var values = new bool[count];
962
963 for (var i = 0; i < values.Length; i++)
964 {
965 var byteOffset = i < 8 ? 2 : 3;
966 var bitIndex = i % 8;
967 values[i] = (payload[byteOffset] & (1 << bitIndex)) != 0;
968 }
969
970 return values;
971 }

다음에 의해서 참조됨 : ParseDigitalOutputs().

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

◆ WriteUInt32BigEndian()

void Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.WriteUInt32BigEndian ( uint value,
byte[] bytes,
int offset )
inlinestaticprivate

32비트 부호 없는 정수를 지정 오프셋에 big-endian으로 씁니다.

매개변수
value쓸 값입니다.
bytes대상 바이트 배열입니다.
offset첫 바이트 오프셋입니다.

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

1080 {
1081 bytes[offset] = (byte)(value >> 24);
1082 bytes[offset + 1] = (byte)(value >> 16);
1083 bytes[offset + 2] = (byte)(value >> 8);
1084 bytes[offset + 3] = (byte)value;
1085 }

다음에 의해서 참조됨 : BuildWriteDigitalOutputs().

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

멤버 데이터 문서화

◆ _syncLock

readonly object Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol._syncLock = new()
private

sync Lock 값을 보관합니다.

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

다음에 의해서 참조됨 : NextSyncNo().

◆ _syncNo

byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol._syncNo
private

sync No 값을 보관합니다.

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

다음에 의해서 참조됨 : NextSyncNo().

◆ AnalogInputNotSupportedMessage

const string Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.AnalogInputNotSupportedMessage = "Fastech Ezi-IO Plus-E 16-point DIO protocol does not support analog input."
staticprivate

Analog Input Not Supported Message 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildReadAnalogInputs(), ParseAnalogInputs().

◆ AnalogOutputNotSupportedMessage

const string Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.AnalogOutputNotSupportedMessage = "Fastech Ezi-IO Plus-E 16-point DIO protocol does not support analog output."
staticprivate

Analog Output Not Supported Message 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildReadAnalogOutputs(), BuildWriteAnalogOutputs(), ParseAnalogOutputs().

◆ Digital16PointResetMask

const uint Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.Digital16PointResetMask = 0xFFFF_FFFF
staticprivate

Digital16 Point Reset Mask 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildWriteDigitalOutputs().

◆ GetInputFrameType

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.GetInputFrameType = 0xC0
staticprivate

Get Input Frame Type 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildReadDigitalInputs(), ParseDigitalInputs().

◆ GetOutputFrameType

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.GetOutputFrameType = 0xC5
staticprivate

Get Output Frame Type 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildReadDigitalOutputs(), ParseDigitalOutputs().

◆ GetSlaveInfoFrameType

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.GetSlaveInfoFrameType = 0x01
staticprivate

Get Slave Info Frame Type 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildGetSlaveInfo(), ParseSlaveInfo().

◆ Header

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.Header = 0xAA
staticprivate

Header 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildFrame(), ParseReply().

◆ Reserved

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.Reserved = 0x00
staticprivate

Reserved 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildFrame(), ParseReply().

◆ SetOutputFrameType

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.SetOutputFrameType = 0xC6
staticprivate

Set Output Frame Type 값을 보관합니다.

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

다음에 의해서 참조됨 : BuildWriteDigitalOutputs(), ParseWriteResponse().

◆ StatusOk

const byte Dreamine.IO.Fastech.Ethernet.Protocol.FastechPlusE16PointProtocol.StatusOk = 0x00
staticprivate

Status Ok 값을 보관합니다.

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

다음에 의해서 참조됨 : ParseReply().


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