|
- using BPASmartClient.Model.冰淇淋.Enum;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
- using static BPASmartClient.GSIceCream.MessageDefine;
-
- namespace BPASmartClient.GSIceCream
- {
- [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
- public class ICMSG_MODE_DW
- {
- public byte Header1;
- public byte Header2;
- public IC_CMD Cmd;
- public MORKI_MODE Mode;
- public short CalcCode;
-
- public ICMSG_MODE_DW() {
- Header1 = MessageDefine.HEADER1;
- Header2 = MessageDefine.HEADER2_DW;
- Cmd = IC_CMD.MODE;
- }
-
- public static ICMSG_MODE_DW Build(MORKI_MODE mode) {
- ICMSG_MODE_DW temp = new ICMSG_MODE_DW();
- temp.Mode = mode;
- temp.CalcCode = (short)((byte)temp.Cmd + (byte)temp.Mode);
- return temp;
- }
- }
- }
|