Skip to content

Commit f4e2b11

Browse files
Add extra attributes to the XDD to permit storing of the storage location with in the XDD format Fixes #139. It appears there are no usable extension attributes or other fields that can be used so i've just added a new attribute. This *may* create a warning in other editors when loading a file as this is officially an unsupported attribute. But really they should just ignore it.
1 parent e63ed44 commit f4e2b11

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎libEDSsharp/CanOpenXDD.cs‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ public ISO15745ProfileContainer convert(EDSsharp eds)
381381
AppLayer.CANopenObjectList.CANopenObject[count].accessTypeSpecified = true;
382382

383383
AppLayer.CANopenObjectList.CANopenObject[count].denotation = od.denotation;
384+
AppLayer.CANopenObjectList.CANopenObject[count].edseditor_extenstion_storagelocation = od.StorageLocation;
384385

385386
if (od.subobjects != null && od.subobjects.Count > 0)
386387
{
@@ -874,6 +875,9 @@ public EDSsharp convert(ISO15745ProfileContainer container)
874875
if (obj3.denotation != null)
875876
entry.denotation = obj3.denotation;
876877

878+
if (obj3.edseditor_extenstion_storagelocation != null)
879+
entry.StorageLocation = obj3.edseditor_extenstion_storagelocation;
880+
877881
//FIXME im not sure this is correct
878882
if (obj3.objFlags != null)
879883
entry.ObjFlags = obj3.objFlags[0];
@@ -2727,6 +2731,8 @@ public partial class CANopenObjectListCANopenObject
27272731

27282732
private string denotationField;
27292733

2734+
private string edseditor_extenstion_storagelocationField;
2735+
27302736
private CANopenObjectListCANopenObjectPDOmapping pDOmappingField;
27312737

27322738
private bool pDOmappingFieldSpecified;
@@ -2907,6 +2913,20 @@ public string denotation
29072913
}
29082914
}
29092915

2916+
/// <remarks/>
2917+
[System.Xml.Serialization.XmlAttributeAttribute()]
2918+
public string edseditor_extenstion_storagelocation
2919+
{
2920+
get
2921+
{
2922+
return this.edseditor_extenstion_storagelocationField;
2923+
}
2924+
set
2925+
{
2926+
this.edseditor_extenstion_storagelocationField = value;
2927+
}
2928+
}
2929+
29102930
/// <remarks/>
29112931
[System.Xml.Serialization.XmlAttributeAttribute()]
29122932
public CANopenObjectListCANopenObjectPDOmapping PDOmapping
@@ -3185,6 +3205,7 @@ public string denotation
31853205
}
31863206
}
31873207

3208+
31883209
/// <remarks/>
31893210
[System.Xml.Serialization.XmlAttributeAttribute()]
31903211
public CANopenObjectListCANopenObjectCANopenSubObjectPDOmapping PDOmapping

0 commit comments

Comments
 (0)