:Revision=8
:html
<<
128.114
AIDA - Automotive and Industrial Diagnostic Assistance|AIDA
--
>>

<<
128.114.1
Functions of the AIDA-Object|Functions
--
>>

<<
128.114.1.1
AIDA.Error|Error
!128.114.1.2 - Message
--
<!DEF>
function <!TW>AIDA.Error (nNr : real) : real;
<!TXT>
Returns the result of the action on the AIDA-Stack <!PW>nNr.
>>
<<
128.114.1.2
AIDA.Message|Message
!128.114.1.1 - Error
--
<!DEF>
function <!TW>AIDA.Message (nCode : real) : string;
<!TXT>
Returns the error text to the AIDA-error code <!PW>nCode.
>>

<<
128.114.1.3
AIDA.Get|Get
--
<!DEF>
function <!TW>AIDA.Get (nNr : real  [; nTimeout : real [; sLayer : string]]) : vector;
<!TXT>
Waits for maximum time of <!PW>nTimeout ms (default=2000) for a frame on the Layer <!PW>sLayer (default is the top layer resp. ''). 

If nothing is received, then the vector is empty. 

Frames on other layers are ignored.

The frame can be received in case of successful <!RW>Get also via <!RW>AIDA.Received.
>>

<<
128.114.1.4
AIDA.Received|Received
--
<!DEF>
function <!TW>AIDA.Received (nNr : real [; var rFlags : real]) : vector;
<!TXT>
Returns the frame received at the last <!RW>Send resp. <!RW>Get.

If nothing is received, then the vector is empty.

If the <!PW>vrFlags variable is specified, then the flags from there 
are returned. If nothing is received, then the value is 0.
>>

<<
128.114.1.5
AIDA.IsActive|IsActive
--
<!DEF>
function <!TW>AIDA.IsActive : real;
<!TXT>
Returns <!RW>TRUE, if AIDA is globally activated.

<!DEF>
function <!TW>AIDA.IsActive (nNr : real) : real;
<!TXT>
Returns <!RW>TRUE, if AIDA is globally activated and the AIDA-Stack <!PW>nNr is also active.
>>

<<
128.114.1.6
AIDA.IsOpen|IsOpen
--
<!DEF>
function <!TW>AIDA.IsOpen (nNr : real) : real;
<!TXT>
Returns <!RW>TRUE, if the AIDA-Stack <!PW>nNr is open.
>>

<<
128.114.1.7
AIDA.Check|Check
--
<!DEF>
function <!TW>AIDA.Check (lFrame, lTest : vector [; nMode : real]) : real;
<!TXT>
Compares the frame from the vector <!PW>lFrame with the frame in the vector <!PW>lTest.

 <!PW>lFrame may contain only values 0..255 (the bytes of the frame)
 
 <!PW>lTest may contain only values in the range -1..255, -1=Don't care

 <!PW>lMode determines the behaviour in case of different lengths,
<!STBL>
<!+>lMode<!+>Meaning<!>
<!c>0<!>Length must be identical (default)<!>
<!c>1<!><!PW>lFrame may be shorter than <!PW>lTest <!>
<!c>2<!><!PW>lFrame may be longer than <!PW>lTest,<br> no testing of the 'protruding' bytes<!>
<!c>3<!><!PW>lFrame may be longer or shorter<!>
<!ETBL>

Return value: 0= everything ok, otherwise the index of the position in <!PW>lFrame which differs.
>>

<<
128.114.1.8
AIDA.RcvFlags|RcvFlags
--
<!DEF>
function <!TW>AIDA.RcvFlags (nNr : real) : real;
<!TXT>
Returns the flags read with the last executed <!RW>Send resp. <!RW>Get.
If nothing was received, the result will be 0.
>>

<<
128.114.2
Procedures of the AIDA-Object|Procedures
--
>>

<<
128.114.2.1
AIDA.Open|Open
--
<!DEF>
procedure <!TW>AIDA.Open (nNr : real);
<!TXT>
Opens the AIDA-Stack <!PW>nNr.

<!DEF>
procedure <!TW>AIDA.Open (nNr : real; sStackFile : string);
<!TXT>
Loads the Stack-Configuration-File <!PW>sStackFile in the AIDA-Stack <!PW>nNr and opens it. If the stack was open, it will be closed before the action is started. If <!PW>sStackFile has no path specification, then it is searched in the AIDA-path.
>>

<<
128.114.2.2
AIDA.Close|Close
--
<!DEF>
procedure <!TW>AIDA.Close (nNr : real);
<!TXT>
Closes the AIDA Stack <!PW>nNr.
>>
<<
128.114.2.3
AIDA.Send|Send
--
<!DEF>
procedure <!TW>AIDA.Send (nNr : real; lFrame : vector [; nTimeout : real [; sLayer : string]]);
<!TXT>
Sends the frame from the vector <!PW>lFrame on the AIDA-Stack <!PW>nNr and waites for a response. <!PW>nTimeout is by default 2000ms. The used default-layer is '<System>' resp. '' (access via the top level).

For <!PW>sLayer, the name of a lower layer can be specified if it should communicate directly via this component. The response is expected to come also via this layer too. It is always the first received frame that is used. 

The frame can be received with <!RW>AIDA.Received. <!RW>AIDA.Send works as <!RW>AIDA.Put, followed by <!RW>AIDA.Get with identical <!PW>sLayer-specifications.
>>

<<
128.114.2.4
AIDA.Put|Put
!128.114.2.3
--
<!DEF>
procedure <!TW>AIDA.Put (nNr : real; lFrame : vector [; sLayer : string]);
<!TXT>
Same as <!RW>AIDA.Send, but does not waited for a response.
>>

<<
128.114.2.5
AIDA.SetFlags|SetFlags
--
<!DEF>
procedure <!TW>AIDA.SetFlags (nNr, nFlags : real);
<!TXT>
Determines the flags used by AIDA-Stack <!PW>nNr when calling the DLL-Function <!SW>AIDA_boSendEvent. 

Possible values (OR-combined, from the AIDA-Doku):
<!STBL>
<!>AIDA_nStartCommu<!>1<!>
<!>AIDA_nStopCommu<!>2<!>
<!>AIDA_nSendBreak<!>4<!>
>>

<<
128.114.2.6
AIDA.Parameter.Set|Parameter.Set
--
<!DEF>
procedure <!TW>AIDA.Parameter.Set (rNr : real; sLayer, sParameter : string; Value : string|real);
<!TXT>
Changes the value of an AIDA-Component parameter in stack <!PW>rNr, addressed by the name of the component and parameter.

Works only if the stack is open; otherwise the corresponding data structures are not in memory. 

The success of the command can be enquired via <!RW>AIDA.Error. The modification is not permanent - it will not be saved in the configuration-File and will be reset with the next <!RW>AIDA.Open.
>>