42 #define snprintf _snprintf 49 unsigned int m_modelNumber;
50 unsigned int m_messageID;
61 : m_Verbose(0), m_pConnectionToReader(NULL)
68 char * pReaderHostName);
71 checkConnectionStatus (
void);
74 enableImpinjExtensions (
void);
77 resetConfigurationToFactoryDefaults (
void);
80 getReaderCapabilities(
void);
83 setImpinjReaderConfig(
void);
98 awaitAndPrintReport (
int timeoutSec);
105 printOneTagReportData (
115 int getOnePhaseAngle(
127 unsigned long long *out);
132 unsigned short *out);
137 unsigned short *out);
144 unsigned short channelIndex,
145 unsigned short antenna,
146 unsigned long long time,
147 double *outVelocity);
150 handleReaderEventNotification (
158 handleReaderExceptionEvent (
216 CMyApplication myApp;
217 char * pReaderHostName;
226 pReaderHostName = av[1];
252 pReaderHostName = av[2];
263 rc = myApp.run(pReaderHostName);
265 printf(
"INFO: Done\n");
298 printf(
"Usage: %s [-v[v]] READERHOSTNAME\n", pProgName);
300 printf(
"Each -v increases verbosity level\n");
303 printf(
"Usage: %s [/v[v]] READERHOSTNAME\n", pProgName);
305 printf(
"Each /v increases verbosity level\n");
353 CMyApplication::run (
354 char * pReaderHostName)
364 pTypeRegistry = getTheTypeRegistry();
365 if(NULL == pTypeRegistry)
367 printf(
"ERROR: getTheTypeRegistry failed\n");
387 printf(
"ERROR: new CConnection failed\n");
396 printf(
"INFO: Connecting to %s....\n", pReaderHostName);
411 m_pConnectionToReader = pConn;
415 printf(
"INFO: Connected, checking status....\n");
424 if(0 == checkConnectionStatus())
427 if(0 == enableImpinjExtensions())
430 if(0 == resetConfigurationToFactoryDefaults())
433 if(0 == getReaderCapabilities())
436 if(0 == setImpinjReaderConfig())
442 if(0 == enableROSpec())
445 if(0 == startROSpec())
448 if(0 == awaitAndPrintReport(60))
451 if(0 == stopROSpec())
470 printf(
"INFO: Clean up reader configuration...\n");
472 resetConfigurationToFactoryDefaults();
478 printf(
"INFO: Finished\n");
490 delete pTypeRegistry;
531 CMyApplication::checkConnectionStatus (
void)
542 pMessage = recvMessage(10000);
558 if(&CREADER_EVENT_NOTIFICATION::s_typeDescriptor != pMessage->
m_pType)
587 if(ConnectionAttemptStatusType_Success != pEvent->
getStatus())
599 printf(
"INFO: Connection status OK\n");
611 printf(
"ERROR: checkConnectionStatus failed\n");
634 CMyApplication::enableImpinjExtensions (
void)
644 pCmd->setMessageID(m_messageID++);
648 pRspMsg = transact(pCmd);
673 "enableImpinjExtensions"))
690 printf(
"INFO: Impinj Extensions are enabled\n");
720 CMyApplication::resetConfigurationToFactoryDefaults (
void)
730 pCmd->setMessageID(m_messageID++);
736 pRspMsg = transact(pCmd);
761 "resetConfigurationToFactoryDefaults"))
778 printf(
"INFO: Configuration reset to factory defaults\n");
804 CMyApplication::getReaderCapabilities(
void)
810 std::list<CTransmitPowerLevelTableEntry *>::iterator PwrLvl;
811 unsigned int bMajorVersion, bMinorVersion, bDevVersion, bBuildVersion = 0;
817 pCmd->setMessageID(m_messageID++);
823 pRspMsg = transact(pCmd);
848 "getReaderCapabilities"))
871 printf(
"ERROR: Must have Firmware 4.4 or later for low level data example \n");
881 if( (bMajorVersion < 4) && (bMinorVersion < 4) )
883 printf(
"ERROR: Must have Firmware 4.4 or later for low level data example \n");
890 printf(
"INFO: Reader Model Name %u\n", m_modelNumber);
903 printf(
"INFO: Found LLRP Capabilities \n");
992 CMyApplication::setImpinjReaderConfig(
void)
1002 pCmd->setMessageID(m_messageID++);
1093 pRspMsg = transact(pCmd);
1118 "setImpinjReaderConfig"))
1135 printf(
"INFO: Set Impinj Reader Configuration \n");
1194 CMyApplication::addROSpec (
void)
1199 ROSpecStartTriggerType_Null);
1211 AISpecStopTriggerType_Null);
1217 pInventoryParameterSpec->
setProtocolID(AirProtocols_EPCGlobalClass1Gen2);
1250 pCmd->setMessageID(m_messageID++);
1256 pRspMsg = transact(pCmd);
1281 if(0 != checkLLRPStatus(pRsp->
getLLRPStatus(),
"addROSpec"))
1298 printf(
"INFO: ROSpec added\n");
1326 CMyApplication::enableROSpec (
void)
1336 pCmd->setMessageID(m_messageID++);
1342 pRspMsg = transact(pCmd);
1366 if(0 != checkLLRPStatus(pRsp->
getLLRPStatus(),
"enableROSpec"))
1383 printf(
"INFO: ROSpec enabled\n");
1411 CMyApplication::startROSpec (
void)
1421 pCmd->setMessageID(m_messageID++);
1427 pRspMsg = transact(pCmd);
1451 if(0 != checkLLRPStatus(pRsp->
getLLRPStatus(),
"startROSpec"))
1468 printf(
"INFO: ROSpec started\n");
1495 CMyApplication::stopROSpec (
void)
1505 pCmd->setMessageID(m_messageID++);
1511 pRspMsg = transact(pCmd);
1535 if(0 != checkLLRPStatus(pRsp->
getLLRPStatus(),
"stopROSpec"))
1552 printf(
"INFO: ROSpec stopped\n");
1582 CMyApplication::awaitAndPrintReport (
int timeout)
1586 time_t startTime = time(NULL);
1602 pMessage = recvMessage(1000);
1605 tempTime = time(NULL);
1606 if(difftime(tempTime, startTime) > timeout)
1611 if(NULL == pMessage)
1626 if(&CRO_ACCESS_REPORT::s_typeDescriptor == pType)
1632 printTagReportData(pNtf);
1639 else if(&CREADER_EVENT_NOTIFICATION::s_typeDescriptor == pType)
1647 if(NULL != pNtfData)
1649 handleReaderEventNotification(pNtfData);
1657 printf(
"WARNING: READER_EVENT_NOTIFICATION without data\n");
1666 printf(
"WARNING: Ignored unexpected message during monitor: %s\n",
1695 CMyApplication::printTagReportData (
1698 std::list<CTagReportData *>::iterator Cur;
1699 std::list<CParameter *>::iterator CustCur;
1701 unsigned int nEntry = 0;
1716 printf(
"INFO: %u tag report entries\n", nEntry);
1727 printOneTagReportData(*Cur);
1740 CMyApplication::formatOneEPC (
1747 int bufsize = buflen;
1750 written = snprintf(p, bufsize,
"%s", startStr);
1754 if(NULL != pEPCParameter)
1759 llrp_u8_t * pValue = NULL;
1762 pType = pEPCParameter->
m_pType;
1763 if(&CEPC_96::s_typeDescriptor == pType)
1767 pEPC_96 = (
CEPC_96 *) pEPCParameter;
1768 my_u96 = pEPC_96->
getEPC();
1772 else if(&CEPCData::s_typeDescriptor == pType)
1776 pEPCData = (
CEPCData *) pEPCParameter;
1777 my_u1v = pEPCData->
getEPC();
1779 n = (my_u1v.
m_nBit + 7u) / 8u;
1784 for(i = 0; i < n; i++)
1786 if(0 < i && i%2 == 0 && 1 < bufsize)
1793 written = snprintf(p, bufsize,
"%02X", pValue[i]);
1801 written = snprintf(p, bufsize,
"%s",
"---unknown-epc-data-type---");
1808 written = snprintf(p, bufsize,
"%s",
"--null epc---");
1814 buf[buflen-1] =
'\0';
1816 return buflen - bufsize;
1829 CMyApplication::getOnePhaseAngle(
1833 if(NULL != pRfPhase)
1836 *out = ((double) phase * 360)/4096;
1851 CMyApplication::getOnePeakRSSI (
1855 if(NULL != pPeakRSSI)
1857 llrp_s16_t rssival = pPeakRSSI->
getRSSI();
1858 *out = ((double) rssival / 100);
1873 CMyApplication::getOneTimestamp (
1875 unsigned long long *out)
1879 if(NULL == pTimestamp)
1884 if(&CFirstSeenTimestampUTC::s_typeDescriptor == pTimestamp->
m_pType)
1888 }
else if (&CFirstSeenTimestampUptime::s_typeDescriptor == pTimestamp->
m_pType)
1892 }
else if(&CLastSeenTimestampUTC::s_typeDescriptor == pTimestamp->
m_pType)
1896 }
else if (&CLastSeenTimestampUTC::s_typeDescriptor == pTimestamp->
m_pType)
1915 CMyApplication::getOneAntenna (
1917 unsigned short *out)
1919 if(NULL != pAntenna)
1936 CMyApplication::getOneChannelIndex (
1938 unsigned short *out)
1940 if(NULL != pChannelIndex)
1958 CMyApplication::estimateVelocity(
1962 unsigned short channelIndex,
1963 unsigned short antenna,
1964 unsigned long long time,
1965 double *outVelocity)
1968 static char lastEpcStr[128];
1969 static double lastrssi = 0;
1970 static double lastphase = 0;
1971 static unsigned short lastchannelindex = 0;
1972 static unsigned short lastantenna = 0;
1973 static unsigned long long lasttime = 0;
1978 if((0 == strcmp(epcStr, lastEpcStr)) &&
1979 (lastantenna == antenna) &&
1980 (lastchannelindex == channelIndex))
1983 double phaseChangeDegrees = (phase - lastphase);
1984 double timeChangeUsec = (double) (time - lasttime);
1987 while( phaseChangeDegrees < -180)
1988 phaseChangeDegrees += 360;
1989 while( phaseChangeDegrees > 180)
1990 phaseChangeDegrees -= 360;
1998 if( abs((
int) phaseChangeDegrees) <= 90)
2015 *outVelocity = ((phaseChangeDegrees * 0.5 * 0.327868852 * 1000000)/(360 * timeChangeUsec ));
2022 strcpy(lastEpcStr, epcStr);
2025 lastchannelindex = channelIndex;
2026 lastantenna = antenna;
2041 CMyApplication::printOneTagReportData (
2049 unsigned long long time;
2050 unsigned short antenna, channelIndex;
2051 double rssi, phase, velocityInst;
2054 static double velocity = 0;
2055 std::list<CParameter *>::iterator Cur;
2065 memset(epcBuf, 0x00,
sizeof(epcBuf));
2066 formatOneEPC(pEPCParameter, epcBuf, 128,
"");
2068 written = snprintf(ptr, len,
" epc=%s", epcBuf);
2074 written = snprintf(ptr, len,
" tm=%010u", time);
2079 if(getOneChannelIndex(pTagReportData->
getChannelIndex(), &channelIndex))
2081 written = snprintf(ptr, len,
" idx=%02u", channelIndex);
2086 if(getOneAntenna(pTagReportData->
getAntennaID(), &antenna))
2088 written = snprintf(ptr, len,
" ant=%01u", antenna);
2099 if(&CImpinjRFPhaseAngle::s_typeDescriptor == (*Cur)->m_pType)
2103 written = snprintf(ptr, len,
" ph=%+04d", (
int) phase);
2107 }
else if (&CImpinjPeakRSSI::s_typeDescriptor == (*Cur)->m_pType)
2111 written = snprintf(ptr, len,
" rs=%+3.2f", rssi);
2120 if(estimateVelocity(&epcBuf[0], rssi, phase, channelIndex, antenna, time, &velocityInst))
2123 velocity = (6*velocity + 4*velocityInst)/10.0;
2126 if (velocity > 0.25)
2128 if (velocity < -0.25)
2131 written =snprintf(ptr, len,
" vel=%+2.2f filt=%+2.2f %s",
2132 velocityInst, velocity, str);
2139 printf(
"%s\n", aBuf);
2158 CMyApplication::handleReaderEventNotification (
2166 if(NULL != pAntennaEvent)
2168 handleAntennaEvent(pAntennaEvent);
2173 if(NULL != pReaderExceptionEvent)
2175 handleReaderExceptionEvent(pReaderExceptionEvent);
2195 printf(
"NOTICE: Unexpected (unhandled) ReaderEvent\n");
2212 CMyApplication::handleAntennaEvent (
2215 EAntennaEventType eEventType;
2216 llrp_u16_t AntennaID;
2224 case AntennaEventType_Antenna_Disconnected:
2225 pStateStr =
"disconnected";
2228 case AntennaEventType_Antenna_Connected:
2229 pStateStr =
"connected";
2233 pStateStr =
"?unknown-event?";
2237 printf(
"NOTICE: Antenna %d is %s\n", AntennaID, pStateStr);
2254 CMyApplication::handleReaderExceptionEvent (
2259 Message = pReaderExceptionEvent->
getMessage();
2263 printf(
"NOTICE: ReaderException '%.*s'\n",
2268 printf(
"NOTICE: ReaderException but no message\n");
2292 CMyApplication::checkLLRPStatus (
2302 if(NULL == pLLRPStatus)
2304 printf(
"ERROR: %s missing LLRP status\n", pWhatStr);
2324 printf(
"ERROR: %s failed, no error description given\n",
2329 printf(
"ERROR: %s failed, %.*s\n",
2366 CMyApplication::transact (
2378 printf(
"\n===================================\n");
2379 printf(
"INFO: Transact sending\n");
2380 printXMLMessage(pSendMsg);
2388 pRspMsg = pConn->
transact(pSendMsg, 5000);
2394 printf(
"ERROR: %s transact failed, %s\n",
2400 printf(
"ERROR: ... reference type %s\n",
2406 printf(
"ERROR: ... reference field %s\n",
2419 printf(
"\n- - - - - - - - - - - - - - - - - -\n");
2420 printf(
"INFO: Transact received response\n");
2421 printXMLMessage(pRspMsg);
2429 if(&CERROR_MESSAGE::s_typeDescriptor == pRspMsg->
m_pType)
2435 printf(
"ERROR: Received ERROR_MESSAGE instead of %s\n",
2470 CMyApplication::recvMessage (
2485 if(NULL == pMessage)
2492 printf(
"ERROR: recvMessage failed, %s\n",
2498 printf(
"ERROR: ... reference type %s\n",
2504 printf(
"ERROR: ... reference field %s\n",
2517 printf(
"\n===================================\n");
2518 printf(
"INFO: Message received\n");
2519 printXMLMessage(pMessage);
2544 CMyApplication::sendMessage (
2555 printf(
"\n===================================\n");
2556 printf(
"INFO: Sending\n");
2557 printXMLMessage(pSendMsg);
2569 printf(
"ERROR: %s sendMessage failed, %s\n",
2575 printf(
"ERROR: ... reference type %s\n",
2581 printf(
"ERROR: ... reference field %s\n",
2609 CMyApplication::printXMLMessage (
2612 char aBuf[100*1024];
void setEnableFirstSeenTimestamp(llrp_u1_t value)
Set accessor functions for the LLRP EnableFirstSeenTimestamp field.
llrp_utf8v_t getMessage(void)
Get accessor functions for the LLRP Message field.
void setROSpecID(llrp_u32_t value)
Set accessor functions for the LLRP ROSpecID field.
Class Definition CConnectionAttemptEvent for LLRP parameter ConnectionAttemptEvent.
Class Definition CImpinjTagReportContentSelector for LLRP parameter ImpinjTagReportContentSelector.
void setEnableCRC(llrp_u1_t value)
Set accessor functions for the LLRP EnableCRC field.
Class Definition CFirstSeenTimestampUTC for LLRP parameter FirstSeenTimestampUTC. ...
Class Definition CLastSeenTimestampUptime for LLRP parameter LastSeenTimestampUptime.
EResultCode setC1G2SingulationControl(CC1G2SingulationControl *pValue)
Set accessor functions for the LLRP C1G2SingulationControl sub-parameter.
EResultCode addCustom(CParameter *pValue)
Add a Custom to the LLRP sub-parameter list.
char * m_pName
String name of field (e.g. "ROSpecID")
const CTypeDescriptor * m_pType
The type descriptor desribing this element.
llrp_u16_t getChannelIndex(void)
Get accessor functions for the LLRP ChannelIndex field.
Class Definition CEPC_96 for LLRP parameter EPC_96.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
llrp_u8_t * m_pValue
Pointer to the first array element.
Class for LLRP basic type u16v (List of unsigned 16-bit values)
Class Definition CIMPINJ_ENABLE_EXTENSIONS_RESPONSE for LLRP message IMPINJ_ENABLE_EXTENSIONS_RESPONS...
void setDurationTrigger(llrp_u32_t value)
Set accessor functions for the LLRP DurationTrigger field.
Class Definition CFirstSeenTimestampUptime for LLRP parameter FirstSeenTimestampUptime.
void setEnablePeakRSSI(llrp_u1_t value)
Set accessor functions for the LLRP EnablePeakRSSI field.
Class Definition CSTART_ROSPEC_RESPONSE for LLRP message START_ROSPEC_RESPONSE.
Class Definition CC1G2SingulationControl for LLRP parameter C1G2SingulationControl.
const CFieldDescriptor * m_pRefField
If non-NULL this is the field descriptors for the errored field.
void setTari(llrp_u16_t value)
Set accessor functions for the LLRP Tari field.
void setDurationTriggerValue(llrp_u32_t value)
Set accessor functions for the LLRP DurationTriggerValue field.
Class Definition CENABLE_ROSPEC for LLRP message ENABLE_ROSPEC.
void usage(char *pProgName)
Print usage message and exit.
void setEnableLastSeenTimestamp(llrp_u1_t value)
Set accessor functions for the LLRP EnableLastSeenTimestamp field.
const CTypeDescriptor * m_pRefType
If non-NULL this is the type descriptors for the errored type.
void setROReportTrigger(EROReportTriggerType value)
Set accessor functions for the LLRP ROReportTrigger field.
EResultCode addAirProtocolEPCMemorySelector(CParameter *pValue)
Add a AirProtocolEPCMemorySelector to the LLRP sub-parameter list.
void setSerializedTIDMode(EImpinjSerializedTIDMode value)
Set accessor functions for the LLRP SerializedTIDMode field.
void setFieldPingInterval(llrp_u16_t value)
Set accessor functions for the LLRP FieldPingInterval field.
CParameter * getEPCParameter(void)
Get accessor functions for the LLRP EPCParameter sub-parameter.
EResultCode m_eResultCode
Result code from operation.
Class for LLRP basic type u96 (96-bit value)
Class Definition CAntennaEvent for LLRP parameter AntennaEvent.
Class Definition CSTOP_ROSPEC_RESPONSE for LLRP message STOP_ROSPEC_RESPONSE.
void setAISpecStopTriggerType(EAISpecStopTriggerType value)
Set accessor functions for the LLRP AISpecStopTriggerType field.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
llrp_u64_t getMicroseconds(void)
Get accessor functions for the LLRP Microseconds field.
void enrollImpinjTypesIntoRegistry(CTypeRegistry *pTypeRegistry)
Enrolls the types for Impinj into the LTKCPP registry.
llrp_u96_t getEPC(void)
Get accessor functions for the LLRP EPC field.
const char * m_pWhatStr
Descriptive printable error string.
EResultCode toXMLString(char *pBuffer, int nBuffer)
A wrapper around LLRP::toXMLString()
Class Definition CGeneralDeviceCapabilities for LLRP parameter GeneralDeviceCapabilities.
EResultCode setImpinjEnableSerializedTID(CImpinjEnableSerializedTID *pValue)
Set accessor functions for the LLRP ImpinjEnableSerializedTID sub-parameter.
void setROSpecID(llrp_u32_t value)
Set accessor functions for the LLRP ROSpecID field.
Class Definition CImpinjLowDutyCycle for LLRP parameter ImpinjLowDutyCycle.
llrp_utf8v_t getReaderFirmwareVersion(void)
Get accessor functions for the LLRP ReaderFirmwareVersion field.
void setModeIndex(llrp_u16_t value)
Set accessor functions for the LLRP ModeIndex field.
Class Definition CROReportSpec for LLRP parameter ROReportSpec.
EStatusCode getStatusCode(void)
Get accessor functions for the LLRP StatusCode field.
Class Definition CChannelIndex for LLRP parameter ChannelIndex.
void setRequestedData(EGetReaderCapabilitiesRequestedData value)
Set accessor functions for the LLRP RequestedData field.
llrp_u16_t m_nValue
The number of arrray elements.
Class Definition CImpinjRFPhaseAngle for LLRP parameter ImpinjRFPhaseAngle.
int closeConnectionToReader(void)
Close connection to reader, allow reuse of instance.
CGeneralDeviceCapabilities * getGeneralDeviceCapabilities(void)
Get accessor functions for the LLRP GeneralDeviceCapabilities sub-parameter.
EResultCode setC1G2RFControl(CC1G2RFControl *pValue)
Set accessor functions for the LLRP C1G2RFControl sub-parameter.
void setRFPhaseAngleMode(EImpinjRFPhaseAngleMode value)
Set accessor functions for the LLRP RFPhaseAngleMode field.
Class Definition CROSpecStartTrigger for LLRP parameter ROSpecStartTrigger.
EResultCode setImpinjEnablePeakRSSI(CImpinjEnablePeakRSSI *pValue)
Set accessor functions for the LLRP ImpinjEnablePeakRSSI sub-parameter.
EAntennaEventType getEventType(void)
Get accessor functions for the LLRP EventType field.
A collection of pointers to CTypeDescriptors.
CAntennaEvent * getAntennaEvent(void)
Get accessor functions for the LLRP AntennaEvent sub-parameter.
llrp_u32_t getDeviceManufacturerName(void)
Get accessor functions for the LLRP DeviceManufacturerName field.
const CErrorDetails * getTransactError(void)
Get the details that explains transact() error.
EResultCode setROBoundarySpec(CROBoundarySpec *pValue)
Set accessor functions for the LLRP ROBoundarySpec sub-parameter.
void setLowDutyCycleMode(EImpinjLowDutyCycleMode value)
Set accessor functions for the LLRP LowDutyCycleMode field.
Class Definition CRO_ACCESS_REPORT for LLRP message RO_ACCESS_REPORT.
void setEnableAccessSpecID(llrp_u1_t value)
Set accessor functions for the LLRP EnableAccessSpecID field.
Class Definition CAISpec for LLRP parameter AISpec.
Class Definition CROSpec for LLRP parameter ROSpec.
std::list< CParameter * >::iterator endCustom(void)
Returns the last element of the Custom sub-parameter list.
void setROSpecID(llrp_u32_t value)
Set accessor functions for the LLRP ROSpecID field.
Class Definition CImpinjInventorySearchMode for LLRP parameter ImpinjInventorySearchMode.
Class Definition CC1G2RFControl for LLRP parameter C1G2RFControl.
Class Definition CInventoryParameterSpec for LLRP parameter InventoryParameterSpec.
Class Definition CSET_READER_CONFIG_RESPONSE for LLRP message SET_READER_CONFIG_RESPONSE.
void setEnableTagSeenCount(llrp_u1_t value)
Set accessor functions for the LLRP EnableTagSeenCount field.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
void setInventorySearchMode(EImpinjInventorySearchType value)
Set accessor functions for the LLRP InventorySearchMode field.
CReaderExceptionEvent * getReaderExceptionEvent(void)
Get accessor functions for the LLRP ReaderExceptionEvent sub-parameter.
Class Definition CReaderExceptionEvent for LLRP parameter ReaderExceptionEvent.
Class Definition CLLRPStatus for LLRP parameter LLRPStatus.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
CAntennaID * getAntennaID(void)
Get accessor functions for the LLRP AntennaID sub-parameter.
EResultCode addSpecParameter(CParameter *pValue)
Add a SpecParameter to the LLRP sub-parameter list.
Class Definition CEPCData for LLRP parameter EPCData.
llrp_u64_t getMicroseconds(void)
Get accessor functions for the LLRP Microseconds field.
Class Definition CREADER_EVENT_NOTIFICATION for LLRP message READER_EVENT_NOTIFICATION.
CMessage * recvMessage(int nMaxMS)
Receive a message from a connection.
std::list< CTagReportData * >::iterator beginTagReportData(void)
Returns the first element of the TagReportData sub-parameter list.
void setTagInventoryStateAware(llrp_u1_t value)
Set accessor functions for the LLRP TagInventoryStateAware field.
EResultCode setAISpecStopTrigger(CAISpecStopTrigger *pValue)
Set accessor functions for the LLRP AISpecStopTrigger sub-parameter.
EResultCode setTagReportContentSelector(CTagReportContentSelector *pValue)
Set accessor functions for the LLRP TagReportContentSelector sub-parameter.
File that includes all Impinj Custom extension classes and types.
void setEnableChannelIndex(llrp_u1_t value)
Set accessor functions for the LLRP EnableChannelIndex field.
void setROSpecStartTriggerType(EROSpecStartTriggerType value)
Set accessor functions for the LLRP ROSpecStartTriggerType field.
Class Definition CImpinjEnableSerializedTID for LLRP parameter ImpinjEnableSerializedTID.
llrp_u1v_t getEPC(void)
Get accessor functions for the LLRP EPC field.
Class Definition CSET_READER_CONFIG for LLRP message SET_READER_CONFIG.
llrp_u16_t getPhaseAngle(void)
Get accessor functions for the LLRP PhaseAngle field.
CChannelIndex * getChannelIndex(void)
Get accessor functions for the LLRP ChannelIndex sub-parameter.
std::list< CParameter * >::iterator beginCustom(void)
Returns the first element of the Custom sub-parameter list.
CMessage * transact(CMessage *pSendMessage, int nMaxMS)
Transact a LLRP request and response to a connection.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
void setEnablePCBits(llrp_u1_t value)
Set accessor functions for the LLRP EnablePCBits field.
const CErrorDetails * getRecvError(void)
Get the details that explains recvMessage() or recvResponse() error.
Class for LLRP basic type utf8v (vector of utf-8 encoded characters)
llrp_u16_t m_nBit
The number of arrray elements.
Class for LLRP basic type u1v (vector of unsigned 1-bit values)
void setAntennaIDs(llrp_u16v_t value)
Set accessor functions for the LLRP AntennaIDs field.
int openConnectionToReader(const char *pReaderHostName)
Open a connection to the reader over an unencrypted socket.
Class Definition CENABLE_ROSPEC_RESPONSE for LLRP message ENABLE_ROSPEC_RESPONSE. ...
Class Definition CGET_READER_CAPABILITIES for LLRP message GET_READER_CAPABILITIES.
const CTypeDescriptor * m_pResponseType
For messages (bIsMessage==TRUE), this is the type descriptor for the corresponding response...
EResultCode addCustom(CParameter *pValue)
Add a Custom to the LLRP sub-parameter list.
void setTagPopulation(llrp_u16_t value)
Set accessor functions for the LLRP TagPopulation field.
void setProtocolID(EAirProtocols value)
Set accessor functions for the LLRP ProtocolID field.
llrp_u16_t getAntennaID(void)
Get accessor functions for the LLRP AntennaID field.
Class Definition CAntennaID for LLRP parameter AntennaID.
EResultCode sendMessage(CMessage *pMessage)
Send a LLRP message to a connection.
std::list< CTagReportData * >::iterator endTagReportData(void)
Returns the last element of the TagReportData sub-parameter list.
Class to return error details in LTKCPP operations.
void setN(llrp_u16_t value)
Set accessor functions for the LLRP N field.
Class Definition CTagReportData for LLRP parameter TagReportData.
char * m_pName
String name of parameter/message type (e.g. "ROSpec")
EResultCode setROSpec(CROSpec *pValue)
Set accessor functions for the LLRP ROSpec sub-parameter.
int main(int ac, char *av[])
Command main routine.
llrp_u16_t getAntennaID(void)
Get accessor functions for the LLRP AntennaID field.
File that includes all LLRP classes and types.
Class Definition CC1G2InventoryCommand for LLRP parameter C1G2InventoryCommand.
Class Definition CADD_ROSPEC for LLRP message ADD_ROSPEC.
void setAntennaID(llrp_u16_t value)
Set accessor functions for the LLRP AntennaID field.
Class Definition CSTART_ROSPEC for LLRP message START_ROSPEC.
void setROSpecStopTriggerType(EROSpecStopTriggerType value)
Set accessor functions for the LLRP ROSpecStopTriggerType field.
Class Definition CIMPINJ_ENABLE_EXTENSIONS for LLRP message IMPINJ_ENABLE_EXTENSIONS.
EResultCode setROSpecStopTrigger(CROSpecStopTrigger *pValue)
Set accessor functions for the LLRP ROSpecStopTrigger sub-parameter.
Class Definition CAntennaConfiguration for LLRP parameter AntennaConfiguration.
Class Definition CROSpecStopTrigger for LLRP parameter ROSpecStopTrigger.
void setInventoryParameterSpecID(llrp_u16_t value)
Set accessor functions for the LLRP InventoryParameterSpecID field.
llrp_u16_t * m_pValue
Pointer to the first array element.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
llrp_u8_t m_aValue[12]
Simple array of basic type llrp_u8_t.
Class Definition CLastSeenTimestampUTC for LLRP parameter LastSeenTimestampUTC.
Base Class for All LLRP LTK Parameters.
Base Class for All LLRP LTK Messages.
Class Definition CImpinjEnableRFPhaseAngle for LLRP parameter ImpinjEnableRFPhaseAngle.
EResultCode setROReportSpec(CROReportSpec *pValue)
Set accessor functions for the LLRP ROReportSpec sub-parameter.
CLLRPStatus * getLLRPStatus(void)
Get accessor functions for the LLRP LLRPStatus sub-parameter.
Class Definition CADD_ROSPEC_RESPONSE for LLRP message ADD_ROSPEC_RESPONSE.
EResultCode addAirProtocolInventoryCommandSettings(CParameter *pValue)
Add a AirProtocolInventoryCommandSettings to the LLRP sub-parameter list.
Class Definition CAISpecStopTrigger for LLRP parameter AISpecStopTrigger.
const char * getConnectError(void)
Get the string that explains openReaderConnection() error.
void setEnableInventoryParameterSpecID(llrp_u1_t value)
Set accessor functions for the LLRP EnableInventoryParameterSpecID field.
void setROSpecID(llrp_u32_t value)
Set accessor functions for the LLRP ROSpecID field.
void setEnableAntennaID(llrp_u1_t value)
Set accessor functions for the LLRP EnableAntennaID field.
CReaderEventNotificationData * getReaderEventNotificationData(void)
Get accessor functions for the LLRP ReaderEventNotificationData sub-parameter.
void setResetToFactoryDefault(llrp_u1_t value)
Set accessor functions for the LLRP ResetToFactoryDefault field.
EResultCode setROSpecStartTrigger(CROSpecStartTrigger *pValue)
Set accessor functions for the LLRP ROSpecStartTrigger sub-parameter.
EResultCode addAntennaConfiguration(CAntennaConfiguration *pValue)
Add a AntennaConfiguration to the LLRP sub-parameter list.
Class Definition CC1G2EPCMemorySelector for LLRP parameter C1G2EPCMemorySelector. ...
void setEnableSpecIndex(llrp_u1_t value)
Set accessor functions for the LLRP EnableSpecIndex field.
Class Definition CGET_READER_CAPABILITIES_RESPONSE for LLRP message GET_READER_CAPABILITIES_RESPONSE...
llrp_u64_t getMicroseconds(void)
Get accessor functions for the LLRP Microseconds field.
llrp_utf8v_t getErrorDescription(void)
Get accessor functions for the LLRP ErrorDescription field.
void setTagTransitTime(llrp_u32_t value)
Set accessor functions for the LLRP TagTransitTime field.
Class Definition CTagReportContentSelector for LLRP parameter TagReportContentSelector.
void setSession(llrp_u2_t value)
Set accessor functions for the LLRP Session field.
Class Definition CSTOP_ROSPEC for LLRP message STOP_ROSPEC.
CFirstSeenTimestampUTC * getFirstSeenTimestampUTC(void)
Get accessor functions for the LLRP FirstSeenTimestampUTC sub-parameter.
void setCurrentState(EROSpecState value)
Set accessor functions for the LLRP CurrentState field.
void setEnableROSpecID(llrp_u1_t value)
Set accessor functions for the LLRP EnableROSpecID field.
llrp_utf8_t * m_pValue
Pointer to the first array element.
EResultCode addInventoryParameterSpec(CInventoryParameterSpec *pValue)
Add a InventoryParameterSpec to the LLRP sub-parameter list.
llrp_u64_t getMicroseconds(void)
Get accessor functions for the LLRP Microseconds field.
void setPriority(llrp_u8_t value)
Set accessor functions for the LLRP Priority field.
EResultCode setImpinjEnableRFPhaseAngle(CImpinjEnableRFPhaseAngle *pValue)
Set accessor functions for the LLRP ImpinjEnableRFPhaseAngle sub-parameter.
Class Definition CROBoundarySpec for LLRP parameter ROBoundarySpec.
void setEmptyFieldTimeout(llrp_u16_t value)
Set accessor functions for the LLRP EmptyFieldTimeout field.
CConnectionAttemptEvent * getConnectionAttemptEvent(void)
Get accessor functions for the LLRP ConnectionAttemptEvent sub-parameter.
Describes a message or parameter type.
const CErrorDetails * getSendError(void)
Get the details that explains sendMessage() error.
EConnectionAttemptStatusType getStatus(void)
Get accessor functions for the LLRP Status field.
Class Definition CReaderEventNotificationData for LLRP parameter ReaderEventNotificationData.