FreeMASTER ActiveX Object
KIT33912EVME System Basis Chip with LIN Tranceiver Setup Instructions, Rev. 2.0
Freescale Semiconductor
23
Chapter 7 FreeMASTER ActiveX Object
7.1
Overview
All HTML pages used in FreeMASTER are rendered using the standard Microsoft Internet Explorer component. The advantage
of using the HTML and Internet Explorer component is that it fully supports scripting languages and enables scripts to embed
and access third-party ActiveX controls. The FreeMASTER application itself implements a (non-visual) ActiveX component to let
script-based code access and control the target board application.
The chapter gives basic description of the ActiveX FreeMASTER object.
•
•
WriteVariable Function Example
•
7.2
Quick Reference
The FreeMASTER object is registered in the system registry during each start of the FreeMASTER application. Its class ID
(CLSID) is
{48A185F1-FFDB-11D3-80E3-00C04F176153}
The registry name is "MCB.PCM.1"; version independent name is "MCB.PCM".
FreeMASTER functions can be called from any HTML code via the FreeMASTER ActiveX control. Insert the FreeMASTER
ActiveX control into your HTML code by the Class ID number (see the example below) and set the dimensions (height and width)
to zero to make the object invisible.
<object name="PCMaster" width="0" height="0" classid="clsid:48A185F1-FFDB-11D3-80E3-00C04F176153">
The SBCLIN GUI uses only three functions of FreeMASTER ActiveX control:
•
WriteVariable writes a value to a FreeMASTER-defined variable
– This function writes a value to a FreeMASTER variable.
•
ReadVariable reads a value from a FreeMASTER-defined variable
– This function reads a value from a FreeMASTER-defined variable.
Short examples on how the functions are used in the GUI are in the following sections. For more details on the FreeMASTER
functions, refer to the “FreeMASTER for Embedded application” user manual.
7.2.1 WriteVariable Function Example
// write to FreeMASTER variable, display error box in case of error
function write_fmaster_variable(varname, value){
var succ = pcm.WriteVariable(varname, value);
if (!succ) set_fmaster_err();
}