public function setFrame($frame)
 {
     while (strlen($frame)) {
         $attribute_identifier = new AttributeIdentifier();
         $attribute_identifier->setAttributeId(Buffer::unpackInt16u($frame));
         $this->attribute_identifiers[] = $attribute_identifier;
     }
 }
Пример #2
0
 public function testReadAttribute()
 {
     $zcl = new ZCLFrame();
     $zcl->setTransactionId(0x1);
     $read_attributes_elem = new AttributeIdentifier();
     $read_attributes_elem->setAttributeId(0x2);
     $read_attributes = new ReadAttributesCommand();
     $read_attributes->addAttributeIdentifier($read_attributes_elem);
     $zcl->setPayloadObject($read_attributes);
     $this->assertEquals('0x00 0x01 0x00 0x02 0x00', $zcl->displayFrame());
 }