49 #ifndef _BSLIBINTERNAL_H 50 #define _BSLIBINTERNAL_H 55 #include "rnr/rnrconfig.h" 66 #define BSCLIENT_T_READ 10000000 67 #define BSCLIENT_T_WRITE 5000000
68 #define BSCLIENT_T_FLUSH 5000000
127 #define _BS_LOG_MSGHDR(pClient, sPreface, pMsgHdr) \ 130 if( LOGABLE(LOG_LEVEL_DIAG3) ) \ 132 bsClientLogMsgHdr(pClient, sPreface, pMsgHdr); \ 136 #define _BS_LOG_MSGHDR(pClient, sPreface, pMsgHdr) 145 #define _BS_LOG_REQ(pClient, pMsgHdr) \ 146 LOGDIAG3("%s: MsgId=%d sent.", \ 147 bsClientAttrGetName(pClient), (pMsgHdr)->m_hdrMsgId) 155 #define _BS_LOG_RSP(pClient, pMsgHdr) \ 156 LOGDIAG3("%s: MsgId=%d received.", \ 157 bsClientAttrGetName(pClient), (pMsgHdr)->m_hdrMsgId) 194 const char *sDevName,
195 const char *sModName,
202 #endif // _BSLIBINTERNAL_H BsVConnHnd_T m_hndVConn
virtual connection handle
const BsClientAppInfo_T * m_pAppInfo
app-specific info (optional)
BsVConn_T * m_tblVConn[BSPROXY_VCONN_CLIENT_MAX]
table of virtual connections
const char * m_sModName
interface module path name
#define BSCLIENT_IS_VCONN_HANDLE(hnd)
Test if the handle is in the valid client virtual connection range.
BsProxyMsgHdr_T * m_pMsgHdr
cached message header
uint_t m_uReqTimeout
client request timeout
Socket_T * m_pSocket
IP socket to server.
int bsVConnDelete(BsClient_T *pClient, int index)
Delete a vConnection (and proxied device) from the client's tblVConn table.
Client Virtual Connection Info Structure.
int bsVConnRemove(BsClient_T *pClient, BsVConnHnd_T hndVConn)
Remove a vConnection from the client's tblHndIndex table.
Cashed Transaction Information Structure.
pthread_mutex_t m_mutexTrans
client transaction mutex
The Client Structure Type.
uint_t m_uRspTimeout
client response timeout
#define BSPROXY_VCONN_UNDEF
undefined virtual connection handle
INLINE_IN_H BsVConn_T * bsGetVConn(BsClient_T *pClient, BsVConnHnd_T hndVConn)
int bsVConnNew(BsClient_T *pClient, const char *sDevName, const char *sModName, const BsClientAppInfo_T *pAppInfo, bool_t bTrace)
Reserve a new client vConnection (and proxied device) in the client's tblVConn table.
struct _bsClientStruct BsClient_T
The Client Structure Type.
<b><i>BotSense</i></b> client library declarations.
const char * m_sDevName
device path name
uint_t m_uTidCounter
transaction id counter
BsTransInfo_T * m_tblTransCache[BSPROXY_TID_NUMOF]
transaction cache
<b><i>BotSense</i></b> client library information and callbacks to application-specific data...
byte_t * m_pBuf
cached packed message body buffer
bool_t m_bTraceServer
do [not] trace server-ended msgs
const char * m_sClientName
client name
bool_t m_bCached
this transaction is [not] cached
#define BSPROXY_TID_NUMOF
number of unique tid's
void bsVConnClearAll(BsClient_T *pClient)
Remove and delete all of a client's vConnections.
int bsVConnAdd(BsClient_T *pClient, BsVConnHnd_T hndVConn, int index)
Add a created vConnection to the client's tblHndIndex table.
BotSense Proxy Message Header Structure.
#define BSPROXY_VCONN_CLIENT_MAX
max number of virtual conn/client
#define BSPROXY_VCONN_MOD_NUMOF
number of module-specific handles
byte_t m_tblHndIndex[BSPROXY_VCONN_MOD_NUMOF]
handle to vconn index table
int m_nVConnCount
number of active v. connections
bool_t m_bTrace
do [not] trace this vconn msgs
<b><i>BotSense</i></b> package top-level, unifying header declarations.
int BsVConnHnd_T
virtual connection handle type