eWON JTK

com.ewon.ewonitf
Class StorageControl

java.lang.Object
  extended by com.ewon.ewonitf.StorageControl

public class StorageControl
extends Object

Manage storage in the eWON (flash and ram). this class provides function to erase and format eWON informations and file system.


Field Summary
static int ALARM_RECORDING
          use with eraseRecording to erase the alarm recording file.
static int ALL_RECORDING
          use with eraseRecording to erase all circular recording files.
static int EVENT_RECORDING
          use with eraseRecording to erase the events recording file.
static int SYS_PARTITION
          use with formatPartition to erase the /sys partition
static int TAG_RECORDING
          use with eraseRecording to erase the incremental recording file.
static int USR_PARTITION
          use with formatPartition to erase the /usr partition
 
Constructor Summary
StorageControl()
           
 
Method Summary
static void clearPendingActions()
          See ScheduledActionManager.clearPendingActions().
This operation is also executed when SysControlBlock.saveBlock(boolean) is called with the saveToFlash set to true.
static void defaultComConfig()
          This function restores the "communication" config to its default values.
REM: the eWON IP address, netmask and gateway are NOT changed.
REM: the configuration is NOT saved to flash, you must call saveConfig to save it.
static void eraseImpl(int eraseElementId)
           
static void eraseRecordings(int recordings)
          Erase the given recordings.
static void formatPartitions(int partitions)
          Format the given partition.
REM: rebooting after /sys partition was erased cause default config to be reloaded.
static void saveConfig()
          Save the current active configuration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYS_PARTITION

public static final int SYS_PARTITION
use with formatPartition to erase the /sys partition

See Also:
Constant Field Values

USR_PARTITION

public static final int USR_PARTITION
use with formatPartition to erase the /usr partition

See Also:
Constant Field Values

ALL_RECORDING

public static final int ALL_RECORDING
use with eraseRecording to erase all circular recording files.

See Also:
Constant Field Values

TAG_RECORDING

public static final int TAG_RECORDING
use with eraseRecording to erase the incremental recording file.

See Also:
Constant Field Values

EVENT_RECORDING

public static final int EVENT_RECORDING
use with eraseRecording to erase the events recording file.

See Also:
Constant Field Values

ALARM_RECORDING

public static final int ALARM_RECORDING
use with eraseRecording to erase the alarm recording file.

See Also:
Constant Field Values
Constructor Detail

StorageControl

public StorageControl()
Method Detail

formatPartitions

public static void formatPartitions(int partitions)
Format the given partition.
REM: rebooting after /sys partition was erased cause default config to be reloaded. If saveConfig is called after /sys partition was erased, the current config is saved to /sys and next reboot will maintain current config.

Parameters:
partitions - Must be SYS_PARTITION or USR_PARTITION

eraseRecordings

public static void eraseRecordings(int recordings)
Erase the given recordings.

Parameters:
recordings - combinaison of TAG_RECORDING, EVENT_RECORDING, ALARM_RECORDING.
or ALL_RECORDING

saveConfig

public static void saveConfig()
                       throws EWException
Save the current active configuration. This typically covers config contained in the config.txt file (system config, tags and users) and the comcfg.txt configuration (communication config).

Throws:
EWException

clearPendingActions

public static void clearPendingActions()
See ScheduledActionManager.clearPendingActions().
This operation is also executed when SysControlBlock.saveBlock(boolean) is called with the saveToFlash set to true.


defaultComConfig

public static void defaultComConfig()
This function restores the "communication" config to its default values.
REM: the eWON IP address, netmask and gateway are NOT changed.
REM: the configuration is NOT saved to flash, you must call saveConfig to save it.


eraseImpl

public static void eraseImpl(int eraseElementId)

eWON JTK

www.eWON.biz: Your Eyes Watching Over Net