Kuon/sw/bsModules/bsKuon/bsKuonClient.c
int bsKuonReqAlterSlew(BsClient_P   pClient,
                          BsVConnHnd_T hndVConn,
                          int          nslewFL,
                          int          nslewFR,
                          int          nslewRL,
                          int          nslewRR)
{
  static BsKuonMsgId_T    msgIdReq = BsKuonMsgIdReqAlterSlew;
  static BsProxyMsgId_T   msgIdRsp = BsProxyMsgIdRspOk;

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

  //
  // Parameter checks.
  //
  BSCLIENT_TRY_EXPR(pClient, BSCLIENT_HAS_VCONN(pClient, hndVConn),
      BS_ECODE_BAD_VAL, "VConn=%d", hndVConn);

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

  //
  // Set request message values.
  //
  msgReq.m_slewFL  = (ushort_t)nslewFL;
  msgReq.m_slewFR  = (ushort_t)nslewFR;
  msgReq.m_slewRL  = (ushort_t)nslewRL;
  msgReq.m_slewRR  = (ushort_t)nslewRR;

  //
  // Pack request.
  //
  n = BsKuonPackReqAlterSlew(&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,  hndVConn,
                    msgIdReq, buf, (size_t)n,
                    msgIdRsp, buf, sizeof(buf));

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

  //
  // Set return values from response.
  //
  LOGDIAG3("%s: SetSlew: (%d,%d,%d,%d).", bsClientAttrGetName(pClient),
                                nslewFL, nslewFR, nslewRL, nslewRR);

  return BS_OK;
}
/*!
 * \brief Proxied request to alter robots slew rates.
 *
 * \param pClient     \h_botsense client.
 * \param hndVConn    Handle to virtual connection to close.
 * \param nslewFL    Change front left wheel brake rate.
 * \param nslewFR    Change front right wheel brake rate.
 * \param nslewRL    Change rear left wheel brake rate.
 * \param nslewRR    Change rear right wheel brake rate.
 *
 * \copydoc doc_return_bs_std
 */
\brief Proxied request to alter robots slew rates.
\param pClient     \h_botsense client.
\param hndVConn    Handle to virtual connection to close.
\param nslewFL    Change front left wheel brake rate.
\param nslewFR    Change front right wheel brake rate.
\param nslewRL    Change rear left wheel brake rate.
\param nslewRR    Change rear right wheel brake rate.


\ brief Proxied request to alter robots slew rates . \ param pClient \ h_botsense client . \ param hndVConn Handle to virtual connection to close . \ param nslewFL Change front left wheel brake rate . \ param nslewFR Change front right wheel brake rate . \ param nslewRL Change rear left wheel brake rate . \ param nslewRR Change rear right wheel brake rate .
int bsKuonReqAlterSlew(BsClient_P   pClient,
                          BsVConnHnd_T hndVConn,
                          int          nslewFL,
                          int          nslewFR,
                          int          nslewRL,
                          int          nslewRR)
{
  static BsKuonMsgId_T    msgIdReq = BsKuonMsgIdReqAlterSlew;
  static BsProxyMsgId_T   msgIdRsp = BsProxyMsgIdRspOk;
  BsKuonReqAlterSlew_T    msgReq;                   
  byte_t                  buf[BSPROXY_MSG_MAX_LEN]; 
  bool_t                  bTrace;                   
  int                     n;                        
   Parameter checks.
  BSCLIENT_TRY_EXPR(pClient, BSCLIENT_HAS_VCONN(pClient, hndVConn),
      BS_ECODE_BAD_VAL, "VConn=%d", hndVConn);
   trace state
  bTrace = bsClientAttrGetTraceState(pClient, hndVConn);
   Set request message values.
  msgReq.m_slewFL  = (ushort_t)nslewFL;
  msgReq.m_slewFR  = (ushort_t)nslewFR;
  msgReq.m_slewRL  = (ushort_t)nslewRL;
  msgReq.m_slewRR  = (ushort_t)nslewRR;
   Pack request.
  n = BsKuonPackReqAlterSlew(&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,  hndVConn,
                    msgIdReq, buf, (size_t)n,
                    msgIdRsp, buf, sizeof(buf));
   check transaction return code
  BSCLIENT_TRY_ECODE(pClient, n, "MsgId=%u: Transaction failed.", msgIdReq);
   Set return values from response.
  LOGDIAG3("%s: SetSlew: (%d,%d,%d,%d).", bsClientAttrGetName(pClient),
                                nslewFL, nslewFR, nslewRL, nslewRR);
  return BS_OK;
}
int bsKuonReqAlterSlew ( BsClient_P pClient , BsVConnHnd_T hndVConn , int nslewFL , int nslewFR , int nslewRL , int nslewRR ) { static BsKuonMsgId_T msgIdReq = BsKuonMsgIdReqAlterSlew ; static BsProxyMsgId_T msgIdRsp = BsProxyMsgIdRspOk ; BsKuonReqAlterSlew_T msgReq ; byte_t buf [ BSPROXY_MSG_MAX_LEN ] ; bool_t bTrace ; int n ; BSCLIENT_TRY_EXPR ( pClient , BSCLIENT_HAS_VCONN ( pClient , hndVConn ) , BS_ECODE_BAD_VAL , " " , hndVConn ) ; bTrace = bsClientAttrGetTraceState ( pClient , hndVConn ) ; msgReq . m_slewFL = ( ushort_t ) nslewFL ; msgReq . m_slewFR = ( ushort_t ) nslewFR ; msgReq . m_slewRL = ( ushort_t ) nslewRL ; msgReq . m_slewRR = ( ushort_t ) nslewRR ; n = BsKuonPackReqAlterSlew ( & msgReq , BSPROXY_BUF_BODY ( buf ) , bTrace ) ; BSCLIENT_TRY_NM_ECODE ( pClient , n , " " , msgIdReq ) ; n = bsClientTrans ( pClient , hndVConn , msgIdReq , buf , ( size_t ) n , msgIdRsp , buf , sizeof ( buf ) ) ; BSCLIENT_TRY_ECODE ( pClient , n , " " , msgIdReq ) ; LOGDIAG3 ( " " , bsClientAttrGetName ( pClient ) , nslewFL , nslewFR , nslewRL , nslewRR ) ; return BS_OK ; }
\brief Proxied request to alter robots slew rates.
\ brief Proxied request to alter robots slew rates .
// request message  // req/rsp buffer // do [not] trace messages // num of bytes/return code // // Parameter checks. // // trace state // // Set request message values. // // // Pack request. // // check packing return code // // Execute request-response transaction. // // check transaction return code // // Set return values from response. //