Lines Matching full:model

147 /* Models from the Mesh Model Specification */
207 /** Model opcode handler. */
222 * @param model Model instance receiving the message.
229 int (*const func)(struct bt_mesh_model *model,
257 * @brief Helper to define an empty model array
265 * @brief Composition data SIG model entry with callback functions
271 * @param _id Model ID.
272 * @param _op Array of model opcode handlers.
273 * @param _pub Model publish parameters.
274 * @param _user_data User data for the model.
275 * @param _keys Number of keys that can be bound to the model.
277 * @param _grps Number of addresses that the model can be subscribed to.
295 * @brief Composition data vendor model entry with callback functions
302 * @param _id Model ID.
303 * @param _op Array of model opcode handlers.
304 * @param _pub Model publish parameters.
305 * @param _user_data User data for the model.
306 * @param _keys Number of keys that can be bound to the model.
308 * @param _grps Number of addresses that the model can be subscribed to.
327 * @brief Composition data SIG model entry with callback functions.
332 * @param _id Model ID.
333 * @param _op Array of model opcode handlers.
334 * @param _pub Model publish parameters.
335 * @param _user_data User data for the model.
346 * @brief Composition data SIG model entry with callback functions and metadata.
351 * @param _id Model ID.
352 * @param _op Array of model opcode handlers.
353 * @param _pub Model publish parameters.
354 * @param _user_data User data for the model.
379 * @brief Composition data vendor model entry with callback functions.
385 * @param _id Model ID.
386 * @param _op Array of model opcode handlers.
387 * @param _pub Model publish parameters.
388 * @param _user_data User data for the model.
398 * @brief Composition data vendor model entry with callback functions and metadata.
404 * @param _id Model ID.
405 * @param _op Array of model opcode handlers.
406 * @param _pub Model publish parameters.
407 * @param _user_data User data for the model.
427 * @brief Composition data SIG model entry.
432 * @param _id Model ID.
433 * @param _op Array of model opcode handlers.
434 * @param _pub Model publish parameters.
435 * @param _user_data User data for the model.
441 * @brief Composition data vendor model entry.
447 * @param _id Model ID.
448 * @param _op Array of model opcode handlers.
449 * @param _pub Model publish parameters.
450 * @param _user_data User data for the model.
464 * values of the configuration model data.
494 * values of the configuration model data.
521 * @param pub Model publication context.
532 * @param pub Model publication context.
538 /** Model publication context.
544 /** The model the context belongs to. Initialized by the stack. */
573 * When set to NULL, the model is assumed not to support
585 * @param mod The Model the Publication Context belongs to.
596 * Define a model publication context.
644 /** Model callback functions. */
646 /** @brief Set value handler of user data tied to the model.
650 * @param model Model to set the persistent data of.
659 int (*const settings_set)(struct bt_mesh_model *model,
668 * When this callback fires, the mesh model may start its behavior,
671 * @param model Model this callback belongs to.
675 int (*const start)(struct bt_mesh_model *model);
677 /** @brief Model init callback.
679 * Called on every model instance during mesh initialization.
681 * If any of the model init callbacks return an error, the Mesh
685 * @param model Model to be initialized.
689 int (*const init)(struct bt_mesh_model *model);
691 /** @brief Model reset callback.
693 * Called when the mesh node is reset. All model data is deleted on
694 * reset, and the model should clear its state.
696 * @note If the model stores any persistent data, this needs to be
699 * @param model Model this callback belongs to.
701 void (*const reset)(struct bt_mesh_model *model);
703 /** @brief Callback used to store pending model's user data.
709 * @param model Model this callback belongs to.
711 void (*const pending_store)(struct bt_mesh_model *model);
714 /** Vendor model ID */
718 /** Model ID */
722 /** Abstraction that describes a Mesh Model instance */
725 /** SIG model ID */
727 /** Vendor model ID */
733 uint8_t mod_idx; /* Is the Nth model in the element */
734 uint16_t flags; /* Model flags for internal bookkeeping */
736 /** Model Publication */
750 /** Model callback structure. */
754 /* Pointer to the next model in a model extension list. */
759 /* Pointer to the array of model metadata entries. */
763 /** Model-specific user data */
767 /** Callback structure for monitoring model message sending */
793 * @param model Mesh (client) Model that the message belongs to.
801 int bt_mesh_model_send(struct bt_mesh_model *model,
807 /** @brief Send a model publication message.
809 * Before calling this function, the user needs to ensure that the model
816 * @param model Mesh (client) Model that's publishing the message.
820 int bt_mesh_model_publish(struct bt_mesh_model *model);
826 * @param model Mesh Model that supports publication.
830 static inline bool bt_mesh_model_pub_is_retransmission(const struct bt_mesh_model *model) in bt_mesh_model_pub_is_retransmission() argument
832 return model->pub->count != BT_MESH_PUB_TRANSMIT_COUNT(model->pub->retransmit); in bt_mesh_model_pub_is_retransmission()
835 /** @brief Get the element that a model belongs to.
837 * @param mod Mesh model.
839 * @return Pointer to the element that the given model belongs to.
843 /** @brief Find a SIG model.
845 * @param elem Element to search for the model in.
846 * @param id Model ID of the model.
848 * @return A pointer to the Mesh model matching the given parameters, or NULL
849 * if no SIG model with the given ID exists in the given element.
854 /** @brief Find a vendor model.
856 * @param elem Element to search for the model in.
857 * @param company Company ID of the model.
858 * @param id Model ID of the model.
860 * @return A pointer to the Mesh model matching the given parameters, or NULL
861 * if no vendor model with the given ID exists in the given element.
866 /** @brief Get whether the model is in the primary element of the device.
868 * @param mod Mesh model.
870 * @return true if the model is on the primary element, false otherwise.
877 /** @brief Immediately store the model's user data in persistent storage.
879 * @param mod Mesh model.
880 * @param vnd This is a vendor model.
883 * @param data Model data to store, or NULL to delete any model data.
884 * @param data_len Length of the model data.
892 /** @brief Schedule the model's user data store in persistent storage.
895 * for the corresponding model after delay defined by
901 * @param mod Mesh model.
905 /** @brief Let a model extend another.
908 * complex model. A Mesh model may extend any number of models, in any element.
909 * The extensions may also be nested, ie a model that extends another may
912 * A set of models that extend each other form a model extension list.
919 * @param extending_mod Mesh model that is extending the base model.
920 * @param base_mod The model being extended.
922 * @retval 0 Successfully extended the base_mod model.
927 /** @brief Let a model correspond to another.
930 * other must be present too. A Mesh model may correspond to any number of models,
939 * @param corresponding_mod Mesh model that is corresponding to the base model.
940 * @param base_mod The model being corresponded to.
942 * @retval 0 Successfully saved correspondence to the base_mod model.
950 /** @brief Check if model is extended by another model.
952 * @param model The model to check.
954 * @retval true If model is extended by another model, otherwise false
956 bool bt_mesh_model_is_extended(struct bt_mesh_model *model);