X13.Periphery.TWIDriver.LM75.Poll C# (CSharp) Method

Poll() public method

public Poll ( byte &buf ) : bool
buf byte
return bool
      public override bool Poll(out byte[] buf) {
        if(_busy) {
          buf=null;
          if(_pt<DateTime.Now) {    // Timeout
            _present.value=false;
            _pt=DateTime.Now.AddSeconds(_rand.Next(135, 165));
            _busy=false;
          }
          return true;
        }
        if(_pt<DateTime.Now) {
          buf=new byte[] { addr, 0x03, 0x01, 0x02, 0x00 };
          _pt=DateTime.Now.AddSeconds(1);
          _busy=true;
          return true;
        }
        buf=null;
        return false;
      }
      public override void Reset() {