Dreamine.PLC.Mitsubishi.MC
1.0.1
Dreamine.PLC.Mitsubishi.MC 산업 자동화 및 I/O 기능을 제공합니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
MitsubishiMcDeviceCodeMapper.cs
이 파일의 문서화 페이지로 가기
1
using
Dreamine.PLC.Abstractions.Devices;
2
using
Dreamine.PLC.Abstractions.Results;
3
using
Dreamine.PLC.Mitsubishi.MC.Protocol
;
4
5
namespace
Dreamine.PLC.Mitsubishi.MC.Devices
;
6
15
public
sealed
class
MitsubishiMcDeviceCodeMapper
16
{
41
public
PlcResult<MitsubishiMcDeviceCode>
Map
(PlcDeviceType deviceType)
42
{
43
return
deviceType
switch
44
{
45
PlcDeviceType.D => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.D),
46
PlcDeviceType.M => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.M),
47
PlcDeviceType.X => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.X),
48
PlcDeviceType.Y => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.Y),
49
PlcDeviceType.B => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.B),
50
PlcDeviceType.W => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.W),
51
PlcDeviceType.R => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.R),
52
PlcDeviceType.ZR => PlcResult<MitsubishiMcDeviceCode>.Success(
MitsubishiMcDeviceCode
.ZR),
53
_ => PlcResult<MitsubishiMcDeviceCode>.Failure($
"Unsupported Mitsubishi MC device type: {deviceType}"
)
54
};
55
}
56
}
Dreamine.PLC.Mitsubishi.MC.Devices
Definition
MitsubishiMcDeviceCodeMapper.cs:5
Dreamine.PLC.Mitsubishi.MC.Protocol
Definition
MitsubishiMcBinary3EFrameBuilder.cs:6
Dreamine.PLC.Mitsubishi.MC.Protocol.MitsubishiMcDeviceCode
MitsubishiMcDeviceCode
Definition
MitsubishiMcDeviceCode.cs:12
Dreamine.PLC.Mitsubishi.MC.Devices.MitsubishiMcDeviceCodeMapper
Definition
MitsubishiMcDeviceCodeMapper.cs:16
Dreamine.PLC.Mitsubishi.MC.Devices.MitsubishiMcDeviceCodeMapper.Map
PlcResult< MitsubishiMcDeviceCode > Map(PlcDeviceType deviceType)
Definition
MitsubishiMcDeviceCodeMapper.cs:41
Devices
MitsubishiMcDeviceCodeMapper.cs
다음에 의해 생성됨 :
1.17.0