This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Questions about the implementation of Generic Power OnOff model

Hi,

I'm looking at the Generic Power OnOff model available in SDK For Mesh v3.1.0.

1. Why is there a `generic_ponoff_setup_server_status_publish()` when the setup server doesn't support publishing?

From the Mesh Model Specification v1.0.1, section 3.3.5, "Generic Power OnOff Setup Server".

"This model shall support model subscription, as defined in Section 4.2.3 of the Mesh Profile specification [2]."

2. Why does the Generic Power OnOff Setup Server create an instance of a Default Transition Time model and share its subscription list?

While the standard says that the Generic Power OnOff Setup Server extends the Default Transition Time Server they don't have any bound state, thus they shouldn't share the subscription list as explained in section 1.4.1.1.1 "Subscription Lists on bound states".

"Models that operate on bound states share a single instance of a Subscription List per element."

The two models do not operate on bound states and thus shouldn't share the subscription list.

By creating an instance of the Default Transition Time Server model it becomes more complex to add other models that also extend the Default Transition Time Server model to the same element as it causes conflicts. See for example the Scene Setup Server that also extends the DTT Server model.

Thanks

Parents Reply Children
  • Hi again Jonas,

    I don't have an answer to the question in point 1, but as far as I can see in the code the generic_ponoff_setup_server_status_publish() function is never called, which make sense because the Mesh model specification in section 3.3.5.2.1 says:

    " If the received message is a Generic OnPowerUp Set message, the Generic Power OnOff Server
    shall respond with a Generic OnPowerUp Status message (see Section
    3.3.4.3.2). "

    So, the message added by the power on off setup server (the Generic OnPowerUp Set message)  is answered with a message from the power on off server (the Generic OnPowerUp Status mesage) which supports publishing.

    I might be wrong but it seems to me that there is no need of a `generic_ponoff_setup_server_status_publish()` function.

    Best regards

  • I do agree with you that it doesn't really make sense. But since it was implemented I thought I might have overlooked something.

    Perhaps it gets removed in the next release.

    Thanks.

Related