leader_message osa_control
API Reference Manual  /  7 Simulator-to-Simulator Interfaces  / 

osa_component

Description

get_admin returns the osa_admin object associated with the component.

get_root_node returns a maybe_node_id_t with the valid field set to true and id set to the current root node if a root node exists. If no root node exists the valid field will be set to false.

It is only valid to call get_admin or get_root_node on instantiated components.

notify_tracker registers a callback function cb that will be called when a tracker is added to the component using the insert-tracker command. Returns a cancel id that can be used to cancel the callback using cancel_notify. It is a one time notification and will automatically be canceled once it has been called. The data argument will be passed on to the callback.

cancel_notify cancels a callback made by notify_tracker.

has_tracker returns true if the component has a tracker inserted, otherwise false.

get_processors returns a list of processors to use for the software domain.

SIM_INTERFACE(osa_component) {
        conf_object_t *(*get_admin)(conf_object_t *NOTNULL obj);
        maybe_node_id_t (*get_root_node)(conf_object_t *NOTNULL obj);
        cancel_id_t (*notify_tracker)(conf_object_t *NOTNULL obj,
                                      void (*cb)(cbdata_call_t data),
                                      cbdata_register_t data);
        void (*cancel_notify)(conf_object_t *NOTNULL obj,
                              cancel_id_t cancel_id);
        bool (*has_tracker)(conf_object_t *NOTNULL obj);
        attr_value_t (*get_processors)(conf_object_t *NOTNULL obj);
};

#define OSA_COMPONENT_INTERFACE "osa_component"

Execution Context
Cell Context for all methods.

leader_message osa_control