Strict Standards: Declaration of SkinxPL::initPage() should be compatible with Skin::initPage(OutputPage $out) in /home/xplteam/public_html/wiki/skins/xpl.php on line 7
Schema - HBEAT - XPLProject

Contents

HBEAT Message Specification

This schema provides the description of heartbeat message send by xPL devices on the xPL network. This schema is part of the core xPL Protocol.

XPL-STAT Structure

If a device is configurable, but has not yet been configured, it should send heartbeats according to the config schema.

HBEAT.BASIC

The hbeat.basic heartbeat is for use by small devices, such as PIC systems. PC based applications must use the hbeat.app schema, because of hub requirements.

hbeat.basic
{
interval=[interval in minutes]
[version=[version info]]
(...additional info defined by the developer)
}

Each device is required to send a hbeat.basic or hbeat.app at a regular interval. Version info is preferably formatted as 1 to 4 integers separated by a dot ('.') (eg. version=0.4 or version=1.2.0.1234).

HBEAT.APP

The hbeat.app heartbeat is for use by PC based applications, using ethernet. They must use this schema, because it contains the necessary information for the hub to communicate with the xPL application. The schema is identical to the hbeat.basic version except for the addition of keys remote-ip and port.

hbeat.app
{
interval=[interval in minutes]
port=[listening port]
remote-ip=[local IP address]
[version=[version info]]
(...additional info defined by the developer)
}

Each device is required to send a hbeat.basic or hbeat.app at a regular interval. PC based applications should start sending hbeat.app messages approximately every 3 to 10 seconds, until they receive their own echo (which means that the hub on the PC the application is running on is working), then they should revert to regular intervals. If the PC based application has not received an echo within 2 minutes, then it should revert to sending a heartbeat every 30 seconds until it gets its own echo.

Version info is preferably formatted as 1 to 4 integers separated by a dot ('.') (eg. version=0.4 or version=1.2.0.1234).

HBEAT.END

The hbeat.end heartbeat will notify other xPL devices that the device is no longer available. It allows devices that track other devices to clean up.

hbeat.end
{
(...additional info defined by the developer)
}

hbeat.end should only be sent if the heartbeat messages sent so far were hbeat.basic or hbeat.app. If they were config.basic or config.app then config.end should be sent instead. It is not required for devices to sent the hbeat.end.

XPL-CMND Structure

HBEAT.REQUEST

hbeat.request
{
command=request
}

The target device(s) will respond with a hbeat.app or hbeat.basic response. It is not required for devices to support this request.

XPL-TRIG Structure

Not applicable for heartbeats.

Standard Schema Notes

The heartbeat interval depends on the state of a device. Regular heratbeat intervals are anywhere between 5 and 9 minutes.

This page was last modified on 23 May 2011, at 18:13. This page has been accessed 5,607 times.