libIEC61850  1.0.1
Open-source IEC 61850 MMS/GOOSE/SV server and client library
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, 2014 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 "mms_common.h"
32 #include "mms_types.h"
33 #include "linked_list.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
54 void
55 MmsVariableSpecification_destroy(MmsVariableSpecification* self);
56 
70 MmsValue*
71 MmsVariableSpecification_getChildValue(MmsVariableSpecification* self, MmsValue* value, const char* childId);
72 
81 MmsVariableSpecification*
82 MmsVariableSpecification_getNamedVariableRecursive(MmsVariableSpecification* self, const char* nameId);
83 
91 MmsType
92 MmsVariableSpecification_getType(MmsVariableSpecification* self);
93 
104 const char*
105 MmsVariableSpecification_getName(MmsVariableSpecification* self);
106 
107 LinkedList /* <char*> */
108 MmsVariableSpecification_getStructureElements(MmsVariableSpecification* self);
109 
117 int
118 MmsVariableSpecification_getSize(MmsVariableSpecification* self);
119 
120 MmsVariableSpecification*
121 MmsVariableSpecification_getChildSpecificationByIndex(MmsVariableSpecification* self, int index);
122 
123 MmsVariableSpecification*
124 MmsVariableSpecification_getArrayElementSpecification(MmsVariableSpecification* self);
125 
126 int
127 MmsVariableSpecification_getExponentWidth(MmsVariableSpecification* self);
128 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* MMS_TYPE_SPEC_H_ */
const char * MmsVariableSpecification_getName(MmsVariableSpecification *self)
get the name of the variable
MmsType MmsVariableSpecification_getType(MmsVariableSpecification *self)
get the MMS type of the variable
void MmsVariableSpecification_destroy(MmsVariableSpecification *self)
Delete MmsTypeSpecification object (recursive).
MmsVariableSpecification * MmsVariableSpecification_getArrayElementSpecification(MmsVariableSpecification *self)
LinkedList MmsVariableSpecification_getStructureElements(MmsVariableSpecification *self)
MmsVariableSpecification * MmsVariableSpecification_getChildSpecificationByIndex(MmsVariableSpecification *self, int index)
int MmsVariableSpecification_getExponentWidth(MmsVariableSpecification *self)
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...
MmsVariableSpecification * MmsVariableSpecification_getNamedVariableRecursive(MmsVariableSpecification *self, const char *nameId)
Get the child of self specified by its relative name.
MmsValue * MmsVariableSpecification_getChildValue(MmsVariableSpecification *self, MmsValue *value, const char *childId)
Get the corresponding child of value according to childId.
struct sMmsValue MmsValue
Definition: mms_value.h:68
MmsType
Definition: mms_common.h:104