Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
Classes | Namespaces | Typedefs | Enumerations | Variables
FileSystem.h File Reference

Classes for reading, writing and managing the file system built into an iMS Synthesiser. More...

#include "IMSSystem.h"
#include "IEventHandler.h"
#include <memory>
#include <array>
Include dependency graph for FileSystem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  iMS::FileSystemTableEntry
 Contains all the parameters that uniquely locate a File within the Synthesiser FileSystem. More...
 
class  iMS::FileSystemTableViewer
 Provides a mechanism for viewing the FileSystemTable associated with an iMS System. More...
 
class  iMS::FileSystemManager
 Provides user management operations for working with Synthesiser FileSystems. More...
 
class  iMS::UserFileReader
 Provides a mechanism for retrieving User File data from the Synthesiser FileSystem. More...
 
class  iMS::UserFileWriter
 Provides a mechanism for committing User File data to the Synthesiser FileSystem. More...
 

Namespaces

 iMS
 The entire API is encapsulated by the iMS namespace.
 

Typedefs

using iMS::FileSystemIndex = int
 FileSystemIndex represents the entry number for a particular file in the FileSystemTable.
 

Enumerations

enum  iMS::FileSystemTypes : std::uint8_t {
  iMS::FileSystemTypes::NO_FILE = 0, iMS::FileSystemTypes::COMPENSATION_TABLE = 1, iMS::FileSystemTypes::TONE_BUFFER = 2, iMS::FileSystemTypes::DDS_SCRIPT = 3,
  iMS::FileSystemTypes::USER_DATA = 15
}
 All of the different (up to 15) types of file available to the filesystem. More...
 
enum  iMS::FileDefault : bool { iMS::FileDefault::DEFAULT = true, iMS::FileDefault::NON_DEFAULT = false }
 Default flag tags a file entry for execution at startup (only one per filetype) More...
 

Variables

const unsigned int iMS::MAX_FST_ENTRIES = 33
 Maximum number of entries that may be stored in the FileSystem.
 

Detailed Description

Classes for reading, writing and managing the file system built into an iMS Synthesiser.

The Synthesiser includes an area of non-volatile memory which is used for permanent storage of a variety of different data types.

A simple filesystem structure has been defined which arranges and organises the data stored in the memory, allowing the user to keep track of data files and the system to perform relevant functions on the stored data, both on command by the user, and at startup through the setting of default flags.

The filesystem allows up to MAX_FST_ENTRIES different files to be stored in the data area, with each entry being one of 15 different types. Each file can be any size up to the maximum available space in the memory.

The file types so far defined are:

The FileSystem has a FileSystemTable associated with it which stores the starting addresses, lengths and types of each file stored in the FileSystem, along with a default flag indicating whether it should be executed at startup and a short (max 8 character) filename for descriptive purposes.

One file of each type may be tagged as a Default, in which case when the Synthesiser initialises, it will attempt to Execute that file. If multiple files are tagged default, the lowest index of each type is executed and any subsequent flags cleared.

File execution as a predictable effect on each type of file, except for USER_DATA, which does nothing (can only by read and written).

At present, the total size of the filesystem on all Synthesiser models is 128kB with 1kB reserved for system use. The FileSystemManager will allocate space in memory for data to be downloaded to but files must always be stored contiguously therefore it is up to the user to ensure the FileSystem does not become excessively fragmented.

All files stored to the FileSystem of all types are prepended with a 2-byte marker symbol which is a requirement of the FileSystem protocol.

When an IMSSystem object is initialised (typically through the ConnectionList::Scan() method), the FileSystemTable is read back and made available for use by classes in this file.

Author
Dave Cowan
Date
2016-01-20
Since
1.1