Skip to content

emberAfDishwasherModeClusterInitCallback is not being invoked. How do I get the ModeBase::Instance? (CON-1904) #1633

@tomasmcguinness

Description

@tomasmcguinness

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions