@@ -59,6 +59,10 @@ def import_eds(source, node_id):
5959 # If the keyword ObjectType is missing, this is regarded as
6060 # "ObjectType=0x7" (=VAR).
6161 object_type = VAR
62+ try :
63+ storage_location = eds .get (section , "StorageLocation" )
64+ except NoOptionError :
65+ storage_location = None
6266
6367 if object_type in (VAR , DOMAIN ):
6468 var = build_variable (eds , section , node_id , index )
@@ -70,12 +74,15 @@ def import_eds(source, node_id):
7074 last_subindex .data_type = objectdictionary .UNSIGNED8
7175 arr .add_member (last_subindex )
7276 arr .add_member (build_variable (eds , section , node_id , index , 1 ))
77+ arr .storage_location = storage_location
7378 od .add_object (arr )
7479 elif object_type == ARR :
7580 arr = objectdictionary .Array (name , index )
81+ arr .storage_location = storage_location
7682 od .add_object (arr )
7783 elif object_type == RECORD :
7884 record = objectdictionary .Record (name , index )
85+ record .storage_location = storage_location
7986 od .add_object (record )
8087
8188 continue
@@ -154,6 +161,10 @@ def build_variable(eds, section, node_id, index, subindex=0):
154161 """
155162 name = eds .get (section , "ParameterName" )
156163 var = objectdictionary .Variable (name , index , subindex )
164+ try :
165+ var .storage_location = eds .get (section , "StorageLocation" )
166+ except NoOptionError :
167+ var .storage_location = None
157168 var .data_type = int (eds .get (section , "DataType" ), 0 )
158169 var .access_type = eds .get (section , "AccessType" ).lower ()
159170 if var .data_type > 0x1B :
0 commit comments