Orocos Real-Time Toolkit  2.9.0
PulseTrainGeneratorInterface.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Klaas Gadeyne Thu Sep 21 17:29:27 CEST 2006 PulseTrainGeneratorInterface.hpp
3 
4  PulseTrainGeneratorInterface.hpp - description
5  -------------------
6  begin : Thu Sep 21 17:29:27 CEST 2006
7  copyright : (C) 2006 FMTC
8  email : klaas gadeyne at fmtc be
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, *
24  * Suite 330, Boston, MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 #ifndef PULSETRAINGENERATOR_HPP
29 #define PULSETRAINGENERATOR_HPP
30 
31 #include "NameServer.hpp"
33 #include "../../Time.hpp" // Orocos Time types
34 #include "../../rtt-config.h"
35 
36 #ifdef ORO_PRAGMA_INTERFACE
37 #pragma interface
38 #endif
39 
40 namespace RTT
41 { namespace dev {
42 
49  : private NameServerRegistrator<PulseTrainGeneratorInterface*>
50  {
51  public:
58  PulseTrainGeneratorInterface( const std::string& name )
59  : NameServerRegistrator<PulseTrainGeneratorInterface*>( nameserver, name, this )
60  { }
61 
66  { }
67 
73 
75 
82  virtual bool pulseWidthSet(psecs picos) = 0;
83 
90  virtual bool pulsePeriodSet(psecs picos) = 0;
91 
95  virtual bool start() = 0;
96 
100  virtual bool stop() = 0;
101  };
102 }}
103 
104 #endif
Utility class to register a given object with a nameserver, and deregister upon destruction.
long long psecs
picoseconds as a signed long long
Definition: Time.hpp:73
#define RTT_API
Definition: rtt-config.h:97
static NameServer< PulseTrainGeneratorInterface * > nameserver
The NameServer of this interface.
PulseTrainGeneratorInterface()
Create a not nameserved PulseTrainGeneratorInterface instance.
A generic interface to a pulsetraingenerator for simulation of encoder like behaviour.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:52
PulseTrainGeneratorInterface(const std::string &name)
Create a PulseTrainGeneratorInterface with a name.