botsense/libbotsense/bsLibServer.c
int bsServerReqMsgTrace(BsClient_P   pClient,
                        BsVConnHnd_T hndVConn,
                        bool_t       bNewTrace)
{
  static BsProxyMsgId_T msgIdReq = BsProxyMsgIdReqMsgTrace;
  static BsProxyMsgId_T msgIdRsp = BsProxyMsgIdRspOk;

  BsProxyReqMsgTrace_T  msgReq;                   // request message 
  byte_t                buf[BSPROXY_MSG_MAX_LEN]; // req/rsp buffer
  bool_t                bTrace;                   // do [not] trace messages
  int                   n;                        // number of bytes/return code

  // trace state
  bTrace = bsClientAttrGetTraceState(pClient, BSPROXY_VCONN_SERVER);

  //
  // Set request message values.
  //
  msgReq.m_vconn = (byte_t)hndVConn;
  msgReq.m_trace  = bNewTrace;

  //
  // Pack request.
  //
  n = BsProxyPackReqMsgTrace(&msgReq, BSPROXY_BUF_BODY(buf), bTrace);

  // check packing return code
  BSCLIENT_TRY_NM_ECODE(pClient, n, "MsgId=%u", msgIdReq);

  //
  // Execute request-response transaction.
  //
  n = bsClientTrans(pClient,  BSPROXY_VCONN_SERVER,
                    msgIdReq, buf, (size_t)n,
                    msgIdRsp, buf, sizeof(buf));

  // check transaction return code
  BSCLIENT_TRY_ECODE(pClient, n, "MsgId=%u: Transaction failed.", msgIdReq);

  //
  // Unpack response. No response body.
  //

  //
  // Set return values from response. No response values.
  //

  return BS_OK;
}
/*!
 * \brief Request server to enable/disable message tracing on a virtual
 * connection.
 * 
 * \param pClient         \h_botsense client.
 * \param hndVConn        Virtual connection handle to set tracing state.
 * \param bNewTrace       Message new tracing enable(true)/disable(false) state.
 * 
 * \copydoc doc_return_std
 */
\brief Request server to enable/disable message tracing on a virtual
connection.

\param pClient         \h_botsense client.
\param hndVConn        Virtual connection handle to set tracing state.


\ brief Request server to enable / disable message tracing on a virtual connection . \ param pClient \ h_botsense client . \ param hndVConn Virtual connection handle to set tracing state .
int bsServerReqMsgTrace(BsClient_P   pClient,
                        BsVConnHnd_T hndVConn,
                        bool_t       bNewTrace)
{
  static BsProxyMsgId_T msgIdReq = BsProxyMsgIdReqMsgTrace;
  static BsProxyMsgId_T msgIdRsp = BsProxyMsgIdRspOk;
  BsProxyReqMsgTrace_T  msgReq;                   
  byte_t                buf[BSPROXY_MSG_MAX_LEN]; 
  bool_t                bTrace;                   
  int                   n;                        
  bTrace = bsClientAttrGetTraceState(pClient, BSPROXY_VCONN_SERVER);
   Set request message values.
  msgReq.m_vconn = (byte_t)hndVConn;
  msgReq.m_trace  = bNewTrace;
   Pack request.
  n = BsProxyPackReqMsgTrace(&msgReq, BSPROXY_BUF_BODY(buf), bTrace);
   check packing return code
  BSCLIENT_TRY_NM_ECODE(pClient, n, "MsgId=%u", msgIdReq);
   Execute request-response transaction.
  n = bsClientTrans(pClient,  BSPROXY_VCONN_SERVER,
                    msgIdReq, buf, (size_t)n,
                    msgIdRsp, buf, sizeof(buf));
   check transaction return code
  BSCLIENT_TRY_ECODE(pClient, n, "MsgId=%u: Transaction failed.", msgIdReq);
   Unpack response. No response body.
   Set return values from response. No response values.
  return BS_OK;
}
int bsServerReqMsgTrace ( BsClient_P pClient , BsVConnHnd_T hndVConn , bool_t bNewTrace ) { static BsProxyMsgId_T msgIdReq = BsProxyMsgIdReqMsgTrace ; static BsProxyMsgId_T msgIdRsp = BsProxyMsgIdRspOk ; BsProxyReqMsgTrace_T msgReq ; byte_t buf [ BSPROXY_MSG_MAX_LEN ] ; bool_t bTrace ; int n ; bTrace = bsClientAttrGetTraceState ( pClient , BSPROXY_VCONN_SERVER ) ; msgReq . m_vconn = ( byte_t ) hndVConn ; msgReq . m_trace = bNewTrace ; n = BsProxyPackReqMsgTrace ( & msgReq , BSPROXY_BUF_BODY ( buf ) , bTrace ) ; BSCLIENT_TRY_NM_ECODE ( pClient , n , " " , msgIdReq ) ; n = bsClientTrans ( pClient , BSPROXY_VCONN_SERVER , msgIdReq , buf , ( size_t ) n , msgIdRsp , buf , sizeof ( buf ) ) ; BSCLIENT_TRY_ECODE ( pClient , n , " " , msgIdReq ) ; return BS_OK ; }
\brief Request server to enable/disable message tracing on a virtual
 connection.
\ brief Request server to enable / disable message tracing on a virtual connection .
// request message  // req/rsp buffer // do [not] trace messages // number of bytes/return code // trace state // // Set request message values. // // // Pack request. // // check packing return code // // Execute request-response transaction. // // check transaction return code // // Unpack response. No response body. // // // Set return values from response. No response values. //