libIEC61850
Open-source IEC 61850 MMS server and client library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
mms_client_connection.h
Go to the documentation of this file.
1 /*
2  * mms_client_connection.h
3  *
4  * Copyright 2013 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 MMS_CLIENT_CONNECTION_H_
25 #define MMS_CLIENT_CONNECTION_H_
26 
32 #include <stdint.h>
33 
34 #include "mms_common.h"
35 #include "mms_type_spec.h"
36 #include "mms_value.h"
37 #include "iso_client_connection.h"
38 #include "linked_list.h"
39 
43 typedef enum {
49 
53 typedef struct sMmsConnectionParameters {
57  int maxPduSize; /* local detail */
59 
60 typedef struct sMmsVariableSpecification {
61  char* domainId;
62  char* itemId;
63  int32_t arrayIndex;
66 
67 typedef void (*MmsInformationReportHandler) (void* parameter, char* domainName,
68  char* variableListName, MmsValue* value);
69 
73 typedef struct sMmsConnection* MmsConnection;
74 
75 
76 /*******************************************************************************
77  * Connection management functions
78  *******************************************************************************/
79 
87 
98 void
100  void* parameter);
101 
108 void
110 
117 void
118 MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParameters* params);
119 
125 void
127 
135 
136 
137 /*******************************************************************************
138  * Blocking functions for connection establishment and data access
139  *******************************************************************************/
140 
141 
152 MmsIndication
153 MmsConnection_connect(MmsConnection self, char* serverName, int serverPort);
154 
164 LinkedList /* <char*> */
166 
177 LinkedList /* <char*> */
179 
190 LinkedList /* <char*> */
192 
202 LinkedList /* <char*> */
204 
205 
216 MmsValue*
217 MmsConnection_readVariable(MmsConnection self, char* domainId, char* itemId);
218 
232 MmsValue*
233 MmsConnection_readArrayElements(MmsConnection self, char* domainId, char* itemId,
234  uint32_t startIndex, uint32_t numberOfElements);
235 
247 MmsValue*
249  LinkedList /*<char*>*/ items);
250 
261 MmsIndication
263  char* domainId, char* itemId,
264  MmsValue* value);
265 
275 MmsTypeSpecification*
277  char* domainId, char* itemId);
278 
291 MmsValue*
292 MmsConnection_readNamedVariableListValues(MmsConnection self, char* domainId, char* listName,
293  bool specWithResult);
294 
295 
307 MmsValue*
309  bool specWithResult);
310 
321 MmsIndication
322 MmsConnection_defineNamedVariableList(MmsConnection self, char* domainId, char* listName,
323  LinkedList variableSpecs);
324 
325 
335 MmsIndication /* NEW */
337  LinkedList variableSpecs);
338 
350 LinkedList /* <MmsVariableSpecification*> */
351 MmsConnection_readNamedVariableListDirectory(MmsConnection self, char* domainId, char* listName, bool* deletable);
352 
361 LinkedList /* <MmsVariableSpecification*> */ /* NEW */
363 
373 MmsIndication
374 MmsConnection_deleteNamedVariableList(MmsConnection self, char* domainId, char* listName);
375 
384 MmsIndication /* NEW */
386 
398 MmsVariableSpecification_create(char* domainId, char* itemId);
399 
416 MmsVariableSpecification_createAlternateAccess(char* domainId, char* itemId, int32_t index,
417  char* componentName);
418 
425 void
426 MmsConnection_setLocalDetail(MmsConnection self, int32_t localDetail);
427 
428 int32_t
430 
431 
434 #endif /* MMS_CLIENT_CONNECTION_H_ */