Mistake on this page? Email us
pt_devices_api.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * Copyright 2018 ARM Ltd.
4  *
5  * SPDX-License-Identifier: Apache-2.0
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 #ifndef PT_API_VERSION
22 #define PT_API_VERSION 2
23 #endif
24 #if PT_API_VERSION != 2
25 #error "Including mixed versions of Protocol API"
26 #endif
27 
28 #ifndef PT_DEVICES_API_H
29 #define PT_DEVICES_API_H
30 
32 
54 typedef void (*pt_devices_cb)(connection_id_t connection_id, void *userdata);
55 
71 pt_status_t pt_devices_register_devices(const connection_id_t connection_id,
72  pt_devices_cb devices_registration_success,
73  pt_devices_cb devices_registration_failure,
74  void *userdata);
75 
94 pt_status_t pt_devices_unregister_devices(const connection_id_t connection_id,
95  pt_devices_cb devices_unregistration_success,
96  pt_devices_cb devices_unregistration_failure,
97  void *userdata);
98 
116 pt_status_t pt_devices_update(const connection_id_t connection_id,
117  pt_devices_cb success_handler,
118  pt_devices_cb failure_handler,
119  void *userdata);
120 
126 #endif
void(* pt_devices_cb)(connection_id_t connection_id, void *userdata)
A function prototype for calling the client code when devices operation (for example: write...
Definition: pt_devices_api.h:54
Contains common structures and definitions for the protocol translator client.
pt_status_t pt_devices_register_devices(const connection_id_t connection_id, pt_devices_cb devices_registration_success, pt_devices_cb devices_registration_failure, void *userdata)
registers the devices that haven't been registered yet.
pt_status_t pt_devices_update(const connection_id_t connection_id, pt_devices_cb success_handler, pt_devices_cb failure_handler, void *userdata)
Updates the changed object structure from the endpoint device to Edge Core.
pt_status_t pt_devices_unregister_devices(const connection_id_t connection_id, pt_devices_cb devices_unregistration_success, pt_devices_cb devices_unregistration_failure, void *userdata)
Unregisters all the registered devices.