Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
yodiwo_api.h
00001 /** 00002 * Created by ApiGenerator Tool (C) on 15/9/2015 4:32:53 μμ. 00003 */ 00004 00005 #ifndef _Yodiwo_Plegma_H_ 00006 #define _Yodiwo_Plegma_H_ 00007 00008 #ifdef __cplusplus 00009 extern "C" { 00010 #endif 00011 00012 #include <stdbool.h> 00013 #include <stdint.h> 00014 00015 /* ========================================================================*/ 00016 /* Enum */ 00017 /* ========================================================================*/ 00018 typedef enum 00019 { 00020 Yodiwo_ePortType_Undefined = 0, 00021 Yodiwo_ePortType_Integer = 1, 00022 Yodiwo_ePortType_Decimal = 2, 00023 Yodiwo_ePortType_DecimalHigh = 3, 00024 Yodiwo_ePortType_Boolean = 4, 00025 Yodiwo_ePortType_Color = 5, 00026 Yodiwo_ePortType_String = 6, 00027 } Yodiwo_Plegma_ePortType; 00028 00029 typedef enum 00030 { 00031 Yodiwo_ioPortDirection_Undefined = 0, 00032 Yodiwo_ioPortDirection_InputOutput = 1, 00033 Yodiwo_ioPortDirection_Output = 2, 00034 Yodiwo_ioPortDirection_Input = 3, 00035 } Yodiwo_Plegma_ioPortDirection; 00036 00037 typedef enum 00038 { 00039 Yodiwo_ePortConf_None = 0, 00040 Yodiwo_ePortConf_ReceiveAllEvents = 1, 00041 Yodiwo_ePortConf_IsTrigger = 2, 00042 } Yodiwo_Plegma_ePortConf; 00043 00044 typedef enum 00045 { 00046 Yodiwo_eNodeType_Unknown = 0, 00047 Yodiwo_eNodeType_Gateway = 1, 00048 Yodiwo_eNodeType_EndpointSingle = 2, 00049 Yodiwo_eNodeType_TestGateway = 3, 00050 Yodiwo_eNodeType_TestEndpoint = 4, 00051 Yodiwo_eNodeType_WSEndpoint = 5, 00052 } Yodiwo_Plegma_eNodeType; 00053 00054 typedef enum 00055 { 00056 Yodiwo_eNodeCapa_None = 0, 00057 Yodiwo_eNodeCapa_SupportsGraphSplitting = 1, 00058 } Yodiwo_Plegma_eNodeCapa; 00059 00060 typedef enum 00061 { 00062 Yodiwo_eThingsOperation_Invalid = 0, 00063 Yodiwo_eThingsOperation_Update = 1, 00064 Yodiwo_eThingsOperation_Overwrite = 2, 00065 Yodiwo_eThingsOperation_Delete = 3, 00066 Yodiwo_eThingsOperation_Get = 4, 00067 Yodiwo_eThingsOperation_Scan = 5, 00068 } Yodiwo_Plegma_eThingsOperation; 00069 00070 typedef enum 00071 { 00072 Yodiwo_ePortStateOperation_Invalid = 0, 00073 Yodiwo_ePortStateOperation_SpecificKeys = 1, 00074 Yodiwo_ePortStateOperation_ActivePortStates = 2, 00075 Yodiwo_ePortStateOperation_AllPortStates = 3, 00076 } Yodiwo_Plegma_ePortStateOperation; 00077 00078 typedef enum 00079 { 00080 Yodiwo_PairingStates_Initial = 0, 00081 Yodiwo_PairingStates_StartRequested = 1, 00082 Yodiwo_PairingStates_TokensRequested = 2, 00083 Yodiwo_PairingStates_TokensSentToNode = 3, 00084 Yodiwo_PairingStates_Token2SentToUser = 4, 00085 Yodiwo_PairingStates_Token2PostedToServer = 5, 00086 Yodiwo_PairingStates_UUIDEntryRedirect = 6, 00087 Yodiwo_PairingStates_Phase1Complete = 7, 00088 Yodiwo_PairingStates_NextRequested = 8, 00089 Yodiwo_PairingStates_Token1PostedToServer = 9, 00090 Yodiwo_PairingStates_KeysSentToNode = 10, 00091 Yodiwo_PairingStates_Paired = 11, 00092 Yodiwo_PairingStates_Failed = 12, 00093 } Yodiwo_Plegma_PairingStates; 00094 00095 00096 00097 /* ========================================================================*/ 00098 /* Struct Prototypes */ 00099 /* ========================================================================*/ 00100 struct Yodiwo_Plegma_UserKey; 00101 struct Yodiwo_Plegma_NodeKey; 00102 struct Yodiwo_Plegma_ThingKey; 00103 struct Yodiwo_Plegma_PortKey; 00104 struct Yodiwo_Plegma_GraphDescriptorBaseKey; 00105 struct Yodiwo_Plegma_GraphDescriptorKey; 00106 struct Yodiwo_Plegma_GraphKey; 00107 struct Yodiwo_Plegma_BlockKey; 00108 struct Yodiwo_Plegma_TimelineDescriptorKey; 00109 struct Yodiwo_Plegma_Mqtt_MqttAPIMessage; 00110 struct Yodiwo_Plegma_Port; 00111 struct Yodiwo_Plegma_ConfigParameter; 00112 struct Yodiwo_Plegma_ThingUIHints; 00113 struct Yodiwo_Plegma_Thing; 00114 struct Yodiwo_Plegma_LoginReq; 00115 struct Yodiwo_Plegma_LoginRsp; 00116 struct Yodiwo_Plegma_StateDescription; 00117 struct Yodiwo_Plegma_ConfigDescription; 00118 struct Yodiwo_Plegma_PortDescription; 00119 struct Yodiwo_Plegma_NodeModelType; 00120 struct Yodiwo_Plegma_NodeThingType; 00121 struct Yodiwo_Plegma_NodeInfoReq; 00122 struct Yodiwo_Plegma_NodeInfoRsp; 00123 struct Yodiwo_Plegma_ThingsReq; 00124 struct Yodiwo_Plegma_ThingsRsp; 00125 struct Yodiwo_Plegma_PortEvent; 00126 struct Yodiwo_Plegma_PortEventMsg; 00127 struct Yodiwo_Plegma_PortStateReq; 00128 struct Yodiwo_Plegma_PortState; 00129 struct Yodiwo_Plegma_PortStateRsp; 00130 struct Yodiwo_Plegma_ActivePortKeysMsg; 00131 struct Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest; 00132 struct Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest; 00133 struct Yodiwo_Plegma_NodePairing_PairingServerTokensResponse; 00134 struct Yodiwo_Plegma_NodePairing_PairingServerKeysResponse; 00135 struct Yodiwo_Plegma_NodePairing_PairingNodePhase1Response; 00136 struct Yodiwo_Tools_APIGenerator_CNodeConfig; 00137 struct Yodiwo_Tools_APIGenerator_CNodeYConfig; 00138 00139 /* Array helper structs */ 00140 struct Array_Yodiwo_Plegma_ConfigParameter; 00141 struct Array_Yodiwo_Plegma_Port; 00142 struct Array_Yodiwo_Plegma_ConfigDescription; 00143 struct Array_Yodiwo_Plegma_PortDescription; 00144 struct Array_Yodiwo_Plegma_NodeModelType; 00145 struct Array_Yodiwo_Plegma_NodeThingType; 00146 struct Array_Yodiwo_Plegma_Thing; 00147 struct Array_Yodiwo_Plegma_PortEvent; 00148 struct Array_string; 00149 struct Array_Yodiwo_Plegma_PortState; 00150 struct Array_Yodiwo_Tools_APIGenerator_CNodeConfig; 00151 00152 /* ========================================================================*/ 00153 /* Struct Helpers */ 00154 /* ========================================================================*/ 00155 00156 typedef struct Array_Yodiwo_Plegma_ConfigParameter 00157 { 00158 int num; 00159 struct Yodiwo_Plegma_ConfigParameter* elems; 00160 } Array_Yodiwo_Plegma_ConfigParameter_t; 00161 00162 typedef struct Array_Yodiwo_Plegma_Port 00163 { 00164 int num; 00165 struct Yodiwo_Plegma_Port* elems; 00166 } Array_Yodiwo_Plegma_Port_t; 00167 00168 typedef struct Array_Yodiwo_Plegma_ConfigDescription 00169 { 00170 int num; 00171 struct Yodiwo_Plegma_ConfigDescription* elems; 00172 } Array_Yodiwo_Plegma_ConfigDescription_t; 00173 00174 typedef struct Array_Yodiwo_Plegma_PortDescription 00175 { 00176 int num; 00177 struct Yodiwo_Plegma_PortDescription* elems; 00178 } Array_Yodiwo_Plegma_PortDescription_t; 00179 00180 typedef struct Array_Yodiwo_Plegma_NodeModelType 00181 { 00182 int num; 00183 struct Yodiwo_Plegma_NodeModelType* elems; 00184 } Array_Yodiwo_Plegma_NodeModelType_t; 00185 00186 typedef struct Array_Yodiwo_Plegma_NodeThingType 00187 { 00188 int num; 00189 struct Yodiwo_Plegma_NodeThingType* elems; 00190 } Array_Yodiwo_Plegma_NodeThingType_t; 00191 00192 typedef struct Array_Yodiwo_Plegma_Thing 00193 { 00194 int num; 00195 struct Yodiwo_Plegma_Thing* elems; 00196 } Array_Yodiwo_Plegma_Thing_t; 00197 00198 typedef struct Array_Yodiwo_Plegma_PortEvent 00199 { 00200 int num; 00201 struct Yodiwo_Plegma_PortEvent* elems; 00202 } Array_Yodiwo_Plegma_PortEvent_t; 00203 00204 typedef struct Array_string 00205 { 00206 int num; 00207 char** elems; 00208 } Array_string; 00209 00210 typedef struct Array_Yodiwo_Plegma_PortState 00211 { 00212 int num; 00213 struct Yodiwo_Plegma_PortState* elems; 00214 } Array_Yodiwo_Plegma_PortState_t; 00215 00216 typedef struct Array_Yodiwo_Tools_APIGenerator_CNodeConfig 00217 { 00218 int num; 00219 struct Yodiwo_Tools_APIGenerator_CNodeConfig* elems; 00220 } Array_Yodiwo_Tools_APIGenerator_CNodeConfig_t; 00221 00222 00223 /* ========================================================================*/ 00224 /* Struct Definitions */ 00225 /* ========================================================================*/ 00226 ///<summary>Globally unique identifier of a </summary> 00227 typedef struct Yodiwo_Plegma_UserKey 00228 { 00229 char* UserID; 00230 } Yodiwo_Plegma_UserKey_t; 00231 00232 ///<summary>Globally unique identifier of a Node</summary> 00233 typedef struct Yodiwo_Plegma_NodeKey 00234 { 00235 Yodiwo_Plegma_UserKey_t UserKey; 00236 int32_t NodeID; 00237 } Yodiwo_Plegma_NodeKey_t; 00238 00239 ///<summary>Globally unique identifier of a Yodiwo.API.Plegma.Thing</summary> 00240 typedef struct Yodiwo_Plegma_ThingKey 00241 { 00242 Yodiwo_Plegma_NodeKey_t NodeKey; 00243 char* ThingUID; 00244 } Yodiwo_Plegma_ThingKey_t; 00245 00246 ///<summary>Globally unique identifier of a Yodiwo.API.Plegma.Thing's Yodiwo.API.Plegma.Port</summary> 00247 typedef struct Yodiwo_Plegma_PortKey 00248 { 00249 Yodiwo_Plegma_ThingKey_t ThingKey; 00250 char* PortUID; 00251 } Yodiwo_Plegma_PortKey_t; 00252 00253 typedef struct Yodiwo_Plegma_GraphDescriptorBaseKey 00254 { 00255 Yodiwo_Plegma_UserKey_t UserKey; 00256 char* Id; 00257 } Yodiwo_Plegma_GraphDescriptorBaseKey_t; 00258 00259 ///<summary>Globally unique identifier of a GraphDescriptor</summary> 00260 typedef struct Yodiwo_Plegma_GraphDescriptorKey 00261 { 00262 Yodiwo_Plegma_UserKey_t UserKey; 00263 char* Id; 00264 int32_t Revision; 00265 } Yodiwo_Plegma_GraphDescriptorKey_t; 00266 00267 ///<summary>Globally unique identifier of a Graph</summary> 00268 typedef struct Yodiwo_Plegma_GraphKey 00269 { 00270 Yodiwo_Plegma_GraphDescriptorKey_t GraphDescriptorKey; 00271 int32_t GraphId; 00272 } Yodiwo_Plegma_GraphKey_t; 00273 00274 ///<summary>Globally unique identifier of a Graph's Block</summary> 00275 typedef struct Yodiwo_Plegma_BlockKey 00276 { 00277 Yodiwo_Plegma_GraphKey_t GraphKey; 00278 int32_t BlockId; 00279 } Yodiwo_Plegma_BlockKey_t; 00280 00281 ///<summary>Globally unique identifier of a TimelineDescriptor</summary> 00282 typedef struct Yodiwo_Plegma_TimelineDescriptorKey 00283 { 00284 Yodiwo_Plegma_UserKey_t UserKey; 00285 char* Id; 00286 } Yodiwo_Plegma_TimelineDescriptorKey_t; 00287 00288 ///<summary>Mqtt message encapsulation class.</summary> 00289 typedef struct Yodiwo_Plegma_Mqtt_MqttAPIMessage 00290 { 00291 int32_t ResponseToSeqNo; 00292 char* Payload; 00293 } Yodiwo_Plegma_Mqtt_MqttAPIMessage_t; 00294 00295 ///<summary>Basic Input/Output entity of a Thing Creates and sends messages towards the Yodiwo cloud service, or receives and handles messages from the cloud. Both events occur via the Yodiwo.API.Plegma.PortEventMsg message</summary> 00296 typedef struct Yodiwo_Plegma_Port 00297 { 00298 char* PortKey; 00299 char* Name; 00300 char* Description; 00301 Yodiwo_Plegma_ioPortDirection ioDirection; 00302 Yodiwo_Plegma_ePortType Type; 00303 char* State; 00304 int32_t RevNum; 00305 Yodiwo_Plegma_ePortConf ConfFlags; 00306 } Yodiwo_Plegma_Port_t; 00307 00308 ///<summary>Configuration parameters for the thing in generic name-value pairs</summary> 00309 typedef struct Yodiwo_Plegma_ConfigParameter 00310 { 00311 char* Name; 00312 char* Value; 00313 } Yodiwo_Plegma_ConfigParameter_t; 00314 00315 ///<summary>Collection of instructions ("hints") for how to present this thing in the Cyan UI</summary> 00316 typedef struct Yodiwo_Plegma_ThingUIHints 00317 { 00318 char* IconURI; 00319 char* Description; 00320 } Yodiwo_Plegma_ThingUIHints_t; 00321 00322 ///<summary>Main representation of a Thing that can interact with the Yodiwo cloud service</summary> 00323 typedef struct Yodiwo_Plegma_Thing 00324 { 00325 char* ThingKey; 00326 char* Name; 00327 Array_Yodiwo_Plegma_ConfigParameter_t Config; 00328 Array_Yodiwo_Plegma_Port_t Ports; 00329 char* Type; 00330 char* BlockType; 00331 Yodiwo_Plegma_ThingUIHints_t UIHints; 00332 } Yodiwo_Plegma_Thing_t; 00333 00334 ///<summary>Login Request to be used only for transports that require explicit authentication via the API itself</summary> 00335 typedef struct Yodiwo_Plegma_LoginReq 00336 { 00337 int32_t SeqNo; 00338 } Yodiwo_Plegma_LoginReq_t; 00339 00340 ///<summary>Login Response 00341 ///sends node and secret keys 00342 ///to be used only for transports that require explicit authentication via the API itself</summary> 00343 typedef struct Yodiwo_Plegma_LoginRsp 00344 { 00345 int32_t SeqNo; 00346 char* NodeKey; 00347 char* SecretKey; 00348 } Yodiwo_Plegma_LoginRsp_t; 00349 00350 typedef struct Yodiwo_Plegma_StateDescription 00351 { 00352 double Minimum; 00353 double Maximum; 00354 double Step; 00355 char* Pattern; 00356 bool ReadOnly; 00357 } Yodiwo_Plegma_StateDescription_t; 00358 00359 ///<summary>Describes restrictions and gives information of a configuration parameter.</summary> 00360 typedef struct Yodiwo_Plegma_ConfigDescription 00361 { 00362 char* DefaultValue; 00363 char* Description; 00364 char* Label; 00365 char* Name; 00366 bool Required; 00367 char* Type; 00368 double Minimum; 00369 double Maximum; 00370 double Stepsize; 00371 bool ReadOnly; 00372 } Yodiwo_Plegma_ConfigDescription_t; 00373 00374 ///<summary>Describes restrictions and gives information of a port Yodiwo.API.Plegma.Port.</summary> 00375 typedef struct Yodiwo_Plegma_PortDescription 00376 { 00377 char* Description; 00378 char* Id; 00379 char* Label; 00380 char* Category; 00381 Yodiwo_Plegma_StateDescription_t State; 00382 } Yodiwo_Plegma_PortDescription_t; 00383 00384 ///<summary>Base class that describes a Model of a Thing Yodiwo.API.Plegma.Thing</summary> 00385 typedef struct Yodiwo_Plegma_NodeModelType 00386 { 00387 char* Id; 00388 char* Name; 00389 char* Description; 00390 Array_Yodiwo_Plegma_ConfigDescription_t Config; 00391 Array_Yodiwo_Plegma_PortDescription_t Port; 00392 } Yodiwo_Plegma_NodeModelType_t; 00393 00394 ///<summary>Base class that describes a group of Thing Models Yodiwo.API.Plegma.NodeModelType</summary> 00395 typedef struct Yodiwo_Plegma_NodeThingType 00396 { 00397 char* Type; 00398 bool Searchable; 00399 char* Description; 00400 Array_Yodiwo_Plegma_NodeModelType_t Model; 00401 } Yodiwo_Plegma_NodeThingType_t; 00402 00403 ///<summary>Node Info Request If sent by cloud to a node, it is to request capabilities and supported types from the node If sent by a node to the cloud, then Yodiwo.API.Plegma.NodeInfoReq.RequestedThingType must be set and can be used to perform discovery with the user's connected nodes (currently unavailable) 00404 ///Direction: bidirectional (Node->Cloud and Cloud->Node) 00405 ///Receiving end must reply with a Yodiwo.API.Plegma.NodeInfoRsp 00406 ///</summary> 00407 typedef struct Yodiwo_Plegma_NodeInfoReq 00408 { 00409 int32_t SeqNo; 00410 Yodiwo_Plegma_NodeThingType_t RequestedThingType; 00411 } Yodiwo_Plegma_NodeInfoReq_t; 00412 00413 ///<summary>Node Info Response Message that contains gneral information about a node including supported Node Types and Capabilities 00414 ///Direction: bidirectional (Node->Cloud and Cloud->Node) 00415 ///In response to a Yodiwo.API.Plegma.NodeInfoReq</summary> 00416 typedef struct Yodiwo_Plegma_NodeInfoRsp 00417 { 00418 int32_t SeqNo; 00419 char* Name; 00420 Yodiwo_Plegma_eNodeType Type; 00421 Yodiwo_Plegma_eNodeCapa Capabilities; 00422 Array_Yodiwo_Plegma_NodeThingType_t ThingTypes; 00423 } Yodiwo_Plegma_NodeInfoRsp_t; 00424 00425 ///<summary>Node Things Request Used to request a Yodiwo.API.Plegma.Things related operation from the other end. 00426 ///Receiving side *must* reply with a Yodiwo.API.Plegma.ThingsRsp. Its ApiMsg.ResponseToSeqNo field *must* be set to this message's Yodiwo.API.Plegma.ApiMsg.SeqNo 00427 ///Direction: bidirectional (Node->Cloud and Cloud->Node) 00428 ///</summary> 00429 typedef struct Yodiwo_Plegma_ThingsReq 00430 { 00431 int32_t SeqNo; 00432 Yodiwo_Plegma_eThingsOperation Operation; 00433 char* ThingKey; 00434 Array_Yodiwo_Plegma_Thing_t Data; 00435 } Yodiwo_Plegma_ThingsReq_t; 00436 00437 ///<summary>Node Things Response Response to a Yodiwo.API.Plegma.ThingsReq request 00438 ///a ThingsRsp message should have: - Yodiwo.API.Plegma.ThingsRsp.Operation set to ThingReq's operation - ApiMsg.ResponseToSeqNo set to ThingReq's Yodiwo.API.Plegma.ApiMsg.SeqNo- Yodiwo.API.Plegma.ThingsRsp.Status set to True if ThingsReq was successfully handled and this Msg has valid data, False otherwise - if Yodiwo.API.Plegma.ThingsRsp.Status is True, Yodiwo.API.Plegma.ThingsRsp.Data set to correspond to requested Req's operation, set to Null otherwise. Yodiwo.API.Plegma.ThingsRsp.Data is allowed to be null if originally requested operation does not expect back data, only status 00439 ///Direction: bidirectional (Node->Cloud and Cloud->Node) 00440 ///</summary> 00441 typedef struct Yodiwo_Plegma_ThingsRsp 00442 { 00443 int32_t SeqNo; 00444 Yodiwo_Plegma_eThingsOperation Operation; 00445 bool Status; 00446 Array_Yodiwo_Plegma_Thing_t Data; 00447 } Yodiwo_Plegma_ThingsRsp_t; 00448 00449 ///<summary>Port Event class: used to describe a new event that should trigger en endpoint, either towards a node or the Cloud Services</summary> 00450 typedef struct Yodiwo_Plegma_PortEvent 00451 { 00452 char* PortKey; 00453 char* State; 00454 int32_t RevNum; 00455 } Yodiwo_Plegma_PortEvent_t; 00456 00457 ///<summary>asynchronous Port Event message The main API message to exchange events between Nodes and the Yodiwo Cloud Service 00458 ///Direction: bidirectional (Node->Cloud and Cloud->Node) 00459 ///</summary> 00460 typedef struct Yodiwo_Plegma_PortEventMsg 00461 { 00462 int32_t SeqNo; 00463 Array_Yodiwo_Plegma_PortEvent_t PortEvents; 00464 } Yodiwo_Plegma_PortEventMsg_t; 00465 00466 ///<summary>Port State Request. Will result in a response of type Yodiwo.API.Plegma.PortStateRsp 00467 ///Direction: node->cloud 00468 ///</summary> 00469 typedef struct Yodiwo_Plegma_PortStateReq 00470 { 00471 int32_t SeqNo; 00472 Yodiwo_Plegma_ePortStateOperation Operation; 00473 Array_string PortKeys; 00474 } Yodiwo_Plegma_PortStateReq_t; 00475 00476 ///<summary>internal state of a referenced Port</summary> 00477 typedef struct Yodiwo_Plegma_PortState 00478 { 00479 char* PortKey; 00480 char* State; 00481 int32_t RevNum; 00482 bool IsDeployed; 00483 } Yodiwo_Plegma_PortState_t; 00484 00485 ///<summary>Active Port Keys Msg Informs Node of all currently active Ports (i.e. Ports that are connected and active in currently deployed graphs). Should be used to 1. supress events from inactive ports, allowing more efficient use of medium, 2. sync Port states with the server 00486 ///Can be either asynchronous (e.g. at Node connection) or as a response to a PortUpdateReq 00487 ///Direction: Cloud -> Node 00488 ///</summary> 00489 typedef struct Yodiwo_Plegma_PortStateRsp 00490 { 00491 int32_t SeqNo; 00492 Yodiwo_Plegma_ePortStateOperation Operation; 00493 Array_Yodiwo_Plegma_PortState_t PortStates; 00494 } Yodiwo_Plegma_PortStateRsp_t; 00495 00496 ///<summary>Active Port Keys Msg Informs Node of all currently active Ports (i.e. Ports that are connected and active in currently deployed graphs). Should be used by Nodes to supress events from inactive ports, allowing more efficient use of medium 00497 ///Direction: Cloud -> Node 00498 ///</summary> 00499 typedef struct Yodiwo_Plegma_ActivePortKeysMsg 00500 { 00501 int32_t SeqNo; 00502 Array_string ActivePortKeys; 00503 } Yodiwo_Plegma_ActivePortKeysMsg_t; 00504 00505 typedef struct Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest 00506 { 00507 char* uuid; 00508 char* name; 00509 } Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest_t; 00510 00511 typedef struct Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest 00512 { 00513 char* uuid; 00514 char* token1; 00515 } Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest_t; 00516 00517 typedef struct Yodiwo_Plegma_NodePairing_PairingServerTokensResponse 00518 { 00519 char* token1; 00520 char* token2; 00521 } Yodiwo_Plegma_NodePairing_PairingServerTokensResponse_t; 00522 00523 typedef struct Yodiwo_Plegma_NodePairing_PairingServerKeysResponse 00524 { 00525 char* nodeKey; 00526 char* secretKey; 00527 } Yodiwo_Plegma_NodePairing_PairingServerKeysResponse_t; 00528 00529 typedef struct Yodiwo_Plegma_NodePairing_PairingNodePhase1Response 00530 { 00531 char* userNodeRegistrationUrl; 00532 char* token2; 00533 } Yodiwo_Plegma_NodePairing_PairingNodePhase1Response_t; 00534 00535 typedef struct Yodiwo_Tools_APIGenerator_CNodeConfig 00536 { 00537 char* Uuid; 00538 char* Name; 00539 char* NodeKey; 00540 char* NodeSecret; 00541 char* PairingServerUrl; 00542 char* YPChannelServer; 00543 int32_t YPChannelServerPort; 00544 int32_t WebPort; 00545 char* MqttBrokerHostname; 00546 int32_t MqttBrokerPort; 00547 char* MqttBrokerCertFile; 00548 } Yodiwo_Tools_APIGenerator_CNodeConfig_t; 00549 00550 typedef struct Yodiwo_Tools_APIGenerator_CNodeYConfig 00551 { 00552 int32_t ActiveID; 00553 Array_Yodiwo_Tools_APIGenerator_CNodeConfig_t Configs; 00554 } Yodiwo_Tools_APIGenerator_CNodeYConfig_t; 00555 00556 00557 00558 /* ========================================================================*/ 00559 /* ToJson Functions Prototypes */ 00560 /* ========================================================================*/ 00561 00562 int Yodiwo_Plegma_UserKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_UserKey_t *value); 00563 int Yodiwo_Plegma_NodeKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeKey_t *value); 00564 int Yodiwo_Plegma_ThingKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingKey_t *value); 00565 int Yodiwo_Plegma_PortKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortKey_t *value); 00566 int Yodiwo_Plegma_GraphDescriptorBaseKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_GraphDescriptorBaseKey_t *value); 00567 int Yodiwo_Plegma_GraphDescriptorKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_GraphDescriptorKey_t *value); 00568 int Yodiwo_Plegma_GraphKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_GraphKey_t *value); 00569 int Yodiwo_Plegma_BlockKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_BlockKey_t *value); 00570 int Yodiwo_Plegma_TimelineDescriptorKey_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_TimelineDescriptorKey_t *value); 00571 int Yodiwo_Plegma_Mqtt_MqttAPIMessage_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_Mqtt_MqttAPIMessage_t *value); 00572 int Yodiwo_Plegma_Port_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_Port_t *value); 00573 int Yodiwo_Plegma_ConfigParameter_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ConfigParameter_t *value); 00574 int Yodiwo_Plegma_ThingUIHints_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingUIHints_t *value); 00575 int Yodiwo_Plegma_Thing_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_Thing_t *value); 00576 int Yodiwo_Plegma_LoginReq_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_LoginReq_t *value); 00577 int Yodiwo_Plegma_LoginRsp_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_LoginRsp_t *value); 00578 int Yodiwo_Plegma_StateDescription_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_StateDescription_t *value); 00579 int Yodiwo_Plegma_ConfigDescription_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ConfigDescription_t *value); 00580 int Yodiwo_Plegma_PortDescription_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortDescription_t *value); 00581 int Yodiwo_Plegma_NodeModelType_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeModelType_t *value); 00582 int Yodiwo_Plegma_NodeThingType_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeThingType_t *value); 00583 int Yodiwo_Plegma_NodeInfoReq_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeInfoReq_t *value); 00584 int Yodiwo_Plegma_NodeInfoRsp_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeInfoRsp_t *value); 00585 int Yodiwo_Plegma_ThingsReq_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingsReq_t *value); 00586 int Yodiwo_Plegma_ThingsRsp_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingsRsp_t *value); 00587 int Yodiwo_Plegma_PortEvent_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortEvent_t *value); 00588 int Yodiwo_Plegma_PortEventMsg_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortEventMsg_t *value); 00589 int Yodiwo_Plegma_PortStateReq_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortStateReq_t *value); 00590 int Yodiwo_Plegma_PortState_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortState_t *value); 00591 int Yodiwo_Plegma_PortStateRsp_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortStateRsp_t *value); 00592 int Yodiwo_Plegma_ActivePortKeysMsg_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_ActivePortKeysMsg_t *value); 00593 int Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest_t *value); 00594 int Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest_t *value); 00595 int Yodiwo_Plegma_NodePairing_PairingServerTokensResponse_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingServerTokensResponse_t *value); 00596 int Yodiwo_Plegma_NodePairing_PairingServerKeysResponse_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingServerKeysResponse_t *value); 00597 int Yodiwo_Plegma_NodePairing_PairingNodePhase1Response_ToJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingNodePhase1Response_t *value); 00598 int Yodiwo_Tools_APIGenerator_CNodeConfig_ToJson(char* json, size_t jsonSize, Yodiwo_Tools_APIGenerator_CNodeConfig_t *value); 00599 int Yodiwo_Tools_APIGenerator_CNodeYConfig_ToJson(char* json, size_t jsonSize, Yodiwo_Tools_APIGenerator_CNodeYConfig_t *value); 00600 00601 00602 /* ========================================================================*/ 00603 /* FromJson Functions Prototypes */ 00604 /* ========================================================================*/ 00605 00606 00607 typedef enum { 00608 Yodiwo_JsonSuccessParse = 0, 00609 Yodiwo_JsonFailedToParse = -1, 00610 Yodiwo_JsonFailedObjectExpected = -2, 00611 } Yodiwo_Plegma_Json_e; 00612 00613 00614 00615 00616 Yodiwo_Plegma_Json_e Yodiwo_Plegma_UserKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_UserKey_t *value); 00617 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodeKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeKey_t *value); 00618 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ThingKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingKey_t *value); 00619 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortKey_t *value); 00620 Yodiwo_Plegma_Json_e Yodiwo_Plegma_GraphDescriptorBaseKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_GraphDescriptorBaseKey_t *value); 00621 Yodiwo_Plegma_Json_e Yodiwo_Plegma_GraphDescriptorKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_GraphDescriptorKey_t *value); 00622 Yodiwo_Plegma_Json_e Yodiwo_Plegma_GraphKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_GraphKey_t *value); 00623 Yodiwo_Plegma_Json_e Yodiwo_Plegma_BlockKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_BlockKey_t *value); 00624 Yodiwo_Plegma_Json_e Yodiwo_Plegma_TimelineDescriptorKey_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_TimelineDescriptorKey_t *value); 00625 Yodiwo_Plegma_Json_e Yodiwo_Plegma_Mqtt_MqttAPIMessage_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_Mqtt_MqttAPIMessage_t *value); 00626 Yodiwo_Plegma_Json_e Yodiwo_Plegma_Port_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_Port_t *value); 00627 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ConfigParameter_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ConfigParameter_t *value); 00628 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ThingUIHints_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingUIHints_t *value); 00629 Yodiwo_Plegma_Json_e Yodiwo_Plegma_Thing_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_Thing_t *value); 00630 Yodiwo_Plegma_Json_e Yodiwo_Plegma_LoginReq_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_LoginReq_t *value); 00631 Yodiwo_Plegma_Json_e Yodiwo_Plegma_LoginRsp_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_LoginRsp_t *value); 00632 Yodiwo_Plegma_Json_e Yodiwo_Plegma_StateDescription_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_StateDescription_t *value); 00633 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ConfigDescription_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ConfigDescription_t *value); 00634 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortDescription_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortDescription_t *value); 00635 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodeModelType_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeModelType_t *value); 00636 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodeThingType_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeThingType_t *value); 00637 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodeInfoReq_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeInfoReq_t *value); 00638 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodeInfoRsp_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodeInfoRsp_t *value); 00639 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ThingsReq_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingsReq_t *value); 00640 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ThingsRsp_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ThingsRsp_t *value); 00641 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortEvent_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortEvent_t *value); 00642 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortEventMsg_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortEventMsg_t *value); 00643 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortStateReq_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortStateReq_t *value); 00644 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortState_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortState_t *value); 00645 Yodiwo_Plegma_Json_e Yodiwo_Plegma_PortStateRsp_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_PortStateRsp_t *value); 00646 Yodiwo_Plegma_Json_e Yodiwo_Plegma_ActivePortKeysMsg_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_ActivePortKeysMsg_t *value); 00647 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingNodeGetTokensRequest_t *value); 00648 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingNodeGetKeysRequest_t *value); 00649 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodePairing_PairingServerTokensResponse_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingServerTokensResponse_t *value); 00650 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodePairing_PairingServerKeysResponse_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingServerKeysResponse_t *value); 00651 Yodiwo_Plegma_Json_e Yodiwo_Plegma_NodePairing_PairingNodePhase1Response_FromJson(char* json, size_t jsonSize, Yodiwo_Plegma_NodePairing_PairingNodePhase1Response_t *value); 00652 Yodiwo_Plegma_Json_e Yodiwo_Tools_APIGenerator_CNodeConfig_FromJson(char* json, size_t jsonSize, Yodiwo_Tools_APIGenerator_CNodeConfig_t *value); 00653 Yodiwo_Plegma_Json_e Yodiwo_Tools_APIGenerator_CNodeYConfig_FromJson(char* json, size_t jsonSize, Yodiwo_Tools_APIGenerator_CNodeYConfig_t *value); 00654 00655 00656 #ifdef __cplusplus 00657 } 00658 #endif 00659 00660 #endif /* _Yodiwo_Plegma_H_ */ 00661
Generated on Wed Jul 13 2022 15:51:49 by
