IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
octypes.h
Go to the documentation of this file.
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //******************************************************************
20 
21 
28 #ifndef OCTYPES_H_
29 #define OCTYPES_H_
30 
31 #include "ocstackconfig.h"
32 #include <stdbool.h>
33 #include <stdint.h>
34 #include <stdio.h>
35 #ifdef __cplusplus
36 #include <string.h>
37 
38 extern "C" {
39 #endif // __cplusplus
40 
42 #define WITH_PRESENCE
43 
44 #include "ocpresence.h"
45 
46 //-----------------------------------------------------------------------------
47 // Defines
48 //-----------------------------------------------------------------------------
49 
51 #define IOTIVITY_VERSION "1.3.1"
52 
60 #define OC_RSRVD_WELL_KNOWN_URI "/oic/res"
61 
63 #define OC_RSRVD_DEVICE_URI "/oic/d"
64 
66 #define OC_RSRVD_PLATFORM_URI "/oic/p"
67 
69 #define OC_RSRVD_RESOURCE_TYPES_URI "/oic/res/types/d"
70 
72 #define OC_RSRVD_GATEWAY_URI "/oic/gateway"
73 
75 #define OC_RSRVD_WELL_KNOWN_MQ_URI "/oic/ps"
76 
78 #define OC_RSRVD_KEEPALIVE_URI "/oic/ping"
79 
83 #define OC_RSRVD_PRESENCE_URI "/oic/ad"
84 
86 #define OC_RSRVD_DEVICE_PRESENCE_URI "/oic/prs"
87 
89 #define OC_DEFAULT_PRESENCE_TTL_SECONDS (60)
90 
92 #define OC_MULTICAST_DISCOVERY_URI "/oic/res"
93 
95 #define OC_QUERY_SEPARATOR "&;"
96 
98 #define OC_KEY_VALUE_DELIMITER "="
99 
103 #define OC_DEFAULT_PRESENCE_TTL_SECONDS (60)
104 
111 #define OC_MAX_PRESENCE_TTL_SECONDS (60 * 60 * 24)
112 
113 
119 #define OC_RSRVD_TRIGGER_CREATE "create"
120 
122 #define OC_RSRVD_TRIGGER_CHANGE "change"
123 
125 #define OC_RSRVD_TRIGGER_DELETE "delete"
126 
131 #define OC_RSRVD_OC "oic"
132 
133 
136 #define OC_RSRVD_PAYLOAD "payload"
137 
139 #define OC_RSRVD_HREF "href"
140 
142 #define OC_RSRVD_PROPERTY "prop"
143 
145 #define OC_RSRVD_REPRESENTATION "rep"
146 
148 #define OC_RSRVD_CONTENT_TYPE "ct"
149 
151 #define OC_RSRVD_RESOURCE_TYPE "rt"
152 
154 #define OC_RSRVD_RESOURCE_TYPE_PRESENCE "oic.wk.ad"
155 
157 #define OC_RSRVD_RESOURCE_TYPE_DEVICE "oic.wk.d"
158 
160 #define OC_RSRVD_RESOURCE_TYPE_PLATFORM "oic.wk.p"
161 
163 #define OC_RSRVD_RESOURCE_TYPE_MAINTENANCE "oic.wk.mnt"
164 
166 #define OC_RSRVD_RESOURCE_TYPE_COLLECTION "oic.wk.col"
167 
169 #define OC_RSRVD_RESOURCE_TYPE_RES "oic.wk.res"
170 
172 #define OC_RSRVD_RESOURCE_TYPE_MQ_BROKER "oic.wk.ps"
173 
175 #define OC_RSRVD_RESOURCE_TYPE_MQ_TOPIC "oic.wk.ps.topic"
176 
178 #define OC_RSRVD_RESOURCE_TYPE_INTROSPECTION "oic.wk.introspection"
179 
181 #define OC_RSRVD_RESOURCE_TYPE_INTROSPECTION_PAYLOAD "oic.wk.introspection.payload"
182 
184 #define OC_RSRVD_INTERFACE "if"
185 
187 #define OC_RSRVD_TTL "ttl"
188 
190 #define OC_RSRVD_DEVICE_TTL OC_RSRVD_TTL
191 
193 #define OC_RSRVD_NONCE "non"
194 
196 #define OC_RSRVD_TRIGGER "trg"
197 
199 #define OC_RSRVD_LINKS "links"
200 
202 #define OC_RSRVD_INTERFACE_DEFAULT "oic.if.baseline"
203 
205 #define OC_RSRVD_INTERFACE_READ "oic.if.r"
206 
208 #define OC_RSRVD_INTERFACE_READ_WRITE "oic.if.rw"
209 
211 #define OC_RSRVD_INTERFACE_LL "oic.if.ll"
212 
214 #define OC_RSRVD_INTERFACE_BATCH "oic.if.b"
215 
217 #define OC_RSRVD_INTERFACE_ACTUATOR "oic.if.a"
218 
220 #define OC_RSRVD_INTERFACE_SENSOR "oic.if.s"
221 
223 #define OC_RSRVD_INTERFACE_GROUP "oic.mi.grp"
224 
226 #define OC_RSRVD_FW_VERSION "mnfv"
227 
229 #define OC_RSRVD_HOST_NAME "hn"
230 
232 #define OC_RSRVD_POLICY "p"
233 
235 #define OC_RSRVD_BITMAP "bm"
236 
238 #define OC_RSRVD_SECURE "sec"
239 
241 #define OC_SECURITY_DB_FILE_NAME "oic_svr_db.json"
242 
244 #define OC_SECURITY_DB_DAT_FILE_NAME "oic_svr_db.dat"
245 
247 #define OC_RSRVD_HOSTING_PORT "port"
248 
250 #define OC_RSRVD_TCP_PORT "x.org.iotivity.tcp"
251 
253 #define OC_RSRVD_TLS_PORT "x.org.iotivity.tls"
254 
256 #define OC_RSRVD_SERVER_INSTANCE_ID "sid"
257 
259 #define OC_RSRVD_ENDPOINTS "eps"
260 
262 #define OC_RSRVD_ENDPOINT "ep"
263 
265 #define OC_RSRVD_PRIORITY "pri"
266 
268 #define OC_RSRVD_INSTANCE_ID "id"
269 
275 #define OC_RSRVD_PLATFORM_ID "pi"
276 
278 #define OC_RSRVD_MFG_NAME "mnmn"
279 
281 #define OC_RSRVD_MFG_URL "mnml"
282 
284 #define OC_RSRVD_MODEL_NUM "mnmo"
285 
287 #define OC_RSRVD_MFG_DATE "mndt"
288 
290 #define OC_RSRVD_PLATFORM_VERSION "mnpv"
291 
293 #define OC_RSRVD_OS_VERSION "mnos"
294 
296 #define OC_RSRVD_HARDWARE_VERSION "mnhw"
297 
299 #define OC_RSRVD_FIRMWARE_VERSION "mnfv"
300 
302 #define OC_RSRVD_SUPPORT_URL "mnsl"
303 
305 #define OC_RSRVD_SYSTEM_TIME "st"
306 
308 #define OC_RSRVD_VID "vid"
309 
315 #define OC_RSRVD_DEVICE_ID "di"
316 
318 #define OC_RSRVD_DEVICE_NAME "n"
319 
321 #define OC_RSRVD_SPEC_VERSION "icv"
322 
324 #define OC_RSRVD_DATA_MODEL_VERSION "dmv"
325 
327 #define OC_RSRVD_DEVICE_DESCRIPTION "ld"
328 
330 #define OC_RSRVD_SOFTWARE_VERSION "sv"
331 
333 #define OC_RSRVD_DEVICE_MFG_NAME "dmn"
334 
336 #define OC_RSRVD_DEVICE_MODEL_NUM "dmno"
337 
339 #define OC_RSRVD_PROTOCOL_INDEPENDENT_ID "piid"
340 
342 #define OC_SPEC_VERSION "ocf.1.1.0"
343 
345 #define OC_SPEC_VERSION_VALUE 2048
346 
348 #define OC_DATA_MODEL_VERSION "ocf.res.1.1.0,ocf.sh.1.1.0"
349 
354 #define OC_RSRVD_INTROSPECTION_NAME "n"
355 
357 #define OC_RSRVD_INTROSPECTION_NAME_VALUE "Introspection"
358 
360 #define OC_RSRVD_INTROSPECTION_URL_INFO "urlInfo"
361 
363 #define OC_RSRVD_INTROSPECTION_URL "url"
364 
366 #define OC_RSRVD_INTROSPECTION_PROTOCOL "protocol"
367 
369 #define OC_RSRVD_INTROSPECTION_CONTENT_TYPE "content-type"
370 
372 #define OC_RSRVD_INTROSPECTION_CONTENT_TYPE_VALUE "application/cbor"
373 
375 #define OC_RSRVD_INTROSPECTION_VERSION "version"
376 
378 #define OC_RSRVD_INTROSPECTION_VERSION_VALUE 1
379 
381 #define OC_INTROSPECTION_FILE_NAME "introspection.dat"
382 
386 #ifndef GOING_AWAY
387 
389 #define OC_MULTICAST_PREFIX "224.0.1.187:5683"
390 
392 #define OC_MULTICAST_IP "224.0.1.187"
393 
395 #define OC_MULTICAST_PORT (5683)
396 #endif // GOING_AWAY
397 
399 #ifdef RA_ADAPTER
400 #define MAX_ADDR_STR_SIZE (256)
401 #else
402 
406 #define MAX_ADDR_STR_SIZE (66)
407 #endif
408 
410 #define MAC_ADDR_STR_SIZE (17)
411 
413 #define MAC_ADDR_BLOCKS (6)
414 
416 #define MAX_IDENTITY_SIZE (37)
417 
419 #define UUID_IDENTITY_SIZE (128/8)
420 
424 #define OC_RSRVD_RD_URI "/oic/rd"
425 
427 #define OC_RSRVD_RESOURCE_TYPE_RD "oic.wk.rd"
428 
430 #define OC_RSRVD_RD_DISCOVERY_SEL "sel"
431 
433 #define OC_RSRVD_PROXY_URI "/oic/chp"
434 
436 #define OC_RSRVD_PROXY_OPTION_ID 35
437 
439 #define OC_RSRVD_INS "ins"
440 
442 #define OC_RSRVD_RTS "rts"
443 
445 #define OC_RSRVD_DREL "drel"
446 
448 #define OC_RSRVD_REL "rel"
449 
451 #define OC_RSRVD_TITLE "title"
452 
454 #define OC_RSRVD_URI "anchor"
455 
457 #define OC_RSRVD_MEDIA_TYPE "type"
458 
460 #define OC_RSRVD_RESOURCE_TYPE_RDPUBLISH "oic.wk.rdpub"
461 
465 #define OC_RSRVD_ACCOUNT_URI "/oic/account"
466 
468 #define OC_RSRVD_ACCOUNT_SEARCH_URI "/oic/account/search"
469 
471 #define OC_RSRVD_ACCOUNT_SESSION_URI "/oic/account/session"
472 
474 #define OC_RSRVD_ACCOUNT_TOKEN_REFRESH_URI "/oic/account/tokenrefresh"
475 
477 #define OC_RSRVD_ACL_GROUP_URI "/oic/acl/group"
478 
480 #define OC_RSRVD_ACL_INVITE_URI "/oic/acl/invite"
481 
483 #define OC_RSRVD_AUTHPROVIDER "authprovider"
484 
486 #define OC_RSRVD_AUTHCODE "authcode"
487 
489 #define OC_RSRVD_ACCESS_TOKEN "accesstoken"
490 
492 #define OC_RSRVD_LOGIN "login"
493 
495 #define OC_RSRVD_SEARCH "search"
496 
498 #define OC_RSRVD_GRANT_TYPE "granttype"
499 
501 #define OC_RSRVD_REFRESH_TOKEN "refreshtoken"
502 
504 #define OC_RSRVD_USER_UUID "uid"
505 
507 #define OC_RSRVD_GROUP_ID "gid"
508 
510 #define OC_RSRVD_MEMBER_ID "mid"
511 
513 #define OC_RSRVD_INVITE "invite"
514 
516 #define OC_RSRVD_ACCEPT "accept"
517 
519 #define OC_RSRVD_OPERATION "op"
520 
522 #define OC_RSRVD_ADD "add"
523 
525 #define OC_RSRVD_DELETE "delete"
526 
528 #define OC_RSRVD_OWNER "owner"
529 
531 #define OC_RSRVD_MEMBERS "members"
532 
534 #define OC_RSRVD_GRANT_TYPE_REFRESH_TOKEN "refresh_token"
535 
537 #define OC_RSRVD_PROV_CRL_URL "/oic/credprov/crl"
538 
539 #define OC_RSRVD_LAST_UPDATE "lu"
540 
541 #define OC_RSRVD_THIS_UPDATE "thisupdate"
542 
543 #define OC_RSRVD_NEXT_UPDATE "nu"
544 
545 #define OC_RSRVD_SERIAL_NUMBERS "rcsn"
546 
547 #define OC_RSRVD_CRL "crldata"
548 
549 #define OC_RSRVD_CRL_ID "crlid"
550 
552 #define OC_RSRVD_GROUP_URL "/oic/group"
553 
554 #define OC_RSRVD_ACL_GROUP_URL "/oic/acl/group"
555 
556 #define OC_RSRVD_ACL_INVITE_URL "/oic/acl/invite"
557 
558 #define OC_RSRVD_ACL_VERIFY_URL "/oic/acl/verify"
559 
560 #define OC_RSRVD_ACL_ID_URL "/oic/acl/id"
561 
562 #define OC_RSRVD_MEMBER_ID "mid"
563 
564 #define OC_RSRVD_GROUP_ID "gid"
565 
566 #define OC_RSRVD_OWNER_ID "oid"
567 
568 #define OC_RSRVD_ACL_ID "aclid"
569 
570 #define OC_RSRVD_ACE_ID "aceid"
571 
572 #define OC_RSRVD_DEVICE_ID "di"
573 
574 #define OC_RSRVD_SUBJECT_ID "sid"
575 
576 #define OC_RSRVD_REQUEST_METHOD "rm"
577 
578 #define OC_RSRVD_REQUEST_URI "uri"
579 
580 #define OC_RSRVD_GROUP_MASTER_ID "gmid"
581 
582 #define OC_RSRVD_GROUP_TYPE "gtype"
583 
584 #define OC_RSRVD_SUBJECT_TYPE "stype"
585 
586 #define OC_RSRVD_GROUP_ID_LIST "gidlist"
587 
588 #define OC_RSRVD_MEMBER_ID_LIST "midlist"
589 
590 #define OC_RSRVD_DEVICE_ID_LIST "dilist"
591 
592 #define OC_RSRVD_ACCESS_CONTROL_LIST "aclist"
593 
594 #define OC_RSRVD_RESOURCES "resources"
595 
596 #define OC_RSRVD_VALIDITY "validity"
597 
598 #define OC_RSRVD_PERIOD "period"
599 
600 #define OC_RSRVD_RECURRENCE "recurrence"
601 
602 #define OC_RSRVD_INVITE "invite"
603 
604 #define OC_RSRVD_INVITED "invited"
605 
606 #define OC_RSRVD_ENCODING "encoding"
607 
608 #define OC_OIC_SEC "oic.sec"
609 
610 #define OC_RSRVD_BASE64 "base64"
611 
612 #define OC_RSRVD_DER "der"
613 
614 #define OC_RSRVD_PEM "pem"
615 
616 #define OC_RSRVD_RAW "raw"
617 
618 #define OC_RSRVD_UNKNOWN "unknown"
619 
620 #define OC_RSRVD_DATA "data"
621 
622 #define OC_RSRVD_RESOURCE_OWNER_UUID "rowneruuid"
623 
624 #define OC_RSRVD_SUBJECT_UUID "subjectuuid"
625 
626 #define OC_RSRVD_PERMISSION_MASK "permission"
627 
628 #define OC_RSRVD_GROUP_PERMISSION "gp"
629 
630 #define OC_RSRVD_GROUP_ACL "gacl"
631 
633 #define OC_RSRVD_PROV_CERT_URI "/oic/credprov/cert"
634 
635 #define OC_RSRVD_CSR "csr"
636 
637 #define OC_RSRVD_CERT "cert"
638 
639 #define OC_RSRVD_CACERT "certchain"
640 
641 #define OC_RSRVD_TOKEN_TYPE "tokentype"
642 
643 #define OC_RSRVD_EXPIRES_IN "expiresin"
644 
645 #define OC_RSRVD_REDIRECT_URI "redirecturi"
646 
647 #define OC_RSRVD_CERTIFICATE "certificate"
648 
652 #define COAP_OPTION_ACCEPT_VERSION 2049
653 #define COAP_OPTION_CONTENT_VERSION 2053
654 
660 typedef enum
661 {
664 
666  OC_ADAPTER_IP = (1 << 0),
667 
670 
673 #ifdef RA_ADAPTER
675  OC_ADAPTER_REMOTE_ACCESS = (1 << 3),
676 #endif
677 
678  OC_ADAPTER_TCP = (1 << 4),
679 
681  OC_ADAPTER_NFC = (1 << 5)
683 
684 typedef enum
685 {
697 
704 typedef enum
705 {
706  OC_LOG_LEVEL_ALL = 1, // all logs.
707  OC_LOG_LEVEL_INFO, // debug level is disabled.
708 } OCLogLevel;
709 
713 typedef enum
714 {
717 
720  OC_FLAG_SECURE = (1 << 4),
721 
724  OC_IP_USE_V6 = (1 << 5),
725 
727  OC_IP_USE_V4 = (1 << 6),
728 
730  OC_MULTICAST = (1 << 7),
731 
737 
740 
743 
746 
749 
752 
755 
757 
759 #define OC_MASK_SCOPE (0x000F)
760 
762 #define OC_MASK_MODS (0x0FF0)
763 #define OC_MASK_FAMS (OC_IP_USE_V6|OC_IP_USE_V4)
764 
765 typedef struct OCStringLL
766 {
767  struct OCStringLL *next;
768  char* value;
769 } OCStringLL;
770 
774 typedef struct
775 {
777  uint16_t id_length;
778 
780  unsigned char id[MAX_IDENTITY_SIZE];
781 } OCIdentity;
782 
786 typedef struct
787 {
789  unsigned char id[UUID_IDENTITY_SIZE];
790 } OCUUIdentity;
791 
796 typedef struct
797 {
800 
803 
805  uint16_t port;
806 
808  char addr[MAX_ADDR_STR_SIZE];
809 
811  uint32_t ifindex;
812 
814  char routeData[MAX_ADDR_STR_SIZE];
815 
817  char remoteId[MAX_IDENTITY_SIZE];
818 
819 } OCDevAddr;
820 
829 typedef enum
830 {
833 
835  CT_ADAPTER_IP = (1 << 16),
836 
838  CT_ADAPTER_GATT_BTLE = (1 << 17),
839 
842 
843 #ifdef RA_ADAPTER
845  CT_ADAPTER_REMOTE_ACCESS = (1 << 19),
846 #endif
847 
848  CT_ADAPTER_TCP = (1 << 20),
849 
851  CT_ADAPTER_NFC = (1 << 21),
852 
856  CT_FLAG_SECURE = (1 << 4),
857 
861  CT_IP_USE_V6 = (1 << 5),
862 
864  CT_IP_USE_V4 = (1 << 6),
865 
871 
874 
877 
880 
883 
886 
890 
892 #define CT_ADAPTER_SHIFT 16
893 
895 #define CT_MASK_FLAGS 0xFFFF
896 
898 #define CT_MASK_ADAPTER 0xFFFF0000
899 
903 typedef enum
904 {
906 
908  OC_REST_GET = (1 << 0),
909 
911  OC_REST_PUT = (1 << 1),
912 
914  OC_REST_POST = (1 << 2),
915 
917  OC_REST_DELETE = (1 << 3),
918 
920  OC_REST_OBSERVE = (1 << 4),
921 
924 
925 #ifdef WITH_PRESENCE
926 
927  OC_REST_PRESENCE = (1 << 7),
928 
929 #endif
931  OC_REST_DISCOVER = (1 << 8)
932 } OCMethod;
933 
937 typedef enum
938 {
945 
949 typedef enum
950 {
955 } OCMode;
956 
963 typedef enum
964 {
967 
970 
973 
977 
985 typedef enum
986 {
990 
992  OC_DISCOVERABLE = (1 << 0),
993 
995  OC_OBSERVABLE = (1 << 1),
996 
1000  OC_ACTIVE = (1 << 2),
1001 
1005  OC_SLOW = (1 << 3),
1006 
1008  OC_NONSECURE = (1 << 6),
1009 
1010 #if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
1011 
1012  OC_SECURE = (1 << 4),
1013 #else
1014  OC_SECURE = (0),
1015 #endif
1016 
1021 
1022 #ifdef WITH_MQ
1024  // @todo
1025  // Since this property is not defined on OCF Spec. it should be set 0 until define it
1026  ,OC_MQ_PUBLISHER = (0)
1027 #endif
1028 
1029 #ifdef MQ_BROKER
1030 
1031  // @todo
1032  // Since this property is not defined on OCF Spec. it should be set 0 until define it
1033  ,OC_MQ_BROKER = (0)
1034 #endif
1036 
1037 #define OC_MASK_RESOURCE_SECURE (OC_NONSECURE | OC_SECURE)
1038 
1042 typedef enum
1043 {
1045  OC_INVALID_ID = (1 << 0),
1046 
1047  /* For coap ID.*/
1048  OC_COAP_ID = (1 << 1)
1050 
1054 typedef enum
1055 {
1080 
1088 
1101 
1110 
1118 
1121 
1123 #ifdef WITH_PRESENCE
1127 #endif
1128 
1142 } OCStackResult;
1143 
1147 typedef void * OCDoHandle;
1148 
1152 typedef void * OCResourceHandle;
1153 
1157 typedef void * OCRequestHandle;
1158 
1165 typedef uint8_t OCObservationId;
1166 
1171 #define MAX_SEQUENCE_NUMBER (0xFFFFFF)
1172 
1176 typedef enum
1177 {
1180 
1183 
1186 
1187 } OCObserveAction;
1188 
1189 
1197 typedef struct {
1199  FILE* (* open)(const char *path, const char *mode);
1200 
1202  size_t (* read)(void *ptr, size_t size, size_t nmemb, FILE *stream);
1203 
1205  size_t (* write)(const void *ptr, size_t size, size_t nmemb, FILE *stream);
1206 
1208  int (* close)(FILE *fp);
1209 
1211  int (* unlink)(const char *path);
1213 
1217 typedef struct
1218 {
1221 
1223  OCObservationId obsId;
1225 
1229 typedef enum
1230 {
1253 
1258 typedef struct OCHeaderOption
1259 {
1262 
1264  uint16_t optionID;
1265 
1267  uint16_t optionLength;
1268 
1271 
1272 #ifdef __cplusplus
1273  OCHeaderOption() = default;
1275  uint16_t optId,
1276  uint16_t optlen,
1277  const uint8_t* optData)
1278  : protocolID(pid),
1279  optionID(optId),
1280  optionLength(optlen)
1281  {
1282 
1283  // parameter includes the null terminator.
1286  memcpy(optionData, optData, optionLength);
1287  optionData[optionLength - 1] = '\0';
1288  }
1289 #endif // __cplusplus
1290 } OCHeaderOption;
1291 
1297 typedef struct
1298 {
1300  char *platformID;
1301 
1304 
1307 
1310 
1313 
1316 
1319 
1322 
1325 
1327  char *supportUrl;
1328 
1330  char *systemTime;
1331 
1332 } OCPlatformInfo;
1333 
1340 typedef struct
1341 {
1343  char *deviceName;
1350 } OCDeviceInfo;
1351 
1355 typedef enum
1356 {
1359 
1361  OC_COAP = 1,
1362 
1364  OC_COAPS = (1 << 1),
1365 
1366 #ifdef TCP_ADAPTER
1368  OC_COAP_TCP = (1 << 2),
1369 
1371  OC_COAPS_TCP = (1 << 3),
1372 #endif
1373 #ifdef HTTP_ADAPTER
1375  OC_HTTP = (1 << 4),
1376 
1378  OC_HTTPS = (1 << 5),
1379 #endif
1380 #ifdef EDR_ADAPTER
1382  OC_COAP_RFCOMM = (1 << 6),
1383 #endif
1384 #ifdef LE_ADAPTER
1385 
1386  OC_COAP_GATT = (1 << 7),
1387 #endif
1388 #ifdef NFC_ADAPTER
1390  OC_COAP_NFC = (1 << 8),
1391 #endif
1392 #ifdef RA_ADAPTER
1393 
1394  OC_COAP_RA = (1 << 9),
1395 #endif
1397  OC_ALL = 0xffff
1399 
1400 #ifdef RA_ADAPTER
1401 
1404 typedef void (*jid_bound_cb)(char *jid);
1405 
1410 typedef struct
1411 {
1412  char *hostname;
1413  uint16_t port;
1414  char *xmpp_domain;
1415  char *username;
1416  char *password;
1417  char *resource;
1418  char *user_jid;
1419  jid_bound_cb jidbound;
1420 } OCRAInfo_t;
1421 #endif /* RA_ADAPTER */
1422 
1423 
1425 typedef enum
1426 {
1445 } OCPayloadType;
1446 
1453 typedef struct
1454 {
1457 } OCPayload;
1458 
1459 typedef enum
1460 {
1470 
1472 typedef struct
1473 {
1475  uint8_t* bytes;
1476 
1478  size_t len;
1479 } OCByteString;
1480 
1481 #define MAX_REP_ARRAY_DEPTH 3
1482 typedef struct
1483 {
1485  size_t dimensions[MAX_REP_ARRAY_DEPTH];
1486 
1487  union
1488  {
1489  int64_t* iArray;
1490  double* dArray;
1491  bool* bArray;
1492  char** strArray;
1493 
1496 
1498  };
1500 
1501 typedef struct OCRepPayloadValue
1502 {
1503  char* name;
1505  union
1506  {
1507  int64_t i;
1508  double d;
1509  bool b;
1510  char* str;
1511 
1514 
1517  };
1519 
1521 
1522 // used for get/set/put/observe/etc representations
1523 typedef struct OCRepPayload
1524 {
1526  char* uri;
1531 } OCRepPayload;
1532 
1533 // used inside a resource payload
1534 typedef struct OCEndpointPayload
1535 {
1536  char* tps;
1537  char* addr;
1539  uint16_t port;
1540  uint16_t pri;
1543 
1544 // used inside a discovery payload
1545 typedef struct OCResourcePayload
1546 {
1547  char* uri;
1548  char* rel;
1549  char* anchor;
1552  uint8_t bitmap;
1553  bool secure;
1554  uint16_t port;
1555 #ifdef TCP_ADAPTER
1556  uint16_t tcpPort;
1557 #endif
1561 
1562 typedef struct OCDiscoveryPayload
1563 {
1565 
1567  char *sid;
1568 
1570  char *name;
1571 
1574 
1577 
1580 
1583 
1585 
1586 typedef struct
1587 {
1589  uint8_t* securityData;
1590  size_t payloadSize;
1592 
1593 #ifdef WITH_PRESENCE
1594 typedef struct
1595 {
1597  uint32_t sequenceNumber;
1598  uint32_t maxAge;
1599  OCPresenceTrigger trigger;
1602 #endif
1603 
1604 typedef struct
1605 {
1607  char* message;
1609 
1610 typedef struct
1611 {
1615 
1622 typedef struct
1623 {
1625  OCResourceHandle resource;
1626 
1628  OCRequestHandle requestHandle;
1629 
1632 
1635 
1637  char * query;
1638 
1642 
1645 
1648 
1650  uint16_t messageID;
1651 
1654 
1656 
1657 
1661 typedef struct
1662 {
1665 
1668 
1671 
1674 
1677 
1679  uint32_t sequenceNumber;
1680 
1682  const char * resourceUri;
1683 
1686 
1689 
1691  OCHeaderOption rcvdVendorSpecificHeaderOptions[MAX_HEADER_OPTIONS];
1693 
1698 typedef struct
1699 {
1701  OCRequestHandle requestHandle;
1702 
1704  OCResourceHandle resourceHandle;
1705 
1708 
1711 
1714 
1716  OCHeaderOption sendVendorSpecificHeaderOptions[MAX_HEADER_OPTIONS];
1717 
1719  char resourceUri[MAX_URI_LENGTH];
1720 
1724 
1728 typedef enum
1729 {
1731  OC_REQUEST_FLAG = (1 << 1),
1733  OC_OBSERVE_FLAG = (1 << 2)
1735 
1742 typedef enum
1743 {
1749 
1750 
1751 //#ifdef DIRECT_PAIRING
1758 typedef enum OCPrm
1759 {
1761  DP_PRE_CONFIGURED = (0x1 << 0),
1762  DP_RANDOM_PIN = (0x1 << 1),
1763 } OCPrm_t;
1764 
1768 typedef struct OCDPDev
1769 {
1772  uint16_t securePort;
1773  bool edp;
1775  size_t prmLen;
1778  struct OCDPDev *next;
1779 } OCDPDev_t;
1780 //#endif // DIRECT_PAIRING
1781 
1782 /*
1783  * -------------------------------------------------------------------------------------------
1784  * Callback function definitions
1785  * -------------------------------------------------------------------------------------------
1786  */
1787 
1791 typedef OCStackApplicationResult (* OCClientResponseHandler)(void *context, OCDoHandle handle,
1792  OCClientResponse * clientResponse);
1793 
1798 typedef void (* OCClientContextDeleter)(void *context);
1799 
1803 typedef struct OCCallbackData
1804 {
1806  void *context;
1807 
1810 
1813 
1814 #ifdef __cplusplus
1815  OCCallbackData() = default;
1816  OCCallbackData(void* ctx, OCClientResponseHandler callback, OCClientContextDeleter deleter)
1817  :context(ctx), cb(callback), cd(deleter){}
1818 #endif // __cplusplus
1819 } OCCallbackData;
1820 
1850 (OCEntityHandlerFlag flag, OCEntityHandlerRequest * entityHandlerRequest, void* callbackParam);
1851 
1880 (OCEntityHandlerFlag flag, OCEntityHandlerRequest * entityHandlerRequest, char* uri, void* callbackParam);
1881 
1882 #if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
1883 
1891 typedef void (*TrustCertChainChangeCB)(void *ctx, uint16_t credId, uint8_t *trustCertChain,
1892  size_t chainSize);
1893 
1897 typedef struct trustCertChainContext
1898 {
1899  TrustCertChainChangeCB callback;
1900  void *context;
1901 } trustCertChainContext_t;
1902 #endif
1903 
1904 #if defined(TCP_ADAPTER) && defined(WITH_CLOUD)
1905 
1908 typedef enum
1909 {
1911  OC_USER_PREF_CLOUD = 0,
1913  OC_USER_PREF_LOCAL_UDP = 1,
1915  OC_USER_PREF_LOCAL_TCP =2
1916 } OCConnectUserPref_t;
1917 
1918 #endif
1919 
1920 #ifdef __cplusplus
1921 }
1922 #endif // __cplusplus
1923 
1924 #endif /* OCTYPES_H_ */
IPv6 Link-Local scope (default).
Definition: octypes.h:739
double * dArray
Definition: octypes.h:1490
bool secure
Definition: octypes.h:1553
OCStackResult result
the is the result of our stack, OCStackResult should contain coap/other error codes.
Definition: octypes.h:1676
OCStringLL * interfaces
Definition: octypes.h:1551
Request handle is passed to server via the entity handler for each incoming request.
Definition: octypes.h:1698
OCPrm_t * prm
Definition: octypes.h:1774
Definition: octypes.h:1243
The payload is an OCDiscoveryPayload.
Definition: octypes.h:1430
NFC Transport.
Definition: octypes.h:851
OCPayload base
Definition: octypes.h:1564
OCClientContextDeleter cd
A pointer to a function to delete the context when this callback is removed.
Definition: octypes.h:1812
CoAP over TCP.
Definition: octypes.h:678
Success status code - START HERE.
Definition: octypes.h:1057
IPv4 and IPv6, including 6LoWPAN.
Definition: octypes.h:835
OCEntityHandlerResult
Possible returned values from entity handler.
Definition: octypes.h:1229
When this bit is set, the resource is allowed to be observed by clients.
Definition: octypes.h:995
struct OCDiscoveryPayload OCDiscoveryPayload
OCObserveAction action
Action associated with observation request.
Definition: octypes.h:1220
int64_t * iArray
Definition: octypes.h:1489
Acknowledgments are used to confirm delivery.
Definition: octypes.h:972
Definition: octypes.h:1069
Allows OCDoResource caller to do discovery.
Definition: octypes.h:931
500
Definition: octypes.h:1136
OCPayload * payload
the payload for the response PDU.
Definition: octypes.h:1685
IPv6 Realm-Local scope.
Definition: octypes.h:742
#define MAX_HEADER_OPTIONS
Maximum number of vendor specific header options an application can set or receive in PDU...
Definition: ocstackconfig.h:92
uint8_t numRcvdVendorSpecificHeaderOptions
Number of the received vendor specific header options.
Definition: octypes.h:1644
GATT over Bluetooth LE.
Definition: octypes.h:669
Definition: octypes.h:1126
uint16_t port
Definition: octypes.h:1554
coaps + udp
Definition: octypes.h:1364
Definition: octypes.h:1249
OCStringLL * types
Pointer to the types.
Definition: octypes.h:1345
OCResourceHandle resourceHandle
Resource handle.
Definition: octypes.h:1704
value zero indicates discovery.
Definition: octypes.h:663
Definition: octypes.h:1087
This structure is expected as input for device properties.
Definition: octypes.h:1340
struct OCHeaderOption OCHeaderOption
This structure will be used to define the vendor specific header options to be included in communicat...
char * manufacturerUrl
Manufacturer URL for platform property.
Definition: octypes.h:1306
char * dateOfManufacture
Manufacturer date.
Definition: octypes.h:1312
coap + udp
Definition: octypes.h:1361
struct OCDPDev OCDPDev_t
Device Information of discoverd direct pairing device(s).
This info is passed from application to OC Stack when initiating a request to Server.
Definition: octypes.h:1803
char ** strArray
Definition: octypes.h:1492
OCTransportFlags family
Definition: octypes.h:1538
char * modelNumber
Model number.
Definition: octypes.h:1309
uint32_t sequenceNumber
Definition: octypes.h:1597
Client server mode along with routing capabilities.
Definition: octypes.h:954
char * query
resource query send by client.
Definition: octypes.h:1637
401
Definition: octypes.h:1104
Definition: octypes.h:1244
OCPayload base
Definition: octypes.h:1606
Definition: octypes.h:939
To Register.
Definition: octypes.h:1179
uint16_t messageID
Message id.
Definition: octypes.h:1650
char * resourceType
Definition: octypes.h:1600
Definition: octypes.h:1466
This structure describes the platform properties.
Definition: octypes.h:1297
Link-Local multicast is the default multicast scope for IPv6.
Definition: octypes.h:870
OCTransportProtocolID
Transport Protocol IDs.
Definition: octypes.h:1042
OCConnectivityType connType
Definition: octypes.h:1771
uint32_t sequenceNumber
If associated with observe, this will represent the sequence of notifications from server...
Definition: octypes.h:1679
OCLogLevel
Log level to print can be controlled through this enum.
Definition: octypes.h:704
400
Definition: octypes.h:1067
uint16_t port
for IP.
Definition: octypes.h:805
char * deviceName
Pointer to the device name.
Definition: octypes.h:1343
Insert all new error codes here!.
Definition: octypes.h:1124
#define MAX_URI_LENGTH
Maximum length of the URI supported by client/server while processing REST requests/responses.
Definition: ocstackconfig.h:39
Definition: octypes.h:1462
char * tps
Definition: octypes.h:1536
OCPayloadType
Enum to describe the type of object held by the OCPayload object.
Definition: octypes.h:1425
OCRepPayloadPropType type
Definition: octypes.h:1484
Definition: octypes.h:1610
OCPayload base
Definition: octypes.h:1588
203, 205
Definition: octypes.h:1058
When this bit is set, the resource is initialized, otherwise the resource is 'inactive'.
Definition: octypes.h:1000
Definition: octypes.h:1501
The payload is an OCIntrospectionPayload.
Definition: octypes.h:1444
Make no more calls to the callback and call the OCClientContextDeleter for this callback.
Definition: octypes.h:1745
Multicast only.
Definition: octypes.h:730
IPv6 Admin-Local scope.
Definition: octypes.h:879
OCRepPayloadPropType
Definition: octypes.h:1459
char * platformID
Platform ID.
Definition: octypes.h:1300
uint32_t ifindex
usually zero for default interface.
Definition: octypes.h:811
OCPayloadType type
The type of message that was received.
Definition: octypes.h:1456
Definition: octypes.h:1014
201
Definition: octypes.h:1059
Definition: octypes.h:941
Definition: octypes.h:1523
Insecure transport is the default (subject to change).
Definition: octypes.h:720
OCDevAddr devAddr
Address of remote server.
Definition: octypes.h:1664
struct OCRepPayload ** objArray
Definition: octypes.h:1497
Definition: octypes.h:1242
void(* OCClientContextDeleter)(void *context)
Client applications using a context pointer implement this callback to delete the context upon remova...
Definition: octypes.h:1798
Definition: octypes.h:1061
OCStringLL * iface
Interface.
Definition: octypes.h:1576
OCDevAddr devAddr
description of endpoint that sent the request.
Definition: octypes.h:1634
Contents of the payload are invalid.
Definition: octypes.h:1428
Packet delivery is best effort.
Definition: octypes.h:969
Definition: octypes.h:1248
Definition: octypes.h:1236
Definition: octypes.h:1482
OCStringLL * type
Resource Type.
Definition: octypes.h:1573
char * addr
Definition: octypes.h:1537
Definition: octypes.h:1066
#define MAX_IDENTITY_SIZE
Max identity size.
Definition: octypes.h:416
char * message
Definition: octypes.h:1607
void * OCResourceHandle
Handle to an OCResource object owned by the OCStack.
Definition: octypes.h:1152
OCMode
Host Mode of Operation.
Definition: octypes.h:949
Definition: octypes.h:1760
char * hardwareVersion
HW version.
Definition: octypes.h:1321
char * supportUrl
Platform support URL.
Definition: octypes.h:1327
struct OCResourcePayload * next
Definition: octypes.h:1558
OCTransportFlags
Enum layout assumes some targets have 16-bit integer (e.g., Arduino).
Definition: octypes.h:713
struct OCDiscoveryPayload * next
Holding address of the next DiscoveryPayload.
Definition: octypes.h:1582
disable BLE advertisement.
Definition: octypes.h:689
402
Definition: octypes.h:1096
Definition: octypes.h:1239
Definition: octypes.h:1075
Definition: octypes.h:765
struct OCEndpointPayload * next
Definition: octypes.h:1541
char * uri
Definition: octypes.h:1526
OCRequestHandle requestHandle
Request handle.
Definition: octypes.h:1701
413
Definition: octypes.h:1107
OCEntityHandlerFlag
Entity's state.
Definition: octypes.h:1728
RFCOMM over Bluetooth EDR.
Definition: octypes.h:841
Resource not found.
Definition: octypes.h:1082
CoAP over TCP.
Definition: octypes.h:848
Subscribe for all presence notifications of a particular resource.
Definition: octypes.h:927
OCEntityHandlerResult ehResult
Allow the entity handler to pass a result with the response.
Definition: octypes.h:1707
char * platformVersion
Platform version.
Definition: octypes.h:1315
OCTransportAdapter adapter
adapter type.
Definition: octypes.h:799
Possible returned values from entity handler.
Definition: octypes.h:1217
size_t prmLen
Definition: octypes.h:1775
Packet delivery is best effort.
Definition: octypes.h:966
uint16_t optionLength
its length 191.
Definition: octypes.h:1267
Definition: octypes.h:1246
Allow all endpoint.
Definition: octypes.h:1397
bool edp
Definition: octypes.h:1773
char * value
Definition: octypes.h:768
OCEntityHandlerResult(* OCEntityHandler)(OCEntityHandlerFlag flag, OCEntityHandlerRequest *entityHandlerRequest, void *callbackParam)
Application server implementations must implement this callback to consume requests OTA...
Definition: octypes.h:1850
OCQualityOfService
Quality of Service attempts to abstract the guarantees provided by the underlying transport protocol...
Definition: octypes.h:963
Definition: octypes.h:1076
char * rel
Definition: octypes.h:1548
char * systemTime
System time.
Definition: octypes.h:1330
uint16_t securePort
Definition: octypes.h:1772
Definition: octypes.h:1467
uint8_t numSendVendorSpecificHeaderOptions
number of the vendor specific header options .
Definition: octypes.h:1713
Definition: octypes.h:1117
The payload type of the platform.
Definition: octypes.h:1434
Definition: octypes.h:1464
Incoming requests handled by the server.
Definition: octypes.h:1622
Read.
Definition: octypes.h:908
OCResourceProperty
Resource Properties.
Definition: octypes.h:985
Definition: octypes.h:706
use when defaults are ok.
Definition: octypes.h:832
Definition: octypes.h:1234
disable rfcomm server.
Definition: octypes.h:695
#define MAX_ADDR_STR_SIZE
Max Device address size.
Definition: octypes.h:406
void * context
Pointer to the context.
Definition: octypes.h:1806
#define MAX_REP_ARRAY_DEPTH
Definition: octypes.h:1481
OCRepPayloadValue * values
Definition: octypes.h:1529
#define UUID_IDENTITY_SIZE
Universal unique identity size.
Definition: octypes.h:419
Write.
Definition: octypes.h:911
OCDevAddr * addr
backward compatibility (points to devAddr).
Definition: octypes.h:1667
struct OCRepPayloadValue * next
Definition: octypes.h:1518
Definition: octypes.h:952
Definition: octypes.h:942
Link-Local multicast is the default multicast scope for IPv6.
Definition: octypes.h:736
Definition: octypes.h:905
char * sid
Device Id.
Definition: octypes.h:1567
Definition: octypes.h:1245
uint8_t * bytes
pointer to data bytes.
Definition: octypes.h:1475
size_t len
number of data bytes.
Definition: octypes.h:1478
const char * resourceUri
resourceURI.
Definition: octypes.h:1682
No Quality is defined, let the stack decide.
Definition: octypes.h:975
uint16_t pri
Definition: octypes.h:1540
OCPayload * payload
the payload from the request PDU.
Definition: octypes.h:1653
504
Definition: octypes.h:1137
bool * bArray
Definition: octypes.h:1491
IPv6 Global scope.
Definition: octypes.h:888
Definition: octypes.h:940
IPv4 & IPv6 auto-selection is the default.
Definition: octypes.h:724
End point identity.
Definition: octypes.h:774
uint8_t * securityData
Definition: octypes.h:1589
Definition: octypes.h:951
OCStringLL * interfaces
Definition: octypes.h:1528
405
Definition: octypes.h:1073
enum OCPrm OCPrm_t
direct pairing Method Type.
The payload is an OCPresencePayload.
Definition: octypes.h:1440
To Deregister.
Definition: octypes.h:1182
Definition: octypes.h:1125
struct OCStringLL OCStringLL
Definition: octypes.h:1465
OCTransportAdapter
These enums (OCTransportAdapter and OCTransportFlags) must be kept synchronized with OCConnectivityTy...
Definition: octypes.h:660
IPv6 Realm-Local scope.
Definition: octypes.h:876
OCStackResult
Declares Stack Results & Errors.
Definition: octypes.h:1054
Definition: octypes.h:1097
char * name
Name.
Definition: octypes.h:1570
void * OCDoHandle
Handle to an OCDoResource invocation.
Definition: octypes.h:1147
Definition: octypes.h:1461
OCStringLL * types
Definition: octypes.h:1527
Request come from endpoint which is not mapped to the resource.
Definition: octypes.h:1120
struct OCRepPayload OCRepPayload
When this bit is set, the resource supports access via non-secure endpoints.
Definition: octypes.h:1008
OCResourcePayload * resources
This structure holds the old /oic/res response.
Definition: octypes.h:1579
OCByteString * ocByteStrArray
pointer to ByteString array.
Definition: octypes.h:1495
default flag is 0.
Definition: octypes.h:687
Definition: octypes.h:1545
Update.
Definition: octypes.h:914
OCConnectivityType
This enum type includes elements of both OCTransportAdapter and OCTransportFlags. ...
Definition: octypes.h:829
uint16_t optionID
The header option ID which will be added to communication packets.
Definition: octypes.h:1264
char * operatingSystemVersion
Operating system version.
Definition: octypes.h:1318
struct OCCallbackData OCCallbackData
This info is passed from application to OC Stack when initiating a request to Server.
uint8_t bitmap
Definition: octypes.h:1552
OCTransportBTFlags_t
Definition: octypes.h:684
202
Definition: octypes.h:1060
char * uri
Definition: octypes.h:1547
struct OCStringLL * next
Definition: octypes.h:767
A generic struct representing a payload returned from a resource operation.
Definition: octypes.h:1453
Device Information of discoverd direct pairing device(s).
Definition: octypes.h:1768
OCStringLL * dataModelVersions
Pointer to the device data model versions (in CSV format).
Definition: octypes.h:1349
OCPayload base
Definition: octypes.h:1612
Definition: octypes.h:1562
char * firmwareVersion
FW version.
Definition: octypes.h:1324
Definition: octypes.h:1594
char * manufacturerName
Manufacturer name.
Definition: octypes.h:1303
OCByteString ocByteStr
ByteString object.
Definition: octypes.h:1513
IPv6 Site-Local scope.
Definition: octypes.h:882
Definition: octypes.h:1761
OCRequestHandle requestHandle
Associated request handle.
Definition: octypes.h:1628
Definition: octypes.h:1534
Request is denied by the user.
Definition: octypes.h:1130
Definition: octypes.h:1240
For initialize.
Definition: octypes.h:1358
Universally unique identifier.
Definition: octypes.h:786
504
Definition: octypes.h:1077
OCEndpointPayload * eps
Definition: octypes.h:1559
OCObservationInfo obsInfo
Information associated with observation - valid only when OCEntityHandler flag includes OC_OBSERVE_FL...
Definition: octypes.h:1641
Definition: octypes.h:1070
Definition: octypes.h:1079
Definition: octypes.h:1247
204
Definition: octypes.h:1065
Definition: octypes.h:1241
OCStackApplicationResult(* OCClientResponseHandler)(void *context, OCDoHandle handle, OCClientResponse *clientResponse)
Client applications implement this callback to consume responses received from Servers.
Definition: octypes.h:1791
size_t payloadSize
Definition: octypes.h:1590
struct OCDPDev * next
Definition: octypes.h:1778
OCMethod method
the REST method retrieved from received request PDU.
Definition: octypes.h:1631
Definition: octypes.h:1762
IPv6 Global scope.
Definition: octypes.h:754
enable BLE advertisement.
Definition: octypes.h:691
Definition: octypes.h:1251
Others.
Definition: octypes.h:1185
Resource has no registered observers.
Definition: octypes.h:1090
struct OCRepPayloadValue OCRepPayloadValue
503
Definition: octypes.h:1140
struct OCRepPayload * next
Definition: octypes.h:1530
OCIdentity identity
the security identity of the remote server.
Definition: octypes.h:1673
Definition: octypes.h:1131
The payload is an OCDiagnosticPayload.
Definition: octypes.h:1442
RFCOMM over Bluetooth EDR.
Definition: octypes.h:672
Definition: octypes.h:1100
uint32_t maxAge
Definition: octypes.h:1598
char * name
Definition: octypes.h:1503
void * OCRequestHandle
Handle to an OCRequest object owned by the OCStack.
Definition: octypes.h:1157
Definition: octypes.h:953
OCPayload base
Definition: octypes.h:1525
OCResourceHandle resource
Associated resource.
Definition: octypes.h:1625
OCPrm
direct pairing Method Type.
Definition: octypes.h:1758
Definition: octypes.h:1093
struct OCEndpointPayload OCEndpointPayload
Definition: octypes.h:1238
Definition: octypes.h:1604
#define MAX_HEADER_OPTION_DATA_LENGTH
Maximum Length of the vendor specific header option.
Definition: ocstackconfig.h:101
Definition: octypes.h:1463
OCClientResponseHandler cb
The pointer to a function the stack will call to handle the requests.
Definition: octypes.h:1809
Definition: octypes.h:1068
int64_t i
Definition: octypes.h:1507
OCUUIdentity rowner
Definition: octypes.h:1777
Definition: octypes.h:1231
When this bit is set, the resource is allowed to be discovered by clients.
Definition: octypes.h:992
OCUUIdentity deviceID
Definition: octypes.h:1776
Definition: octypes.h:1048
default flag is 0
Definition: octypes.h:716
GATT over Bluetooth LE.
Definition: octypes.h:838
OCConnectivityType connType
backward compatibility.
Definition: octypes.h:1670
uint8_t numRcvdVendorSpecificHeaderOptions
Number of the received vendor specific header options.
Definition: octypes.h:1688
OCRepPayloadPropType type
Definition: octypes.h:1504
Persistent storage handlers.
Definition: octypes.h:1197
Definition: octypes.h:1086
This file contains all the variables which can be configured/modified as per platform or specific pro...
IPv6 Organization-Local scope.
Definition: octypes.h:885
Request state.
Definition: octypes.h:1731
Definition: octypes.h:1468
For invalid ID.
Definition: octypes.h:1045
When none of the bits are set, the resource is non-secure, non-discoverable & non-observable by the c...
Definition: octypes.h:989
Error code from OTM This error is pushed from DTLS interface when handshake failure happens...
Definition: octypes.h:1115
OCStringLL * types
Definition: octypes.h:1550
OCPayload base
Definition: octypes.h:1596
OCMethod
OCDoResource methods to dispatch the request.
Definition: octypes.h:903
Register observe request for most up date notifications ONLY.
Definition: octypes.h:920
Definition: octypes.h:1108
struct OCRepPayload * obj
Definition: octypes.h:1515
The payload of the device.
Definition: octypes.h:1432
Request is not authorized by Resource Server.
Definition: octypes.h:1103
Definition: octypes.h:1116
uint16_t port
Definition: octypes.h:1539
Observe state.
Definition: octypes.h:1733
Definition: octypes.h:1235
Response from queries to remote servers.
Definition: octypes.h:1661
Register observe request for all notifications, including stale notifications.
Definition: octypes.h:923
This structure will be used to represent a binary string for CBOR payloads.
Definition: octypes.h:1472
char * specVersion
Pointer to the device specification version.
Definition: octypes.h:1347
OCTransportProtocolID protocolID
The protocol ID this option applies to.
Definition: octypes.h:1261
Definition: octypes.h:1586
IPv6 Admin-Local scope.
Definition: octypes.h:745
bool b
Definition: octypes.h:1509
OCEntityHandlerResult(* OCDeviceEntityHandler)(OCEntityHandlerFlag flag, OCEntityHandlerRequest *entityHandlerRequest, char *uri, void *callbackParam)
Device Entity handler need to use this call back instead of OCEntityHandler.
Definition: octypes.h:1880
uint8_t persistentBufferFlag
Server sets to true for persistent response buffer,false for non-persistent response buffer...
Definition: octypes.h:1722
This structure will be used to define the vendor specific header options to be included in communicat...
Definition: octypes.h:1258
OCPayload * payload
This is the pointer to server payload data to be transferred.
Definition: octypes.h:1710
IPv6 Link-Local scope (default).
Definition: octypes.h:873
When this bit is set, the resource is allowed to be discovered only if discovery request contains an ...
Definition: octypes.h:1020
OCObservationId obsId
Identifier for observation being registered/deregistered.
Definition: octypes.h:1223
Definition: octypes.h:1250
Data structure to encapsulate IPv4/IPv6/Contiki/lwIP device addresses.
Definition: octypes.h:796
OCRepPayloadValueArray arr
Definition: octypes.h:1516
Delete.
Definition: octypes.h:917
Definition: octypes.h:1091
IPv4 & IPv6 autoselection is the default.
Definition: octypes.h:861
Definition: octypes.h:1109
The payload is an OCRepPayload.
Definition: octypes.h:1436
uint8_t OCObservationId
Unique identifier for each observation request.
Definition: octypes.h:1165
uint8_t optionData[MAX_HEADER_OPTION_DATA_LENGTH]
pointer to its data.
Definition: octypes.h:1270
Definition: octypes.h:1092
Definition: octypes.h:1099
Definition: octypes.h:707
OCTransportFlags flags
transport modifiers.
Definition: octypes.h:802
OCDevAddr endpoint
Definition: octypes.h:1770
406
Definition: octypes.h:1134
OCObserveAction
Action associated with observation.
Definition: octypes.h:1176
Insecure transport is the default (subject to change).
Definition: octypes.h:856
OCPresenceTrigger trigger
Definition: octypes.h:1599
404
Definition: octypes.h:1085
Definition: octypes.h:1233
OCPayloadFormat
Formats for payload encoding.
Definition: octypes.h:937
double d
Definition: octypes.h:1508
Definition: octypes.h:1237
Definition: octypes.h:1098
Definition: octypes.h:1232
IP adapter only.
Definition: octypes.h:864
char * str
Definition: octypes.h:1510
The payload is an OCSecurityPayload.
Definition: octypes.h:1438
NFC Transport for Messaging.
Definition: octypes.h:681
Keep this callback registered and call it if an apropriate event occurs.
Definition: octypes.h:1747
IPv6 Site-Local scope.
Definition: octypes.h:748
Definition: octypes.h:1078
403
Definition: octypes.h:1135
uint16_t id_length
Identity Length.
Definition: octypes.h:777
IPv6 Organization-Local scope.
Definition: octypes.h:751
Definition: octypes.h:1074
struct OCResourcePayload OCResourcePayload
When this bit is set, the resource has been marked as 'slow'.
Definition: octypes.h:1005
OCTpsSchemeFlags
This enum type for indicate Transport Protocol Suites.
Definition: octypes.h:1355
disable gatt server.
Definition: octypes.h:693
OCByteString cborPayload
Definition: octypes.h:1613
IPv4 and IPv6, including 6LoWPAN.
Definition: octypes.h:666
OCStackApplicationResult
Possible return values from client application callback.
Definition: octypes.h:1742
IP & TCP adapter only.
Definition: octypes.h:727
char * anchor
Definition: octypes.h:1549
OCHeaderOption * rcvdVendorSpecificHeaderOptions
Pointer to the array of the received vendor specific header options.
Definition: octypes.h:1647
Definition: octypes.h:943