Dripline-Cpp  v2.10.11
Dripline Implementation in C++
oscillator_service_endpoints.hh
Go to the documentation of this file.
1 /*
2  * oscillator_service_endpoints.hh
3  *
4  * Created on: May 20, 2019
5  * Author: N.S. Oblath
6  *
7  * Comment by the author: this class is a premier example of why it's annoying to make a software-only service
8  * using endpoints rather than hub. It would be improved by using something like the provider concept.
9  * As it is, however, we have to set the pointers to the service and derived service class in each endpoint
10  * after the service constructor, and this is done in the added function set_pointers().
11  */
12 
13 #ifndef EXAMPLES_OSCILLATOR_SERVICE_ENDPOINTS_HH_
14 #define EXAMPLES_OSCILLATOR_SERVICE_ENDPOINTS_HH_
15 
16 #include "service.hh"
17 
18 #include "oscillator.hh"
19 
20 namespace dripline
21 {
23  {
24  public:
25  oscillator_service_endpoints( const scarab::param_node& a_config, const scarab::authentication& a_auth );
27 
28  void execute();
29 
30  mv_referrable( class oscillator, oscillator );
31 
32  mv_accessible( int, return );
33  };
34 
35 
37  {
38  public:
39  oscillator_ep( const std::string& a_name );
40  virtual ~oscillator_ep();
41 
42  protected:
45  };
46 
48  {
49  public:
50  oscillator_ep_frequency( const std::string& a_name );
51  virtual ~oscillator_ep_frequency();
52 
53  virtual reply_ptr_t do_get_request( const request_ptr_t a_request );
54  virtual reply_ptr_t do_set_request( const request_ptr_t a_request );
55  };
56 
58  {
59  public:
60  oscillator_ep_amplitude( const std::string& a_name );
61  virtual ~oscillator_ep_amplitude();
62 
63  virtual reply_ptr_t do_get_request( const request_ptr_t a_request );
64  virtual reply_ptr_t do_set_request( const request_ptr_t a_request );
65  };
66 
68  {
69  public:
70  oscillator_ep_in_phase( const std::string& a_name );
71  virtual ~oscillator_ep_in_phase();
72 
73  virtual reply_ptr_t do_get_request( const request_ptr_t a_request );
74  };
75 
77  {
78  public:
79  oscillator_ep_quadrature( const std::string& a_name );
80  virtual ~oscillator_ep_quadrature();
81 
82  virtual reply_ptr_t do_get_request( const request_ptr_t a_request );
83  };
84 
86  {
87  public:
88  oscillator_ep_iq( const std::string& a_name );
89  virtual ~oscillator_ep_iq();
90 
91  virtual reply_ptr_t do_get_request( const request_ptr_t a_request );
92  };
93 
94 } /* namespace dripline */
95 
96 #endif /* EXAMPLES_OSCILLATOR_SERVICE_ENDPOINTS_HH_ */
Basic Dripline object capable of receiving and acting on messages.
Definition: endpoint.hh:97
oscillator_service_endpoints * f_osc_svc
Primary unit of software that connects to a broker and typically provides an interface with an instru...
Definition: service.hh:85
#define DRIPLINE_EXAMPLES_API
Definition: dripline_api.hh:35
std::shared_ptr< msg_reply > reply_ptr_t
Definition: dripline_fwd.hh:24
std::shared_ptr< msg_request > request_ptr_t
Definition: dripline_fwd.hh:23