@@ -372,6 +372,7 @@ def __init__(self,
372
372
'SwcModeSwitchEvent' : self ._write_swc_mode_switch_event ,
373
373
'TimingEvent' : self ._write_timing_event ,
374
374
'TransformerHardErrorEvent' : self ._write_transformer_hard_error_event ,
375
+ 'PortDefinedArgumentValue' : self ._write_port_defined_argument_value ,
375
376
}
376
377
self .switcher_all = {} # All concrete elements (used for unit testing)
377
378
self .switcher_all .update (self .switcher_collectable )
@@ -1467,7 +1468,7 @@ def _write_sw_data_def_props_content(self, elem: ar_element.SwDataDefPropsCondit
1467
1468
if elem .data_constraint_ref is not None :
1468
1469
self ._write_data_constraint_ref (elem .data_constraint_ref )
1469
1470
if elem .impl_data_type_ref is not None :
1470
- self ._write_impl_data_type_ref (elem .impl_data_type_ref )
1471
+ self ._write_impl_data_type_ref (elem .impl_data_type_ref , "IMPLEMENTATION-DATA-TYPE-REF" )
1471
1472
if elem .impl_policy is not None :
1472
1473
self ._add_content ('SW-IMPL-POLICY' ,
1473
1474
ar_enum .enum_to_xml (elem .impl_policy ))
@@ -1792,7 +1793,7 @@ def _write_data_type_map(self, elem: ar_element.DataTypeMap) -> None:
1792
1793
if elem .appl_data_type_ref is not None :
1793
1794
self ._write_application_data_type_ref (elem .appl_data_type_ref , "APPLICATION-DATA-TYPE-REF" )
1794
1795
if elem .impl_data_type_ref is not None :
1795
- self ._write_impl_data_type_ref (elem .impl_data_type_ref )
1796
+ self ._write_impl_data_type_ref (elem .impl_data_type_ref , "IMPLEMENTATION-DATA-TYPE-REF" )
1796
1797
self ._leave_child ()
1797
1798
1798
1799
def _write_data_type_mapping_set (self , elem : ar_element .DataTypeMappingSet ) -> None :
@@ -1986,19 +1987,18 @@ def _write_function_ptr_signature_ref(self, elem: ar_element.FunctionPtrSignatur
1986
1987
self ._collect_base_ref_attr (elem , attr )
1987
1988
self ._add_content ('FUNCTION-POINTER-SIGNATURE-REF' , elem .value , attr )
1988
1989
1989
- def _write_impl_data_type_ref (self , elem : ar_element .ImplementationDataTypeRef ) -> None :
1990
+ def _write_impl_data_type_ref (self , elem : ar_element .ImplementationDataTypeRef , tag : str ) -> None :
1990
1991
"""
1991
- Writes complex type AR:IMPLEMENTATION-DATA-TYPE-REF
1992
- Type: Concrete
1993
- Tag variants: 'IMPLEMENTATION-DATA-TYPE-REF'
1992
+ Writes reference to AR:IMPLEMENTATION-DATA-TYPE-REF
1993
+ Tag variants: 'IMPLEMENTATION-DATA-TYPE-REF' | 'VALUE-TYPE-TREF'
1994
1994
1995
1995
Note: The name of the complex-type is anonymous in the XML schema.
1996
1996
1997
1997
"""
1998
1998
assert isinstance (elem , ar_element .ImplementationDataTypeRef )
1999
1999
attr : TupleList = []
2000
2000
self ._collect_base_ref_attr (elem , attr )
2001
- self ._add_content ('IMPLEMENTATION-DATA-TYPE-REF' , elem .value , attr )
2001
+ self ._add_content (tag , elem .value , attr )
2002
2002
2003
2003
def _write_sw_base_type_ref (self , elem : ar_element .SwBaseTypeRef ) -> None :
2004
2004
"""
@@ -2016,7 +2016,7 @@ def _write_sw_base_type_ref(self, elem: ar_element.SwBaseTypeRef) -> None:
2016
2016
2017
2017
def _write_sw_addr_method_ref (self , elem : ar_element .SwAddrMethodRef ) -> None :
2018
2018
"""
2019
- Writes references to AR:SW-ADDR-METHOD--SUBTYPES-ENUM
2019
+ Writes reference to AR:SW-ADDR-METHOD--SUBTYPES-ENUM
2020
2020
Tag variants: 'SW-ADDR-METHOD-REF'
2021
2021
"""
2022
2022
assert isinstance (elem , ar_element .SwAddrMethodRef )
@@ -4351,6 +4351,25 @@ def _write_transformer_hard_error_event_group(self, elem: ar_element.Transformer
4351
4351
if elem .trigger is not None :
4352
4352
self ._write_p_trigger_in_atomic_swc_instance_ref (elem .trigger , "TRIGGER-IREF" )
4353
4353
4354
+ def _write_port_defined_argument_value (self , elem : ar_element .PortDefinedArgumentValue ) -> None :
4355
+ """
4356
+ Writes complex type AR:PORT-DEFINED-ARGUMENT-VALUE
4357
+ Tag variants: 'PORT-DEFINED-ARGUMENT-VALUE'
4358
+ """
4359
+ assert isinstance (elem , ar_element .PortDefinedArgumentValue )
4360
+ tag = "PORT-DEFINED-ARGUMENT-VALUE"
4361
+ if elem .is_empty :
4362
+ self ._add_content (tag )
4363
+ else :
4364
+ self ._add_child (tag )
4365
+ if elem .value is not None :
4366
+ self ._add_child ("VALUE" )
4367
+ self ._write_value_specification_element (elem .value )
4368
+ self ._leave_child ()
4369
+ if elem .value_type is not None :
4370
+ self ._write_impl_data_type_ref (elem .value_type , "VALUE-TYPE-TREF" )
4371
+ self ._leave_child ()
4372
+
4354
4373
def _write_swc_internal_behavior (self , elem : ar_element .SwcInternalBehavior ) -> None :
4355
4374
"""
4356
4375
Writes complex type AR:SWC-INTERNAL-BEHAVIOR
0 commit comments