Initial update of comments to JSDoc format.
diff --git a/js/util/CCNTime.js b/js/util/CCNTime.js
index e4c8afd..bb1222e 100644
--- a/js/util/CCNTime.js
+++ b/js/util/CCNTime.js
@@ -4,24 +4,14 @@
* This class represents CCNTime Objects
*/
-var CCNTime = function CCNTime(
-
- input) {
-
-
-
-
+/**
+ * @constructor
+ */
+var CCNTime = function CCNTime(input) {
this.NANOS_MAX = 999877929;
- /*if(typeof input =='object'){
- this.longDate = DataUtils.byteArrayToUnsignedLong(input);
- this.binaryDate = input;
- }*/
- if(typeof input =='number'){
+ if(typeof input =='number')
this.msec = input;
- //this.binaryDate = DataUtils.unsignedLongToByteArray(input);
-
- }
else{
if(LOG>1) console.log('UNRECOGNIZED TYPE FOR TIME');
}
diff --git a/js/util/ExponentialReExpressClosure.js b/js/util/ExponentialReExpressClosure.js
index 1057f60..3b0fd85 100644
--- a/js/util/ExponentialReExpressClosure.js
+++ b/js/util/ExponentialReExpressClosure.js
@@ -4,13 +4,14 @@
* This is the closure class for use in expressInterest to re express with exponential falloff.
*/
-/*
+/**
* Create a new ExponentialReExpressClosure where upcall responds to UPCALL_INTEREST_TIMED_OUT
* by expressing the interest again with double the interestLifetime. If the interesLifetime goes
* over maxInterestLifetime, then call callerClosure.upcall with UPCALL_INTEREST_TIMED_OUT.
* When upcall is not UPCALL_INTEREST_TIMED_OUT, just call callerClosure.upcall.
- *
- * settings is an associative array with the following defaults:
+ * @constructor
+ * @param {Closure} callerClosure
+ * @param {Object} settings if not null, an associative array with the following defaults:
* {
* maxInterestLifetime: 16000 // milliseconds
* }
@@ -25,6 +26,10 @@
this.maxInterestLifetime = (settings.maxInterestLifetime || 16000);
};
+/**
+ * Wrap this.callerClosure to responds to UPCALL_INTEREST_TIMED_OUT
+ * by expressing the interest again as described in the constructor.
+ */
ExponentialReExpressClosure.prototype.upcall = function(kind, upcallInfo) {
try {
if (kind == Closure.UPCALL_INTEREST_TIMED_OUT) {