libIEC61850  1.0.1
Open-source IEC 61850 MMS/GOOSE/SV server and client library
goose_receiver.h
Go to the documentation of this file.
1 /*
2  * goose_receiver.h
3  *
4  * Copyright 2014 Michael Zillgith
5  *
6  * This file is part of libIEC61850.
7  *
8  * libIEC61850 is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * libIEC61850 is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * See COPYING file for the complete license text.
22  */
23 
24 #ifndef GOOSE_RECEIVER_H_
25 #define GOOSE_RECEIVER_H_
26 
27 #include <goose_subscriber.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
40 typedef struct sGooseReceiver* GooseReceiver;
41 
50 GooseReceiver
52 
59 void
60 GooseReceiver_setInterfaceId(GooseReceiver self, const char* interfaceId);
61 
71 void
72 GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber);
73 
83 void
84 GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber);
85 
91 void
92 GooseReceiver_start(GooseReceiver self);
93 
101 void
102 GooseReceiver_stop(GooseReceiver self);
103 
104 void
105 GooseReceiver_destroy(GooseReceiver self);
106 
107 /***************************************
108  * Functions for non-threaded operation
109  ***************************************/
110 void
111 GooseReceiver_startThreadless(GooseReceiver self);
112 
113 void
114 GooseReceiver_stopThreadless(GooseReceiver self);
115 
125 bool
126 GooseReceiver_tick(GooseReceiver self);
127 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 
135 #endif /* GOOSE_RECEIVER_H_ */
void GooseReceiver_stopThreadless(GooseReceiver self)
void GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber)
Remove a subscriber from this receiver instance.
struct sGooseSubscriber * GooseSubscriber
Definition: goose_subscriber.h:40
void GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber)
Add a subscriber to this receiver instance.
void GooseReceiver_stop(GooseReceiver self)
stop the GOOSE receiver running in a speparate thread
void GooseReceiver_setInterfaceId(GooseReceiver self, const char *interfaceId)
sets the interface for the GOOSE receiver
bool GooseReceiver_tick(GooseReceiver self)
Parse GOOSE messages if they are available.
void GooseReceiver_start(GooseReceiver self)
start the GOOSE receiver in a separate thread
GooseReceiver GooseReceiver_create(void)
Create a new receiver instance.
struct sGooseReceiver * GooseReceiver
Definition: goose_receiver.h:40
void GooseReceiver_startThreadless(GooseReceiver self)
void GooseReceiver_destroy(GooseReceiver self)