conn_output_endpoint.hpp
Go to the documentation of this file.
00001 /* 
00002  *  conn_output_endpoint.hpp - micros output end element for transport channel
00003  *  Copyright (C) 2015 Zaile Jiang
00004  *  
00005  *  This program is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU General Public License
00007  *  as published by the Free Software Foundation; either version 2
00008  *  of the License, or (at your option) any later version.
00009  *  
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *  
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 */
00019 #ifndef MICROSRTT_CONN_OUTPUT_ENDPOINT_HPP
00020 #define MICROSRTT_CONN_OUTPUT_ENDPOINT_HPP
00021 
00022 #include "micros_rtt/connection_base.h"
00023 #include "micros_rtt/oro/channel_data_element.hpp"
00024 
00025 namespace micros_rtt
00026 {
00035 template<typename M>
00036 class ConnOutputEndpoint : public ChannelElement<M>
00037 {
00038   ConnectionBasePtr subscription_;
00039 public:
00048   ConnOutputEndpoint(ConnectionBasePtr subscription)
00049         : subscription_(subscription)
00050   {
00051   }
00052 
00053   ~ConnOutputEndpoint()
00054   {
00055   }
00056 
00064   bool inputReady()
00065   {
00066     return ChannelElement<M>::inputReady();
00067   }
00068 
00069   using ChannelElement<M>::write;
00070 
00074   virtual bool write(typename ChannelElement<M>::param_t sample)
00075   { return false; }
00076 
00077   virtual void disconnect(bool forward)
00078   {
00079     //temporary not supportted
00080   }
00081 
00082   virtual bool signal()
00083   {
00084     //temporary not supportted
00085     return true;
00086   }
00087 
00088   virtual bool data_sample(typename ChannelElement<M>::param_t sample)
00089   {
00090     //data element has been initialized, this should be true
00091     return true;
00092   }
00093 
00094 };
00095 
00096 }
00097 
00098 #endif


micros_rtt
Author(s): Zaile Jiang , Xiaodong Yi , Minglong Li
autogenerated on Sat Jun 8 2019 19:02:21