CloudPlugs REST Library  1.0.0
for ANSI C
Glossary and data reference

This page defines some common used terms and details about data types of CloudPlugs platform.

Data types

CloudPlugs platform uses an internal protocol containing custom data types for HTTP communications between server and clients libraries (requests/responses).
In this section are described the data types referenced in the REST Client documentation

JSON

Is a standard format to define data values as a string. Allowed values are: null, true, false, STRINGS, NUMBERS, ARRAYS, OBJECTS. For further details please refer to http://www.json.org/

HWID

String (in IoT is the serial number). When associated to a thing (product) it must be unique among all the things of the same model. If associated to a prototype or controller it must be unique among all the prototypes and controllers of the same company.

OBJECT_ID

String: 24 hexadecimal chars (case insensitive)

OBJECT_ID_CSV

String: OBJECT_ID, ... (comma separated OBJECT_ID )

PLUG_ID

String: "dev" or "com" + "-" + OBJECT_ID

PLUG_ID_CSV

String: PLUG_ID, ... (comma separated PLUG_ID )

PLUG_FILTER

Array of PLUG_ID or null (empty array => none; not present or null => all)

ROLE

String: "iot_pt" or "iot_tg" or "iot_ctrl"

STATUS

String: "ok" or "disabled" or "reactivate"

MODEL_SECRET

String: model.secret (of the Data Model)

ACTIVATION_CODE

String: base64( sha1( HWID + MODEL_SECRET ) )

CONTROL_CODE

String: base64( sha1( MODEL_SECRET + HWID ) )

TIMESTAMP

String or Number: an ISO date string or a string/number contains the millisecs since the Epoch

TIMESTAMP_CSV

String or Number: TIMESTAMP, ... (comma separated TIMESTAMPs)

CHANNEL

String: channel name (max 200 bytes)

CHMASK

String: channel mask (max 200 bytes)

CHMASK_CSV

String: CHMASK,... (comma separated CHMASK )

PERM_FILTER

Object or Array:

{
of : {
r : PLUG_FILTER, // reading constraint on data producer
w : PLUG_FILTER // writing constraint on data producer
},
ctrl : "r" or "rw" or "" or null // which permission (r/w) a controller can have on this device
// "" = no permission, null is equivalent to "rw"
}

HWID_ENTRY

String: HWID (serial number) or Array or Object:

{
hwid: String,
thing: String,
ctrl: String
}

(thing and ctrl are optional)

PROP_LINKS

Warning: not supported yet, present only for future use!.
Array or Object:

{
property_name1 : {
channel: String,
field: String or null
},
...
}

(field is optional, the subfield of the published data value to refer)