Changeset 1037 for XIOS/dev/branch_yushan/src/filter/output_pin.hpp
- Timestamp:
- 01/25/17 16:25:17 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/filter/output_pin.hpp
r1006 r1037 2 2 #define __XIOS_COutputPin__ 3 3 4 #include "garbage_collector.hpp"5 4 #include "input_pin.hpp" 6 5 … … 10 9 * An output pin handles the connections with downstream filters. 11 10 */ 12 class COutputPin : public InvalidableObject11 class COutputPin 13 12 { 14 13 public: 15 /*!16 * Constructs an ouput pin with manual or automatic trigger17 * and an associated garbage collector.18 *19 * \param gc the garbage collector associated with this ouput pin20 * \param slotsCount the number of slots21 */22 COutputPin(CGarbageCollector& gc, bool manualTrigger = false);23 24 14 /*! 25 15 * Connects to a specific slot of the input pin of a downstream filter. … … 31 21 void connectOutput(boost::shared_ptr<CInputPin> inputPin, size_t inputSlot); 32 22 33 /*!34 * Triggers the output of any buffered packet for the specified timestamp.35 *36 * \param timestamp the timestamp for which we are triggering the output37 */38 void virtual trigger(Time timestamp);39 40 /*!41 * Tests if the pin can be triggered.42 *43 * \return true if the pin can be triggered44 */45 bool virtual canBeTriggered() const;46 47 /*!48 * Removes all pending packets which are older than the specified timestamp.49 *50 * \param timestamp the timestamp used for invalidation51 */52 void virtual invalidate(Time timestamp);53 54 23 protected: 55 /*!56 * Function triggered when a packet is ready to be delivered.57 *58 * \param packet the packet ready for output59 */60 void onOutputReady(CDataPacketPtr packet);61 62 /*!63 * Informs the downstream pins that this output pin should be triggered.64 */65 void setOutputTriggers();66 67 private:68 24 /*! 69 25 * Delivers an output packet to the downstreams filter. … … 73 29 void deliverOuput(CDataPacketPtr packet); 74 30 75 CGarbageCollector& gc; //!< The garbage collector associated to the output pin 76 77 //!< Whether the ouput should be triggered manually 78 bool manualTrigger; 79 31 private: 80 32 //!< The list of connected filters and the corresponding slot numbers 81 33 std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> > outputs; 82 83 //! Output buffer, store the packets until the output is triggered84 std::map<Time, CDataPacketPtr> outputPackets;85 34 }; // class COutputPin 86 35 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.