public function setFrame($frame)
 {
     while (strlen($frame)) {
         $attribute_identifier = new AttributeIdentifier();
         $attribute_identifier->setAttributeId(Buffer::unpackInt16u($frame));
         $this->attribute_identifiers[] = $attribute_identifier;
     }
 }
Example #2
0
 public function testReverse()
 {
     $old_zcl = ZCLFrame::construct(ReadAttributesCommand::construct([AttributeIdentifier::construct(0x2)]), 0x4e47, ZCLFrame::DIRECTION_SERVER_TO_CLIENT, ZCLFrame::DEFAULT_RESPONSE_ENABLED, 0x1);
     $old_zcl_frame = $old_zcl->getFrame();
     $new = new ZCLFrame($old_zcl_frame);
     $this->assertEquals($old_zcl_frame, $new->getFrame());
 }