libIEC61850  0.8.4
Open-source IEC 61850 MMS/GOOSE server and client library
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mms_common.h
Go to the documentation of this file.
1 /*
2  * mms_common.h
3  *
4  * Copyright 2013, 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 #include "libiec61850_common_api.h"
25 
26 #ifndef MMS_COMMON_H_
27 #define MMS_COMMON_H_
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 //TODO move to other file
34 #define DEFAULT_MAX_SERV_OUTSTANDING_CALLING 5
35 #define DEFAULT_MAX_SERV_OUTSTANDING_CALLED 5
36 #define DEFAULT_DATA_STRUCTURE_NESTING_LEVEL 10
37 #define DEFAULT_MAX_PDU_SIZE 65000
38 
39 //TODO move to other file - not required in API
40 typedef enum
41 {
44 
52 typedef enum
53 {
54  /* generic error codes */
63 
64  /* confirmed error PDU codes */
66 
68 
76 
79 
81 
83 
85 
91  MMS_ERROR_ACCESS_OBJECT_VALUE_INVALID = 85, /* for DataAccessError 11 */
92  MMS_ERROR_ACCESS_TEMPORARILY_UNAVAILABLE = 86, /* for DataAccessError 2 */
93 
104 
105  /* reject codes */
112 
113 } MmsError;
114 
115 typedef enum ATTRIBUTE_PACKED
116 {
137  MMS_BCD = 11,
145 } MmsType;
146 
147 typedef struct sMmsDomain MmsDomain;
148 
149 typedef struct sMmsAccessSpecifier
150 {
151  MmsDomain* domain;
153  int arrayIndex; /* -1 --> no index present / ignore index */
156 
157 typedef struct
158 {
159  char* domainId;
160  char* itemId;
161  int32_t arrayIndex; /* -1 --> no index present / ignore index */
164 
165 typedef struct sMmsNamedVariableList* MmsNamedVariableList;
166 typedef struct sMmsAccessSpecifier* MmsNamedVariableListEntry;
167 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif /* MMS_COMMON_H_ */