Hi Mayur,
I see two emails from you. I'll get to this one first, but I'll probably need to wait 'till later to get to the next. - does bbfs handles flash access contention itself, or do I need to add a bool, to allow only single access to bbfs read/write. Blackbook does not queue up requests, and it will only handle one request at a time. If a component tries to access Blackbook while Blackbook is handling another client, the command will return fail. One simple way to get around this is put all your Blackbook commands in a spinning task.. but that could increase your memory footprint. Another way to do it is to setup your own arbitration mechanism. I left this functionality out of Blackbook because I didn't want to make it mandatory and increase everyone's memory footprint when not everyone needed the functionality. - does bbfs defines an upper limit on max number of files on flash and/or max number of open files etc Look in BlackbookConst.h: /** * The following is the maximum number of files on * our file system * * The amount of RAM used by Blackbook to store file info * can be expressed by: * MAX_FILES * NODES_PER_FILE * sizeof(node_t) */ #ifndef MAX_FILES #define MAX_FILES 19 #endif MAX_FILES defines the maximum number of "file" structures existing in non-volatile memory - the maximum number of real files you can have. At least one of those files is automatically taken by the "bb.cp_" checkpoint file. The maximum number of files you can have open at any given time is dependent upon how many BFileRead(), BFileWrite(), BDictionary(), etc. instances there are. If your application needs to have 18 files open for reading/writing simultaneously, it can by making 18 new BFile*() components. - does bbfs have any issues with the same file being opened/read/write simultaneously Blackbook can have a single file open for reading and writing at the same time. As you write to the file through BFileWrite(), you can be reading that data back out of BFileRead(). -David _____ From: Mayur Maheshwari [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 12:17 PM To: David Moss; tinyos-help@millennium.berkeley.edu Subject: SOS on BBFS ;) Hi David, I am using bbfs but have been facing a few problems. Your inputs will help a lot. - does bbfs handles flash access contention itself, or do I need to add a bool, to allow only single access to bbfs read/write. - does bbfs defines an upper limit on max number of files on flash and/or max number of open files etc - does bbfs have any issues with the same file being opened/read/write simultaneously I am reading a lot of files and sending over radio (while writing continues simultaneously). It seems that bbfs open of a file fails after sometime and every other bbfs operations fails too. It will help a lot it you can share some test code where multiple read, write and delete happen simultaneously. Thanks, Mayur -- Mayur Maheshwari([EMAIL PROTECTED]) "Karmanye Vadhikaraste Ma Phaleshu Kadachana, Ma Karma Phala Hetur Bhurmatey Sangostva Akarmani"
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help