Other Parts Discussed in Thread: Z-STACK
Hi,
Is there anyway for me to perform a control ZED polling through my application in Z.Stack 4.10.00.78.
In ZStack 3.0.2, I had the option to perform a one time poll using NLME_SetPollRate(1) when my application needs it.(to trigger message reception).
For e.g. after button pressed, perform poll after 5 seconds.
Would something like this work
//Initialize default pollrate (set default)
zstack_sysConfigWriteReq_t writeReq = {0};
writeReq.has_pollRate = true;
writeReq.pollRate = 60000;
writeReq.pollRateType = POLL_RATE_TYPE_DEFAULT;
Zstackapi_sysConfigWriteReq(appServiceTaskId, &writeReq);
/* On button press callback */
//Initialize app pollrate to 5000ms
zstack_sysConfigWriteReq_t writeReq = {0};
writeReq.has_pollRate = true;
writeReq.pollRate = 5000;
writeReq.pollRateType = POLL_RATE_TYPE_APP_1; // what is the different between POLL_RATE_TYPE_APP_1 and POLL_RATE_TYPE_DEFAULT
Zstackapi_sysConfigWriteReq(appServiceTaskId, &writeReq);
//start clock for 5.1 seconds
Timer_setTimeout(handle, 5100);
/*In Timer callback*/
//restore to default poll rate of 60000
zstack_sysConfigWriteReq_t writeReq = {0};
writeReq.has_pollRate = true;
writeReq.pollRate = 60000;
writeReq.pollRateType = POLL_RATE_TYPE_DEFAULT;
Zstackapi_sysConfigWriteReq(appServiceTaskId, &writeReq);
Is there anyway to do something similar to ZStack 3.0.2 like a onetime poll in this ZStack 4.10.00.78 ?
Please could you share any instruction set to use the Zstackapi_sysConfigWriteReq and when the various Poll Types are in effect, if any.
Thanks
Akhilesh