winIDEA SDK
isys::CLoaderController Class Reference

Description

Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead.

This class can be used for downloading executables to the target.

#include <CLoaderController.h>

Inheritance diagram for isys::CLoaderController:
isys::WrapperBase

Public Types

enum  DownloadListType { DLIST_PRIMARY , DLIST_TARGET }
 Identifies which download list to use. More...
 
typedef std::vector< DownloadListMemberDownloadListVector
 Contains a list of download files with advanced download options.
 

Public Member Functions

void addToDownloadList (CDownloadConfigurationSPtr downloadConfig, CLoaderController::DownloadListType listType, const std::string &fileName, const std::string &cmdLineOptions)
 
void addToDownloadList (CLoaderController::DownloadListType listType, const std::string &fileName, bool isAbsolutePath, const std::string &options)
 
void clearDownloadList (CLoaderController::DownloadListType listType)
 
 CLoaderController (std::shared_ptr< ConnectionMgr > connectionMgr)
 
int download ()
 
int downloadFromList (CLoaderController::DownloadListType listType, const std::string &fileName, bool isRealTime)
 
int downloadFromList (CLoaderController::DownloadListType listType, int fileIndex, bool isRealTime)
 
int downloadWithoutCode ()
 
const DownloadListVector getDownloadList (CLoaderController::DownloadListType listType, bool isAbsolutePath)
 
int removeFromDownloadList (CLoaderController::DownloadListType listType, int fileIndex)
 
int targetDownload (CDownloadConfiguration::DownloadFileFormats format, const std::string &fileName)
 This is a specialized version of the more general method targetDownload(CDownloadConfigurationSPtr , const std::string &, const std::string &). More...
 
int targetDownload (CDownloadConfigurationSPtr downloadConfig, const std::string &fileName, const std::string &cmdLineOptions)
 This method downloads a file in winIDEA's target file list (see Debug / Configure Session / SoCs / Edit / Target Files) without resetting the target and initializing emulation. More...
 
void verifyDownload ()
 Verifies download. More...
 

Member Enumeration Documentation

◆ DownloadListType

Identifies which download list to use.

Enumerator
DLIST_PRIMARY 

use the Program Files download list

DLIST_TARGET 

use the Target Files download list

Constructor & Destructor Documentation

◆ CLoaderController()

isys::CLoaderController::CLoaderController ( std::shared_ptr< ConnectionMgr connectionMgr)
Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead.

Instantiates object.

Parameters
connectionMgrclass which maintains connection to winIDEA. Connection must be established before this call.

Member Function Documentation

◆ addToDownloadList() [1/2]

void isys::CLoaderController::addToDownloadList ( CDownloadConfigurationSPtr  downloadConfig,
CLoaderController::DownloadListType  listType,
const std::string &  fileName,
const std::string &  cmdLineOptions 
)
Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.

Adds a file to download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit).

Parameters
downloadConfigdownload configuration
listTypeselects main or target download list in winIDEA
fileNamethe file to be downloaded
cmdLineOptionscommand line options for download. These options contain settings from the winIDEA advanced download options dialog (Debug / Configure Session / SoCs / Edit / Target Files / Edit / Advanced). To see how to format this string, set the options manually in winIDEA, and then call getDownloadList() and print the options attribute of the returned items.

Python example: test_add_to_download_list.py

◆ addToDownloadList() [2/2]

void isys::CLoaderController::addToDownloadList ( CLoaderController::DownloadListType  listType,
const std::string &  fileName,
bool  isAbsolutePath,
const std::string &  options 
)
Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.

Adds a file to download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit).

Parameters
listTypeselects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit)
fileNamename of the file to add
isAbsolutePathif true, the specified path is not converted into a workspace relative path
optionscommand line options for download. These options contain settings from the winIDEA advanced download options dialog (Debug / Configure Session / SoCs / Edit / Target Files / Edit / Advanced). To see how to format this string, set the options manually in winIDEA, and then call getDownloadList() and print the options attribute of the returned items.

Python example: test_add_to_download_list.py

◆ clearDownloadList()

void isys::CLoaderController::clearDownloadList ( CLoaderController::DownloadListType  listType)
Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.

Removes all files from the specified download list.

Parameters
listTypeselects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit)

Python example: test_clear_download_list.py

◆ download()

int isys::CLoaderController::download ( )
Deprecated:
Use CSessionCtrl::begin_program instead. See examples in Session Control section of the documentation.

Downloads executables to the target. The download files are defined in winIDEA, Debug / Configure Session / SoCs / Edit / Program Files. This method resets the target.

Returns
S_OK in case of success, S_FALSE in case of warning (but successful download).
Exceptions
IOExceptionin case of an error

Note: this method is superseded by CSessionCtrl::begin_program

◆ downloadFromList() [1/2]

int isys::CLoaderController::downloadFromList ( CLoaderController::DownloadListType  listType,
const std::string &  fileName,
bool  isRealTime 
)
Deprecated:
Will not be replaced.

Downloads a file from winIDEA's download list.

Parameters
listTypeselects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit)
fileNamename of the file to download
isRealTimeif true, real-time access is performed.
Returns
S_OK in case of success, S_FALSE in case of warning (but successful download).
Exceptions
IOExceptionin case of an error

◆ downloadFromList() [2/2]

int isys::CLoaderController::downloadFromList ( CLoaderController::DownloadListType  listType,
int  fileIndex,
bool  isRealTime 
)
Deprecated:
Will not be replaced.

Downloads a file from winIDEA's download list.

Parameters
listTypeselects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit)
fileIndexindex of the file in the list
isRealTimeif true, real-time access is performed.
Returns
S_OK in case of success, S_FALSE in case of warning (but successful download).
Exceptions
IOExceptionin case of an error

◆ downloadWithoutCode()

int isys::CLoaderController::downloadWithoutCode ( )
Deprecated:
Use CSessionCtrl::begin_reset instead. See examples in Session Control section of the documentation.

Download without code - initialize target and load symbols. The download files are defined in winIDEA, Debug / Configure Session / SoCs / Edit / Program Files.

Returns
S_OK in case of success, S_FALSE in case of warning (but successful download).
Exceptions
IOExceptionin case of an error

Note: this method is superseded by CSessionCtrl::begin_reset

◆ getDownloadList()

const DownloadListVector isys::CLoaderController::getDownloadList ( CLoaderController::DownloadListType  listType,
bool  isAbsolutePath 
)
Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.

Gets list of files to be downloaded from winIDEA.

Parameters
listTypeselects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit)
isAbsolutePathif true, absolute paths are returned
Exceptions
IOExceptionin case of an error

Python example: test_get_download_list.py

◆ removeFromDownloadList()

int isys::CLoaderController::removeFromDownloadList ( CLoaderController::DownloadListType  listType,
int  fileIndex 
)
Deprecated:
Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.

Removes the file at the given index from the list.

Parameters
listTypeselects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit)
fileIndexindex of file to be removed from the list.
Returns
S_FALSE if there is no file at the given index.

Python example: test_remove_from_download_list.py

◆ targetDownload() [1/2]

int isys::CLoaderController::targetDownload ( CDownloadConfiguration::DownloadFileFormats  format,
const std::string &  fileName 
)

This is a specialized version of the more general method targetDownload(CDownloadConfigurationSPtr , const std::string &, const std::string &).

It downloads code and symbols, memory area is not used, no real-time access. It is equivalent to the following code snippet:

CDownloadConfiguration downloadConfig;
downloadConfig.setCodeOffset(0).setSymbolsOffset(0).setDownloadFileFormat(format);

loader.targetDownload(downloadConfig, fileName, "");
Parameters
formatformat of the download file
fileNamethe file to be downloaded
Returns
S_OK in case of success, S_FALSE in case of warning (but successful download).
Exceptions
IOExceptionin case of an error

◆ targetDownload() [2/2]

int isys::CLoaderController::targetDownload ( CDownloadConfigurationSPtr  downloadConfig,
const std::string &  fileName,
const std::string &  cmdLineOptions 
)

This method downloads a file in winIDEA's target file list (see Debug / Configure Session / SoCs / Edit / Target Files) without resetting the target and initializing emulation.

Parameters
downloadConfigdownload configuration
fileNamethe file to be downloaded
cmdLineOptionscommand line options for download. These options contain settings from the winIDEA advanced download options dialog (Debug / Configure Session / SoCs / Edit / Target Files / Edit / Advanced). To see how to format this string, set the options manually in winIDEA, and then call getDownloadList() and print the options attribute of the returned items.
Returns
S_OK in case of success, S_FALSE in case of warning (but successful download).
Exceptions
IOExceptionin case of an error

◆ verifyDownload()

void isys::CLoaderController::verifyDownload ( )

Verifies download.

Exceptions
IOExceptionif verification can not be performed
IllegalStateExceptionif verification detects error in download