Project

General

Profile

Bug #4160

the default time uint is millisecond while ndn-cxx uses nanosecond

Added by Haitao Zhang almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Start date:
07/05/2017
Due date:
% Done:

0%

Estimated time:

Description

This causes problems when programs based on ndn-ccl libraries need to communicate with problems based on ndn-cxx

History

#1 Updated by Jeff Thompson almost 2 years ago

The CCL is not meant to have the exact API as ndn-cxx. Can you give an example of communication problems?

#2 Updated by Haitao Zhang almost 2 years ago

For example, a timestamp component is created using jNDN's Component.fromTimestamp(); when it is converted back to timestamp using ndn-cxx's Component.toTimestamp(), the timestamp is 1/1000 of the original timestamp.

#3 Updated by Jeff Thompson almost 2 years ago

Actually, the jNDN fromTimestamp and toTimestamp just encode and decode the number that it is given, without converting them. The timestamp is defined to be "Number of microseconds since UNIX epoch" in the Name Conventions document: http://named-data.net/doc/tech-memos/naming-conventions.pdf

ndn-cxx uses Boost time functions which force things to nanoseconds. But jNDN doesn't use Boost. The Common Client Libraries API is designed to be consistent across languages like Java, Python, etc. It is not hard-wired to Boost like ndn-cxx.

#4 Updated by Haitao Zhang almost 2 years ago

I need to correct myself first: ndn-cxx uses "microseconds", which is consistent with the Name Conventions document; while ccl uses "milliseconds".

I agree that it's a good that ccl libs API is designed to be consistent. My concern is, a timestamp component is interpreted differently by ndn-cxx and ccl; however, in theory, all interpretations should be consistent with the Name Conventions document.

#5 Updated by Jeff Burke almost 2 years ago

  • Status changed from New to Rejected

This is not a bug, it is an API design decision. The API calls perform as documented and encode/decode the correct convention.

Also available in: Atom PDF