Commit c7c7d0f2 authored by Claes Sjofors's avatar Claes Sjofors

Profinet configurator, new gsdml tags and attributes added

parent 6d515efe
...@@ -188,6 +188,7 @@ static gsdml_sTag taglist[] = { ...@@ -188,6 +188,7 @@ static gsdml_sTag taglist[] = {
{ "PrimaryLanguage", gsdml_eTag_PrimaryLanguage, gsdml_eType_, 0, 0, 1}, { "PrimaryLanguage", gsdml_eTag_PrimaryLanguage, gsdml_eType_, 0, 0, 1},
{ "Language", gsdml_eTag_Language, gsdml_eType_, 0, 0, 1}, { "Language", gsdml_eTag_Language, gsdml_eType_, 0, 0, 1},
{ "Text", gsdml_eTag_Text, gsdml_eType_, 0, 0, 1}, { "Text", gsdml_eTag_Text, gsdml_eType_, 0, 0, 1},
{ "CertificationInfo", gsdml_eTag_CertificationInfo, gsdml_eType_, 0, 0, 1},
{ "", gsdml_eTag_, gsdml_eType_, 0}}; { "", gsdml_eTag_, gsdml_eType_, 0}};
static gsdml_sAttribute attrlist[] = { static gsdml_sAttribute attrlist[] = {
...@@ -235,6 +236,12 @@ static gsdml_sAttribute attrlist[] = { ...@@ -235,6 +236,12 @@ static gsdml_sAttribute attrlist[] = {
{ "NameOfStationNotTransferable", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,NameOfStationNotTransferable), 0, "false"}, { "NameOfStationNotTransferable", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,NameOfStationNotTransferable), 0, "false"},
{ "DeviceAccessSupported", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,DeviceAccessSupported), 0, "false"}, { "DeviceAccessSupported", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,DeviceAccessSupported), 0, "false"},
{ "SharedDeviceSupported", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,SharedDeviceSupported), 0, "false"}, { "SharedDeviceSupported", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,SharedDeviceSupported), 0, "false"},
// Added without doc, TODO check type and default value
{ "PNIO_Version", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sDeviceAccessPointItem,PNIO_Version), 0, "V1.0"},
{ "CheckDeviceID_Allowed", gsdml_eTag_DeviceAccessPointItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sDeviceAccessPointItem,CheckDeviceID_Allowed), 0, "false"},
{ "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"},
// //
// ModuleInfo // ModuleInfo
// //
...@@ -249,6 +256,13 @@ static gsdml_sAttribute attrlist[] = { ...@@ -249,6 +256,13 @@ static gsdml_sAttribute attrlist[] = {
{ "MainFamily", gsdml_eTag_Family, gsdml_eTag_ModuleInfo, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sModuleInfo,MainFamily), 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
//
// Added without doc, TODO check type and default value
{ "ConformanceClass", gsdml_eTag_CertificationInfo, gsdml_eTag_, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sCertificationInfo,ConformanceClass), 0, ""},
{ "ApplicationClass", gsdml_eTag_CertificationInfo, gsdml_eTag_, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sCertificationInfo,ApplicationClass), 0, ""},
{ "NetloadClass", gsdml_eTag_CertificationInfo, gsdml_eTag_, gsdml_eType_String, sizeof(gsdml_tString80), offsetof(gsdml_sCertificationInfo,NetloadClass), 0, ""},
//
// SubslotItem // SubslotItem
// //
{ "SubslotNumber", gsdml_eTag_SubslotItem, gsdml_eTag_SubslotList, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sSubslotItem,SubslotNumber), 0, ""}, { "SubslotNumber", gsdml_eTag_SubslotItem, gsdml_eTag_SubslotList, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sSubslotItem,SubslotNumber), 0, ""},
...@@ -453,6 +467,9 @@ static gsdml_sAttribute attrlist[] = { ...@@ -453,6 +467,9 @@ static gsdml_sAttribute attrlist[] = {
// //
{ "MaxBridgeDelay", gsdml_eTag_RT_Class3Properties, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sRT_Class3Properties,MaxBridgeDelay), 0, ""}, { "MaxBridgeDelay", gsdml_eTag_RT_Class3Properties, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sRT_Class3Properties,MaxBridgeDelay), 0, ""},
{ "MaxNumberIR_FrameData", gsdml_eTag_RT_Class3Properties, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sRT_Class3Properties,MaxNumberIR_FrameData), 0, ""}, { "MaxNumberIR_FrameData", gsdml_eTag_RT_Class3Properties, gsdml_eTag_, gsdml_eType_Unsigned16, sizeof(gsdml_tUnsigned16), offsetof(gsdml_sRT_Class3Properties,MaxNumberIR_FrameData), 0, ""},
// Added without spec
{ "StartupMode", gsdml_eTag_RT_Class3Properties, gsdml_eTag_, gsdml_eType_String, sizeof(gsdml_tString), offsetof(gsdml_sRT_Class3Properties,StartupMode), 0, ""},
{ "ForwardingMode", gsdml_eTag_RT_Class3Properties, gsdml_eTag_, gsdml_eType_String, sizeof(gsdml_tString), offsetof(gsdml_sRT_Class3Properties,ForwardingMode), 0, ""},
// //
// SynchronisationMode // SynchronisationMode
// //
...@@ -474,6 +491,8 @@ static gsdml_sAttribute attrlist[] = { ...@@ -474,6 +491,8 @@ static gsdml_sAttribute attrlist[] = {
{ "IOCR_BlockVersion", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_Unsigned16, 0, 0, 1, ""}, { "IOCR_BlockVersion", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_Unsigned16, 0, 0, 1, ""},
{ "AlarmCR_BlockVersion", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_Unsigned16, 0, 0, 1, ""}, { "AlarmCR_BlockVersion", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_Unsigned16, 0, 0, 1, ""},
{ "SubmoduleDataBlockVersion", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_Unsigned16, 0, 0, 1, ""}, { "SubmoduleDataBlockVersion", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_Unsigned16, 0, 0, 1, ""},
// Added without doc, TODO check type and default value
{ "StartupMode", gsdml_eTag_ApplicationRelations, gsdml_eTag_InterfaceSubmoduleItem, gsdml_eType_String, 0, 0, 1, ""},
// //
// TimingProperties // TimingProperties
// //
...@@ -493,6 +512,10 @@ static gsdml_sAttribute attrlist[] = { ...@@ -493,6 +512,10 @@ static gsdml_sAttribute attrlist[] = {
// //
{ "RT_MediaRedundancySupported", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sMediaRedundancy,RT_MediaRedundancySupported), 0, "true"}, { "RT_MediaRedundancySupported", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sMediaRedundancy,RT_MediaRedundancySupported), 0, "true"},
{ "SupportedRole", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_TokenList, sizeof(gsdml_tTokenList), offsetof(gsdml_sMediaRedundancy,SupportedRole), 0, "Client"}, { "SupportedRole", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_TokenList, sizeof(gsdml_tTokenList), offsetof(gsdml_sMediaRedundancy,SupportedRole), 0, "Client"},
// Added without doc, TODO check type and default value
{ "AdditionalProtocolsSupported", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sMediaRedundancy,AdditionalProtocolsSupported), 0, "false"},
{ "MRPD_Supported", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sMediaRedundancy,MRPD_Supported), 0, "false"},
{ "MaxMRP_Instances", gsdml_eTag_MediaRedundancy, gsdml_eTag_, gsdml_eType_Integer, sizeof(gsdml_tInteger), offsetof(gsdml_sMediaRedundancy,MaxMRP_Instances), 0, "1"},
// //
// PortSubmoduleItem // PortSubmoduleItem
// //
...@@ -510,6 +533,8 @@ static gsdml_sAttribute attrlist[] = { ...@@ -510,6 +533,8 @@ static gsdml_sAttribute attrlist[] = {
{ "PowerBudgetControlSupported", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,PowerBudgetControlSupported), 0, "false"}, { "PowerBudgetControlSupported", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,PowerBudgetControlSupported), 0, "false"},
{ "SupportsRingportConfig", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,SupportsRingportConfig), 0, "false"}, { "SupportsRingportConfig", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,SupportsRingportConfig), 0, "false"},
{ "IsDefaultRingport", gsdml_eTag_PortSubmoduleItem, gsdml_eTag_, gsdml_eType_Boolean, sizeof(gsdml_tBoolean), offsetof(gsdml_sPortSubmoduleItem,IsDefaultRingport), 0, "false"}, { "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"},
// //
// DeviceAccessPointItem-ApplicationRelations // DeviceAccessPointItem-ApplicationRelations
// //
...@@ -1195,7 +1220,9 @@ int pn_gsdml::tag_value( const char *value) ...@@ -1195,7 +1220,9 @@ int pn_gsdml::tag_value( const char *value)
sts = find_tag( get_tag_stack(), &idx); sts = find_tag( get_tag_stack(), &idx);
if ( !sts) { if ( !sts) {
error_message_line( "Undefined tag"); char msg[200];
printf( "Undefined tag %s", value);
error_message_line( msg);
return 0; return 0;
} }
...@@ -1219,7 +1246,9 @@ int pn_gsdml::tag_attribute( const char *name, const char *value) ...@@ -1219,7 +1246,9 @@ int pn_gsdml::tag_attribute( const char *name, const char *value)
sts = find_tag_attribute( name, get_tag_stack(), get_tag_stack(1), &idx); sts = find_tag_attribute( name, get_tag_stack(), get_tag_stack(1), &idx);
if ( !sts) { if ( !sts) {
error_message_line( "Undefined tag attribute"); char msg[200];
sprintf( msg, "Undefined tag attribute %s (%s)", name, current_tag);
error_message_line( msg);
return 0; return 0;
} }
...@@ -2087,6 +2116,28 @@ void *pn_gsdml::object_factory( gsdml_eTag id) ...@@ -2087,6 +2116,28 @@ void *pn_gsdml::object_factory( gsdml_eTag id)
ro = o; ro = o;
break; break;
} }
case gsdml_eTag_CertificationInfo: {
gsdml_CertificationInfo *o = new gsdml_CertificationInfo( this);
current_body = &o->Body;
current_body_size = sizeof( gsdml_sCertificationInfo);
void *p;
if ( (p = get_object_stack( gsdml_eTag_DeviceAccessPointItem)))
((gsdml_DeviceAccessPointItem *)p)->CertificationInfo = o;
#if 0
else if ( (p = get_object_stack( gsdml_eTag_VirtualSubmoduleItem)))
((gsdml_VirtualSubmoduleItem *)p)->CertificationInfo = o;
else if ( (p = get_object_stack( gsdml_eTag_ModuleItem)))
((gsdml_ModuleItem *)p)->CertificationInfo = o;
#endif
else {
error_message_line( "Misplaced CertificationInfo");
return 0;
}
ro = o;
break;
}
case gsdml_eTag_SubslotList: { case gsdml_eTag_SubslotList: {
gsdml_SubslotList *o = new gsdml_SubslotList( this); gsdml_SubslotList *o = new gsdml_SubslotList( this);
......
...@@ -233,6 +233,7 @@ typedef enum { ...@@ -233,6 +233,7 @@ typedef enum {
gsdml_eTag_PrimaryLanguage, gsdml_eTag_PrimaryLanguage,
gsdml_eTag_Language, gsdml_eTag_Language,
gsdml_eTag_Text, gsdml_eTag_Text,
gsdml_eTag_CertificationInfo,
gsdml_eTag__ gsdml_eTag__
} gsdml_eTag; } gsdml_eTag;
...@@ -413,6 +414,19 @@ class gsdml_ModuleInfo { ...@@ -413,6 +414,19 @@ class gsdml_ModuleInfo {
void print( int ind); void print( int ind);
}; };
typedef struct {
gsdml_tString ConformanceClass;
gsdml_tString ApplicationClass;
gsdml_tString NetloadClass;
} gsdml_sCertificationInfo;
class gsdml_CertificationInfo {
public:
gsdml_CertificationInfo( pn_gsdml *g) : gsdml(g) { memset( &Body, 0, sizeof(Body));}
gsdml_sCertificationInfo Body;
pn_gsdml *gsdml;
};
typedef struct { typedef struct {
gsdml_tUnsigned16 SubslotNumber; gsdml_tUnsigned16 SubslotNumber;
gsdml_tRefId TextId; gsdml_tRefId TextId;
...@@ -786,6 +800,8 @@ class gsdml_General { ...@@ -786,6 +800,8 @@ class gsdml_General {
typedef struct { typedef struct {
gsdml_tUnsigned16 MaxBridgeDelay; gsdml_tUnsigned16 MaxBridgeDelay;
gsdml_tUnsigned16 MaxNumberIR_FrameData; gsdml_tUnsigned16 MaxNumberIR_FrameData;
gsdml_tString StartupMode;
gsdml_tString ForwardingMode;
} gsdml_sRT_Class3Properties; } gsdml_sRT_Class3Properties;
class gsdml_RT_Class3Properties { class gsdml_RT_Class3Properties {
...@@ -869,6 +885,9 @@ class gsdml_InterfaceSubmoduleItem_ApplicationRelations { ...@@ -869,6 +885,9 @@ class gsdml_InterfaceSubmoduleItem_ApplicationRelations {
typedef struct { typedef struct {
gsdml_tBoolean RT_MediaRedundancySupported; gsdml_tBoolean RT_MediaRedundancySupported;
gsdml_tTokenList SupportedRole; gsdml_tTokenList SupportedRole;
gsdml_tBoolean AdditionalProtocolsSupported;
gsdml_tBoolean MRPD_Supported;
gsdml_tInteger MaxMRP_Instances;
} gsdml_sMediaRedundancy; } gsdml_sMediaRedundancy;
class gsdml_MediaRedundancy { class gsdml_MediaRedundancy {
...@@ -930,6 +949,7 @@ typedef struct { ...@@ -930,6 +949,7 @@ typedef struct {
gsdml_tBoolean PowerBudgetControlSupported; gsdml_tBoolean PowerBudgetControlSupported;
gsdml_tBoolean SupportsRingportConfig; gsdml_tBoolean SupportsRingportConfig;
gsdml_tBoolean IsDefaultRingport; gsdml_tBoolean IsDefaultRingport;
gsdml_tBoolean CheckMAUTypeSupported;
} gsdml_sPortSubmoduleItem; } gsdml_sPortSubmoduleItem;
class gsdml_PortSubmoduleItem { class gsdml_PortSubmoduleItem {
...@@ -1071,6 +1091,11 @@ typedef struct { ...@@ -1071,6 +1091,11 @@ typedef struct {
gsdml_tBoolean NameOfStationNotTransferable; gsdml_tBoolean NameOfStationNotTransferable;
gsdml_tBoolean DeviceAccessSupported; gsdml_tBoolean DeviceAccessSupported;
gsdml_tBoolean SharedDeviceSupported; gsdml_tBoolean SharedDeviceSupported;
gsdml_tString PNIO_Version;
gsdml_tBoolean CheckDeviceID_Allowed;
gsdml_tBoolean LLDP_NoD_Supported;
gsdml_tUnsigned32 ResetToFactoryModes;
gsdml_tBoolean SharedInputSupported;
} gsdml_sDeviceAccessPointItem; } gsdml_sDeviceAccessPointItem;
class gsdml_DeviceAccessPointItem { class gsdml_DeviceAccessPointItem {
...@@ -1081,6 +1106,7 @@ class gsdml_DeviceAccessPointItem { ...@@ -1081,6 +1106,7 @@ class gsdml_DeviceAccessPointItem {
{ memset( &Body, 0, sizeof(Body));} { memset( &Body, 0, sizeof(Body));}
gsdml_sDeviceAccessPointItem Body; gsdml_sDeviceAccessPointItem Body;
gsdml_ModuleInfo *ModuleInfo; gsdml_ModuleInfo *ModuleInfo;
gsdml_CertificationInfo *CertificationInfo;
gsdml_SubslotList *SubslotList; gsdml_SubslotList *SubslotList;
gsdml_IOConfigData *IOConfigData; gsdml_IOConfigData *IOConfigData;
gsdml_UseableModules *UseableModules; gsdml_UseableModules *UseableModules;
......
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