Hi Jonathan, I am using LogStorage to store sensor data. To overcome the problem of mote reboot/reset I store LogRead.currentOffset() in ConfigStorage after every successful read (so that I can restore the read pointer/cookie after mote resets). But I face a problem when I manually reset the mote.
On investigation I realized that after reset LogWrite.currentOffset() is returning 0 and hence LogRead.seek() is failing. I thought the fail is happening because of if (cookie > m_log_info[id].write_addr) return FAIL; in error_t Read.seek[uint8_t id] (storage_addr_t cookie) in Stm25LogP.nc. I commented out this block and to my surprise the LogWrite.currentOffsetreturns correct/appropriate value (not 0) after reset. This seems to be a strange behaviour? Any thoughts on why this may be happening. Also, it seems that LogRead.seek() have specified only two return types (in api comments) - SUCCESS and EBUSY, so a return type of FAIL is a problem for new users like me. Also, it returns a FAIL from newRequest where it seems to verify whether flash block is idle. Would EBUSY be a more appropriate return type there? regards, Suvesh
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
