botsense/bsModules/bsI2C/bsI2CServer.c
int bsModTrace(BsVConnHnd_T hndVConn, bool_t bTrace)
{
  BsModCtlBlk_T  *pCtlBlk;

  // check if handle is in valid range
  if( !BSMOD_IS_VCONN_HANDLE(hndVConn) )
  {
    BSMOD_LOG_ERROR(hndVConn, BS_ECODE_BAD_VCONN_HND,
          "Module vconn handle out-of-range.");
    return -BS_ECODE_BAD_VCONN_HND;
  }

  // retrieve resource control block
  pCtlBlk = (BsModCtlBlk_T *)BSMOD_RSRC(BsModRsrcTbl, hndVConn);

  // check resource
  if( pCtlBlk == NULL )
  {
    BSMOD_LOG_ERROR(hndVConn, BS_ECODE_NO_VCONN,
        "No resources for virtual connection found.");
    return -BS_ECODE_NO_VCONN;
  }

  pCtlBlk->m_bTrace = bTrace;

  return BS_OK;
}
/*!
 * \brief Enable/disable message tracing on handle.
 *
 * \param hndVConn  Virtual connection handle.
 * \param bTrace    Do [not] enable message tracing on this handle.
 *
 * \copydoc doc_return_std
 */
\brief Enable/disable message tracing on handle.
\param hndVConn  Virtual connection handle.
\param bTrace    Do [not] enable message tracing on this handle.


\ brief Enable / disable message tracing on handle . \ param hndVConn Virtual connection handle . \ param bTrace Do [ not ] enable message tracing on this handle .
int bsModTrace(BsVConnHnd_T hndVConn, bool_t bTrace)
{
  BsModCtlBlk_T  *pCtlBlk;
  if( !BSMOD_IS_VCONN_HANDLE(hndVConn) )
  {
    BSMOD_LOG_ERROR(hndVConn, BS_ECODE_BAD_VCONN_HND,
          "Module vconn handle out-of-range.");
    return -BS_ECODE_BAD_VCONN_HND;
  }
  pCtlBlk = (BsModCtlBlk_T *)BSMOD_RSRC(BsModRsrcTbl, hndVConn);
  if( pCtlBlk == NULL )
  {
    BSMOD_LOG_ERROR(hndVConn, BS_ECODE_NO_VCONN,
        "No resources for virtual connection found.");
    return -BS_ECODE_NO_VCONN;
  }
  pCtlBlk->m_bTrace = bTrace;
  return BS_OK;
}
int bsModTrace ( BsVConnHnd_T hndVConn , bool_t bTrace ) { BsModCtlBlk_T * pCtlBlk ; if ( ! BSMOD_IS_VCONN_HANDLE ( hndVConn ) ) { BSMOD_LOG_ERROR ( hndVConn , BS_ECODE_BAD_VCONN_HND , " " ) ; return - BS_ECODE_BAD_VCONN_HND ; } pCtlBlk = ( BsModCtlBlk_T * ) BSMOD_RSRC ( BsModRsrcTbl , hndVConn ) ; if ( pCtlBlk == NULL ) { BSMOD_LOG_ERROR ( hndVConn , BS_ECODE_NO_VCONN , " " ) ; return - BS_ECODE_NO_VCONN ; } pCtlBlk -> m_bTrace = bTrace ; return BS_OK ; }
\brief Enable/disable message tracing on handle.
\ brief Enable / disable message tracing on handle .
// check if handle is in valid range // retrieve resource control block // check resource