libiec61850  1.5.3
mms_type_spec.h
Go to the documentation of this file.
1 /*
2  * mms_type_spec.h
3  *
4  * MmsTypeSpecfication objects are used to describe simple and complex MMS types.
5  * Complex types are arrays or structures of simple and complex types.
6  * They also represent MMS NamedVariables.
7  *
8  * Copyright 2013-2019 Michael Zillgith
9  *
10  * This file is part of libIEC61850.
11  *
12  * libIEC61850 is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * libIEC61850 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
24  *
25  * See COPYING file for the complete license text.
26  */
27 
28 #ifndef MMS_TYPE_SPEC_H_
29 #define MMS_TYPE_SPEC_H_
30 
31 #include "libiec61850_common_api.h"
32 #include "mms_common.h"
33 #include "mms_types.h"
34 #include "linked_list.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
55 LIB61850_API void
56 MmsVariableSpecification_destroy(MmsVariableSpecification* self);
57 
71 LIB61850_API MmsValue*
72 MmsVariableSpecification_getChildValue(MmsVariableSpecification* self, MmsValue* value, const char* childId);
73 
82 LIB61850_API MmsVariableSpecification*
83 MmsVariableSpecification_getNamedVariableRecursive(MmsVariableSpecification* self, const char* nameId);
84 
92 LIB61850_API MmsType
93 MmsVariableSpecification_getType(MmsVariableSpecification* self);
94 
103 LIB61850_API bool
104 MmsVariableSpecification_isValueOfType(MmsVariableSpecification* self, const MmsValue* value);
105 
116 LIB61850_API const char*
117 MmsVariableSpecification_getName(MmsVariableSpecification* self);
118 
119 LIB61850_API LinkedList /* <char*> */
120 MmsVariableSpecification_getStructureElements(MmsVariableSpecification* self);
121 
132 LIB61850_API int
133 MmsVariableSpecification_getSize(MmsVariableSpecification* self);
134 
135 LIB61850_API MmsVariableSpecification*
136 MmsVariableSpecification_getChildSpecificationByIndex(MmsVariableSpecification* self, int index);
137 
147 LIB61850_API MmsVariableSpecification*
148 MmsVariableSpecification_getChildSpecificationByName(MmsVariableSpecification* self, const char* name, int* index);
149 
150 LIB61850_API MmsVariableSpecification*
152 
153 LIB61850_API int
154 MmsVariableSpecification_getExponentWidth(MmsVariableSpecification* self);
155 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif /* MMS_TYPE_SPEC_H_ */
struct sMmsValue MmsValue
Definition: mms_value.h:68
LIB61850_API void MmsVariableSpecification_destroy(MmsVariableSpecification *self)
Delete MmsTypeSpecification object (recursive).
LIB61850_API const char * MmsVariableSpecification_getName(MmsVariableSpecification *self)
get the name of the variable
LIB61850_API LinkedList MmsVariableSpecification_getStructureElements(MmsVariableSpecification *self)
LIB61850_API int MmsVariableSpecification_getExponentWidth(MmsVariableSpecification *self)
LIB61850_API MmsValue * MmsVariableSpecification_getChildValue(MmsVariableSpecification *self, MmsValue *value, const char *childId)
Get the corresponding child of value according to childId.
LIB61850_API MmsVariableSpecification * MmsVariableSpecification_getNamedVariableRecursive(MmsVariableSpecification *self, const char *nameId)
Get the child of self specified by its relative name.
LIB61850_API int MmsVariableSpecification_getSize(MmsVariableSpecification *self)
returns the number of elements if the type is a complex type (structure, array) or the bit size of in...
LIB61850_API MmsVariableSpecification * MmsVariableSpecification_getChildSpecificationByName(MmsVariableSpecification *self, const char *name, int *index)
return the MmsVariableSpecification of a structure element with the given name
LIB61850_API bool MmsVariableSpecification_isValueOfType(MmsVariableSpecification *self, const MmsValue *value)
Check if the value has exactly the same type as this variable specfication.
LIB61850_API MmsVariableSpecification * MmsVariableSpecification_getChildSpecificationByIndex(MmsVariableSpecification *self, int index)
LIB61850_API MmsType MmsVariableSpecification_getType(MmsVariableSpecification *self)
get the MMS type of the variable
LIB61850_API MmsVariableSpecification * MmsVariableSpecification_getArrayElementSpecification(MmsVariableSpecification *self)
MmsType
Definition: mms_common.h:106