servlib/bundling/BundleDaemon.h
changeset 55 1938118cd06c
parent 22 3c36683e13be
equal deleted inserted replaced
54:4122c50abb39 55:1938118cd06c
    32 #include "BundleEventHandler.h"
    32 #include "BundleEventHandler.h"
    33 #include "BundleProtocol.h"
    33 #include "BundleProtocol.h"
    34 #include "BundleActions.h"
    34 #include "BundleActions.h"
    35 #include "BundleStatusReport.h"
    35 #include "BundleStatusReport.h"
    36 #include "BPQBlock.h"
    36 #include "BPQBlock.h"
       
    37 #include "BPQCache.h"
    37 
    38 
    38 #include <execinfo.h>
    39 #include <execinfo.h>
    39 #include <signal.h>
    40 #include <signal.h>
    40 
    41 
    41 namespace dtn {
    42 namespace dtn {
   173      * Accessor for the custody bundles list.
   174      * Accessor for the custody bundles list.
   174      */
   175      */
   175     BundleList* custody_bundles() { return custody_bundles_; }
   176     BundleList* custody_bundles() { return custody_bundles_; }
   176    
   177    
   177     /**
   178     /**
   178      * Accessor for the BPQ bundles list.
   179      * Accessor for the BPQ Cache.
   179      */
   180      */
   180     BundleList* bpq_bundles() { return bpq_bundles_; }
   181     BPQCache* bpq_cache() { return bpq_cache_; }
   181  
   182  
   182     /**
   183     /**
   183      * Format the given StringBuffer with current routing info.
   184      * Format the given StringBuffer with current routing info.
   184      */
   185      */
   185     void get_routing_state(oasys::StringBuffer* buf);
   186     void get_routing_state(oasys::StringBuffer* buf);
   415      * Release custody of the given bundle, sending the appropriate
   416      * Release custody of the given bundle, sending the appropriate
   416      * signal to the current custodian.
   417      * signal to the current custodian.
   417      */
   418      */
   418     void release_custody(Bundle* bundle);
   419     void release_custody(Bundle* bundle);
   419 
   420 
   420     /**
   421 //    /**
   421      * Add BPQ bundle to the on-path cache
   422 //     * TODO
   422      */
   423 //     * Add BPQ bundle to the on-path cache
   423     bool accept_bpq_response(Bundle* bundle, BPQBlock* bpq_block,
   424 //     */
   424                              bool add_to_store);
   425 //    bool accept_bpq_response(Bundle* bundle, BPQBlock* bpq_block,
   425 
   426 //                             bool add_to_store);
   426     /**
   427 //
   427      * Add BPQ bundle to the on-path cache if space allows
   428 //    /**
   428      * if full, remove old bundles to make room
   429 //     * Add BPQ bundle to the on-path cache if space allows
   429      */
   430 //     * if full, remove old bundles to make room
   430     bool add_bundle_to_bpq_cache(Bundle* bundle, bool add_to_store);
   431 //     * TODO
   431 
   432 //     */
   432     /**
   433 //    bool add_bundle_to_bpq_cache(Bundle* bundle, bool add_to_store);
   433      * todo
   434 //
   434      */
   435 //    /**
   435     bool answer_bpq_query(Bundle* bundle, BPQBlock* bpq_block);
   436 //     * TODO
       
   437 //     */
       
   438 //    bool answer_bpq_query(Bundle* bundle, BPQBlock* bpq_block);
   436 
   439 
   437     /**
   440     /**
   438      * Add the bundle to the pending list and (optionally) the
   441      * Add the bundle to the pending list and (optionally) the
   439      * persistent store, and set up the expiration timer for it.
   442      * persistent store, and set up the expiration timer for it.
   440      *
   443      *
   475 
   478 
   476 
   479 
   477     /**
   480     /**
   478      * Check the bundle source and if it contains a QUERY_EXTENSION_BLOCK
   481      * Check the bundle source and if it contains a QUERY_EXTENSION_BLOCK
   479      * if if does ...
   482      * if if does ...
       
   483      * TODO
   480      */
   484      */
   481     bool handle_bpq_block(Bundle* b, BundleReceivedEvent* event);
   485     bool handle_bpq_block(Bundle* b, BundleReceivedEvent* event);
   482 
   486 
   483 
   487 
   484     /**
   488     /**
   524 
   528 
   525     /// The list of all bundles that we have custody of
   529     /// The list of all bundles that we have custody of
   526     BundleList* custody_bundles_;
   530     BundleList* custody_bundles_;
   527    
   531    
   528     /// The list of all bundles with the response QUERY_EXTENSION
   532     /// The list of all bundles with the response QUERY_EXTENSION
   529     BundleList* bpq_bundles_;
   533     /// TODO
       
   534     BPQCache* bpq_cache_;
   530  
   535  
   531     /// The event queue
   536     /// The event queue
   532     oasys::MsgQueue<BundleEvent*>* eventq_;
   537     oasys::MsgQueue<BundleEvent*>* eventq_;
   533 
   538 
   534     /// The default endpoint id for reaching this daemon, used for
   539     /// The default endpoint id for reaching this daemon, used for