Mint NextMove PCI Manual de usuario Pagina 28

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 70
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 27
5-8 Advanced Features
5.3 Command prompt
As well as the MintTerminal object the MintMT ActiveX control also has a MintCommandPrompt object that
works with the MintController object. This allows the user to enter lines of MintMT code that will be
compiled and executed in the window.
The form must have a MintController object for the MintCommandPrompt object to function. All
communications to and from a controller pass through the MintController object. In order for the command
prompt window to function it must be linked to a specific controller and given the compiler version and
symbol table information to allow compilation.
Assuming the application already has a MintController object that can be used to communicate with a
controller, the ID of this controller object must be passed to the command prompt window to create a link.
The ID of the MintController object can be obtained using the function getID
This value can then be used to link the MintCommandPrompt object to a MintController object using the
function. setMintControllerID.
The command prompt will also need a valid symbol table for the controller. The function
getSymbolTableForController will ensure that a compatible version of the symbol table exists on the
PC, if not it will upload one from the controller.
Following this the version of the compiler needs to be set. This is determined by the version of the MintMT
virtual machine that the firmware is using. The function getFirmwareMintVMBuild can be used to
interrogate the controller and get the version of MintMT virtual machine being used by the firmware. The
command prompt can then be set up using the function setCompiler.
The below example is written in Microsoft Visual C++ (m_controller is the name of the MintController object
in the project and m_command is the name of the MintCommandPrompt object in the project).
BSTR bstrID;
BSTR bstrSymbolTable;
// create handle to controller
m_controller.setNextMovePCI1Link ( 0, 0 );
// get ID of controller object
bstrID = m_controller.getID ();
// link the command prompt to the controller
m_command.setMintControllerID ( bstrID );
// get symbol table for controller
m_controller.getSymbolTableForController ( VARIANT_FALSE, &bstrSymbolTable );
// link the command prompt to the symbol table
m_command.setSymbolTable ( bstrSymbolTable );
// set the compiler version for the command prompt
m_command.setCompiler ( m_controller.getFirmwareVMBuild () );
// clear up
::SysFreeString ( bstrID );
::SysFreeString ( bstrSymbolTable );
The example below is written in Microsoft Visual Basic (MintController is the name of the MintController
object in the project and MintCommandPrompt is the name of the Command Prompt object in the project).
Vista de pagina 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 69 70

Comentarios a estos manuales

Sin comentarios