13 #ifndef __LTKCPP_CONNECTION_H__
14 #define __LTKCPP_CONNECTION_H__
64 unsigned int nBufferSize);
70 const char * pReaderHostName);
104 llrp_u32_t ResponseMessageID);
110 enum E_LLRP_CONNECTION_TYPE
112 E_LLRP_CONNECTION_TYPE_UNSECURE,
113 E_LLRP_CONNECTION_TYPE_SSL
117 struct bio_st * m_pBio;
120 const char * m_pConnectErrorStr;
126 std::list<CMessage *> m_listInputQueue;
129 unsigned int m_nBufferSize;
135 llrp_byte_t * pBuffer;
138 unsigned int nBuffer;
146 CFrameExtract FrameExtract;
156 llrp_byte_t * pBuffer;
159 unsigned int nBuffer;
169 int initializeWinsock();
170 int shutdownWinsock();
172 int initializeSslBio(bio_st** ppBio);
173 int openSocketConnection(
const char* pkzReaderHostName,
const char* pkzPort,
unsigned long* phSocket);
185 void initializeOpenSSL();
190 #endif // __LTKCPP_CONNECTION_H__
CMessage * recvResponse(int nMaxMS, const CTypeDescriptor *pResponseType, llrp_u32_t ResponseMessageID)
Receive a specific message from a connection.
CConnection(const CTypeRegistry *pTypeRegistry, unsigned int nBufferSize)
Construct a new LLRP connection instance.
EResultCode
Error result codes for LTK operations.
int closeConnectionToReader(void)
Close connection to reader, allow reuse of instance.
A collection of pointers to CTypeDescriptors.
const CErrorDetails * getTransactError(void)
Get the details that explains transact() error.
CMessage * recvMessage(int nMaxMS)
Receive a message from a connection.
CMessage * transact(CMessage *pSendMessage, int nMaxMS)
Transact a LLRP request and response to a connection.
const CErrorDetails * getRecvError(void)
Get the details that explains recvMessage() or recvResponse() error.
int openConnectionToReader(const char *pReaderHostName)
Open a connection to the reader over an unencrypted socket.
EResultCode sendMessage(CMessage *pMessage)
Send a LLRP message to a connection.
Class to return error details in LTKCPP operations.
Base Class for All LLRP LTK Messages.
const char * getConnectError(void)
Get the string that explains openReaderConnection() error.
~CConnection(void)
Destruct a LLRP connection instance.
int openSecureConnectionToReader(const char *pReaderHostName)
Open a connection to the reader over an encrypted socket.
Describes a message or parameter type.
const CErrorDetails * getSendError(void)
Get the details that explains sendMessage() error.