/// <summary> /// byte 값을 IEASSenderType 형식으로 변환 /// </summary> /// <param name="value">byte 형식의 값</param> /// <returns>IEASSenderType</returns> public static IEASSenderType ConvertByteToSenderType(byte value) { IEASSenderType type = IEASSenderType.None; switch (value) { case 0x00: type = IEASSenderType.None; break; case 0x01: type = IEASSenderType.SWI; break; case 0x02: type = IEASSenderType.IITG; break; case 0x03: type = IEASSenderType.SAS; break; default: type = IEASSenderType.None; break; } return(type); }
/// <summary> /// IEASProtocol.IEASSenderType 을 로컬 데이터 타입 SenderTypes 형으로 변환. /// </summary> /// <param name="type"></param> /// <returns></returns> private SenderTypes ConvertToLocalSenderType(IEASSenderType type) { SenderTypes senderType = SenderTypes.IAGW; switch (type) { case IEASSenderType.SAS: { senderType = SenderTypes.SAS; } break; case IEASSenderType.SWI: { senderType = SenderTypes.SWI; } break; case IEASSenderType.IAGW: default: { senderType = SenderTypes.IAGW; } break; } return(senderType); }
/// <summary> /// IEASSenderType 을 Byte 형식으로 변환 /// </summary> /// <param name="type">IEASSenderType</param> /// <returns>byte 형식의 값</returns> public static byte ConvertSenderTypeToByte(IEASSenderType type) { byte value = 0x00; switch (type) { case IEASSenderType.SWI: value = 0x01; break; case IEASSenderType.IITG: value = 0x02; break; case IEASSenderType.SAS: value = 0x03; break; default: value = 0x00; break; } return(value); }