libiec61850  1.5.3
goose_publisher.h
Go to the documentation of this file.
1 /*
2  * goose_publisher.h
3  *
4  * Copyright 2013-2020 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_PUBLISHER_H_
25 #define GOOSE_PUBLISHER_H_
26 
27 #include "iec61850_common.h"
28 #include "linked_list.h"
29 #include "mms_value.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
40 #ifndef GOOSE_SV_COMM_PARAMETERS
41 #define GOOSE_SV_COMM_PARAMETERS
42 
43 typedef struct sCommParameters {
44  uint8_t vlanPriority;
45  uint16_t vlanId;
46  uint16_t appId;
47  uint8_t dstAddress[6];
49 
50 #endif
51 
52 typedef struct sGoosePublisher* GoosePublisher;
53 
62 LIB61850_API GoosePublisher
63 GoosePublisher_create(CommParameters* parameters, const char* interfaceID);
64 
72 LIB61850_API GoosePublisher
73 GoosePublisher_createEx(CommParameters* parameters, const char* interfaceID, bool useVlanTag);
74 
80 LIB61850_API void
82 
91 LIB61850_API int
92 GoosePublisher_publish(GoosePublisher self, LinkedList dataSet);
93 
103 LIB61850_API int
104 GoosePublisher_publishAndDump(GoosePublisher self, LinkedList dataSet, char* msgBuf, int32_t* msgLen, int32_t bufSize);
105 
112 LIB61850_API void
114 
121 LIB61850_API void
123 
130 LIB61850_API void
131 GoosePublisher_setTimeAllowedToLive(GoosePublisher self, uint32_t timeAllowedToLive);
132 
139 LIB61850_API void
141 
148 LIB61850_API void
150 
157 LIB61850_API void
159 
169 LIB61850_API void
171 
180 LIB61850_API void
182 
189 LIB61850_API void
191 
201 LIB61850_API uint64_t
203 
211 LIB61850_API void
213 
214 #ifdef __cplusplus
215 }
216 #endif
217 
220 #endif /* GOOSE_PUBLISHER_H_ */
LIB61850_API GoosePublisher GoosePublisher_create(CommParameters *parameters, const char *interfaceID)
Create a new GoosePublisher instance.
LIB61850_API void GoosePublisher_setStNum(GoosePublisher self, uint32_t stNum)
Manually sets the state number (stNum) of the GoosePublisher instance.
LIB61850_API void GoosePublisher_setConfRev(GoosePublisher self, uint32_t confRev)
Sets the configuration revision used by the GoosePublisher instance.
LIB61850_API int GoosePublisher_publishAndDump(GoosePublisher self, LinkedList dataSet, char *msgBuf, int32_t *msgLen, int32_t bufSize)
Publish a GOOSE message and store the sent message in the provided buffer.
LIB61850_API void GoosePublisher_reset(GoosePublisher self)
Reset state and sequence number of the GoosePublisher instance.
LIB61850_API GoosePublisher GoosePublisher_createEx(CommParameters *parameters, const char *interfaceID, bool useVlanTag)
Create a new GoosePublisher instance.
LIB61850_API uint64_t GoosePublisher_increaseStNum(GoosePublisher self)
Increase the state number (stNum) of the GoosePublisher instance.
LIB61850_API void GoosePublisher_setNeedsCommission(GoosePublisher self, bool ndsCom)
Sets the needs commission flag in sent GOOSE messages.
LIB61850_API void GoosePublisher_setSimulation(GoosePublisher self, bool simulation)
Sets simulation flag in sent GOOSE messages.
LIB61850_API void GoosePublisher_destroy(GoosePublisher self)
Release all resources of the GoosePublisher instance.
LIB61850_API void GoosePublisher_setGoCbRef(GoosePublisher self, char *goCbRef)
Sets the GoCB reference used by the GoosePublisher instance.
LIB61850_API void GoosePublisher_setTimeAllowedToLive(GoosePublisher self, uint32_t timeAllowedToLive)
Sets the time allowed to live value of the GOOSE messages.
LIB61850_API void GoosePublisher_setSqNum(GoosePublisher self, uint32_t sqNum)
Manually sets the sequence number (sqNum) of the GoosePublisher instance.
struct sGoosePublisher * GoosePublisher
Definition: goose_publisher.h:52
LIB61850_API void GoosePublisher_setGoID(GoosePublisher self, char *goID)
Sets the GoID used by the GoosePublisher instance.
LIB61850_API int GoosePublisher_publish(GoosePublisher self, LinkedList dataSet)
Publish a GOOSE message.
LIB61850_API void GoosePublisher_setDataSetRef(GoosePublisher self, char *dataSetRef)
Sets the data set reference used by the GoosePublisher instance.
uint16_t vlanId
Definition: goose_publisher.h:45
uint8_t vlanPriority
Definition: goose_publisher.h:44
uint16_t appId
Definition: goose_publisher.h:46
Definition: goose_publisher.h:43