KNX IoT
KNX IoT Point API stack implementation
oc_uuid.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) 2016 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
25 #ifndef OC_UUID_H
26 #define OC_UUID_H
27 
28 #include <stdint.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
40 #define OC_UUID_LEN (37)
41 
42 typedef struct
43 {
44  uint8_t id[16];
45 } oc_uuid_t;
46 
63 void oc_str_to_uuid(const char *str, oc_uuid_t *uuid);
64 
88 void oc_uuid_to_str(const oc_uuid_t *uuid, char *buffer, int buflen);
104 void oc_gen_uuid(oc_uuid_t *uuid);
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* OC_UUID_H */
void oc_gen_uuid(oc_uuid_t *uuid)
Generate a random Universally Unique IDentifier (UUID)
void oc_str_to_uuid(const char *str, oc_uuid_t *uuid)
Convert a UUID string representation to a 128-bit oc_uuid_t.
void oc_uuid_to_str(const oc_uuid_t *uuid, char *buffer, int buflen)
Convert the 128 bit oc_uuid_t to a sting representation.