Search in sources :

Example 1 with EzspReadCountersRequest

use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspReadCountersRequest in project com.zsmartsystems.zigbee by zsmartsystems.

the class EmberNcp method getCounters.

/**
 * Retrieves Ember counters. See the EmberCounterType enumeration for the counter types.
 *
 * @return the array of counters
 */
public int[] getCounters() {
    EzspReadCountersRequest request = new EzspReadCountersRequest();
    EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspReadCountersResponse.class));
    EzspReadCountersResponse response = (EzspReadCountersResponse) transaction.getResponse();
    logger.debug(response.toString());
    lastStatus = null;
    return response.getValues();
}
Also used : EzspReadCountersResponse(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspReadCountersResponse) EzspReadCountersRequest(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspReadCountersRequest) EzspTransaction(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspTransaction) EzspSingleResponseTransaction(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction)

Aggregations

EzspReadCountersRequest (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspReadCountersRequest)1 EzspReadCountersResponse (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspReadCountersResponse)1 EzspSingleResponseTransaction (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspSingleResponseTransaction)1 EzspTransaction (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.transaction.EzspTransaction)1