-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triggering reference Issue #23
Comments
Hi, |
newCanFramTrig.set_framePorts(framePortsList) addrModeToAssign = af.CanAddressingModeType.VALUE_EXTENDED if msgAddrMode == "EXTENDED" else af.CanAddressingModeType.VALUE_STANDARD newCanFramTrig.set_canFrameRxBehavior(af.CanFrameRxBehaviorEnum.VALUE_ANY) newPduTrig = self.CANPhysicalChannel.new_PduTriggering(msgName + "_PduTrig") As you can see in the code, I create a Frame triggering, then a Pdu Triggering and then reference the PduTriggering in the Frame Triggering. All the other references work, event here it works. But the Path has a bit more than what is expected. |
@punithspal , pack = autosarfactory.new_file(path=os.path.join(resourcesDir, 'tempTest_set_Ref.arxml'), defaultArPackage='TestPackage', overWrite = True)
canChannel = pack.new_CanCluster('Can_Cluster_0').new_CanClusterVariant().new_CanPhysicalChannel('Can_channel_0')
sigTrig = canChannel.new_ISignalTriggering('sigTrig')
pduTrig = canChannel.new_PduTriggering('pduTrig')
pduTrig.new_ISignalTriggering().set_iSignalTriggering(sigTrig)
autosarfactory.save() Please see the generated arxml file for the above code: <?xml version='1.0' encoding='UTF-8'?>
<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_00051.xsd">
<AR-PACKAGES>
<AR-PACKAGE>
<SHORT-NAME>TestPackage</SHORT-NAME>
<ELEMENTS>
<CAN-CLUSTER>
<SHORT-NAME>Can_Cluster_0</SHORT-NAME>
<CAN-CLUSTER-VARIANTS>
<CAN-CLUSTER-CONDITIONAL>
<PHYSICAL-CHANNELS>
<CAN-PHYSICAL-CHANNEL>
<SHORT-NAME>Can_channel_0</SHORT-NAME>
<I-SIGNAL-TRIGGERINGS>
<I-SIGNAL-TRIGGERING>
<SHORT-NAME>sigTrig</SHORT-NAME>
</I-SIGNAL-TRIGGERING>
</I-SIGNAL-TRIGGERINGS>
<PDU-TRIGGERINGS>
<PDU-TRIGGERING>
<SHORT-NAME>pduTrig</SHORT-NAME>
<I-SIGNAL-TRIGGERINGS>
<I-SIGNAL-TRIGGERING-REF-CONDITIONAL>
<I-SIGNAL-TRIGGERING-REF DEST="I-SIGNAL-TRIGGERING">/TestPackage/Can_Cluster_0/Can_channel_0/sigTrig</I-SIGNAL-TRIGGERING-REF>
</I-SIGNAL-TRIGGERING-REF-CONDITIONAL>
</I-SIGNAL-TRIGGERINGS>
</PDU-TRIGGERING>
</PDU-TRIGGERINGS>
</CAN-PHYSICAL-CHANNEL>
</PHYSICAL-CHANNELS>
</CAN-CLUSTER-CONDITIONAL>
</CAN-CLUSTER-VARIANTS>
</CAN-CLUSTER>
</ELEMENTS>
</AR-PACKAGE>
</AR-PACKAGES>
</AUTOSAR> Could you please check if you accidentally passed "short-name" while creating the ClusterVariant? If is not a referable object and doesn't need a short-name. The current implementation checks if the short-name is not provided for referrable object, but not other way around. I will get this fixed in future releases. For the moment, could you please make sure that you don't pass short-name whole creating ClusterVariant. Hope this helps. thanks! |
…referable elements. Added test to prove the fix works
…referable elements. Added test to prove the fix works (#24) Co-authored-by: Girish Chandran
@punithspal I managed to fix this and the same is merged to main. So, just do a git pull and check if it works for you? |
Hello,
I have come across the following issue.
when a FrameTriggering is created, there needs to be a PduTrigerringRef and similarly when a PduTrigerring is created, there needs to be a SignalTrigerringRef .
I am doing as shown below:
canFramTrig.new_PduTriggering().set_pduTriggering(newPduTrig)
or
pduTrig.new_ISignalTriggering(sigName).set_iSignalTriggering(newISignalTrig)
The generated arxml shall be:
/CANCatalog/Cluster/CAN_Bus_Cluster/ClusterVariant/CAN_Bus_Channel/Message1_PduTrig
this is path in the generated arxml: /CANCatalog/Cluster/CAN_Bus_Cluster/ClusterVariant/CAN_Bus_Channel/Message1_PduTrig
but the required path is : /CANCatalog/Cluster/CAN_Bus_Cluster/CAN_Bus_Channel/Message1_PduTrig
The extra "ClusterVariant" is generated in the path. This gives an error in Artop and Tresos.
The text was updated successfully, but these errors were encountered: