Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
List of all members
iMS::ToneBufferDownload Class Reference

Provides a mechanism for downloading ToneBuffer's to a Synthesiser's LTB memory. More...

#include <include\ToneBuffer.h>

Inheritance diagram for iMS::ToneBufferDownload:
Inheritance graph
[legend]
Collaboration diagram for iMS::ToneBufferDownload:
Collaboration graph
[legend]

Public Member Functions

Constructor & Destructor
 ToneBufferDownload (IMSSystem &ims, const ToneBuffer &tb)
 Constructor for ToneBufferDownload Object. More...
 
 ~ToneBufferDownload ()
 Destructor for ToneBufferDownload Object.
 
Bulk Transfer Initiation
bool StartDownload ()
 Begins download of entire ToneBuffer to LTB memory on Synthesiser. More...
 
bool StartDownload (ToneBuffer::const_iterator first, ToneBuffer::const_iterator last)
 Begins download of partial ToneBuffer to LTB memory on Synthesiser beginning at first TBEntry and continuing until last TBEntry (including first but not including last) More...
 
bool StartDownload (ToneBuffer::const_iterator single)
 Downloads a single TBEntry to LTB memory on Synthesiser. More...
 
bool StartVerify ()
 No Verify is possible. Always returns false. More...
 
int GetVerifyError ()
 No Verify is possible. Always return -1. More...
 
Event Notifications
void ToneBufferDownloadEventSubscribe (const int message, IEventHandler *handler)
 Subscribe a callback function handler to a given ToneBufferEvents entry. More...
 
void ToneBufferDownloadEventUnsubscribe (const int message, const IEventHandler *handler)
 Unsubscribe a callback function handler from a given ToneBufferEvents entry. More...
 
Store in Synthesiser Non-Volatile Memory
const FileSystemIndex Store (const std::string &FileName, FileDefault def=FileDefault::NON_DEFAULT) const
 Store ToneBuffer contents to non-volatile memory on the synthesiser. More...
 

Detailed Description

Provides a mechanism for downloading ToneBuffer's to a Synthesiser's LTB memory.

Author
Dave Cowan
Date
2016-02-24
Since
1.1

Constructor & Destructor Documentation

iMS::ToneBufferDownload::ToneBufferDownload ( IMSSystem ims,
const ToneBuffer tb 
)

Constructor for ToneBufferDownload Object.

The pre-requisites for an ToneBufferDownload object to be created are: (1) - an IMSSystem object, representing the configuration of an iMS target to which the ToneBuffer is to be downloaded. (2) - a complete ToneBuffer object to download to the iMS target.

ToneBufferDownload stores const references to both. This means that both must exist before the ToneBufferDownload object, and both must remain valid (not destroyed) until the ToneBufferDownload object itself is destroyed. Because they are stored as references, the IMSSystem and ToneBuffer objects themselves may be modified after the construction of the ToneBufferDownload object.

Once constructed, the object can neither be copied or assigned to another instance.

Parameters
[in]imsA const reference to the iMS System which is the target for downloading the Image
[in]tbA const reference to the ToneBuffer which shall be downloaded to the target
Since
1.1

Member Function Documentation

int iMS::ToneBufferDownload::GetVerifyError ( )
inlinevirtual

No Verify is possible. Always return -1.

Since
1.1

Implements iMS::IBulkTransfer.

bool iMS::ToneBufferDownload::StartDownload ( )
virtual

Begins download of entire ToneBuffer to LTB memory on Synthesiser.

Since
1.1

Implements iMS::IBulkTransfer.

bool iMS::ToneBufferDownload::StartDownload ( ToneBuffer::const_iterator  first,
ToneBuffer::const_iterator  last 
)

Begins download of partial ToneBuffer to LTB memory on Synthesiser beginning at first TBEntry and continuing until last TBEntry (including first but not including last)

Since
1.1
bool iMS::ToneBufferDownload::StartDownload ( ToneBuffer::const_iterator  single)

Downloads a single TBEntry to LTB memory on Synthesiser.

Since
1.1
bool iMS::ToneBufferDownload::StartVerify ( )
inlinevirtual

No Verify is possible. Always returns false.

Since
1.1

Implements iMS::IBulkTransfer.

const FileSystemIndex iMS::ToneBufferDownload::Store ( const std::string &  FileName,
FileDefault  def = FileDefault::NON_DEFAULT 
) const

Store ToneBuffer contents to non-volatile memory on the synthesiser.

The contents of this ToneBuffer can be stored to an area of non-volatile memory on the Synthesiser for retrieval at a future time, including after subsequent power cycles. The data stored can be used to select between alternative ToneBuffers without needing to recalculate or download from Software.

The table can be flagged to be used as a default at startup in which case the Synthesiser will use the contents as a default ToneBuffer program allowing the Synthesiser to be used with no connection to a host system.

Parameters
[in]defmark the entry as a default and the Synthesiser will attempt to program the data to the Local Tone Buffer on power up.
[in]FileNamea string to tag the download with in the File System Table (limited to 8 chars)
Returns
the index in the File System Table where the data was stored or -1 if the operation failed
Since
1.1
void iMS::ToneBufferDownload::ToneBufferDownloadEventSubscribe ( const int  message,
IEventHandler handler 
)

Subscribe a callback function handler to a given ToneBufferEvents entry.

ToneBufferDownload can callback user application code when an event occurs in the download process. Supported events are listed under ToneBufferEvents. The callback function must inherit from the IEventHandler interface and override its EventAction() method.

Use this member function call to subscribe a callback function to an ToneBufferEvents entry. For the period that a callback is subscribed, each time an event in ToneBufferDownload occurs that would trigger the subscribed ToneBufferEvents entry, the user function callback will be executed.

Parameters
[in]messageUse the ToneBufferEvents::Event enum to specify an event to subscribe to
[in]handlerA function pointer to the user callback function to execute on the event trigger.
Since
1.1
void iMS::ToneBufferDownload::ToneBufferDownloadEventUnsubscribe ( const int  message,
const IEventHandler handler 
)

Unsubscribe a callback function handler from a given ToneBufferEvents entry.

Removes all links to a user callback function from the Event Trigger map so that any events that occur in the ToneBufferDownload object following the Unsubscribe request will no longer execute that function

Parameters
[in]messageUse the ToneBufferEvents::Event enum to specify an event to unsubscribe from
[in]handlerA function pointer to the user callback function that will no longer execute on an event
Since
1.1

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