Skip to content

Commit

Permalink
Fix naming of classes
Browse files Browse the repository at this point in the history
- ParameterInAtomicSwcTypeInstanceRef
- PortApiOption
  • Loading branch information
Conny Gustafsson committed Feb 21, 2025
1 parent a7a7f45 commit 412d99d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ ROperationInAtomicSwcInstanceRef | R-OPERATION-IN-ATOMIC-SWC-INSTANCE-REF
* ModeAccessPointIdent | MODE-ACCESS-POINT-IDENT
* ModeSwitchPoint | MODE-SWITCH-POINT
* ParameterAccess | PARAMETER-ACCESS
* ParameterInAtomicSWCTypeInstanceRef | PARAMETER-IN-ATOMIC-SWC-TYPE-INSTANCE-REF
* PortAPIOption | PORT-API-OPTION
* ParameterInAtomicSwcTypeInstanceRef | PARAMETER-IN-ATOMIC-SWC-TYPE-INSTANCE-REF
* PortApiOption | PORT-API-OPTION
* PortDefinedArgumentValue | PORT-DEFINED-ARGUMENT-VALUE
* RunnableEntityArgument | RUNNABLE-ENTITY-ARGUMENT
* SynchronousServerCallPoint | SYNCHRONOUS-SERVER-CALL-POINT
Expand Down
10 changes: 5 additions & 5 deletions src/autosar/xml/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -6035,7 +6035,7 @@ def __init__(self,
self._assign_optional_strict("mode_group", mode_group, PModeGroupInAtomicSwcInstanceRef)


class ParameterInAtomicSWCTypeInstanceRef(ARObject):
class ParameterInAtomicSwcTypeInstanceRef(ARObject):
"""
Complex type AR:PARAMETER-IN-ATOMIC-SWC-TYPE-INSTANCE-REF
Tag variants: 'AUTOSAR-PARAMETER-IREF'
Expand Down Expand Up @@ -6071,15 +6071,15 @@ class AutosarParameterRef(ARObject):
"""

def __init__(self,
autosar_parameter: ParameterInAtomicSWCTypeInstanceRef | None = None,
autosar_parameter: ParameterInAtomicSwcTypeInstanceRef | None = None,
local_parameter: DataPrototypeRef | None = None) -> None:
super().__init__()
# .AUTOSAR-PARAMETER-IREF
self.autosar_parameter: ParameterInAtomicSWCTypeInstanceRef | None = None
self.autosar_parameter: ParameterInAtomicSwcTypeInstanceRef | None = None
# .LOCAL-PARAMETER-REF
self.local_parameter: DataPrototypeRef | None = None

self._assign_optional_strict("autosar_parameter", autosar_parameter, ParameterInAtomicSWCTypeInstanceRef)
self._assign_optional_strict("autosar_parameter", autosar_parameter, ParameterInAtomicSwcTypeInstanceRef)
self._assign_optional("local_parameter", local_parameter, DataPrototypeRef)


Expand Down Expand Up @@ -6648,7 +6648,7 @@ def __init__(self,
SwcSupportedFeatureArgType = SwcSupportedFeature | list[SwcSupportedFeature] | None


class PortAPIOption(ARObject):
class PortApiOption(ARObject):
"""
Complex type AR:PORT-API-OPTION
Tag variants: 'PORT-API-OPTION'
Expand Down
8 changes: 4 additions & 4 deletions src/autosar/xml/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4916,7 +4916,7 @@ def _read_mode_switch_point(self, xml_element: ElementTree.Element) -> ar_elemen

def _read_parameter_in_atomic_swc_type_instance_ref(self,
xml_element: ElementTree.Element
) -> ar_element.ParameterInAtomicSWCTypeInstanceRef:
) -> ar_element.ParameterInAtomicSwcTypeInstanceRef:
"""
Reads complex type AR:PARAMETER-IN-ATOMIC-SWC-TYPE-INSTANCE-REF
Tag variants: 'AUTOSAR-PARAMETER-IREF'
Expand All @@ -4938,7 +4938,7 @@ def _read_parameter_in_atomic_swc_type_instance_ref(self,
xml_child = child_elements.get("MODE-GROUP-IREF")
child_elements.skip("VARIATION-POINT")
self._report_unprocessed_elements(child_elements)
return ar_element.ParameterInAtomicSWCTypeInstanceRef(**data)
return ar_element.ParameterInAtomicSwcTypeInstanceRef(**data)

def _read_autosar_parameter_ref(self, xml_element: ElementTree.Element) -> ar_element.AutosarParameterRef:
"""
Expand Down Expand Up @@ -5488,7 +5488,7 @@ def _read_communication_buffer_locking(self,

def _read_port_api_option(self,
xml_element: ElementTree.Element
) -> ar_element.PortAPIOption:
) -> ar_element.PortApiOption:
"""
Reads complex type AR:PORT-API-OPTION
Tag variants: 'PORT-API-OPTION'
Expand All @@ -5497,7 +5497,7 @@ def _read_port_api_option(self,
child_elements = ChildElementMap(xml_element)
self._read_port_api_option_group(child_elements, data)
self._report_unprocessed_elements(child_elements)
return ar_element.PortAPIOption(**data)
return ar_element.PortApiOption(**data)

def _read_port_api_option_group(self, child_elements: ChildElementMap, data: dict) -> None:
"""
Expand Down
14 changes: 7 additions & 7 deletions src/autosar/xml/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,15 +376,15 @@ def __init__(self,
'TransformerHardErrorEvent': self._write_transformer_hard_error_event,
'PortDefinedArgumentValue': self._write_port_defined_argument_value,
'CommunicationBufferLocking': self._write_communication_buffer_locking,
'PortAPIOption': self._write_port_api_option,
'PortApiOption': self._write_port_api_option,
'AsynchronousServerCallPoint': self._write_async_server_call_point,
'SynchronousServerCallPoint': self._write_sync_server_call_point,
'AsynchronousServerCallResultPoint': self._write_async_server_call_result_point,
'ExternalTriggeringPoint': self._write_external_triggering_point,
'InternalTriggeringPoint': self._write_internal_triggering_point,
'ModeAccessPoint': self._write_mode_access_point,
'ModeSwitchPoint': self._write_mode_switch_point,
'ParameterInAtomicSWCTypeInstanceRef': self._write_parameter_in_atomic_swc_type_instance_ref,
'ParameterInAtomicSwcTypeInstanceRef': self._write_parameter_in_atomic_swc_type_instance_ref,
'AutosarParameterRef': self._write_autosar_parameter_ref,
'ParameterAccess': self._write_parameter_access,
'WaitPoint': self._write_wait_point,
Expand Down Expand Up @@ -4279,13 +4279,13 @@ def _write_mode_switch_point(self, elem: ar_element.ModeSwitchPoint) -> None:
self._leave_child()

def _write_parameter_in_atomic_swc_type_instance_ref(self,
elem: ar_element.ParameterInAtomicSWCTypeInstanceRef
elem: ar_element.ParameterInAtomicSwcTypeInstanceRef
) -> None:
"""
Writes complex type AR:PARAMETER-IN-ATOMIC-SWC-TYPE-INSTANCE-REF
Tag variants: 'AUTOSAR-PARAMETER-IREF'
"""
assert isinstance(elem, ar_element.ParameterInAtomicSWCTypeInstanceRef)
assert isinstance(elem, ar_element.ParameterInAtomicSwcTypeInstanceRef)
tag = "AUTOSAR-PARAMETER-IREF"
if elem.is_empty:
self._add_content(tag)
Expand Down Expand Up @@ -4736,12 +4736,12 @@ def _write_communication_buffer_locking(self, elem: ar_element.CommunicationBuff
self._add_content("SUPPORT-BUFFER-LOCKING", ar_enum.enum_to_xml(elem.support_buffer_locking))
self._leave_child()

def _write_port_api_option(self, elem: ar_element.PortAPIOption) -> None:
def _write_port_api_option(self, elem: ar_element.PortApiOption) -> None:
"""
Writes complex type AR:PORT-API-OPTION
Tag variants: 'PORT-API-OPTION'
"""
assert isinstance(elem, ar_element.PortAPIOption)
assert isinstance(elem, ar_element.PortApiOption)
tag = "PORT-API-OPTION"
if elem.is_empty:
self._add_content(tag)
Expand All @@ -4750,7 +4750,7 @@ def _write_port_api_option(self, elem: ar_element.PortAPIOption) -> None:
self._write_port_api_option_group(elem)
self._leave_child()

def _write_port_api_option_group(self, elem: ar_element.PortAPIOption) -> None:
def _write_port_api_option_group(self, elem: ar_element.PortApiOption) -> None:
"""
Writes group AR:PORT-API-OPTION
Tag variants: 'PORT-API-OPTION'
Expand Down
Loading

0 comments on commit 412d99d

Please sign in to comment.