Skip to content

Commit

Permalink
Add extra attributes to the XDD to permit storing of the storage loca…
Browse files Browse the repository at this point in the history
…tion 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.
  • Loading branch information
robincornelius committed Feb 1, 2019
1 parent e63ed44 commit f4e2b11
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions libEDSsharp/CanOpenXDD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ public ISO15745ProfileContainer convert(EDSsharp eds)
AppLayer.CANopenObjectList.CANopenObject[count].accessTypeSpecified = true;

AppLayer.CANopenObjectList.CANopenObject[count].denotation = od.denotation;
AppLayer.CANopenObjectList.CANopenObject[count].edseditor_extenstion_storagelocation = od.StorageLocation;

if (od.subobjects != null && od.subobjects.Count > 0)
{
Expand Down Expand Up @@ -874,6 +875,9 @@ public EDSsharp convert(ISO15745ProfileContainer container)
if (obj3.denotation != null)
entry.denotation = obj3.denotation;

if (obj3.edseditor_extenstion_storagelocation != null)
entry.StorageLocation = obj3.edseditor_extenstion_storagelocation;

//FIXME im not sure this is correct
if (obj3.objFlags != null)
entry.ObjFlags = obj3.objFlags[0];
Expand Down Expand Up @@ -2727,6 +2731,8 @@ public partial class CANopenObjectListCANopenObject

private string denotationField;

private string edseditor_extenstion_storagelocationField;

private CANopenObjectListCANopenObjectPDOmapping pDOmappingField;

private bool pDOmappingFieldSpecified;
Expand Down Expand Up @@ -2907,6 +2913,20 @@ public string denotation
}
}

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string edseditor_extenstion_storagelocation
{
get
{
return this.edseditor_extenstion_storagelocationField;
}
set
{
this.edseditor_extenstion_storagelocationField = value;
}
}

/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public CANopenObjectListCANopenObjectPDOmapping PDOmapping
Expand Down Expand Up @@ -3185,6 +3205,7 @@ public string denotation
}
}


/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public CANopenObjectListCANopenObjectCANopenSubObjectPDOmapping PDOmapping
Expand Down

0 comments on commit f4e2b11

Please sign in to comment.