botsense/libbotsense/bsLibUtils.c
void bsLogBuf(const char *sBufName, byte_t buf[], size_t uCount)
{
  FILE   *fp;   // log file pointer
  size_t  i;    // working index

  fp = LOG_GET_LOGFP();

  fprintf(fp, "%sDiag%d: %s=", LOG_PREFACE, LOG_GET_THRESHOLD()-1, sBufName);
  for(i=0; i<uCount; ++i)
  {
    if( (i % 16) == 0 )
    {
      fprintf(fp, "\n");
    }
    fprintf(fp, " 0x%02x", buf[i]);
  }
  fprintf(fp, "\n");
}
/*! 
 * \brief Log data bytes.
 *
 * Print diagnostic logging of the contents of a buffer of bytes.
 *
 * \param sBufName  Name of buffer.
 * \param buf       Buffer.
 * \param uCount    Number of bytes to log.
 */
\brief Log data bytes.
Print diagnostic logging of the contents of a buffer of bytes.

\param sBufName  Name of buffer.
\param buf       Buffer.
\param uCount    Number of bytes to log.
\ brief Log data bytes . Print diagnostic logging of the contents of a buffer of bytes . \ param sBufName Name of buffer . \ param buf Buffer . \ param uCount Number of bytes to log .
void bsLogBuf(const char *sBufName, byte_t buf[], size_t uCount)
{
  FILE   *fp;   
  size_t  i;    
  fp = LOG_GET_LOGFP();
  fprintf(fp, "%sDiag%d: %s=", LOG_PREFACE, LOG_GET_THRESHOLD()-1, sBufName);
  for(i=0; i<uCount; ++i)
  {
    if( (i % 16) == 0 )
    {
      fprintf(fp, "\n");
    }
    fprintf(fp, " 0x%02x", buf[i]);
  }
  fprintf(fp, "\n");
}
void bsLogBuf ( const char * sBufName , byte_t buf [ ] , size_t uCount ) { FILE * fp ; size_t i ; fp = LOG_GET_LOGFP ( ) ; fprintf ( fp , " " , LOG_PREFACE , LOG_GET_THRESHOLD ( ) - 1 , sBufName ) ; for ( i = 0 ; i < uCount ; ++ i ) { if ( ( i % 16 ) == 0 ) { fprintf ( fp , " \n " ) ; } fprintf ( fp , " " , buf [ i ] ) ; } fprintf ( fp , " \n " ) ; }
\brief Log data bytes.
\ brief Log data bytes .
// log file pointer // working index