![Anybus CompactCom 40 Common Ethernet Design Manual Download Page 55](http://html1.mh-extra.com/html/anybus/compactcom-40-common-ethernet/compactcom-40-common-ethernet_design-manual_2948756055.webp)
53 (104)
9.2.5
Hex Format Explained
The metadata max and min fields and the ADI values are ABP data encoded in a hex format. If
the data type is an integer, the endianness used is determined by the data format field found in
adi/info.json.
Examples:
The value 5 encoded as a UINT16, with data format = 0 (little endian):
0500
The character array “ABC” encoded as CHAR[3] (data format is not relevant for CHAR):
414243
9.3
Example
This example shows how to create a web page that fetches Module Name and CPU load from
the module and presents it on the web page. The file, containing this code, has to be stored in
the built-in file system, and the result can be seen in a common browser.
<html>
<head>
<title>Anybus CompactCom</title>
<!-- Imported libs -->
<script type="text/javascript" src="vfs/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="vfs/js/tmpl.js"></script>
</head>
<body>
<div id="info-content"></div>
<script type="text/x-tmpl" id="tmpl-info">
<b>From info.json</b><br>
Module name:
{%=o.modulename%}<br>
CPU Load:
{%=o.cpuload%}%<br>
</script>
<script type="text/javascript">
$.getJSON( "/module/info.json", null, function(data){
$("#info-content").html( tmpl("tmpl-info", data ) );
});
</script>
</body>
</html>
Anybus
®
CompactCom
™
40 Common Ethernet Design Guide
HMSI-27–269 2.1