@@ -19,8 +19,10 @@ namespace ROS2
19
19
PublisherConfiguration::Reflect (context);
20
20
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
21
21
{
22
+ serializeContext->RegisterGenericType <AZStd::shared_ptr<PublisherConfiguration>>();
23
+ serializeContext->RegisterGenericType <AZStd::map<AZStd::string, AZStd::shared_ptr<PublisherConfiguration>>>();
22
24
serializeContext->Class <SensorConfiguration>()
23
- ->Version (1 )
25
+ ->Version (2 )
24
26
->Field (" Visualise" , &SensorConfiguration::m_visualise)
25
27
->Field (" Publishing Enabled" , &SensorConfiguration::m_publishingEnabled)
26
28
->Field (" Frequency (HZ)" , &SensorConfiguration::m_frequency)
@@ -35,16 +37,12 @@ namespace ROS2
35
37
->DataElement (AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_publishingEnabled, " Publishing Enabled" , " Toggle publishing for topic" )
36
38
->DataElement (AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_frequency, " Frequency" , " Frequency of publishing" )
37
39
->DataElement (AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_publishersConfigurations, " Publishers" , " Publishers" )
38
- ->Attribute (AZ::Edit::Attributes::ContainerCanBeModified, false )
39
40
->Attribute (AZ::Edit::Attributes::AutoExpand, true )
40
- ->Attribute (AZ::Edit::Attributes::IndexedChildNameLabelOverride, &SensorConfiguration::GetPublisherLabel)
41
+ ->Attribute (AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
42
+ ->Attribute (AZ::Edit::Attributes::ContainerCanBeModified, false )
43
+ ->ElementAttribute (AZ::Edit::Attributes::AutoExpand, true )
41
44
;
42
45
}
43
46
}
44
47
}
45
-
46
- AZStd::string SensorConfiguration::GetPublisherLabel (int index) const
47
- {
48
- return m_publishersConfigurations[index].m_type ;
49
- }
50
48
} // namespace ROS2
0 commit comments