public function consumeFrame(&$frame) { $this->setAttributeId(Buffer::unpackInt16u($frame)); $this->setStatus(Buffer::unpackInt8u($frame)); if ($this->getStatus() == ZCLStatus::SUCCESS) { $this->setDatatypeId(Buffer::unpackInt8u($frame)); $this->setValue(Buffer::unpackDatatype($frame, $this->getDatatypeId())); } }
public function consumeFrame(&$frame) { $this->setDirection(Buffer::unpackInt8u($frame)); $this->setAttributeId(Buffer::unpackInt16u($frame)); if ($this->getDirection() === self::DIRECTION_SERVER_TO_CLIENT) { $this->setDatatypeId(Buffer::unpackInt8u($frame)); $this->setMinimumReportingInterval(Buffer::unpackInt16u($frame)); $this->setMaximumReportingInterval(Buffer::unpackInt16u($frame)); $this->setReportableChange(Buffer::unpackDatatype($frame, $this->getDatatypeId())); } else { $this->setTimeoutPeriod(Buffer::unpackInt16u($frame)); } }
public function consumeFrame(&$frame) { $this->setAttributeId(Buffer::unpackInt16u($frame)); $this->setDatatypeId(Buffer::unpackInt8u($frame)); $this->setValue(Buffer::unpackDatatype($frame, $this->getDatatypeId())); }