Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ public enum TransactionState {
* the command that completed the transaction.
*/
private ZigBeeCommand completionCommand;

private boolean sleepy;

/**
* The amount of time (in milliseconds) from when the command is sent to the transport, until when the transport
Expand Down Expand Up @@ -512,7 +514,15 @@ public void transactionStatusReceived(ZigBeeTransportProgressState progress, int
String.format("%04X", command.getDestinationAddress().getAddress()),
String.format("%02X", transactionId), progress, state);
}

public boolean isSleepy() {
return sleepy;
}

public void setSleepy() {
this.sleepy = true;
}

@Override
public String toString() {
String queuedTime = queueTime == null ? "-" : Long.toString(System.currentTimeMillis() - queueTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ protected void transactionComplete(ZigBeeTransaction transaction, TransactionSta
} else {
queue.transactionComplete(transaction, state);

if (queue.isSleepy() && sleepyTransactions > 0) {
if (transaction.isSleepy() && sleepyTransactions > 0) {
sleepyTransactions--;
}

Expand Down Expand Up @@ -687,6 +687,7 @@ private void sendNextTransaction() {
transaction = queue.getTransaction();
if (transaction != null) {
if (queue.isSleepy()) {
transaction.setSleepy();
sleepyTransactions++;
}

Expand Down