use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspVersionResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class EzspSingleResponseTransactionTest method testResponseMatchFails.
@Test
public void testResponseMatchFails() {
EzspVersionRequest version = new EzspVersionRequest();
version.setSequenceNumber(4);
version.setDesiredProtocolVersion(4);
EzspTransaction versionTransaction = new EzspSingleResponseTransaction(version, EzspVersionResponse.class);
EzspVersionResponse versionResponse = new EzspVersionResponse(getPacketData("03 80 00 04 02 00 58"));
assertFalse(versionTransaction.isMatch(versionResponse));
assertNull(versionTransaction.getResponse());
assertNull(versionTransaction.getResponses());
}
use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspVersionResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNcp method getVersion.
/**
* The command allows the Host to specify the desired EZSP version and must be sent before any other command. The
* response provides information about the firmware running on the NCP.
*
* @param desiredVersion the requested version we support
* @return the {@link EzspVersionResponse}
*/
public EzspVersionResponse getVersion(int desiredVersion) {
EzspVersionRequest request = new EzspVersionRequest();
request.setDesiredProtocolVersion(EzspFrame.getEzspVersion());
EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspVersionResponse.class));
EzspVersionResponse response = (EzspVersionResponse) transaction.getResponse();
logger.debug(response.toString());
lastStatus = null;
return response;
}
Aggregations