libIEC61850
Open-source IEC 61850 MMS server and client library
Main Page
Modules
Data Structures
Files
Downloads
Contact
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
mms
iso_mms
client
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
{
44
MMS_CE_NO_ERROR
,
45
MMS_CE_REQUEST_FAILED
,
46
MMS_CE_REQUEST_TIMEOUT
,
47
MMS_CE_INVOKE_ID_MISMATCH
48
}
MmsClientError
;
49
53
typedef
struct
sMmsConnectionParameters {
54
int
maxServOutstandingCalling
;
55
int
maxServOutstandingCalled
;
56
int
dataStructureNestingLevel
;
57
int
maxPduSize
;
/* local detail */
58
}
MmsConnectionParameters
;
59
60
typedef
struct
sMmsVariableSpecification {
61
char
*
domainId
;
62
char
*
itemId
;
63
int32_t
arrayIndex
;
64
char
*
componentName
;
65
}
MmsVariableSpecification
;
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
85
MmsConnection
86
MmsConnection_create
();
87
98
void
99
MmsConnection_setInformationReportHandler
(
MmsConnection
self
,
MmsInformationReportHandler
handler,
100
void
* parameter);
101
108
void
109
MmsConnection_setConnectionParameters
(
MmsConnection
self
,
MmsConnectionParameters
params);
110
117
void
118
MmsConnection_setIsoConnectionParameters
(
MmsConnection
self
, IsoConnectionParameters* params);
119
125
void
126
MmsConnection_destroy
(
MmsConnection
self
);
127
133
MmsClientError
134
MmsConnection_getError
(
MmsConnection
self
);
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*> */
165
MmsConnection_getDomainNames
(
MmsConnection
self
);
166
177
LinkedList
/* <char*> */
178
MmsConnection_getDomainVariableNames
(
MmsConnection
self
,
char
* domainId);
179
190
LinkedList
/* <char*> */
191
MmsConnection_getDomainVariableListNames
(
MmsConnection
self
,
char
* domainId);
192
202
LinkedList
/* <char*> */
203
MmsConnection_getVariableListNamesAssociationSpecific
(
MmsConnection
self
);
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*
248
MmsConnection_readMultipleVariables
(
MmsConnection
self
,
char
* domainId,
249
LinkedList
/*<char*>*/
items);
250
261
MmsIndication
262
MmsConnection_writeVariable
(
MmsConnection
self
,
263
char
* domainId,
char
* itemId,
264
MmsValue* value);
265
275
MmsTypeSpecification*
276
MmsConnection_getVariableAccessAttributes
(
MmsConnection
self
,
277
char
* domainId,
char
* itemId);
278
291
MmsValue*
292
MmsConnection_readNamedVariableListValues
(
MmsConnection
self
,
char
* domainId,
char
* listName,
293
bool
specWithResult);
294
295
307
MmsValue*
308
MmsConnection_readNamedVariableListValuesAssociationSpecific
(
MmsConnection
self
,
char
* listName,
309
bool
specWithResult);
310
321
MmsIndication
322
MmsConnection_defineNamedVariableList
(
MmsConnection
self
,
char
* domainId,
char
* listName,
323
LinkedList variableSpecs);
324
325
335
MmsIndication
/* NEW */
336
MmsConnection_defineNamedVariableListAssociationSpecific
(
MmsConnection
self
,
char
* listName,
337
LinkedList variableSpecs);
338
350
LinkedList
/* <MmsVariableSpecification*> */
351
MmsConnection_readNamedVariableListDirectory
(
MmsConnection
self
,
char
* domainId,
char
* listName,
bool
* deletable);
352
361
LinkedList
/* <MmsVariableSpecification*> */
/* NEW */
362
MmsConnection_readAssociationSpecificNamedVariableListDirectory
(
MmsConnection
self
,
char
* listName);
363
373
MmsIndication
374
MmsConnection_deleteNamedVariableList
(
MmsConnection
self
,
char
* domainId,
char
* listName);
375
384
MmsIndication
/* NEW */
385
MmsConnection_deleteAssociationSpecificNamedVariableList
(
MmsConnection
self
,
char
* listName);
386
397
MmsVariableSpecification
*
398
MmsVariableSpecification_create
(
char
* domainId,
char
* itemId);
399
415
MmsVariableSpecification
*
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
429
MmsConnection_getLocalDetail
(
MmsConnection
self
);
430
431
434
#endif
/* MMS_CLIENT_CONNECTION_H_ */
Generated on Tue May 14 2013 23:20:13 for libIEC61850 by
1.8.3.1