AzureMXChip/MXCHIPAZ3166/core/lib/netxduo/addons/azure_iot/azure-sdk-for-c/sdk/samples/iot/pnp/pnp_protocol.c
static bool is_component_in_model(
    az_span component_name,
    az_span const** components_ptr,
    int32_t components_num,
    int32_t* out_index)
{
  if (az_span_size(component_name) == 0)
  {
    return false;
  }

  int32_t index = 0;
  while (index < components_num)
  {
    if (az_span_is_content_equal(component_name, *components_ptr[index]))
    {
      *out_index = index;
      return true;
    }
    index++;
  }

  return false;
}
// Check if the component name is in the model
Check if the component name is in the model
Check if the component name is in the model
static bool is_component_in_model(
    az_span component_name,
    az_span const** components_ptr,
    int32_t components_num,
    int32_t* out_index)
{
  if (az_span_size(component_name) == 0)
  {
    return false;
  }
  int32_t index = 0;
  while (index < components_num)
  {
    if (az_span_is_content_equal(component_name, *components_ptr[index]))
    {
      *out_index = index;
      return true;
    }
    index++;
  }
  return false;
}
static bool is_component_in_model ( az_span component_name , az_span const * * components_ptr , int32_t components_num , int32_t * out_index ) { if ( az_span_size ( component_name ) == 0 ) { return false ; } int32_t index = 0 ; while ( index < components_num ) { if ( az_span_is_content_equal ( component_name , * components_ptr [ index ] ) ) { * out_index = index ; return true ; } index ++ ; } return false ; }
Check if the component name is in the model
Check if the component name is in the model