Skip to content
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

[1.1.0.1] compile error with generated IDL bridge output #26369

Open
raven-worx opened this issue May 4, 2023 · 0 comments
Open

[1.1.0.1] compile error with generated IDL bridge output #26369

raven-worx opened this issue May 4, 2023 · 0 comments
Labels
dynamic-bridge Issues in the dynamic-bridge example

Comments

@raven-worx
Copy link

Reproduction steps / Feature

Hi,

using the idl_bridge_generator output does not compile.

i am on 1.1.0.1 tag (8f66f42) creating a dynamic bridge app.

Depending on the used clusters in the Bridge app the Encode() and Decode() methods of cluster specific struct types are failing due to unsupported assignments.

For me this was the case for BridgeDeviceBasicInformation (BridgedDeviceBasicInformationCluster::ProductAppearanceStruct) and DoorLock (DoorLockCluster::CredentialStruct) clusters, but i assume there are more cases.

I tried to fix it but this needs more substantial changes:

  • scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja - use AssignValue method in the Encode/Decode methods for assignment (added with Fix Dynamic Bridge example compilation #26129) like used in the global structs (BridgeClustersGlobalStructs.jinja)

  • the struct field types differ in the struct implementation and the corresponding ::DecodableType implementation (integral types vs enums vs Optional/Nullable types) - for this i think changes are needed in 'scripts/py_matter_idl/matter_idl/generators/bridge/init.py'
    e.g. to handle enum types in get_field_type() and get_field_info() methods and return the enum classes instead

Platform

core (please add to version below)

Platform Version(s)

No response

Type

Manually tested with SDK

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

No response

@bzbarsky-apple bzbarsky-apple added the dynamic-bridge Issues in the dynamic-bridge example label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic-bridge Issues in the dynamic-bridge example
Projects
Status: Todo
Development

No branches or pull requests

2 participants