:Revision=1
:html

<<
128.183
CalibrationAdapter-Object|CalibrationAdapter
$NoSort
--
<h4>Naming convention</h4>

<!STBL>
<!+>Element<!+>Valid characters<!>
<!>Keys<!>a..z | A..Z | 0..9 | ' ' | _ | - | .<!>
<!>Names<!>a..z | A..Z | 0..9 | ' ' | _ | - <!>
<!>Values<!>a..z | A..Z | 0..9 | ' ' | _ | - | . | , <!>
<!ETBL>

<h4>Interpreter syntax</h4>

<!CODE>
var
  vvKey           : StringVector;
  vsSerialNumber  : String;
  vrNF            : Real;

step

  CalibrationAdapter.Clear;

  vvKey := [];
  vvKey := vvKey + ['Messsystem 1'];
  vvKey := vvKey + ['Adapter A'   ];
  vvKey := vvKey + ['Nadelbett I' ];
  vvKey := vvKey + ['01234'       ];
  vvKey := vvKey + ['Alpha'       ];

  if not CalibrationAdapter.CheckKey ( vvKey ) then begin
    CalibrationAdapter.Clear;
    Screen.Dialog (4, 'Error', 'Key not defined');
    Exit;
  end;

  CalibrationAdapter.SetKey ( vvKey );

  if not CalibrationAdapter.Exists ( 'NF' ) then begin
    Screen.Dialog (4, 'Error', 'Value not defined or not valid!');
    Exit;
  end;

  vrNF := CalibrationAdapter.GetRealValue ( 'NF');
  Debug.Show ( 0, vrNF );

  vsSerialNumber := CalibrationAdapter.GetStringValue ( 'AdapterSerialNumber' );
  Debug.Show ( 0, vsSerialNumber );

  SetValue ( 0 );

end.
<!TXT>

<h4>Calibration file</h4>

<!CODE>
[KEY]
Count = 6
Name0 = Computer Name
Name1 = System
Name2 = Adapter
Name3 = Nadelbett
Name4 = Typ
Name5 = EC Variante

[PC_Test%Messsystem 1%Adapter A%Nadelbett I%01234%Alpha]
Count=2
Name0=NF
Value0=1
Name1=AdapterSerialNumber
Value1=1-2-3

[PC_Test%Messsystem 1%Adapter A%Nadelbett I%01234%Beta]
Count=2
Name0=NF
Value0=2
Name1=AdapterSerialNumber
Value1=4-5-6
>>

<<
128.183.1
Functions of the CalibrationAdapter-Object|Functions
--
>>

<<
128.183.1.1
CalibrationAdapter.GetRealValue|GetRealValue
!128.183
--
<!DEF>
function <!TW>CalibrationAdapter.GetRealValue ( vsName : string ) : real;
<!TXT>
Read the value for <!PW>vsName as numerical value.

<!CODE>
var
  vrValue : Real;

step

  vrValue := CalibrationAdapter.GetRealValue ( 'NF' );

  ...

end.
>>

<<
128.183.1.2
CalibrationAdapter.GetStringValue|GetStringValue
!128.183
--
<!DEF>
function <!TW>CalibrationAdapter.GetStringlValue ( vsName : string ) : string;
<!TXT>
Read the value for <!PW>vsName as string value.

<!CODE>
var
  vsValue : String;

step

  vsValue := CalibrationAdapter.GetStringValue ( 'SerialNumber' );

  ...

end.
>>

<<
128.183.1.3
CalibrationAdapter.Exists|Exists
!128.183
--
<!DEF>
function <!TW>CalibrationAdapter.Exists ( vsName : string ) : real;
<!TXT>
Get the status for <!PW>vsName.


<h4>Status/Return value</h4>

<!STBL>
<!+>Value<!+>Meaning<!>
<!>0<!>value not defined<!>
<!>1<!>value is a string<!>
<!>2<!>value can interpreted as a number<!>
<!ETBL>


<!CODE>
step

  if not CalibrationAdapter.Exists ( 'HF' ) then begin
    Screen.Dialog (4, 'Error', 'Value not defined or invalid!');
  end;

end.
>>

<<
128.183.1.4
CalibrationAdapter.CheckKey|CheckKey
!128.183
--
<!DEF>
function <!TW>CalibrationAdapter.CheckKey ( vvKey : stringvector ) : real;
<!TXT>
Checks, if <!PW>vvKey is defined.

<!CODE>
var
  vvKey           : StringVector;

step

  vvKey := [];
  vvKey := vvKey + ['Messsystem 1'];
  vvKey := vvKey + ['Adapter A'   ];
  vvKey := vvKey + ['Nadelbett I' ];
  vvKey := vvKey + ['01234'       ];
  vvKey := vvKey + ['Alpha'       ];

  if not CalibrationAdapter.CheckKey ( vvKey ) then begin
    CalibrationAdapter.Clear;
    Screen.Dialog (4, 'Error', 'Key not defined');
    Exit;
  end;

end.
>>

<<
128.183.2
Procedures of the CalibrationAdapter-Object|Procedures
--
>>

<<
128.183.2.1
CalibrationAdapter.SetKey|SetKey
!128.183
--
<!DEF>
procedure <!TW>CalibrationAdapter.SetKey ( vvKey : stringvector );
<!TXT>
Set the key for the CalibrationAdapter object.

<!CODE>
var
  vvKey           : StringVector;

step

  vvKey := [];
  vvKey := vvKey + ['Messsystem 1'];
  vvKey := vvKey + ['Adapter A'   ];
  vvKey := vvKey + ['Nadelbett I' ];
  vvKey := vvKey + ['01234'       ];
  vvKey := vvKey + ['Alpha'       ];

  CalibrationAdapter.SetKey ( vvKey );

  ...

end.
>>

<<
128.183.2.2
CalibrationAdapter.Clear|Clear
!128.183
--
<!DEF>
procedure <!TW>CalibrationAdapter.Clear;
<!TXT>
Clears all loaded values.

Beispiel
<!CODE>
step

  CalibrationAdapter.Clear;

  ...

end.
>>
