botsense/bsProxy/bsProxyUtils.c
void BsProxyLogMsgHdr(const char *sPreface, BsProxyMsgHdr_T *pMsgHdr)
{
  FILE             *fp;
  const NMMsgDef_T *pMsgDef;
  const char       *sMsgName;

  fp = LOG_GET_LOGFP();

  if( pMsgHdr != NULL )
  {
    if( pMsgHdr->m_hdrVConn == BSPROXY_VCONN_SERVER )
    {
      pMsgDef = BsProxyLookupMsgDef((BsProxyMsgId_T)pMsgHdr->m_hdrMsgId);
      sMsgName = pMsgDef!=NULL? pMsgDef->m_sMsgName: "";
    }
    else
    {
      sMsgName = "";
    }
    fprintf(fp, "%s MsgHdr = {\n", sPreface);
    fprintf(fp, "  Magic:   0x%04x\n",  pMsgHdr->m_hdrMagic);
    fprintf(fp, "  Tid:     %u\n",      (uint_t)(pMsgHdr->m_hdrTid));
    fprintf(fp, "  VConn:   %u\n",      (uint_t)(pMsgHdr->m_hdrVConn));
    fprintf(fp, "  MsgId:   %u %s\n",   pMsgHdr->m_hdrMsgId, sMsgName);
    fprintf(fp, "  BodyLen: %u\n",      pMsgHdr->m_hdrBodyLen);
    fprintf(fp, "}\n");
  }
  else
  {
    fprintf(fp, "%s MsgHdr: (null)\n", sPreface);
  }
}
/*!
 * \brief Log message header.
 *
 * \param sPreface  Preface string.
 * \param pMsgHdr   Pointer to message header structure.
 */
\brief Log message header.
\param sPreface  Preface string.
\param pMsgHdr   Pointer to message header structure.
\ brief Log message header . \ param sPreface Preface string . \ param pMsgHdr Pointer to message header structure .
void BsProxyLogMsgHdr(const char *sPreface, BsProxyMsgHdr_T *pMsgHdr)
{
  FILE             *fp;
  const NMMsgDef_T *pMsgDef;
  const char       *sMsgName;
  fp = LOG_GET_LOGFP();
  if( pMsgHdr != NULL )
  {
    if( pMsgHdr->m_hdrVConn == BSPROXY_VCONN_SERVER )
    {
      pMsgDef = BsProxyLookupMsgDef((BsProxyMsgId_T)pMsgHdr->m_hdrMsgId);
      sMsgName = pMsgDef!=NULL? pMsgDef->m_sMsgName: "";
    }
    else
    {
      sMsgName = "";
    }
    fprintf(fp, "%s MsgHdr = {\n", sPreface);
    fprintf(fp, "  Magic:   0x%04x\n",  pMsgHdr->m_hdrMagic);
    fprintf(fp, "  Tid:     %u\n",      (uint_t)(pMsgHdr->m_hdrTid));
    fprintf(fp, "  VConn:   %u\n",      (uint_t)(pMsgHdr->m_hdrVConn));
    fprintf(fp, "  MsgId:   %u %s\n",   pMsgHdr->m_hdrMsgId, sMsgName);
    fprintf(fp, "  BodyLen: %u\n",      pMsgHdr->m_hdrBodyLen);
    fprintf(fp, "}\n");
  }
  else
  {
    fprintf(fp, "%s MsgHdr: (null)\n", sPreface);
  }
}
void BsProxyLogMsgHdr ( const char * sPreface , BsProxyMsgHdr_T * pMsgHdr ) { FILE * fp ; const NMMsgDef_T * pMsgDef ; const char * sMsgName ; fp = LOG_GET_LOGFP ( ) ; if ( pMsgHdr != NULL ) { if ( pMsgHdr -> m_hdrVConn == BSPROXY_VCONN_SERVER ) { pMsgDef = BsProxyLookupMsgDef ( ( BsProxyMsgId_T ) pMsgHdr -> m_hdrMsgId ) ; sMsgName = pMsgDef != NULL ? pMsgDef -> m_sMsgName : " " ; } else { sMsgName = " " ; } fprintf ( fp , " \n " , sPreface ) ; fprintf ( fp , " \n " , pMsgHdr -> m_hdrMagic ) ; fprintf ( fp , " \n " , ( uint_t ) ( pMsgHdr -> m_hdrTid ) ) ; fprintf ( fp , " \n " , ( uint_t ) ( pMsgHdr -> m_hdrVConn ) ) ; fprintf ( fp , " \n " , pMsgHdr -> m_hdrMsgId , sMsgName ) ; fprintf ( fp , " \n " , pMsgHdr -> m_hdrBodyLen ) ; fprintf ( fp , " \n " ) ; } else { fprintf ( fp , " \n " , sPreface ) ; } }
\brief Log message header.
\ brief Log message header .