36 variable "index" > «ns:HexDecValue(Index/text())» |
36 variable "index" > «ns:HexDecValue(Index/text())» |
37 variable "entry_name" > «ns:EntryName(Name)» |
37 variable "entry_name" > «ns:EntryName(Name)» |
38 choose { |
38 choose { |
39 when "$index >= $min_index and $index <= $max_index" { |
39 when "$index >= $min_index and $index <= $max_index" { |
40 variable "datatype_name" > «Type/text()» |
40 variable "datatype_name" > «Type/text()» |
|
41 variable "default_value" > «Info/DefaultData/text()» |
41 choose { |
42 choose { |
42 when "ancestor::Dictionary/child::DataTypes/DataType[Name/text()=$datatype_name][SubItem]" { |
43 when "ancestor::Dictionary/child::DataTypes/DataType[Name/text()=$datatype_name][SubItem]" { |
43 apply "ancestor::Dictionary/child::DataTypes/DataType[Name/text()=$datatype_name][SubItem]" { |
44 apply "ancestor::Dictionary/child::DataTypes/DataType[Name/text()=$datatype_name][SubItem]" { |
44 with "index" > «$index» |
45 with "index" > «$index» |
45 with "entry_name" > «$entry_name» |
46 with "entry_name" > «$entry_name» |
|
47 with "sub_default_value" > «Info/SubItem/Info/DefaultData/text()» |
46 } |
48 } |
47 } |
49 } |
48 otherwise { |
50 otherwise { |
49 variable "subindex" > 0 |
51 variable "subindex" > 0 |
|
52 variable "sub_entry_flag" > 0 |
50 variable "entry" { |
53 variable "entry" { |
51 > «ns:AddEntry($index, $subindex, $entry_name, $datatype_name, BitSize/text(), Flags/Access/text(), Flags/PdoMapping/text())» |
54 > «ns:AddEntry($index, $subindex, $entry_name, $datatype_name, BitSize/text(), Flags/Access/text(), Flags/PdoMapping/text(), $default_value, $sub_entry_flag)» |
52 } |
55 } |
53 } |
56 } |
54 } |
57 } |
55 } |
58 } |
56 } |
59 } |
57 } |
60 } |
58 |
61 |
59 template "DataType" { |
62 template "DataType" { |
60 param "index"; |
63 param "index"; |
61 param "entry_name"; |
64 param "entry_name"; |
|
65 param "sub_default_value" |
62 foreach "SubItem" { |
66 foreach "SubItem" { |
63 variable "subindex" > «ns:HexDecValue(SubIdx/text())» |
67 variable "subindex" > «ns:HexDecValue(SubIdx/text())» |
64 variable "subentry_name" > «$entry_name» - «ns:EntryName(DisplayName, Name/text())» |
68 variable "subentry_name" > «$entry_name» - «ns:EntryName(DisplayName, Name/text())» |
|
69 variable "sub_entry_flag" > 1 |
65 variable "entry" { |
70 variable "entry" { |
66 > «ns:AddEntry($index, $subindex, $subentry_name, Type/text(), BitSize/text(), Flags/Access/text(), Flags/PdoMapping/text())» |
71 > «ns:AddEntry($index, $subindex, $subentry_name, Type/text(), BitSize/text(), Flags/Access/text(), Flags/PdoMapping/text(), $sub_default_value, $sub_entry_flag)» |
67 } |
72 } |
68 } |
73 } |
69 } |
74 } |
70 |
75 |
71 function "pdo_entries" { |
76 function "pdo_entries" { |