eclipse-4diac / 4diac-forte

Eclipse Public License 2.0
30 stars 32 forks source link

Query command no longer returns resources #203

Closed mx990 closed 3 months ago

mx990 commented 3 months ago

With https://github.com/eclipse-4diac/4diac-forte/pull/198, the resource itself is no longer returned when querying the device.

As a result, the user no longer prompted whether to replace an existing resource in 4diac IDE, which leads to the following error during deployment:

<!--  Connected to device: _04_LOCAL -->

<!-- 127.0.0.1:61499 -->
<Request ID="2" Action="CREATE">
    <FB Name="EMB_RES" Type="EMB_RES"/>
</Request>

<Response ID="2" Reason="INVALID_STATE"/>

Deploying: EMB_RES
<!-- 127.0.0.1:61499: EMB_RES -->
<Request ID="2" Action="START"/>

<Response ID="2" Reason="INVALID_STATE"/>

Deployed: EMB_RES with 1 elements
<!--  Disconnected from device: _04_LOCAL -->

Originally posted by @kumajaya in https://github.com/eclipse-4diac/4diac-forte/issues/198#issuecomment-2266698110

mx990 commented 3 months ago

It seems the resource was previously added to the FB list in the device and thus subsequently added to the response by CResource::queryFBs. With https://github.com/eclipse-4diac/4diac-forte/pull/198, resources are no longer considered an FB (isFB() returns false), so they are omitted from the response.