FreeBSD/sys/dev/isci/scil/sci_base_state_machine_logger.c
/**
 * This function will construct the state machine logger and attach it to the
 * state machine that is to be observed.
 *
 * @param[in] this_observer This is the state machine logger object that is
 *       going to observe the subject state machine.
 * @param[in] the_object This is the object that contains the state machine
 *       being observed it is used to report the address of the object for
 *       which a state transition has occurred.
 * @param[in] the_log_function This is the logging function to be used when a
 *       state machine transition occurs.  Since this is a base object type it
 *       does not actually know if the logging function is for the core or
 *       framework.
 * @param[in] the_object_name This is the name of the object that contains the
 *       state machine being observed.
 * @param[in] the_state_machine_name This is the name that will be displayed
 *       in the log string for the state machine being observed.
 * @param[in] the_object_mask This is the log object mask used when calling
 *       the logging function.
 *
 * @return Nothing
 */
This function will construct the state machine logger and attach it to the
state machine that is to be observed.

@param[in] this_observer This is the state machine logger object that is
going to observe the subject state machine.
@param[in] the_object This is the object that contains the state machine
being observed it is used to report the address of the object for
which a state transition has occurred.
@param[in] the_log_function This is the logging function to be used when a
state machine transition occurs.  Since this is a base object type it
does not actually know if the logging function is for the core or
framework.
@param[in] the_object_name This is the name of the object that contains the
state machine being observed.
@param[in] the_state_machine_name This is the name that will be displayed
in the log string for the state machine being observed.
@param[in] the_object_mask This is the log object mask used when calling
the logging function.

@return Nothing
This function will construct the state machine logger and attach it to the state machine that is to be observed . @param [ in ] this_observer This is the state machine logger object that is going to observe the subject state machine . @param [ in ] the_object This is the object that contains the state machine being observed it is used to report the address of the object for which a state transition has occurred . @param [ in ] the_log_function This is the logging function to be used when a state machine transition occurs . Since this is a base object type it does not actually know if the logging function is for the core or framework . @param [ in ] the_object_name This is the name of the object that contains the state machine being observed . @param [ in ] the_state_machine_name This is the name that will be displayed in the log string for the state machine being observed . @param [ in ] the_object_mask This is the log object mask used when calling the logging function . @return Nothing
void sci_base_state_machine_logger_construct(
   SCI_BASE_STATE_MACHINE_LOGGER_T             * this_observer,
   SCI_BASE_OBJECT_T                           * the_object,
   SCI_BASE_STATE_MACHINE_LOGGER_LOG_HANDLER_T   the_log_function,
   char                                        * log_object_name,
   char                                        * log_state_machine_name,
   U32                                           log_object_mask
)
{
   sci_base_state_machine_observer_construct(&this_observer->parent);
   this_observer->log_object             = the_object;
   this_observer->log_function           = the_log_function;
   this_observer->log_object_name        = log_object_name;
   this_observer->log_state_machine_name = log_state_machine_name;
   this_observer->log_mask               = log_object_mask;
   this_observer->parent.parent.update = sci_base_state_machine_logger_update;
}
void sci_base_state_machine_logger_construct ( SCI_BASE_STATE_MACHINE_LOGGER_T * this_observer , SCI_BASE_OBJECT_T * the_object , SCI_BASE_STATE_MACHINE_LOGGER_LOG_HANDLER_T the_log_function , char * log_object_name , char * log_state_machine_name , U32 log_object_mask ) { sci_base_state_machine_observer_construct ( & this_observer -> parent ) ; this_observer -> log_object = the_object ; this_observer -> log_function = the_log_function ; this_observer -> log_object_name = log_object_name ; this_observer -> log_state_machine_name = log_state_machine_name ; this_observer -> log_mask = log_object_mask ; this_observer -> parent . parent . update = sci_base_state_machine_logger_update ; }
This function will construct the state machine logger and attach it to the
 state machine that is to be observed.
This function will construct the state machine logger and attach it to the state machine that is to be observed .