I have defined a DishwasherModeDelegate and an OperationalStatusDelegate.
How can I access the ModeBase::Instance of my DishwasherMode cluster?
In an older prototype, the function emberAfDishwasherModeClusterInitCallback was invoked, which allowed me to create and store a ModeBase::Instance.
ModeBase::Instance *DishwasherMode::GetInstance()
{
return gDishwasherModeInstance;
}
void emberAfDishwasherModeClusterInitCallback(chip::EndpointId epId)
{
ESP_LOGI(TAG, "emberAfDishwasherModeClusterInitCallback()");
VerifyOrDie(gDishwasherModeDelegate == nullptr && gDishwasherModeInstance == nullptr);
gDishwasherModeDelegate = new DishwasherMode::DishwasherModeDelegate;
gDishwasherModeInstance = new ModeBase::Instance(gDishwasherModeDelegate, epId, DishwasherMode::Id, 0);
gDishwasherModeInstance->Init();
}
This mechanism no longer appears to work. I understand the CHiP SDK is removing all the ember methods.
Do you have an example of how I can access the ModeBase::Instance from within the OperationalStateDelegate's methods?