fixed docu
This commit is contained in:
parent
be4ee5c14d
commit
814d559958
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
\page classes.html
|
\page classes.html
|
||||||
\title All Hive Classes
|
\title All guh Classes
|
||||||
|
|
||||||
\generatelist classes
|
\generatelist classes
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
include(html-template.qdocconf)
|
include(html-template.qdocconf)
|
||||||
|
|
||||||
project = Hive
|
project = guh
|
||||||
description = Hive your Home!
|
description = Gear up your Home!
|
||||||
|
|
||||||
outputdir = html
|
outputdir = html
|
||||||
outputformats = HTML
|
outputformats = HTML
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
\page deviceplugins.html
|
\page deviceplugins.html
|
||||||
\title Device Plugins
|
\title Device Plugins
|
||||||
|
|
||||||
\brief This is the API for implementing Hive device plugins.
|
\brief This is the API for implementing guh device plugins.
|
||||||
|
|
||||||
When creating a device plugin, start by subclassing \l{DevicePlugin} and filling
|
When creating a device plugin, start by subclassing \l{DevicePlugin} and filling
|
||||||
in information for the pure virtual methods.
|
in information for the pure virtual methods.
|
||||||
|
|||||||
@ -3,7 +3,7 @@ include(html-styles.qdocconf)
|
|||||||
HTML.postheader = \
|
HTML.postheader = \
|
||||||
"<div class=\"header\">\n" \
|
"<div class=\"header\">\n" \
|
||||||
" <div class=\"content\"> \n" \
|
" <div class=\"content\"> \n" \
|
||||||
" <a href=\"index.html\" class=\"indexref\"><span>Hive Developer Documentation</span></a>\n" \
|
" <a href=\"index.html\" class=\"indexref\"><span>guh Developer Documentation</span></a>\n" \
|
||||||
" </div>\n" \
|
" </div>\n" \
|
||||||
" <div class=\"breadcrumb toolblock\">\n" \
|
" <div class=\"breadcrumb toolblock\">\n" \
|
||||||
" <ul>\n" \
|
" <ul>\n" \
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
The JSON RPC interface represents a TCP socket connection using plaintext string communication.
|
The JSON RPC interface represents a TCP socket connection using plaintext string communication.
|
||||||
Messages are exchanged using the JSON format. Please note that this is not a REST API as the
|
Messages are exchanged using the JSON format. Please note that this is not a REST API as the
|
||||||
transport channel is not based on HTTP. It is an internal RPC mechanism to allow communication
|
transport channel is not based on HTTP. It is an internal RPC mechanism to allow communication
|
||||||
between the Hive Server and the main controller interface. This communication socket is not meant
|
between the guh Server and the main controller interface. This communication socket is not meant
|
||||||
to be exported to the outside of the of the systen as it allows arbitrary commands to manipulate
|
to be exported to the outside of the of the systen as it allows arbitrary commands to manipulate
|
||||||
the system. A more limited REST API implementation might be added in the main controller interface.
|
the system. A more limited REST API implementation might be added in the main controller interface.
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
connections with a some information about the server. Telnet can be used to issue commands for
|
connections with a some information about the server. Telnet can be used to issue commands for
|
||||||
testing.
|
testing.
|
||||||
|
|
||||||
An example how to communicate with the API using telnet on the same host where the Hive server
|
An example how to communicate with the API using telnet on the same host where the guh server
|
||||||
is running:
|
is running:
|
||||||
\code
|
\code
|
||||||
$ telnet localhost 1234
|
$ telnet localhost 1234
|
||||||
@ -46,7 +46,7 @@
|
|||||||
{
|
{
|
||||||
"id":0,
|
"id":0,
|
||||||
"status": "connected",
|
"status": "connected",
|
||||||
"server":"Hive JSONRPC Interface"
|
"server":"Guh JSONRPC Interface",
|
||||||
"version":"0.0.0"
|
"version":"0.0.0"
|
||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
@ -96,8 +96,8 @@
|
|||||||
"states": [
|
"states": [
|
||||||
"$ref:StateType"
|
"$ref:StateType"
|
||||||
],
|
],
|
||||||
"triggers": [
|
"events": [
|
||||||
"$ref:TriggerType"
|
"$ref:EventType"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
@ -140,7 +140,7 @@
|
|||||||
"type": "bool"
|
"type": "bool"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"triggers": [
|
"events": [
|
||||||
{
|
{
|
||||||
"id": "{7cae711a-a0af-41b4-b3bf-38d3e23b41ba}",
|
"id": "{7cae711a-a0af-41b4-b3bf-38d3e23b41ba}",
|
||||||
"name": "inRange",
|
"name": "inRange",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef HIVECORE_H
|
#ifndef GUHCORE_H
|
||||||
#define HIVECORE_H
|
#define GUHCORE_H
|
||||||
|
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
@ -32,4 +32,4 @@ private slots:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HIVECORE_H
|
#endif // GUHCORE_H
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if test -z $5; then
|
if test -z $5; then
|
||||||
echo "usage: $0 host sourceDevice triggerTypeId targetDeviceId actionTypeId"
|
echo "usage: $0 host sourceDevice eventTypeId targetDeviceId actionTypeId"
|
||||||
else
|
else
|
||||||
(echo '{"id":1, "method":"Rules.AddRule", "params":{"trigger": {"triggerTypeId": "'$3'", "deviceId":"'$2'", "params":{"power":"true"}}, "actions": [ { "deviceId":"'$4'", "actionTypeId":"'$5'", "params":{"power":"true"}}]}}'; sleep 1) | nc $1 1234
|
(echo '{"id":1, "method":"Rules.AddRule", "params":{"events": {"eventTypeId": "'$3'", "deviceId":"'$2'", "params":{"power":"true"}}, "actions": [ { "deviceId":"'$4'", "actionTypeId":"'$5'", "params":{"power":"true"}}]}}'; sleep 1) | nc $1 1234
|
||||||
# (echo '{"id":1, "method":"Rules.AddRule", "params":{"trigger": {"triggerTypeId": "'$2'", "deviceId":"'$3'", "params":{"power":"false"}}, "actions": [ { "deviceId":"'$4'", "name":"rule 1", "params":{"power":"false"}},{ "deviceId":"'$5'", "name":"rule 1", "params":{"power":"true"}}]}}'; sleep 1) | nc $1 1234
|
# (echo '{"id":1, "method":"Rules.AddRule", "params":{"events": {"eventTypeId": "'$2'", "deviceId":"'$3'", "params":{"power":"false"}}, "actions": [ { "deviceId":"'$4'", "name":"rule 1", "params":{"power":"false"}},{ "deviceId":"'$5'", "name":"rule 1", "params":{"power":"true"}}]}}'; sleep 1) | nc $1 1234
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user