终端一体化运控平台
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.
 
 
 

29 lines
832 B

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