public function getFrame() { $frame = ""; Buffer::packInt16u($frame, $this->getAttributeId()); Buffer::packInt8u($frame, $this->getDatatypeId()); return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->command_identifier); Buffer::packInt8u($frame, $this->status_code); return $frame; }
public function testAllSuccess() { Buffer::packInt8u($payload, ZCLStatus::SUCCESS); $frame = new WriteAttributesResponseCommand($payload); $this->assertTrue($frame->isSuccess()); $this->assertEquals("0x00", $frame->displayFrame()); }
function getFrame() { $frame = ""; Buffer::packInt16u($frame, $this->getStartAttributeIdentifier()); Buffer::packInt8u($frame, $this->getMaximumAttributeIdentifiers()); return $frame; }
/** * Returns the frame as a sequence of bytes. * * @return string $frame */ function getFrame() { $frame = ""; Buffer::packInt16u($frame, $this->getZoneStatus()->getValue()); Buffer::packInt8u($frame, $this->getExtendedStatus()); return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); Buffer::packInt16u($frame, $this->getNwkAddrOfInterest()); return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getTransactionId()); $frame .= $this->getPayload(); return $frame; }
public function getFrame() { $frame = ""; Buffer::packEui64($frame, $this->getIeeeAddress()); Buffer::packInt8u($frame, $this->getRequestType()); Buffer::packInt8u($frame, $this->getStartIndex()); return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt16u($frame, $this->getNwkAddrOfInterest()); $user_descr_frame = $this->getUserDescriptor()->getFrame(); Buffer::packInt8u($frame, strlen($user_descr_frame)); $frame .= $user_descr_frame; return $frame; }
function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getDiscoveryComplete() ? 1 : 0); foreach ($this->attributes as $attribute) { $frame .= $attribute->getFrame(); } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); Buffer::packInt16u($frame, $this->getNwkAddrOfInterest()); if ($this->getStatus() == Status::SUCCESS) { $frame .= $this->getPowerDescriptor()->getFrame(); } return $frame; }
public function getZclHeaderFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getFrameControl()); if ($this->getManufacturerIdPresent()) { Buffer::packInt16u($frame, $this->getManufacturerId()); } Buffer::packInt8u($frame, $this->getTransactionId()); Buffer::packInt8u($frame, $this->getCommandId()); return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt16u($frame, $this->getAttributeId()); Buffer::packInt8u($frame, $this->getStatus()); if ($this->getStatus() == ZCLStatus::SUCCESS) { Buffer::packInt8u($frame, $this->getDatatypeId()); Buffer::packDatatype($frame, $this->getDatatypeId(), $this->getValue()); } return $frame; }
/** * Returns the frame as a sequence of bytes. * * @return string $frame */ function getFrame() { $frame = ""; $byte1 = $this->getCurrentPowerMode() & 0xf; $byte1 |= $this->getAvailablePowerSources() << 4 & 0xf0; Buffer::packInt8u($frame, $byte1); $byte2 = $this->getCurrentPowerSource() & 0xf; $byte2 |= $this->getCurrentPowerLevel() << 4 & 0xf0; Buffer::packInt8u($frame, $byte2); return $frame; }
public function getFrame() { $frame = ""; if (!empty($this->attribute_status_records)) { foreach ($this->attribute_status_records as $attribute_status_record) { $frame .= $attribute_status_record->getFrame(); } } else { Buffer::packInt8u($frame, ZCLStatus::SUCCESS); } return $frame; }
/** * Returns the frame as a sequence of bytes. * * @return string $frame */ function getFrame() { $frame = ""; Buffer::packInt16u($frame, $this->getDestinationAddress()); $byte1 = $this->getStatus() & 7; $byte1 |= $this->getMemoryConstrained() << 3 & 8; $byte1 |= $this->getManyToOne() << 4 & 16; $byte1 |= $this->getRouteRecordRequired() << 5 & 32; Buffer::packInt8u($frame, $byte1); Buffer::packInt16u($frame, $this->getNextHopAddress()); return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); if ($this->getStatus() == ZCLStatus::SUCCESS) { $frame .= parent::getFrame(); } else { Buffer::packInt8u($frame, $this->getDirection()); Buffer::packInt16u($frame, $this->getAttributeId()); } return $frame; }
/** * Returns the frame as a sequence of bytes. * * @return string $frame */ function getFrame() { $frame = ""; // Note: 2.3.2.7 Suggests 16 bytes always, but the length field of the UserDescRsp command would then not be needed? $user_description = $this->getUserDescription(); for ($x = 0; $x < strlen($user_description); $x++) { if (isset($user_description[$x])) { Buffer::packInt8u($frame, ord($user_description[$x])); } } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); Buffer::packInt16u($frame, $this->getNwkAddrOfInterest()); Buffer::packInt8u($frame, $this->getActiveEPCount()); if ($this->getStatus() == Status::SUCCESS) { foreach ($this->getActiveEpList() as $active_ep) { Buffer::packInt8u($frame, $active_ep); } } return $frame; }
public function getFrame() { $frame = ""; // If there are no records, just send a single SUCCESS if (empty($this->write_attribute_status_records)) { Buffer::packInt8u($frame, ZCLStatus::SUCCESS); } else { // Loop over the different records foreach ($this->write_attribute_status_records as $write_attribute_status_record) { $frame .= $write_attribute_status_record->getFrame(); } } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); if ($this->getStatus() == Status::SUCCESS) { Buffer::packInt8u($frame, $this->getRoutingTableEntries()); Buffer::packInt8u($frame, $this->getStartIndex()); Buffer::packInt8u($frame, $this->getRoutingTableListCount()); foreach ($this->getRoutingTableList() as $routing_descriptor) { $frame .= $routing_descriptor->getFrame(); } } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getDirection()); Buffer::packInt16u($frame, $this->getAttributeId()); if ($this->getDirection() === self::DIRECTION_SERVER_TO_CLIENT) { Buffer::packInt8u($frame, $this->getDatatypeId()); Buffer::packInt16u($frame, $this->getMinimumReportingInterval()); Buffer::packInt16u($frame, $this->getMaximumReportingInterval()); Buffer::packDatatype($frame, $this->getDatatypeId(), $this->getReportableChange()); } else { Buffer::packInt16u($frame, $this->getTimeoutPeriod()); } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); Buffer::packInt16u($frame, $this->getNwkAddrOfInterest()); if ($this->getStatus() == Status::SUCCESS) { $user_descr_frame = $this->getUserDescriptor()->getFrame(); Buffer::packInt8u($frame, strlen($user_descr_frame)); $frame .= $user_descr_frame; } else { // If status is not success, user descriptor length is 0 Buffer::packInt8u($frame, 0x0); } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); Buffer::packInt16u($frame, $this->getNwkAddrOfInterest()); Buffer::packInt8u($frame, $this->getEndpoint()); Buffer::packInt8u($frame, $this->getAppInputClusterCount()); Buffer::packInt8u($frame, $this->getAppOutputClusterCount()); Buffer::packInt8u($frame, $this->getStartIndex()); if ($this->getStatus() == Status::SUCCESS) { foreach ($this->getAppClusterList() as $cluster_id) { Buffer::packInt16u($frame, $cluster_id); } } return $frame; }
/** * Returns the frame as a sequence of bytes. * * @return string $frame */ function getFrame() { $frame = ""; Buffer::packEui64($frame, $this->getExtendedPanId()); Buffer::packEui64($frame, $this->getExtendedAddress()); Buffer::packInt16u($frame, $this->getNetworkAddress()); $byte1 = $this->getDeviceType() & 3; $byte1 |= $this->getRxOnWhenIdle() << 2 & 12; $byte1 |= $this->getRelationship() << 5 & 112; Buffer::packInt8u($frame, $byte1); $byte2 = $this->getPermitJoining() & 3; Buffer::packInt8u($frame, $byte2); Buffer::packInt8u($frame, $this->getDepth()); Buffer::packInt8u($frame, $this->getLqi()); return $frame; }
public function getFrame() { $subframe = ""; if ($this->getRequestTimestampPresent()) { Buffer::packUTC($subframe, $this->getRequestTimestamp() - self::MILLENNIUM_EPOCH); } if ($this->getExecuteTimestampPresent()) { Buffer::packUTC($subframe, $this->getExecuteTimestamp() - self::MILLENNIUM_EPOCH); } if ($this->getEndTimestampPresent()) { Buffer::packUTC($subframe, $this->getEndTimestamp() - self::MILLENNIUM_EPOCH); } $subframe .= $this->getPayload(); $frame = ""; Buffer::packInt8u($frame, $this->getTazHeader()); Buffer::packInt8u($frame, strlen($subframe)); $frame .= $subframe; return $frame; }
/** * Returns the frame as a sequence of bytes. * * @return string $frame */ function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getEndpoint()); Buffer::packInt16u($frame, $this->getApplicationProfileIdentifier()); Buffer::packInt16u($frame, $this->getApplicationDeviceIdentifier()); Buffer::packInt8u($frame, $this->getApplicationDeviceVersion()); // Input Clusters Buffer::packInt8u($frame, $this->getApplicationInputClusterCount()); foreach ($this->getApplicationInputClusterList() as $cluster_id) { Buffer::packInt16u($frame, $cluster_id); } // Output Clusters Buffer::packInt8u($frame, $this->getApplicationOutputClusterCount()); foreach ($this->getApplicationOutputClusterList() as $cluster_id) { Buffer::packInt16u($frame, $cluster_id); } return $frame; }
public function getFrame() { $frame = ""; Buffer::packInt8u($frame, $this->getStatus()); Buffer::packEui64($frame, $this->getIeeeAddressRemoteDev()); Buffer::packInt16u($frame, $this->getNwkAddrRemoteDev()); // Omit the other fields if the request type is SINGLE or status is not SUCCESS if ($this->getRequestType() == self::REQUEST_TYPE_EXTENDED && $this->getStatus() == Status::SUCCESS) { Buffer::packInt8u($frame, $this->getNumAssocDev()); // Omit the other fields if there are no associated devices listed if ($this->getNumAssocDev() != 0) { Buffer::packInt8u($frame, $this->getStartIndex()); foreach ($this->getAssociatedDeviceList() as $assoc_dev) { Buffer::packInt16u($frame, $assoc_dev); } } } return $frame; }
public function getFrame() { $checksum_frame = ""; Buffer::packInt8u($checksum_frame, $this->getSMSHeader()); Buffer::packInt16u($checksum_frame, 0x0); if ($this->isExtHeaderPresent()) { Buffer::packInt8u($checksum_frame, $this->getExtHeader()); } if ($this->isTazBlockCountPresent()) { Buffer::packInt8u($checksum_frame, $this->getTazBlockCount()); } switch ($this->getAddressType()) { case self::ADDRESS_TYPE_EUI64: Buffer::packEui64($checksum_frame, $this->getAddress()); break; case self::ADDRESS_TYPE_NODE_ID: Buffer::packInt16u($checksum_frame, $this->getAddress()); break; } for ($taz_index = 0; $taz_index < $this->getTazBlockCount(); $taz_index++) { $checksum_frame .= $this->taz_blocks[$taz_index]->getFrame(); } $checksum_frame = self::applyChecksum($checksum_frame); if ($this->getFrameEncoding() == self::FRAME_ENCODING_BASE64) { $checksum_frame = base64_encode($checksum_frame); } $frame = ""; Buffer::packInt8u($frame, $this->getFrameEncoding()); $frame .= $checksum_frame; //echo __CLASS__."->".__FUNCTION__."(): ".Buffer::displayOctetString($frame).PHP_EOL; return $frame; }
public function getFrame() { $frame = parent::getFrame(); Buffer::packInt8u($frame, $this->getStartIndex()); return $frame; }