This is an example of BLE GATT Client, which receives broadcast data from BLE_Server_BME280 ( a GATT server) , then transfers values up to mbed Device Connector (cloud).

Please refer details about BLEClient_mbedDevConn below. https://github.com/soramame21/BLEClient_mbedDevConn

The location of required BLE GATT server, BLE_Server_BME280, is at here. https://developer.mbed.org/users/edamame22/code/BLE_Server_BME280/

Committer:
edamame22
Date:
Thu Apr 13 04:48:11 2017 +0000
Revision:
0:29983394c6b6
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
edamame22 0:29983394c6b6 1 <?xml version="1.0" encoding="UTF-8" ?>
edamame22 0:29983394c6b6 2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
edamame22 0:29983394c6b6 3
edamame22 0:29983394c6b6 4 <xsl:output encoding="UTF-8" indent="yes" method="html"/>
edamame22 0:29983394c6b6 5 <xsl:strip-space elements="*"/>
edamame22 0:29983394c6b6 6
edamame22 0:29983394c6b6 7 <xsl:variable name="list"
edamame22 0:29983394c6b6 8 select="document('index.xml')/list" />
edamame22 0:29983394c6b6 9
edamame22 0:29983394c6b6 10 <xsl:template match="/">
edamame22 0:29983394c6b6 11 <h1>
edamame22 0:29983394c6b6 12 Unittest report
edamame22 0:29983394c6b6 13 </h1>
edamame22 0:29983394c6b6 14
edamame22 0:29983394c6b6 15 <p>
edamame22 0:29983394c6b6 16 <b>
edamame22 0:29983394c6b6 17 Total tests run <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@tests)"/>
edamame22 0:29983394c6b6 18 , failures: <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@failures) + sum(document($list/entry/@name)/testsuite/@errors)"/>
edamame22 0:29983394c6b6 19 </b>
edamame22 0:29983394c6b6 20
edamame22 0:29983394c6b6 21 <xsl:for-each select="document($list/entry/@name)" >
edamame22 0:29983394c6b6 22 <xsl:apply-templates select="testsuite"/>
edamame22 0:29983394c6b6 23 </xsl:for-each>
edamame22 0:29983394c6b6 24 </p>
edamame22 0:29983394c6b6 25 </xsl:template>
edamame22 0:29983394c6b6 26
edamame22 0:29983394c6b6 27 <xsl:template match="testsuite">
edamame22 0:29983394c6b6 28 <h2>
edamame22 0:29983394c6b6 29 <xsl:value-of select="@name" />
edamame22 0:29983394c6b6 30 </h2>
edamame22 0:29983394c6b6 31 <table border="1" cellSpacing="0" cellPadding="10" >
edamame22 0:29983394c6b6 32 <tr>
edamame22 0:29983394c6b6 33 <th>Tests run</th>
edamame22 0:29983394c6b6 34 <th>Tests failed</th>
edamame22 0:29983394c6b6 35 <th>Other errors</th>
edamame22 0:29983394c6b6 36 </tr>
edamame22 0:29983394c6b6 37 <tr>
edamame22 0:29983394c6b6 38 <td><xsl:value-of select="@tests"/></td>
edamame22 0:29983394c6b6 39 <td><xsl:value-of select="@failures"/></td>
edamame22 0:29983394c6b6 40 <td><xsl:value-of select="@errors"/></td>
edamame22 0:29983394c6b6 41 </tr>
edamame22 0:29983394c6b6 42 </table>
edamame22 0:29983394c6b6 43 <br/>
edamame22 0:29983394c6b6 44 <table border="1" cellSpacing="0" cellPadding="10" >
edamame22 0:29983394c6b6 45 <tr>
edamame22 0:29983394c6b6 46 <th>Tests name</th>
edamame22 0:29983394c6b6 47 <th>PASS/FAIL</th>
edamame22 0:29983394c6b6 48 <th>Failing case</th>
edamame22 0:29983394c6b6 49 <th>Reason</th>
edamame22 0:29983394c6b6 50 </tr>
edamame22 0:29983394c6b6 51 <xsl:apply-templates select="testcase"/>
edamame22 0:29983394c6b6 52 </table>
edamame22 0:29983394c6b6 53 </xsl:template>
edamame22 0:29983394c6b6 54
edamame22 0:29983394c6b6 55 <xsl:template match="testcase">
edamame22 0:29983394c6b6 56 <xsl:choose>
edamame22 0:29983394c6b6 57 <xsl:when test="failure">
edamame22 0:29983394c6b6 58 <tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="failure"/></tr>
edamame22 0:29983394c6b6 59 </xsl:when>
edamame22 0:29983394c6b6 60 <xsl:when test="error">
edamame22 0:29983394c6b6 61 <tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="error"/></tr>
edamame22 0:29983394c6b6 62 </xsl:when>
edamame22 0:29983394c6b6 63 <xsl:otherwise>
edamame22 0:29983394c6b6 64 <tr><td><xsl:value-of select="@name" /></td><td><font color="#00FF00">PASS</font></td><td></td><td></td></tr>
edamame22 0:29983394c6b6 65 </xsl:otherwise>
edamame22 0:29983394c6b6 66 </xsl:choose>
edamame22 0:29983394c6b6 67 </xsl:template>
edamame22 0:29983394c6b6 68
edamame22 0:29983394c6b6 69 <xsl:template match="failure">
edamame22 0:29983394c6b6 70 <td>
edamame22 0:29983394c6b6 71 <b><font color="#FF0000">FAIL</font></b>
edamame22 0:29983394c6b6 72 </td>
edamame22 0:29983394c6b6 73 <td>
edamame22 0:29983394c6b6 74 <font color="#ff0000">
edamame22 0:29983394c6b6 75 <xsl:value-of select="@message" />
edamame22 0:29983394c6b6 76 </font>
edamame22 0:29983394c6b6 77 </td>
edamame22 0:29983394c6b6 78 <td>
edamame22 0:29983394c6b6 79 <font color="#ff0000">
edamame22 0:29983394c6b6 80 <xsl:value-of select="@type" />
edamame22 0:29983394c6b6 81 </font>
edamame22 0:29983394c6b6 82 </td>
edamame22 0:29983394c6b6 83 </xsl:template>
edamame22 0:29983394c6b6 84
edamame22 0:29983394c6b6 85 <xsl:template match="error">
edamame22 0:29983394c6b6 86 <td>
edamame22 0:29983394c6b6 87 <b><font color="#FF0000">FAIL</font></b>
edamame22 0:29983394c6b6 88 </td>
edamame22 0:29983394c6b6 89 <td>
edamame22 0:29983394c6b6 90 <font color="#ff0000">
edamame22 0:29983394c6b6 91 <xsl:value-of select="@message" />
edamame22 0:29983394c6b6 92 </font>
edamame22 0:29983394c6b6 93 </td>
edamame22 0:29983394c6b6 94 <td>
edamame22 0:29983394c6b6 95 <font color="#ff0000">
edamame22 0:29983394c6b6 96 <xsl:value-of select="@type" />
edamame22 0:29983394c6b6 97 </font>
edamame22 0:29983394c6b6 98 </td>
edamame22 0:29983394c6b6 99 </xsl:template>
edamame22 0:29983394c6b6 100
edamame22 0:29983394c6b6 101 </xsl:stylesheet>