function setFrame($frame) { $this->setDiscoveryComplete(Buffer::unpackInt8u($frame) == 1); while (strlen($frame)) { $attribute_information = new AttributeInformation(); $attribute_information->consumeFrame($frame); $this->addAttributeInformation($attribute_information); } }
public function setUp() { $this->zcl_str = chr(0x1) . chr(0x2) . chr(0x1) . chr(0x21) . chr(0x8) . chr(0x4) . chr(0x22); $this->zcl_attributes_element_0 = AttributeInformation::construct(0x102, 0x21); $this->zcl_attributes_element_1 = AttributeInformation::construct(0x408, 0x22); $this->zcl_frame = DiscoverAttributesResponseCommand::construct(true, [$this->zcl_attributes_element_0, $this->zcl_attributes_element_1]); }