Difference between revisions of "IoTGateway/WiseSnail"
From ESS-WIKI
Fred.chang (talk | contribs) (→Functions) |
Fred.chang (talk | contribs) (→Structures) |
||
| Line 3: | Line 3: | ||
=Structures= | =Structures= | ||
| + | ==Infospec== | ||
| + | :The infospec structure defines your parameters in sensor hub. Those parameter structures will represented in Wise-PaaS like a tag. this structure includes two callback functions. You can use the callbacks to define your own get and set function. | ||
| + | |||
| + | struct WiseSnail_InfoSpec{ | ||
| + | WiseSnail_DataType type; | ||
| + | char *name; | ||
| + | char *unit; | ||
| + | union { | ||
| + | float value; | ||
| + | char *string; | ||
| + | }; | ||
| + | float min; | ||
| + | float max; | ||
| + | char *resourcetype; | ||
| + | WiseSnail_SetValue setValue; | ||
| + | WiseSnail_GetValue getValue; | ||
| + | }; | ||
Revision as of 03:37, 5 September 2016
Introduction
WiseSnail is the short name of Wise Sensor Network Abstract Interactive Layer. It is a layer to define the topology and behavior of sensor network. A complete device represented in WiseSnail includes one virtual gateway, one sensor connectivity interface and several sensor hubs. WiseSnail provides a form-like array which we call it infospec array to define tha parameters of sensor hub. And a form-like data array updates your real time data. So, you can easy to represent your device by creating several arrays.
Structures
Infospec
- The infospec structure defines your parameters in sensor hub. Those parameter structures will represented in Wise-PaaS like a tag. this structure includes two callback functions. You can use the callbacks to define your own get and set function.
struct WiseSnail_InfoSpec{
WiseSnail_DataType type;
char *name;
char *unit;
union {
float value;
char *string;
};
float min;
float max;
char *resourcetype;
WiseSnail_SetValue setValue;
WiseSnail_GetValue getValue;
};