Search in sources :

Example 1 with AF_DATA_CONFIRM

use of com.zsmartsystems.zigbee.dongle.cc2531.network.packet.af.AF_DATA_CONFIRM in project com.zsmartsystems.zigbee by zsmartsystems.

the class ZigBeeNetworkManager method sendAFDataRequest.

public AF_DATA_CONFIRM sendAFDataRequest(AF_DATA_REQUEST request) {
    if (!waitForNetwork()) {
        return null;
    }
    AF_DATA_CONFIRM result = null;
    waitAndLock3WayConversation(request);
    final BlockingCommandReceiver waiter = new BlockingCommandReceiver(ZToolCMD.AF_DATA_CONFIRM, commandInterface);
    AF_DATA_SRSP response = (AF_DATA_SRSP) sendSynchronous(request);
    if (response == null || response.Status != 0) {
        waiter.cleanup();
    } else {
        result = (AF_DATA_CONFIRM) waiter.getCommand(TIMEOUT);
    }
    unLock3WayConversation(request);
    return result;
}
Also used : AF_DATA_SRSP(com.zsmartsystems.zigbee.dongle.cc2531.network.packet.af.AF_DATA_SRSP) AF_DATA_CONFIRM(com.zsmartsystems.zigbee.dongle.cc2531.network.packet.af.AF_DATA_CONFIRM) BlockingCommandReceiver(com.zsmartsystems.zigbee.dongle.cc2531.network.impl.BlockingCommandReceiver)

Aggregations

BlockingCommandReceiver (com.zsmartsystems.zigbee.dongle.cc2531.network.impl.BlockingCommandReceiver)1 AF_DATA_CONFIRM (com.zsmartsystems.zigbee.dongle.cc2531.network.packet.af.AF_DATA_CONFIRM)1 AF_DATA_SRSP (com.zsmartsystems.zigbee.dongle.cc2531.network.packet.af.AF_DATA_SRSP)1