Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vladamatena committed May 11, 2015
1 parent 2d267b7 commit 5ec004d
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ private void doRebroadcast(L2Packet packet) {
layer2.sendL2Packet(packet, MANETBroadcastAddress.BROADCAST);
}

/**
* Check whether the packet is blocked by boundary condition
*
* @param packet
* Packet to inspect
* @return Whether the packet is blocked by some condition
*/
private boolean isBounded(L2Packet packet) {
Object payload = packet.getObject();

Expand All @@ -177,6 +184,11 @@ private boolean isBounded(L2Packet packet) {
return true;
}

/**
* Gets the knowledge of the local node
*
* @return
*/
private KnowledgeManager getNodeKnowledge() {
// FIXME: in the future, we need to unify the knowledge of all the local KMs.
return kmContainer.getLocals().iterator().next();
Expand Down

0 comments on commit 5ec004d

Please sign in to comment.