PdCom  4.1
Process data communication client
 All Classes Files Functions Variables Enumerations Macros
Subscriber.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vim:tw=78
3  * $Id$
4  *
5  * Copyright (C) 2016 Richard Hacker (lerichi at gmx dot net)
6  *
7  * This file is part of the PdCom library.
8  *
9  * The PdCom library is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or (at your
12  * option) any later version.
13  *
14  * The PdCom library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with the PdCom library. If not, see <http://www.gnu.org/licenses/>.
21  *
22  *****************************************************************************/
23 
26 #ifndef PDCOM_SUBSCRIBER_H
27 #define PDCOM_SUBSCRIBER_H
28 
29 #include "Variable.h"
30 
31 #include <stddef.h>
32 #include <string>
33 #include <stdint.h>
34 
35 namespace PdCom {
36 
91  struct Subscriber {
98  virtual ~Subscriber();
99 
108  virtual void newGroupValue(uint64_t time_ns) = 0;
109 
118  virtual void newValue(
119  const Variable::Subscription* subscription) = 0;
120 
134  virtual void active(const std::string& path,
135  const Variable::Subscription* subscription) = 0;
136 
144  virtual void invalid(const std::string& path, int id) = 0;
145  };
146 } // namespace
147 
148 #endif // PDCOM_SUBSCRIBER_H
virtual void invalid(const std::string &path, int id)=0
Subscription request invalid.
virtual void newGroupValue(uint64_t time_ns)=0
New values for all active signal subscriptions.
Class required to receive subscribed variables.
Definition: Subscriber.h:91
Subscription class.
Definition: Variable.h:77
virtual void active(const std::string &path, const Variable::Subscription *subscription)=0
Subscription is active.
virtual ~Subscriber()
Destructor.
Definition: Process.h:37
virtual void newValue(const Variable::Subscription *subscription)=0
New values for a single subscription is available.