Task #1992
closed
  
Replace FaceFlags with individual fields
 
        
        Added by Junxiao Shi about 11 years ago.
        Updated about 11 years ago.
        
  
  
  
  Description
  
  Replace FaceFlags field with individual fields: FaceScope, FacePersistency, LinkType.
Spec: FaceMgmt rev41.
This Task involves changes in the following places:
ndn::nfd::FaceStatus type 
ndn::nfd::FaceEventNotification type 
Face::getFaceStatus and Face Dataset 
- Face Status Change Notification
 
Recommended:
- Declare a base class for common fields in 
FaceStatus and FaceEventNotification types, or declare a concept for getters and setters of those common fields. 
- Modify 
Face::getFaceStatus to use this base class or concept. 
- Populate face status change notification with modified 
Face::getFaceStatus. 
   
 
 
  
  
    
    
    
    
       - Related to Task #1991: Display face attribute fields instead of FaceFlags added
 
    
    
     
   
  
  
    
    
    
    This Task has interlocked dependency with #1991. Suggested procedure is:
- In #1992, make changes to 
ndn::nfd::FaceStatus type, and mark old API as obsolete. 
- #1991 and rest of #1992 can be worked in parallel.
 
- In #1992, delete old API after #1991 is completed.
 
 
     
   
  
  
  
  
    
    
    
    
       - Assignee set to Chengyu Fan
 
    
    
     
   
  
  
    
    
    
    
       - Status changed from New to In Progress
 
    
    
     
   
  
  
    
    
    
    
       - % Done changed from 0 to 70
 
    
    
     
   
  
  
    
    
    
    Another part of this task is change Face::getFaceStatus and Face Dataset, should this part submit with #1991 or just submit as #1992 in NFD repository?
 
     
   
  
  
    
    
    
    After the Change for ndn::nfd::FaceStatus type and ndn::nfd::FaceEventNotification type is merged, you can make two separate Changes for #1991 and rest of #1992 (except deleting old API). Those can be worked on in parallel.
After both of those Changes are merged, make a fourth Change to delete old API.
 
     
   
  
  
    
    
    
    Changes have been merged into ndn-cxx and corresponding changes need to be made to NFD.   Currently, the master branch of NFD doesn't compile with the master branch of ndn-cxx.
 
     
   
  
  
    
    
    
    will commit the change soon
 
     
   
  
  
    
    
    
    The recently merged ndn-cxx commit is designed to be backwards-compatible, but a file is renamed and we forget to set a alias at old file name.
We should make a urgent commit to ndn-cxx that makes a symbolic link from nfd-face-flags.hpp to nfd-face-traits.hpp.
 
     
   
  
  
    
    
    
    Can I just quickly commit the one to fix this issue, and latter commit others?
 
     
   
  
  
    
    
    
    The quick fix is let face/face.hpp include the header nfd-face-traits.hpp, instead of nfd-face-flags.hpp.
 
     
   
  
  
    
    
    
    No, you should update ndn-cxx to make it backward-compatible, not update NFD.
To test for backwards-compatibility, compile unchanged NFD and NLSR, and they should succeed.
 
     
   
  
  
    
    
    
    
       - Status changed from In Progress to Code review
 
       - % Done changed from 70 to 100
 
    
    
     
   
  
  
    
    
    
    
       - Status changed from Code review to Closed
 
    
    
     
   
  
  
    
    
    
    
       - Status changed from Closed to Feedback
 
    
    This Task also includes deleting deprecated APIs, after #1991 is closed.
 
     
   
  
  
    
    
    
    For deleting deprecated APIs, do you mean delete the deprecated APIs in ndn-cxx?
Should it be done recently?
 
     
   
  
  
    
    
    
    Yes, obsolete APIs can be deleted now.
The purpose of making the first commit backwards-compatible is to avoid breaking NFD outright.
After #1991 completion, NFD shouldn't have any code using obsolete APIs.
 
     
   
  
  
    
    
    
    I think the obsolete APIs contain the face flag setter and getter, isLocal, isOnDemand, and FaceFlags enum.
But there are still some NFD codes use some of them:
- tests/daemon/mgmt/face-manager.cppm line 1602, 1664 use setFlags()
 
- tools/nfd-autoreg.cpp, line 162, 167, and 298 use isLocal or isOnDemand
 
I'll modify them first, and then move the obsolete APIs in ndn-cxx.
If I misunderstand anything, please let me know.
 
     
   
  
  
    
    
    
    If there's any NFD code that uses obsolete APIs, they should be changed as part of this Task.
 
     
   
  
  
    
    
    
    
       - Status changed from Feedback to Closed
 
    
    
     
   
  
 
  
  
 
Also available in:  Atom
  PDF