com.sentilla.platform.tmote
Class FilePropertyDriver

java.lang.Object
  extended by com.sentilla.system.DriverAdapter
      extended by com.sentilla.system.PropertyDriver
          extended by com.sentilla.fs.FilePropertyDriver
              extended by com.sentilla.platform.tmote.FilePropertyDriver
All Implemented Interfaces:
Driver

public class FilePropertyDriver
extends com.sentilla.fs.FilePropertyDriver

Tmote extension of FilePropertyDriver. On this platform, you may remove single properties and reset the entire property file.


Field Summary
 
Fields inherited from class com.sentilla.fs.FilePropertyDriver
buff, DEFAULT_FLAGS, dictfile, VALID_MASK
 
Fields inherited from class com.sentilla.system.DriverAdapter
m_nextDriver
 
Constructor Summary
FilePropertyDriver(int filename)
           
 
Method Summary
protected  com.sentilla.io.RandomAccessFile FileMapFactory(int offset, int edatalen)
          dictfile must be an instance of FlashFile on tmote.
 String getDriverName(int n)
          Returns the valid name(s) for each driver.
 void removeProperty(String key)
          Remove a specific property from the property file.
 void resetProperties()
          Remove all properties, and then restore kernel properties such as the Mac address.
 
Methods inherited from class com.sentilla.fs.FilePropertyDriver
createProperty, openProperty
 
Methods inherited from class com.sentilla.system.PropertyDriver
create, open, remove, reset
 
Methods inherited from class com.sentilla.system.DriverAdapter
getNextDriver, setNextDriver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePropertyDriver

public FilePropertyDriver(int filename)
Method Detail

FileMapFactory

protected com.sentilla.io.RandomAccessFile FileMapFactory(int offset,
                                                          int edatalen)
dictfile must be an instance of FlashFile on tmote.

Specified by:
FileMapFactory in class com.sentilla.fs.FilePropertyDriver

removeProperty

public void removeProperty(String key)
Remove a specific property from the property file. Performance note: on this platform, removing a property is not space- or performance-free. Avoid repetitively removing properties.

Specified by:
removeProperty in class com.sentilla.fs.FilePropertyDriver
Parameters:
key - the property name to remove

resetProperties

public void resetProperties()
Remove all properties, and then restore kernel properties such as the Mac address. Performance note: on this platform, the resultant property file will be "fresh" and perform as-new. This may be used to recover from a file that has become too large or slow due to repetitive calls to removeProperty().

Specified by:
resetProperties in class com.sentilla.fs.FilePropertyDriver

getDriverName

public String getDriverName(int n)
Description copied from class: DriverAdapter
Returns the valid name(s) for each driver. If a driver has N-names, then getDriverName returns a string for n=0 to n=N-1, and returns null for all other values of n.

A driver may return multiple names because it provides the default implementation for a specific name, such as associating "flash" by default to the external flash, or "extflash" if an application specifically asserts it requires the external flash resources. Some drivers may return only a single valid name, such as "intflash" for the internal flash.

Specified by:
getDriverName in interface Driver
Overrides:
getDriverName in class com.sentilla.fs.FilePropertyDriver


Copyright © 2007 Sentilla Corporation. All Rights Reserved.