SerialMessage incomingMessage) {
logger.trace("Handle Message Send Data Request");
int callbackId = incomingMessage.getMessagePayloadByte(0);
TransmissionState status = TransmissionState.getTransmissionState(incomingMessage.getMessagePayloadByte(1));
SerialMessage originalMessage = lastSentMessage;
if (status == null) {
logger.warn("Transmission state not found, ignoring.");
return false;
}
logger.debug("CallBack ID = {}", callbackId);
logger.debug(String.format("Status = %s (0x%02x)", status.getLabel(), status.getKey()));
if (originalMessage == null || originalMessage.getCallbackId() != callbackId) {
logger.warn("Already processed another send data request for this callback Id, ignoring.");
return false;
}
switch (status) {
case COMPLETE_OK:
ZWaveNode node = zController.getNode(originalMessage.getMessageNode());
if(node == null)
break;
// Consider this as a received frame since the controller did receive an ACK from the device.
node.incrementReceiveCount();