FreeBSD/sys/dev/isci/scil/sci_base_state_machine_logger.c
/**
 * This is the function that is called when the state machine wants to notify
 * this observer that there has been a state change.
 *
 * @param[in] observer The state machine logger that is observing the state
 *       machine.
 * @param[in] subject The state machine that is being observed.
 */
This is the function that is called when the state machine wants to notify
this observer that there has been a state change.

@param[in] observer The state machine logger that is observing the state
machine.
@param[in] subject The state machine that is being observed.
This is the function that is called when the state machine wants to notify this observer that there has been a state change . @param [ in ] observer The state machine logger that is observing the state machine . @param [ in ] subject The state machine that is being observed .
static
void sci_base_state_machine_logger_update(
   SCI_BASE_OBSERVER_T *observer,
   SCI_BASE_SUBJECT_T  *subject
)
{
   SCI_BASE_STATE_MACHINE_LOGGER_T *this_observer;
   this_observer = (SCI_BASE_STATE_MACHINE_LOGGER_T *)observer;
   this_observer->log_function(
      sci_base_object_get_logger(this_observer->log_object),
      this_observer->log_mask,
      "%s 0x%08x %s has transitioned from %d to %d\n",
      this_observer->log_object_name,
      this_observer->log_object,
      this_observer->log_state_machine_name,
      this_observer->parent.subject_state,
      sci_base_state_machine_get_state((SCI_BASE_STATE_MACHINE_T *)subject)
   );
   sci_base_state_machine_observer_default_update(
      &this_observer->parent.parent, subject
   );
}
static void sci_base_state_machine_logger_update ( SCI_BASE_OBSERVER_T * observer , SCI_BASE_SUBJECT_T * subject ) { SCI_BASE_STATE_MACHINE_LOGGER_T * this_observer ; this_observer = ( SCI_BASE_STATE_MACHINE_LOGGER_T * ) observer ; this_observer -> log_function ( sci_base_object_get_logger ( this_observer -> log_object ) , this_observer -> log_mask , " \n " , this_observer -> log_object_name , this_observer -> log_object , this_observer -> log_state_machine_name , this_observer -> parent . subject_state , sci_base_state_machine_get_state ( ( SCI_BASE_STATE_MACHINE_T * ) subject ) ) ; sci_base_state_machine_observer_default_update ( & this_observer -> parent . parent , subject ) ; }
This is the function that is called when the state machine wants to notify
 this observer that there has been a state change.
This is the function that is called when the state machine wants to notify this observer that there has been a state change .