LUA Handbuch zu EEP: Unterschied zwischen den Versionen

Aus EEP Handbuch
Wechseln zu: Navigation, Suche
(Der Seiteninhalt wurde durch einen anderen Text ersetzt: „ <h1>EEP specifics in Lua</h1> System Variables“)
Zeile 1: Zeile 1:
     <h1>System-Variables</h1>
+
     <h1>EEP specifics in Lua</h1>
  
 
      
 
      
    <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;">
+
[[System Variables]]
        <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">Assigned by: </td>
+
            <td style="padding: 10px;">EEP</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Requirements: </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;">EEP assignes the version number of EEP to this variable.</td>
+
        </tr>
+
    </table>
+
 
+
 
+
    <br />
+
    <br />
+
    <br />
+
    <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;">
+
                if EEPTime == alteZeit + 50 then
+
                <div style="text-indent:20px;">print( "Exactly 50 seconds have passed" )</div>
+
                <div style="text-indent:20px;">alteZeit = EEPTime</div>
+
                elseif EEPTime > alte Zeit + 50 then
+
                <div style="text-indent:20px;">print( "More than 50 seconds have passed" )</div>
+
                <div style="text-indent:20px;">alteZeit = EEPTime</div>
+
                else
+
                <div style="text-indent:20px;">print( "50 seconds didn't expired yet" )</div>
+
                end
+
            </td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Used in: </td>
+
            <td style="padding: 10px;">Script</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Assigned by: </td>
+
            <td style="padding: 10px;">EEP</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Requirements: </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;">EEP writes the actual time to this variable. The value counts the number of seconds that passed since midnight (EEP-time).</td>
+
        </tr>
+
    </table>
+
 
+
    <br />
+
    <br />
+
    <br />
+
    <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;">
+
                print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock")
+
            </td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Used in: </td>
+
            <td style="padding: 10px;">Script</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Assigned by: </td>
+
            <td style="padding: 10px;">EEP</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Requirements: </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;">EEP writes the current EEP hour into this variable.</td>
+
        </tr>
+
    </table>
+
 
+
 
+
    <br />
+
    <br />
+
    <br />
+
    <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;">
+
                print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock")
+
            </td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Used in: </td>
+
            <td style="padding: 10px;">Script</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Assigned by: </td>
+
            <td style="padding: 10px;">EEP</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Requirements: </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;">EEP writes the current EEP minute into this variable.</td>
+
        </tr>
+
    </table>
+
 
+
 
+
    <br />
+
    <br />
+
    <br />
+
    <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;">
+
                if EEPTimeS == 15 then
+
                <div style="text-indent:20px;">EEPSetSignal( 1 , 1 )  -- switch traffic light 1 to green</div>
+
                elseif EEPTimeS == 45 then
+
                <div style="text-indent:20px;">EEPSetSignal( 1 , 2 )  -- switch traffic light 1 to red</div>
+
                end
+
            </td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Used in: </td>
+
            <td style="padding: 10px;">Script</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Assigned by: </td>
+
            <td style="padding: 10px;">EEP</td>
+
        </tr>
+
        <tr>
+
            <td scope="row">Requirements: </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;">EEP writes the current EEP second into this variable.</td>
+
        </tr>
+
    </table>
+

Version vom 7. September 2018, 11:37 Uhr

EEP specifics in Lua


System Variables