Пример #1
0
 public FMask(Byte1 byte1 = Byte1.None, Byte2 byte2 = Byte2.None, Byte3 byte3 = Byte3.None,
              Byte4 byte4 = Byte4.None, Byte5 byte5 = Byte5.None)
 {
     Mask = (FMaskValues)(((long)byte1 << 8 * 4) |
                          ((long)byte2 << 8 * 3) |
                          ((long)byte3 << 8 * 2) |
                          ((long)byte4 << 8) |
                          ((long)byte5));
 }
Пример #2
0
 public AMask(Byte1 byte1 = Byte1.None, Byte2 byte2 = Byte2.None, Byte3 byte3 = Byte3.None,
              Byte4 byte4 = Byte4.None, Byte5 byte5 = Byte5.None, Byte6 byte6 = Byte6.None,
              Byte7 byte7 = Byte7.None)
 {
     Mask = (AMaskValues)
            ((ulong)byte1 << 8 * 6 |
             (ulong)byte2 << 8 * 5 |
             (ulong)byte3 << 8 * 4 |
             (ulong)byte4 << 8 * 3 |
             (ulong)byte5 << 8 * 2 |
             (ulong)byte6 << 8 * 1 |
             (ulong)byte7 << 8 * 0);
 }
Пример #3
0
 /// <summary>
 /// 转为T28181云台控制命令
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(Byte1.ToString("X2") + Byte2.ToString("X2") + Byte3.ToString("X2") + Byte4.ToString("X2") +
            Byte5.ToString("X2") + Byte6.ToString("X2") + Byte7.ToString("X2") + Byte8.ToString("X2"));
 }
Пример #4
0
			public AMask(Byte1 byte1 = Byte1.None, Byte2 byte2 = Byte2.None, Byte3 byte3 = Byte3.None,
			             Byte4 byte4 = Byte4.None, Byte5 byte5 = Byte5.None, Byte6 byte6 = Byte6.None,
			             Byte7 byte7 = Byte7.None)
			{
				Mask = (AMaskValues)
				       ((ulong)byte1 << 8 * 6 |
				        (ulong)byte2 << 8 * 5 |
				        (ulong)byte3 << 8 * 4 |
				        (ulong)byte4 << 8 * 3 |
				        (ulong)byte5 << 8 * 2 |
				        (ulong)byte6 << 8 * 1 |
				        (ulong)byte7 << 8 * 0);
			}