Commit 302ab995 authored by Marcus Nordenberg's avatar Marcus Nordenberg

Add new attributes and tags to gsdml parser

New tags are however just ignored for now
parent c949de84
......@@ -154,6 +154,8 @@ static gsdml_sTag taglist[] = {
{ "RT_Class3TimingProperties", gsdml_eTag_RT_Class3TimingProperties, gsdml_eType_, 0, 0, 1},
{ "MediaRedundancy", gsdml_eTag_MediaRedundancy, gsdml_eType_, 0, 0, 1},
{ "PortSubmoduleItem", gsdml_eTag_PortSubmoduleItem, gsdml_eType_, 0, 0, 1},
{ "MAUTypeList", gsdml_eTag_MAUTypeList, gsdml_eType_, 0, 0, 1},
{ "MAUTypeItem", gsdml_eTag_MAUTypeItem, gsdml_eType_, 0, 0, 1},
{ "UseableSubmodules", gsdml_eTag_UseableSubmodules, gsdml_eType_, 0, 0, 1},
{ "SubmoduleItemRef", gsdml_eTag_SubmoduleItemRef, gsdml_eType_, 0, 0, 1},
{ "SlotList", gsdml_eTag_SlotList, gsdml_eType_, 0, 0, 1},
......@@ -242,6 +244,7 @@ static gsdml_sAttribute attrlist[] = {
{ "LLDP_NoD_Supported", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,LLDP_NoD_Supported), 0, "false"},
{ "ResetToFactoryModes", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Unsigned32, sizeof(gsdml_tUnsigned32), offsetof(gsdml_sDeviceAccessPointItem,ResetToFactoryModes), 0, "0"},
{ "SharedInputSupported", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,SharedInputSupported), 0, "false"},
{ "NumberOfDeviceAccessAR", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sDeviceAccessPointItem,ObjectUUID_LocalIndex), 0, "1"},
//
// ModuleInfo
//
......@@ -254,7 +257,7 @@ static gsdml_sAttribute attrlist[] = {
{ "Value", gsdml_eTag_HardwareRelease, gsdml_eTag_ModuleInfo, gsdml_eType_Token, sizeof(gsdml_tToken), offsetof(gsdml_sModuleInfo,HardwareRelease), 0, ""},
{ "Value", gsdml_eTag_SoftwareRelease, gsdml_eTag_ModuleInfo, gsdml_eType_Token, sizeof(gsdml_tToken), offsetof(gsdml_sModuleInfo,SoftwareRelease), 0, ""},
{ "MainFamily", gsdml_eTag_Family, gsdml_eTag_ModuleInfo, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sModuleInfo,MainFamily), 0, ""},
{ "ProductFamily", gsdml_eTag_Family, gsdml_eTag_ModuleInfo, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sModuleInfo,ProductFamily), 0, ""},
{ "ProductFamily", gsdml_eTag_Family, gsdml_eTag_ModuleInfo, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sModuleInfo,ProductFamily), 0, ""},
//
// CertificationInfo
//
......@@ -291,6 +294,8 @@ static gsdml_sAttribute attrlist[] = {
{ "Writeable_IM_Records", gsdml_eTag_VirtualSubmoduleItem, gsdml_eTag_, gsdml_eType_ValueList, sizeof(gsdml_tValueList), offsetof(gsdml_sVirtualSubmoduleItem,Writeable_IM_Records), 0, "0"},
{ "Max_iParameterSize", gsdml_eTag_VirtualSubmoduleItem, gsdml_eTag_, gsdml_eType_Unsigned32, sizeof(gsdml_tUnsigned32), offsetof(gsdml_sVirtualSubmoduleItem,Max_iParameterSize), 0, "0"},
{ "SubsysModuleDirIndex", gsdml_eTag_VirtualSubmoduleItem, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sVirtualSubmoduleItem,SubsysModuleDirIndex), 0, ""},
//Added without doc, check type and default value
{ "MayIssueProcessAlarm", gsdml_eTag_VirtualSubmoduleItem, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sVirtualSubmoduleItem,MayIssueProcessAlarm), 0, "0"},
//
// IOData
//
......@@ -458,6 +463,7 @@ static gsdml_sAttribute attrlist[] = {
{ "DCP_HelloSupported", gsdml_eTag_InterfaceSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sInterfaceSubmoduleItem,DCP_HelloSupported), 0, "false"},
{ "PTP_BoundarySupported", gsdml_eTag_InterfaceSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sInterfaceSubmoduleItem,PTP_BoundarySupported), 0, "false"},
{ "DCP_BoundarySupported", gsdml_eTag_InterfaceSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sInterfaceSubmoduleItem,DCP_BoundarySupported), 0, "false"},
{ "DelayMeasurementSupported", gsdml_eTag_InterfaceSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sInterfaceSubmoduleItem,DelayMeasurementSupported), 0, "false"},
//
// DCP_FlashOnceSignalUnit
//
......@@ -535,6 +541,14 @@ static gsdml_sAttribute attrlist[] = {
{ "IsDefaultRingport", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,IsDefaultRingport), 0, "false"},
// Added without doc, TODO check type and default value
{ "CheckMAUTypeSupported", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,CheckMAUTypeSupported), 0, "false"},
{ "CheckMAUTypeDifferenceSupported", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,CheckMAUTypeDifferenceSupported), 0, "false"},
//
// MAUTypeList
//
{ "Value", gsdml_eTag_MAUTypeItem, gsdml_eTag_MAUTypeList, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sMAUTypeItem,Value), 0, ""},
{ "AdjustSupported", gsdml_eTag_MAUTypeItem, gsdml_eTag_MAUTypeList, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sMAUTypeItem,AdjustSupported), 0, "false"},
//
// DeviceAccessPointItem-ApplicationRelations
//
......@@ -3387,7 +3401,8 @@ void gsdml_DeviceAccessPointItem::print( int ind)
"%s MaxSupportedRecordSize=\"%u\"\n"
"%s PowerOnToCommReady=\"%u\"\n"
"%s ParameterizationSpeedSupported=\"%d\"\n"
"%s NameOfStationNotTransferable=\"%d\"/>\n",
"%s NameOfStationNotTransferable=\"%d\"\n"
"%s NumberOfDeviceAccessAR=\"%d\"/>\n",
is,
is, Body.ID,
is, Body.PhysicalSlots.str,
......@@ -3408,7 +3423,8 @@ void gsdml_DeviceAccessPointItem::print( int ind)
is, Body.MaxSupportedRecordSize,
is, Body.PowerOnToCommReady,
is, Body.ParameterizationSpeedSupported,
is, Body.NameOfStationNotTransferable);
is, Body.NameOfStationNotTransferable,
is, Body.NumberOfDeviceAccessAR);
if ( ModuleInfo)
ModuleInfo->print( ind + 2);
......@@ -3906,7 +3922,8 @@ void gsdml_VirtualSubmoduleItem::print( int ind)
"%s PROFISafeSupported=\"%u\"\n"
"%s Writeable_IM_Records=\"%s\"\n"
"%s Max_iParameterSize=\"%u\"\n"
"%s SubsysModuleDirIndex=\"%hu\">\n",
"%s SubsysModuleDirIndex=\"%hu\"\n"
"%s MayIssueProcessAlarm=\"%hu\">\n",
is,
is, Body.ID,
is, Body.SubmoduleIdentNumber,
......@@ -3915,7 +3932,8 @@ void gsdml_VirtualSubmoduleItem::print( int ind)
is, Body.PROFIsafeSupported,
is, Body.Writeable_IM_Records.str,
is, Body.Max_iParameterSize,
is, Body.SubsysModuleDirIndex);
is, Body.SubsysModuleDirIndex,
is, Body.MayIssueProcessAlarm);
if ( IOData)
IOData->print( ind + 2);
......@@ -4086,7 +4104,8 @@ void gsdml_InterfaceSubmoduleItem::print( int ind)
"%s NetworkComponentDiagnosisSupported=\"%u\"\n"
"%s DCP_HelloSupported=\"%u\"\n"
"%s PTP_BoundarySupported=\"%u\"\n"
"%s DCP_BoundarySupported=\"%u\">\n",
"%s DCP_BoundarySupported=\"%u\"\n"
"%s DelayMeasurementSupported=\"%u\">\n",
is,
is, Body.SubslotNumber,
is, Body.TextId.ref,
......@@ -4100,7 +4119,8 @@ void gsdml_InterfaceSubmoduleItem::print( int ind)
is, Body.NetworkComponentDiagnosisSupported,
is, Body.DCP_HelloSupported,
is, Body.PTP_BoundarySupported,
is, Body.DCP_BoundarySupported);
is, Body.DCP_BoundarySupported,
is, Body.DelayMeasurementSupported);
if ( General)
General->print( ind + 2);
......@@ -4136,7 +4156,9 @@ void gsdml_PortSubmoduleItem::print( int ind)
"%s LinkStateDianosisCapability=\"%s\"\n"
"%s PowerBudgetControlSupported=\"%u\"\n"
"%s SupportsRingportConfig=\"%u\"\n"
"%s IsDefauleRingport=\"%u\">\n",
"%s IsDefauleRingport=\"%u\"\n"
"%s CheckMAUTTypeSupported=\"%u\"\n"
"%s CheckMAUTTypeDifferenceSupported=\"%u\">\n",
is,
is, Body.SubslotNumber,
is, Body.TextId.ref,
......@@ -4150,7 +4172,9 @@ void gsdml_PortSubmoduleItem::print( int ind)
is, Body.LinkStateDiagnosisCapability,
is, Body.PowerBudgetControlSupported,
is, Body.SupportsRingportConfig,
is, Body.IsDefaultRingport);
is, Body.IsDefaultRingport,
is, Body.CheckMAUTypeSupported,
is, Body.CheckMAUTypeDifferenceSupported);
if ( RecordDataList)
RecordDataList->print( ind + 2);
......
......@@ -202,6 +202,8 @@ typedef enum {
gsdml_eTag_RT_Class3TimingProperties,
gsdml_eTag_MediaRedundancy,
gsdml_eTag_PortSubmoduleItem,
gsdml_eTag_MAUTypeList,
gsdml_eTag_MAUTypeItem,
gsdml_eTag_UseableSubmodules,
gsdml_eTag_SubmoduleItemRef,
gsdml_eTag_SlotList,
......@@ -414,6 +416,11 @@ class gsdml_ModuleInfo {
void print( int ind);
};
typedef struct {
gsdml_tUnsigned16 Value;
gsdml_tBoolean AdjustSupported;
} gsdml_sMAUTypeItem;
typedef struct {
gsdml_tString ConformanceClass;
gsdml_tString ApplicationClass;
......@@ -746,6 +753,7 @@ typedef struct {
gsdml_tValueList Writeable_IM_Records;
gsdml_tUnsigned32 Max_iParameterSize;
gsdml_tUnsigned16 SubsysModuleDirIndex;
gsdml_tUnsigned16 MayIssueProcessAlarm;
} gsdml_sVirtualSubmoduleItem;
class gsdml_VirtualSubmoduleItem {
......@@ -914,6 +922,7 @@ typedef struct {
gsdml_tBoolean DCP_HelloSupported;
gsdml_tBoolean PTP_BoundarySupported;
gsdml_tBoolean DCP_BoundarySupported;
gsdml_tBoolean DelayMeasurementSupported;
} gsdml_sInterfaceSubmoduleItem;
class gsdml_InterfaceSubmoduleItem {
......@@ -950,6 +959,7 @@ typedef struct {
gsdml_tBoolean SupportsRingportConfig;
gsdml_tBoolean IsDefaultRingport;
gsdml_tBoolean CheckMAUTypeSupported;
gsdml_tBoolean CheckMAUTypeDifferenceSupported;
} gsdml_sPortSubmoduleItem;
class gsdml_PortSubmoduleItem {
......@@ -979,7 +989,7 @@ typedef struct {
gsdml_tUnsigned16 AR_BlockVersion;
gsdml_tUnsigned16 IOCR_BlockVersion;
gsdml_tUnsigned16 AlarmCR_BlockVersion;
gsdml_tUnsigned16 SubmoduleDataBlockVersion;;
gsdml_tUnsigned16 SubmoduleDataBlockVersion;
} gsdml_sDeviceAccessPointItem_ApplicationRelations;
class gsdml_DeviceAccessPointItem_ApplicationRelations {
......@@ -1096,6 +1106,7 @@ typedef struct {
gsdml_tBoolean LLDP_NoD_Supported;
gsdml_tUnsigned32 ResetToFactoryModes;
gsdml_tBoolean SharedInputSupported;
gsdml_tUnsigned16 NumberOfDeviceAccessAR;
} gsdml_sDeviceAccessPointItem;
class gsdml_DeviceAccessPointItem {
......
......@@ -3184,6 +3184,11 @@ int ItemPnInterfaceSubmodule::open_children( GsdmlAttrNav *attrnav, double x, do
pwr_eType_Boolean, sizeof(pwr_tBoolean), 0, 0,
p, 1, node, flow_eDest_IntoLast);
p = (char *) &ii->Body.DelayMeasurementSupported;
new ItemPnBase( attrnav, "DelayMeasurementSupported", "LocalGsdmlAttr",
pwr_eType_Boolean, sizeof(pwr_tBoolean), 0, 0,
p, 1, node, flow_eDest_IntoLast);
gsdml_RecordDataList *rl = ii->RecordDataList;
if ( rl) {
unsigned int record_index = 0;
......@@ -3299,6 +3304,16 @@ int ItemPnPortSubmodule::open_children( GsdmlAttrNav *attrnav, double x, double
pwr_eType_Boolean, sizeof(pwr_tBoolean), 0, 0,
p, 1, node, flow_eDest_IntoLast);
p = (char *) &pi->Body.CheckMAUTypeSupported;
new ItemPnBase( attrnav, "CheckMAUTypeSupported", "LocalGsdmlAttr",
pwr_eType_Boolean, sizeof(pwr_tBoolean), 0, 0,
p, 1, node, flow_eDest_IntoLast);
p = (char *) &pi->Body.CheckMAUTypeDifferenceSupported;
new ItemPnBase( attrnav, "CheckMAUTypeDifferenceSupported", "LocalGsdmlAttr",
pwr_eType_Boolean, sizeof(pwr_tBoolean), 0, 0,
p, 1, node, flow_eDest_IntoLast);
gsdml_RecordDataList *rl = pi->RecordDataList;
if ( rl) {
GsdmlDataRecord *dr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment