System Variables: Unterschied zwischen den Versionen
Aus EEP Handbuch
(Die Seite wurde neu angelegt: „<h1>System-Variables</h1>“) |
|||
(Eine dazwischenliegende Version des gleichen Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | < | + | <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;"> |
+ | <tr> | ||
+ | <th colspan="2">EEPVer</th> | ||
+ | <th style="padding: 10px;">EEPVer</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">type: </td> | ||
+ | <td style="padding: 10px;">variable</td> | ||
+ | <td rowspan="4" style="font: 15px Courier New, sans-serif; padding: 10px;"> | ||
+ | <pre> | ||
+ | if EEPVer < 11 then | ||
+ | print( "Train control via Lua not possible!" ) | ||
+ | end | ||
+ | </pre> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">used in: </td> | ||
+ | <td style="padding: 10px;">script</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">source: </td> | ||
+ | <td style="padding: 10px;">EEP</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">requires: </td> | ||
+ | <td style="padding: 10px;">EEP 10.2 Plug-In 2</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">purpose: </td> | ||
+ | <td colspan="2" style="padding: 10px;">Detecting the version number of EEP.</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;"> | ||
+ | <tr> | ||
+ | <th colspan="2">EEPTime</th> | ||
+ | <th style="padding: 10px;">EEPTime</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">type: </td> | ||
+ | <td style="padding: 10px;">variable</td> | ||
+ | <td rowspan="4" style="font: 15px Courier New, sans-serif; padding: 10px;"> | ||
+ | <pre> | ||
+ | if EEPTime == alteZeit + 50 then | ||
+ | print( "Exactly 50 seconds have passed" ) | ||
+ | alteZeit = EEPTime</div> | ||
+ | elseif EEPTime > alte Zeit + 50 then | ||
+ | print( "More than 50 seconds have passed" ) | ||
+ | alteZeit = EEPTime</div> | ||
+ | else | ||
+ | print( "50 seconds didn't expired yet" ) | ||
+ | end | ||
+ | </pre> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">used in: </td> | ||
+ | <td style="padding: 10px;">script</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">source: </td> | ||
+ | <td style="padding: 10px;">EEP</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">requires: </td> | ||
+ | <td style="padding: 10px;">EEP 10.2 Plug-In 2</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">purpose: </td> | ||
+ | <td colspan="2" style="padding: 10px;">EEPTime provides a variable that represents the current time within the EEP layout. The value equals the seconds passed since midnight (EEP time).</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;"> | ||
+ | <tr> | ||
+ | <th colspan="2">EEPTimeH</th> | ||
+ | <th style="padding: 10px;">EEPTimeH</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">Type: </td> | ||
+ | <td style="padding: 10px;">variable</td> | ||
+ | <td rowspan="4" style="font: 15px Courier New, sans-serif; padding: 10px;"> | ||
+ | <pre> | ||
+ | print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock") | ||
+ | </pre> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">used in: </td> | ||
+ | <td style="padding: 10px;">script</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">source: </td> | ||
+ | <td style="padding: 10px;">EEP</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">requires: </td> | ||
+ | <td style="padding: 10px;">EEP 10.2 Plug-In 2</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">purpose: </td> | ||
+ | <td colspan="2" style="padding: 10px;">Returns the hour component of EEPTime, expressed as a value between 0 and 23.</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;"> | ||
+ | <tr> | ||
+ | <th colspan="2">EEPTimeM</th> | ||
+ | <th style="padding: 10px;">EEPTimeM</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">Type: </td> | ||
+ | <td style="padding: 10px;">variable</td> | ||
+ | <td rowspan="4" style="font: 15px Courier New, sans-serif; padding: 10px;"> | ||
+ | <pre> | ||
+ | print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock") | ||
+ | </pre> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">used in: </td> | ||
+ | <td style="padding: 10px;">script</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">source: </td> | ||
+ | <td style="padding: 10px;">EEP</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">requires: </td> | ||
+ | <td style="padding: 10px;">EEP 10.2 Plug-In 2</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">purpose: </td> | ||
+ | <td colspan="2" style="padding: 10px;">Returns the minute component of EEPTime, expressed as a value between 0 and 59.</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;"> | ||
+ | <tr> | ||
+ | <th colspan="2">EEPTimeS</th> | ||
+ | <th style="padding: 10px;">EEPTimeS</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">Type: </td> | ||
+ | <td style="padding: 10px;">variable</td> | ||
+ | <td rowspan="4" style="font: 15px Courier New, sans-serif; padding: 10px;"> | ||
+ | <pre> | ||
+ | if EEPTimeS == 15 then | ||
+ | EEPSetSignal( 1 , 1 ) -- switch traffic light 1 to green | ||
+ | elseif EEPTimeS == 45 then | ||
+ | EEPSetSignal( 1 , 2 ) -- switch traffic light 1 to red | ||
+ | end | ||
+ | </pre> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">used in: </td> | ||
+ | <td style="padding: 10px;">Script</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">source: </td> | ||
+ | <td style="padding: 10px;">EEP</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">requires: </td> | ||
+ | <td style="padding: 10px;">EEP 10.2 Plug-In 2</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td scope="row">purpose: </td> | ||
+ | <td colspan="2" style="padding: 10px;">Returns the second component of EEPTime, expressed as a value between 0 and 59.</td> | ||
+ | </tr> | ||
+ | </table> |
Aktuelle Version vom 7. September 2018, 11:52 Uhr
EEPVer | EEPVer | |
---|---|---|
type: | variable |
if EEPVer < 11 then print( "Train control via Lua not possible!" ) end |
used in: | script | |
source: | EEP | |
requires: | EEP 10.2 Plug-In 2 | |
purpose: | Detecting the version number of EEP. |
EEPTime | EEPTime | |
---|---|---|
type: | variable |
if EEPTime == alteZeit + 50 then print( "Exactly 50 seconds have passed" ) alteZeit = EEPTime</div> elseif EEPTime > alte Zeit + 50 then print( "More than 50 seconds have passed" ) alteZeit = EEPTime</div> else print( "50 seconds didn't expired yet" ) end |
used in: | script | |
source: | EEP | |
requires: | EEP 10.2 Plug-In 2 | |
purpose: | EEPTime provides a variable that represents the current time within the EEP layout. The value equals the seconds passed since midnight (EEP time). |
EEPTimeH | EEPTimeH | |
---|---|---|
Type: | variable |
print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock") |
used in: | script | |
source: | EEP | |
requires: | EEP 10.2 Plug-In 2 | |
purpose: | Returns the hour component of EEPTime, expressed as a value between 0 and 23. |
EEPTimeM | EEPTimeM | |
---|---|---|
Type: | variable |
print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock") |
used in: | script | |
source: | EEP | |
requires: | EEP 10.2 Plug-In 2 | |
purpose: | Returns the minute component of EEPTime, expressed as a value between 0 and 59. |
EEPTimeS | EEPTimeS | |
---|---|---|
Type: | variable |
if EEPTimeS == 15 then EEPSetSignal( 1 , 1 ) -- switch traffic light 1 to green elseif EEPTimeS == 45 then EEPSetSignal( 1 , 2 ) -- switch traffic light 1 to red end |
used in: | Script | |
source: | EEP | |
requires: | EEP 10.2 Plug-In 2 | |
purpose: | Returns the second component of EEPTime, expressed as a value between 0 and 59. |