*/
function isAcceptingAnnouncements ();
+ /**
+ * Checks whether this node has attempted to announce itself
+ *
+ * @return $hasAnnounced Whether this node has attempted to announce itself
+ */
+ function ifNodeHasAnnounced ();
+
/**
* Checks whether this node has attempted to announce itself and completed it
*
- * @return $hasAnnounced Whether this node has attempted to announce itself and completed it
+ * @return $hasAnnouncementCompleted Whether this node has attempted to announce itself and completed it
*/
function ifNodeHasAnnouncementCompleted ();
$nodeInstance = Registry::getRegistry()->getInstance('node');
// Has this node attempted to announce itself?
- if (!$nodeInstance->ifNodeHasAnnouncementCompleted()) {
+ if (!$nodeInstance->ifNodeHasAnnounced()) {
/*
* This node has never announced itself, so it doesn't expect
* announcement answer messages.
}
/**
- * Checks whether this node has attempted to announce itself and completed it
+ * Checks whether this node has attempted to announce itself
*
- * @return $hasAnnounced Whether this node has attempted to announce itself and completed it
+ * @return $hasAnnounced Whether this node has attempted to announce itself
* @todo Add checking if this node has been announced to the sender node
*/
- public function ifNodeHasAnnouncementCompleted () {
+ public function ifNodeHasAnnounced () {
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): state=' . $this->getStateInstance()->getStateName());
// Simply check the state of this node
- $hasAnnounced = ($this->getStateInstance() instanceof NodeAnnouncementCompletedState);
+ $hasAnnounced = ($this->getStateInstance() instanceof NodeAnnouncedState);
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): hasAnnounced=' . intval($hasAnnounced));
return $hasAnnounced;
}
+ /**
+ * Checks whether this node has attempted to announce itself and completed it
+ *
+ * @return $hasAnnouncementCompleted Whether this node has attempted to announce itself and completed it
+ * @todo Add checking if this node has been announced to the sender node
+ */
+ public function ifNodeHasAnnouncementCompleted () {
+ // Debug message
+ /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): state=' . $this->getStateInstance()->getStateName());
+
+ // Simply check the state of this node
+ $hasAnnouncementCompleted = ($this->getStateInstance() instanceof NodeAnnouncementCompletedState);
+
+ // Debug message
+ /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE: ifNodeHasAnnouncementCompleted(): hasAnnouncementCompleted=' . intval($hasAnnouncementCompleted));
+
+ // Return it
+ return $hasAnnouncementCompleted;
+ }
+
/**
* Enables whether this node accepts announcements
*