<?xml version='1.0' encoding='utf-8'?>

<!-- 

======================================================================================
Firma:            Voith Turbo
Projekt:          Voith Diagnostic Tools XSL-Formating for HTML Presentation of CAN-Data
Dateiname:        CAN_TransmitMessages.XSL

Beschreibung:     XSL - Template for CAN-Data-Formating
                  Es werden alle Empfangsbotschaftn dargestellt
Doc in:           No
Ersterstellung:   /2009 - RThe
======================================================================================

 -->


<xsl:stylesheet version='2.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>


  <xsl:template name="CAN2HTML_Formater_TransmitMessages" match=' / '>

    <!-- 
        ** File-Information **
        In diesem Bereich werden die Receive Messages dargestellt.
        -->

    <!-- 
        ** Ein- / Ausblenden **        
        -->
    
    <table border="0" width="100%" id="table102" height="43">
    <tr>
      <td width="47" style="vertical-align: middle" height="43">
        <h1 style="margin-top: 0; margin-bottom: 0; text-align:center">
          <a onclick="return EP_toggleMe('ID_Transmit')" href="javascript:void(0)">
            <img border="0" src="Resources/XSL/Images/_System_Folder_Closed.gif" name="ID_Content_Grafic" />
          </a>
        </h1>
      </td>
      <td style="vertical-align: middle" height="43">
        <a onclick="return EP_toggleMe('ID_Transmit')" href="javascript:void(0)">
          <p class="header" style="margin-top: 0; margin-bottom: 0"/>
          <script>
            document.write(' <P class='ueberschrift04'>Transmit Messages / Sendebotschaften</P>');
          </script>
        </a>
      </td>
    </tr>
  </table>


    <!-- 
        ** Nachrichten **        
        -->

    <div id="ID_Transmit" style="display:block">

      
        <xsl:for-each select='VoithDiagnosticToolsCAN/CANDeclaration/CanMessage'>
          <xsl:if test='TransmitMessage'>

            <br></br>
            <br></br>
            
            <table border="0" margin="0">
              <tr>
                <td class="uDocHeader02" width="120"></td>
                <td class="uDocHeader02">
                                
                  <xsl:attribute name="id">
                    <xsl:value-of select='concat("MessageDef_",ID)'/>
                  </xsl:attribute>
                  <xsl:value-of select='Name'/>

                </td>
               
              </tr>
            </table>

            <!-- 
            ** Transmitter Tabelle **        
            -->
          
            <table>              
              <tr>
                <td width ="120">
                  <img SRC="Resources/XSL/Images/_MarginalTransmit.gif" alt="Transmit Message" width="80" height="28" border ="0"  />
                </td>
                              
                <td>
                  <p class="uDocHeader02" style="margin-top: 0; margin-bottom: 0" >
                    <xsl:value-of select="Description"/>
                  </p>
                  <br></br>
                  <table border="0" margin="0">
                   
                   
                    <tr>
                      <td class='TabBorder1' width='180' >Identifier:</td>
                      <xsl:for-each select='TransmitMessage/Receivers'>
                        <td class='TabBody1' width='180' >
                          <xsl:value-of select="Identifier/@Value"/>
                          <sub>h</sub> <xsl:value-of select="Identifier"/>
                        </td>
                      </xsl:for-each>
                    </tr>
                    <tr>
                      <td class='TabBorder1' width='180' >PGN:</td>
                      <xsl:for-each select='TransmitMessage/Receivers'>
                        <td class='TabBody1' width='180' >
                          <xsl:value-of select="PGN/@ValueHex"/>
                          <sub>h</sub> /  <xsl:value-of select="PGN/@ValueHex"/>                           
                          <sub>d</sub>    <xsl:value-of select="PGN"/>
                        </td>
                      </xsl:for-each>
                    </tr>
                    <tr>
                      <td class='TabBorder1' width='180' >Cycle Time:</td>
                      <xsl:for-each select='TransmitMessage/Receivers'>
                        <td class='TabBody1' width='180' >
                          <xsl:value-of select="CycleTime"/>    <xsl:value-of select="CycleTime/@Unit"/>
                          <xsl:if test='CycleTime/@Alternative'>
                            or  <xsl:value-of select="CycleTime/@Alternative"/>
                          </xsl:if>
                          <xsl:if test='CycleTime/@Additional'>
                            and  <xsl:value-of select="CycleTime/@Additional"/>
                          </xsl:if>
                        </td>
                      </xsl:for-each>
                    </tr>
                           
                  </table>
                </td>
              </tr>
              
            </table>

            <!-- 
            ** Message Tabelle **        
            -->
            
            <br></br>
            <br></br>
            <table border="0" margin="0" width ="700">
              <tr>
                <td width='120'></td>
                <td width='40'  class='TabBorder1'>Byte</td>
                <td width='40'  class='TabBorder1'>Bit</td>
                <td width='40'  class='TabBorder1'>ECU</td>
                <td width='200' class='TabBorder1'>Parameters</td>
                <td             class='TabBorder1'>J1939-71 Ref.</td>                
                
              </tr>
              <xsl:for-each select='TransmitMessage/TransmitMessageDefinition/TMD'>
                <tr>
                  <td width ="120"></td>
                  <td class='TabBody1'><xsl:value-of select="Byte"/></td>
                  <td class='TabBody1'><xsl:value-of select="Bit"/></td>
                  <xsl:choose>
                    <xsl:when test='ECU'>
                      <td class='TabBody1'>
                        <p style="text-align: center">
                          <img SRC="Resources/XSL/Images/_Bulletfilled.gif" alt="Bullet Filled" border ="0"/>
                        </p>
                      </td>
                    </xsl:when>
                    <xsl:otherwise>
                      <td class='TabBody1'>
                        <p style="text-align: center">
                          <img SRC="Resources/XSL/Images/_Bullethollow.gif" alt="Bullet Hollow" border ="0"/>
                        </p>
                      </td>
                    </xsl:otherwise>
                  </xsl:choose>
                  <td class='TabBody1'><xsl:value-of select="Parameters"/></td>
                  <td class='TabBody1'><xsl:value-of select="J1939Ref"/></td>
                  <xsl:if test='SAESoftwareRef'>
                    <td class='TabBody1'>
                      <xsl:value-of select="SAESoftwareRef"/>
                    </td>
                  </xsl:if>
                  <xsl:if test='IESSoftwareFunction'>
                    <td class='TabBody1'>
                      <xsl:value-of select="IESSoftwareFunction"/>
                    </td>
                  </xsl:if>
                </tr>
              </xsl:for-each>
              
            </table>

            <br></br>
            <br></br>
            <!-- 
            ** Versions-Übersicht **        
            -->

            <table border="0" margin="0" width ="700">
              <tr>
                <td width='120'></td>
                <td class='TabBorder1'>Table is valid to:</td>
              </tr>

              <xsl:for-each select="ValidSoftwareVersions">
                <tr>
                  <td width='120'></td>
                  <td class='TabBody1'>
                    <xsl:value-of select="."/>
                  </td>
                </tr>

              </xsl:for-each>

            </table>



            <br/>
            <a href="#TOP">
              <img border="0" align='Right'  src="Resources/XSL/Images/_System_ArrowTop.gif" />
            </a>
            <hr color="#000099"/>
            
          </xsl:if>
        </xsl:for-each>

      
    </div>

    <br/>
    <hr color="#000099"/>
   

  </xsl:template>

</xsl:stylesheet>
