Hello, I'm a student and have been messing around with your guys awesome
LLRP toolkit for C and I was wondering if someone may be able to help
me. My addROSpec function causes the warning "ReaderException 'LLRP
[664] : Cannot start ROSpec 123 in state Active'".
I was wondering if someone may be able to look through my function I
attached as a .txt file and provide any assistance. If not if I could be
pointed in a direction that offers information and assistance for LTKC
that would be greatly appreciated too. I apologize if this e-mail
address doesn't deal with issues such as this. In any case thanks!
#define RO_TRIGGER_PERIOD 1100
int addROSpec_Periodic(void) {
//
// The RO start & stop specs
//
// this is a periodic trigger
LLRP_tSPeriodicTriggerValue PeriodicTriggerValue = {
.hdr.elementHdr.pType = &LLRP_tdPeriodicTriggerValue,
.Period = RO_TRIGGER_PERIOD,
.pUTCTimestamp = NULL
};
LLRP_tSROSpecStartTrigger ROSpecStartTrigger = {
.hdr.elementHdr.pType = &LLRP_tdROSpecStartTrigger,
.eROSpecStartTriggerType = LLRP_ROSpecStartTriggerType_Periodic,
.pPeriodicTriggerValue = &PeriodicTriggerValue
};
LLRP_tSROSpecStopTrigger ROSpecStopTrigger = {
.hdr.elementHdr.pType = &LLRP_tdROSpecStopTrigger,
.eROSpecStopTriggerType = LLRP_ROSpecStopTriggerType_Null,
.DurationTriggerValue = 0
};
LLRP_tSROBoundarySpec ROBoundarySpec = {
.hdr.elementHdr.pType = &LLRP_tdROBoundarySpec,
.pROSpecStartTrigger = &ROSpecStartTrigger,
.pROSpecStopTrigger = &ROSpecStopTrigger,
};
//
// The Reader Operation contains a single Antenna Inventory, saying
// to scan all antennas.
//
llrp_u16_t AntennaIDs[1] = { 0 }; // 0 is all antenna's.
LLRP_tSTagObservationTrigger TagObservationTrigger = {
.hdr.elementHdr.pType = &LLRP_tdTagObservationTrigger,
.eTriggerType =
LLRP_TagObservationTriggerType_Upon_Seeing_No_More_New_Tags_For_Tms_Or_Timeout,
.T = scan_idle,
.Timeout = scan_timeout
};
LLRP_tSAISpecStopTrigger AISpecStopTrigger = {
.hdr.elementHdr.pType = &LLRP_tdAISpecStopTrigger,
.eAISpecStopTriggerType = LLRP_AISpecStopTriggerType_Tag_Observation,
.pTagObservationTrigger = &TagObservationTrigger
};
LLRP_tSInventoryParameterSpec InventoryParameterSpec = {
.hdr.elementHdr.pType = &LLRP_tdInventoryParameterSpec,
.InventoryParameterSpecID = 1234,
.eProtocolID = LLRP_AirProtocols_EPCGlobalClass1Gen2,
};
LLRP_tSAISpec AISpec = {
.hdr.elementHdr.pType = &LLRP_tdAISpec,
.AntennaIDs = {
.nValue = 1,
.pValue = AntennaIDs
},
.pAISpecStopTrigger = &AISpecStopTrigger,
.listInventoryParameterSpec = &InventoryParameterSpec,
};
//
// This specifies the report we want from the Reader each time the RO
// finishes.
//
LLRP_tSTagReportContentSelector TagReportContentSelector = {
.hdr.elementHdr.pType = &LLRP_tdTagReportContentSelector,
.EnableROSpecID = 0,
.EnableSpecIndex = 0,
.EnableInventoryParameterSpecID = 0,
.EnableAntennaID = 1,
.EnableChannelIndex = 0,
.EnablePeakRSSI = 1,
.EnableFirstSeenTimestamp = 0,
.EnableLastSeenTimestamp = 0,
.EnableTagSeenCount = 0,
.EnableAccessSpecID = 0,
};
LLRP_tSROReportSpec ROReportSpec = {
.hdr.elementHdr.pType = &LLRP_tdROReportSpec,
.eROReportTrigger =
LLRP_ROReportTriggerType_Upon_N_Tags_Or_End_Of_ROSpec,
.N = 0,
.pTagReportContentSelector = &TagReportContentSelector,
};
LLRP_tSROSpec ROSpec = {
.hdr.elementHdr.pType = &LLRP_tdROSpec,
.ROSpecID = 123,
.Priority = 0,
.eCurrentState = LLRP_ROSpecState_Disabled,
.pROBoundarySpec = &ROBoundarySpec,
.listSpecParameter = &AISpec.hdr,
.pROReportSpec = &ROReportSpec,
};
LLRP_tSADD_ROSPEC Cmd = {
.hdr.elementHdr.pType = &LLRP_tdADD_ROSPEC,
.hdr.MessageID = 201,
.pROSpec = &ROSpec,
};
LLRP_tSMessage *pRspMsg;
LLRP_tSADD_ROSPEC_RESPONSE *pRsp;
pRspMsg = transact(&Cmd.hdr);
if(pRspMsg == NULL) {
return -1;
}
pRsp = (LLRP_tSADD_ROSPEC_RESPONSE *) pRspMsg;
if(checkLLRPStatus(pRsp->pLLRPStatus, "addROSpec") != 0) {
freeMessage(pRspMsg);
return -1;
}
freeMessage(pRspMsg);
return 0;
}
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel