Dreamine.PLC.Mitsubishi.MC 1.0.1
Dreamine.PLC.Mitsubishi.MC 산업 자동화 및 I/O 기능을 제공합니다.
로딩중...
검색중...
일치하는것 없음
MitsubishiMcDeviceCodeMapper.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.PLC.Abstractions.Devices;
2using Dreamine.PLC.Abstractions.Results;
4
6
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}
PlcResult< MitsubishiMcDeviceCode > Map(PlcDeviceType deviceType)