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

[Scenes] Fix SceneTableSize #28521

Closed
lpbeliveau-silabs opened this issue Aug 4, 2023 · 4 comments · Fixed by #30095
Closed

[Scenes] Fix SceneTableSize #28521

lpbeliveau-silabs opened this issue Aug 4, 2023 · 4 comments · Fixed by #30095

Comments

@lpbeliveau-silabs
Copy link
Contributor

lpbeliveau-silabs commented Aug 4, 2023

Currently, the attribute SceneTableSize is dictated by CHIP_CONFIG_MAX_SCENES_PER_ENDPOINT from CHIPConfig.h and doesn't get modified from the Zap configuration.

We need to allow users to defined the size of the scene table by zap from the scenes-server.cpp

@bzbarsky-apple
Copy link
Contributor

If we want this defined via ZAP, why are we doing it via AttributeAccessInterface at all?

@lpbeliveau-silabs
Copy link
Contributor Author

lpbeliveau-silabs commented Aug 4, 2023

Currently we are only getting the SceneCount and RemainingCapacity through the AttributeAccessInterface, SceneTableSize should not rely on it. Unless I am mistaken.

@bzbarsky-apple
Copy link
Contributor

Then I am confused. We're not using CHIP_CONFIG_MAX_SCENES_PER_ENDPOINT for the attribute value... Is this issue then about setting CHIP_CONFIG_MAX_SCENES_PER_ENDPOINT or some equivalent automatically to the largest SceneTableSize set in ZAP across all endpoints?

@lpbeliveau-silabs
Copy link
Contributor Author

Yes, that is the actual problem. CHIP_CONFIG_MAX_SCENES_PER_ENDPOINT should be equivalent to the zap parameter, otherwise someone trying to configure a device with a SceneTableSize > CHIP_CONFIG_MAX_SCENES_PER_ENDPOINT would face unexpected Resource exhausted errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants