终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
875 B

  1. using BPASmartClient.Model.冰淇淋.Enum;
  2. using System.Runtime.InteropServices;
  3. using static BPASmartClient.GSIceCream.MessageDefine;
  4. namespace BPASmartClient.GSIceCream
  5. {
  6. [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
  7. public class ICMSG_MODE_UP
  8. {
  9. public byte Header1;
  10. public byte Header2;
  11. public IC_CMD Cmd;
  12. public MORKI_MODE Mode;
  13. public short CalcCode;
  14. public ICMSG_MODE_UP() {
  15. Header1 = MessageDefine.HEADER1;
  16. Header2 = MessageDefine.HEADER2_DW;
  17. Cmd = IC_CMD.MODE;
  18. }
  19. public static ICMSG_MODE_DW Build(MORKI_MODE mode) {
  20. ICMSG_MODE_DW temp = new ICMSG_MODE_DW();
  21. temp.Mode = mode;
  22. temp.CalcCode = (short)((byte)temp.Cmd + (byte)temp.Mode);
  23. return temp;
  24. }
  25. }
  26. }