Пример #1
0
        private bool GetOneOutputStatus(byte value, byte pos)
        {
            bool status = false;

            if (ByteLib.GetBit(value, pos) == 1)
            {
                status = true;
            }
            return(status);
        }
Пример #2
0
 /// <summary>
 /// update one bit of the output for bank 1
 /// </summary>
 /// <param name="value"></param>
 /// <param name="pos"></param>
 private void UpdateOneBitB1(byte value, byte pos)
 {
     try
     {
         currentOutputStatus = ByteLib.SetBit(currentOutputStatus, pos, value);
         byte addr = GetAddress(true);
         CommObj.Send(new byte[] { addr, 9, currentOutputStatus }, 0);
     }
     catch
     {
     }
 }