*/
private $subNodes = array(
// These nodes don't contain any data
- 'node-data',
- 'other-data',
+ 'my-data',
+ 'your-data',
// Data from *this* node
- 'node-external-ip',
- 'node-internal-ip',
- 'node-tcp-port',
- 'node-udp-port',
- 'node-session-id',
- 'node-status',
+ 'my-external-ip',
+ 'my-internal-ip',
+ 'my-tcp-port',
+ 'my-udp-port',
+ 'my-session-id',
+ 'my-status',
// Data from other node
- 'other-external-ip',
- 'other-internal-ip',
- 'other-session-id',
+ 'your-external-ip',
+ 'your-internal-ip',
+ 'your-session-id',
// Answer status (code)
'answer-status'
);
parent::assignVariable($this->getStackerInstance()->getNamed('announcement_answer'), $characters);
}
+ /**
+ * Read announcement-answer variables by calling readVariable() with 'general' as
+ * variable stack.
+ *
+ * @param $key Key to read from
+ * @return $value Value from variable
+ */
+ public function readAnnouncementAnswerData ($key) {
+ // Read the variable
+ $value = parent::readVariable($key, 'general');
+
+ // Return value
+ return $value;
+ }
+
/**
* Getter for cache file (FQFN)
*
}
/**
- * Starts the node-data
+ * Starts the my-data
*
* @return void
*/
- private function startNodeData () {
+ private function startMyData () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-data');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-data');
}
/**
- * Starts the node-external-ip
+ * Starts the my-external-ip
*
* @return void
*/
- private function startNodeExternalIp () {
+ private function startMyExternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-external-ip');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-external-ip');
}
/**
- * Starts the node-internal-ip
+ * Starts the my-internal-ip
*
* @return void
*/
- private function startNodeInternalIp () {
+ private function startMyInternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-internal-ip');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-internal-ip');
}
/**
- * Starts the node-tcp-port
+ * Starts the my-tcp-port
*
* @return void
*/
- private function startNodeTcpPort () {
+ private function startMyTcpPort () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-tcp-port');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-tcp-port');
}
/**
- * Starts the node-udp-port
+ * Starts the my-udp-port
*
* @return void
*/
- private function startNodeUdpPort () {
+ private function startMyUdpPort () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-udp-port');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-udp-port');
}
/**
- * Starts the node-session-id
+ * Starts the my-session-id
*
* @return void
*/
- private function startNodeSessionId () {
+ private function startMySessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-session-id');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-session-id');
}
/**
- * Starts the node-status
+ * Starts the my-status
*
* @return void
*/
- private function startNodeStatus () {
+ private function startMyStatus () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'node-status');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'my-status');
}
/**
- * Finishes the node-status
+ * Finishes the my-status
*
* @return void
*/
- private function finishNodeStatus () {
+ private function finishMyStatus () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the node-session-id
+ * Finishes the my-session-id
*
* @return void
*/
- private function finishNodeSessionId () {
+ private function finishMySessionId () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the node-udp-port
+ * Finishes the my-udp-port
*
* @return void
*/
- private function finishNodeUdpPort () {
+ private function finishMyUdpPort () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the node-tcp-port
+ * Finishes the my-tcp-port
*
* @return void
*/
- private function finishNodeTcpPort () {
+ private function finishMyTcpPort () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the node-internal-ip
+ * Finishes the my-internal-ip
*
* @return void
*/
- private function finishNodeInternalIp () {
+ private function finishMyInternalIp () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the node-external-ip
+ * Finishes the my-external-ip
*
* @return void
*/
- private function finishNodeExternalIp () {
+ private function finishMyExternalIp () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the node-data
+ * Finishes the my-data
*
* @return void
*/
- private function finishNodeData () {
+ private function finishMyData () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Starts the other-data
+ * Starts the your-data
*
* @return void
*/
- private function startOtherData () {
+ private function startYourData () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'other-data');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'your-data');
}
/**
- * Starts the other-external-ip
+ * Starts the your-external-ip
*
* @return void
*/
- private function startOtherExternalIp () {
+ private function startYourExternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'other-external-ip');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'your-external-ip');
}
/**
- * Starts the other-internal-ip
+ * Starts the your-internal-ip
*
* @return void
*/
- private function startOtherInternalIp () {
+ private function startYourInternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'other-internal-ip');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'your-internal-ip');
}
/**
- * Starts the other-session-id
+ * Starts the your-session-id
*
* @return void
*/
- private function startOtherSessionId () {
+ private function startYourSessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'other-session-id');
+ $this->getStackerInstance()->pushNamed('announcement_answer', 'your-session-id');
}
/**
- * Finishes the other-session-id
+ * Finishes the your-session-id
*
* @return void
*/
- private function finishOtherSessionId () {
+ private function finishYourSessionId () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the other-internal-ip
+ * Finishes the your-internal-ip
*
* @return void
*/
- private function finishOtherInternalIp () {
+ private function finishYourInternalIp () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the other-external-ip
+ * Finishes the your-external-ip
*
* @return void
*/
- private function finishOtherExternalIp () {
+ private function finishYourExternalIp () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}
/**
- * Finishes the other-data
+ * Finishes the your-data
*
* @return void
*/
- private function finishOtherData () {
+ private function finishYourData () {
// Pop the last entry
$this->getStackerInstance()->popNamed('announcement_answer');
}