public function setFrame($frame) { $this->setTazHeader(Buffer::unpackInt8u($frame)); $length = Buffer::unpackInt8u($frame); if ($length !== strlen($frame)) { throw new ZigbeeException("Invalid length in length field"); } if ($this->getRequestTimestampPresent()) { $this->setRequestTimestamp(Buffer::unpackUTC($frame) + self::MILLENNIUM_EPOCH); } if ($this->getExecuteTimestampPresent()) { $this->setExecuteTimestamp(Buffer::unpackUTC($frame) + self::MILLENNIUM_EPOCH); } if ($this->getEndTimestampPresent()) { $this->setEndTimestamp(Buffer::unpackUTC($frame) + self::MILLENNIUM_EPOCH); } $this->setPayload($frame); }