src/c/examples/mycomponent/mycomponent.c
extern my_component_t * my_component_alloc (iot_logger_t * logger)
{
  iot_log_trace (logger, "my_component_alloc()");
  my_component_t * mycomp = calloc (1, sizeof (*mycomp));
  iot_component_init (&mycomp->component, my_component_factory (), (iot_component_start_fn_t) my_component_start, (iot_component_stop_fn_t) my_component_stop);
  mycomp->logger = logger;
  iot_logger_add_ref (logger);
  return mycomp;
}
/* Allocation function, takes as arguments all required component attributes */
Allocation function, takes as arguments all required component attributes
Allocation function takes as arguments all required component attributes
extern my_component_t * my_component_alloc (iot_logger_t * logger)
{
  iot_log_trace (logger, "my_component_alloc()");
  my_component_t * mycomp = calloc (1, sizeof (*mycomp));
  iot_component_init (&mycomp->component, my_component_factory (), (iot_component_start_fn_t) my_component_start, (iot_component_stop_fn_t) my_component_stop);
  mycomp->logger = logger;
  iot_logger_add_ref (logger);
  return mycomp;
}
extern my_component_t * my_component_alloc ( iot_logger_t * logger ) { iot_log_trace ( logger , " " ) ; my_component_t * mycomp = calloc ( 1 , sizeof ( * mycomp ) ) ; iot_component_init ( & mycomp -> component , my_component_factory ( ) , ( iot_component_start_fn_t ) my_component_start , ( iot_component_stop_fn_t ) my_component_stop ) ; mycomp -> logger = logger ; iot_logger_add_ref ( logger ) ; return mycomp ; }
Allocation function, takes as arguments all required component attributes
Allocation function takes as arguments all required component attributes