Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
Public Member Functions | List of all members
iMS::DDSScriptDownload Class Reference

Provides a mechanism for transferring DDS Scripts into Filesystem memory. More...

#include <include\Auxiliary.h>

Public Member Functions

 DDSScriptDownload (IMSSystem &ims, const DDSScript &script)
 Construct the DDSScriptDownload object from a reference to the iMS device and a const reference to the DDS Script to download. More...
 
 ~DDSScriptDownload ()
 DDSScriptDownload destructur.
 
const FileSystemIndex Program (const std::string &FileName, FileDefault def=FileDefault::NON_DEFAULT) const
 Causes the DDS Script object to be programmed into the filesystem. More...
 

Detailed Description

Provides a mechanism for transferring DDS Scripts into Filesystem memory.

Use this class to program newly created DDS Scripts to the Synthesiser. The class will automatically find and allocate space in the filesystem and update the filesystem table with the newly created entry.

Setting the FileDefault flag to DEFAULT will cause the downloaded script to be executed at every subsequent powerup.

Use the FileSystemManager class for any additional actions as required, such as setting/clearing default flags, executing scripts and deleting unwanted scripts.

Author
Dave Cowan
Date
2016-03-01
Since
1.1

Constructor & Destructor Documentation

iMS::DDSScriptDownload::DDSScriptDownload ( IMSSystem ims,
const DDSScript script 
)

Construct the DDSScriptDownload object from a reference to the iMS device and a const reference to the DDS Script to download.

Parameters
[in]imsthe iMS target System
[in]scriptthe DDSScript to download

Member Function Documentation

const FileSystemIndex iMS::DDSScriptDownload::Program ( const std::string &  FileName,
FileDefault  def = FileDefault::NON_DEFAULT 
) const

Causes the DDS Script object to be programmed into the filesystem.

Calculates the amount of storage space required, finds a space large enough and transfers the script byte data to be stored at the selected location in Synthesiser non-volatile memory. The new entry is logged in the Filesystem table (FST) along with the default flag, if set.

Parameters
[in]FileNamea max 8 char string to use to refer to the DDS Script (stored in the FST)
[in]defOptional parameter indicating whether to set the default flag for future startup execution
Returns
the index of the script in the FST (or -1 if programming failed, e.g. insufficient space or no free FST entries)
Since
1.1

The documentation for this class was generated from the following file: