@Test public void setRadioPower() { EmberNcp ncp = getEmberNcp(Mockito.mock(EzspSetRadioPowerResponse.class)); ncp.setRadioPower(6); Mockito.verify(handler, Mockito.times(1)).sendEzspTransaction(ezspTransactionCapture.capture()); EzspFrameRequest request = ezspTransactionCapture.getValue().getRequest(); assertTrue(request instanceof EzspSetRadioPowerRequest); assertEquals(6, ((EzspSetRadioPowerRequest) request).getPower()); }
public EmberStatus setRadioPower(int power) { EzspSetRadioPowerRequest request = new EzspSetRadioPowerRequest(); request.setPower(power); EzspTransaction transaction = protocolHandler .sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspSetRadioPowerResponse.class)); EzspSetRadioPowerResponse response = (EzspSetRadioPowerResponse) transaction.getResponse(); return response.getStatus(); }
EmberNcp { public EmberStatus setRadioPower(int power) { EzspSetRadioPowerRequest request = new EzspSetRadioPowerRequest(); request.setPower(power); EzspTransaction transaction = protocolHandler .sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspSetRadioPowerResponse.class)); EzspSetRadioPowerResponse response = (EzspSetRadioPowerResponse) transaction.getResponse(); return response.getStatus(); } }
EmberNcp { public EmberStatus setRadioPower(int power) { EzspSetRadioPowerRequest request = new EzspSetRadioPowerRequest(); request.setPower(power); EzspTransaction transaction = protocolHandler .sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspSetRadioPowerResponse.class)); EzspSetRadioPowerResponse response = (EzspSetRadioPowerResponse) transaction.getResponse(); return response.getStatus(); } EmberNcp(EzspProtocolHandler protocolHandler); }
EmberNcp { public EmberStatus setRadioPower(int power) { EzspSetRadioPowerRequest request = new EzspSetRadioPowerRequest(); request.setPower(power); EzspTransaction transaction = protocolHandler .sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspSetRadioPowerResponse.class)); EzspSetRadioPowerResponse response = (EzspSetRadioPowerResponse) transaction.getResponse(); return response.getStatus(); } EmberNcp(EzspProtocolHandler protocolHandler); EmberStatus getLastStatus(); EzspVersionResponse getVersion(); EmberStatus networkInit(); EmberStatus leaveNetwork(); EmberCurrentSecurityState getCurrentSecurityState(); EzspGetNetworkParametersResponse getNetworkParameters(); EmberNetworkStatus getNetworkState(); EzspGetParentChildParametersResponse getChildParameters(); EzspGetChildDataResponse getChildInformation(int childId); EzspStatus addEndpoint(int endpointId, int deviceId, int profileId, int[] inputClusters,
            int[] outputClusters); int[] getCounters(); EmberStatus clearKeyTable(); EmberKeyStruct getKey(EmberKeyType keyType); EmberKeyStruct getKeyTableEntry(int index); Integer getConfiguration(EzspConfigId configId); EzspStatus setConfiguration(EzspConfigId configId, Integer value); EzspStatus setPolicy(EzspPolicyId policyId, EzspDecisionId decisionId); EzspStatus setPolicy(EzspPolicyId policyId, int decisionId); Integer getPolicy(EzspPolicyId policyId); EzspStatus setValue(EzspValueId valueId, int[] value); int[] getValue(EzspValueId valueId); EmberStatus addTransientLinkKey(IeeeAddress partner, ZigBeeKey transientKey); EmberTransientKeyData getTransientLinkKeyIndex(int index); EmberTransientKeyData getTransientLinkKey(IeeeAddress ieeeAddress); EmberCertificateData getCertificateData(); EmberCertificate283k1Data getCertificate283k1Data(); EmberAesMmoHashContext mmoHash(int[] code); IeeeAddress getIeeeAddress(); int getNwkAddress(); EmberStatus setRadioPower(int power); EmberLibraryStatus getLibraryStatus(EmberLibraryId libraryId); EmberStatus addOrUpdateKeyTableEntry(IeeeAddress address, ZigBeeKey key, boolean linkKey); void setPowerDescriptor(int descriptor); void setManufacturerCode(int code); String getMfgBoardName(); String getMfgName(); int getMfgCustomVersion(); IeeeAddress getMfgCustomEui64(); ByteArray getMfgInstallationCode(); Collection<EzspNetworkFoundHandler> doActiveScan(int channelMask, int scanDuration); List<EzspEnergyScanResultHandler> doEnergyScan(int channelMask, int scanDuration); ZigBeeStatus setExtendedTimeout(IeeeAddress remoteEui64, boolean extendedTimeout); int getBootloaderVersion(); EzspGetXncpInfoResponse getXncpInfo(); EzspCustomFrameResponse sendCustomFrame(int[] customFrame); EmberStatus sendManyToOneRouteRequest(EmberConcentratorType concentratorType, int radius); EzspStatus resetToFactoryDefaults(); int[] getMfgToken(EzspMfgTokenId tokenId); EmberStatus setMfgToken(EzspMfgTokenId tokenId, int[] token); }
EmberNcp { public EmberStatus setRadioPower(int power) { EzspSetRadioPowerRequest request = new EzspSetRadioPowerRequest(); request.setPower(power); EzspTransaction transaction = protocolHandler .sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspSetRadioPowerResponse.class)); EzspSetRadioPowerResponse response = (EzspSetRadioPowerResponse) transaction.getResponse(); return response.getStatus(); } EmberNcp(EzspProtocolHandler protocolHandler); EmberStatus getLastStatus(); EzspVersionResponse getVersion(); EmberStatus networkInit(); EmberStatus leaveNetwork(); EmberCurrentSecurityState getCurrentSecurityState(); EzspGetNetworkParametersResponse getNetworkParameters(); EmberNetworkStatus getNetworkState(); EzspGetParentChildParametersResponse getChildParameters(); EzspGetChildDataResponse getChildInformation(int childId); EzspStatus addEndpoint(int endpointId, int deviceId, int profileId, int[] inputClusters,
            int[] outputClusters); int[] getCounters(); EmberStatus clearKeyTable(); EmberKeyStruct getKey(EmberKeyType keyType); EmberKeyStruct getKeyTableEntry(int index); Integer getConfiguration(EzspConfigId configId); EzspStatus setConfiguration(EzspConfigId configId, Integer value); EzspStatus setPolicy(EzspPolicyId policyId, EzspDecisionId decisionId); EzspStatus setPolicy(EzspPolicyId policyId, int decisionId); Integer getPolicy(EzspPolicyId policyId); EzspStatus setValue(EzspValueId valueId, int[] value); int[] getValue(EzspValueId valueId); EmberStatus addTransientLinkKey(IeeeAddress partner, ZigBeeKey transientKey); EmberTransientKeyData getTransientLinkKeyIndex(int index); EmberTransientKeyData getTransientLinkKey(IeeeAddress ieeeAddress); EmberCertificateData getCertificateData(); EmberCertificate283k1Data getCertificate283k1Data(); EmberAesMmoHashContext mmoHash(int[] code); IeeeAddress getIeeeAddress(); int getNwkAddress(); EmberStatus setRadioPower(int power); EmberLibraryStatus getLibraryStatus(EmberLibraryId libraryId); EmberStatus addOrUpdateKeyTableEntry(IeeeAddress address, ZigBeeKey key, boolean linkKey); void setPowerDescriptor(int descriptor); void setManufacturerCode(int code); String getMfgBoardName(); String getMfgName(); int getMfgCustomVersion(); IeeeAddress getMfgCustomEui64(); ByteArray getMfgInstallationCode(); Collection<EzspNetworkFoundHandler> doActiveScan(int channelMask, int scanDuration); List<EzspEnergyScanResultHandler> doEnergyScan(int channelMask, int scanDuration); ZigBeeStatus setExtendedTimeout(IeeeAddress remoteEui64, boolean extendedTimeout); int getBootloaderVersion(); EzspGetXncpInfoResponse getXncpInfo(); EzspCustomFrameResponse sendCustomFrame(int[] customFrame); EmberStatus sendManyToOneRouteRequest(EmberConcentratorType concentratorType, int radius); EzspStatus resetToFactoryDefaults(); int[] getMfgToken(EzspMfgTokenId tokenId); EmberStatus setMfgToken(EzspMfgTokenId tokenId, int[] token);  }