Virgil IoT KIT
info-client.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2020 Virgil Security, Inc.
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // (1) Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // (2) Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in
14 // the documentation and/or other materials provided with the
15 // distribution.
16 //
17 // (3) Neither the name of the copyright holder nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
22 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 // DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 // POSSIBILITY OF SUCH DAMAGE.
32 //
33 // Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
34 
115 #ifndef VS_SECURITY_SDK_SNAP_SERVICES_INFO_CLIENT_H
116 #define VS_SECURITY_SDK_SNAP_SERVICES_INFO_CLIENT_H
117 
118 #if INFO_CLIENT
119 
123 
124 #ifdef __cplusplus
125 namespace VirgilIoTKit {
126 extern "C" {
127 #endif
128 
137 typedef vs_status_e (*vs_snap_info_wait_t)(uint32_t wait_ms, int *condition, int idle);
138 
146 typedef vs_status_e (*vs_snap_info_stop_wait_t)(int *condition, int expect);
147 
157 
170 
183 
189 typedef struct {
194 
203 const vs_snap_service_t *
205 
221  vs_snap_info_device_t *devices,
222  size_t devices_max,
223  size_t *devices_cnt,
224  uint32_t wait_ms);
225 
241  const vs_mac_addr_t *mac,
242  uint32_t elements,
243  bool enable,
244  uint16_t period_seconds);
245 
246 #ifdef __cplusplus
247 } // extern "C"
248 } // namespace VirgilIoTKit
249 #endif
250 
251 #endif // INFO_CLIENT
252 
253 #endif // VS_SECURITY_SDK_SNAP_SERVICES_INFO_CLIENT_H
vs_snap_info_client_service_t::statistics
vs_snap_info_statistics_cb_t statistics
Device statistics.
Definition: info-client.h:192
vs_snap_info_client
const vs_snap_service_t * vs_snap_info_client(vs_snap_info_client_service_t impl)
INFO Client SNAP Service implementation.
vs_snap_info_device_t
Device information.
Definition: info-structs.h:59
vs_snap_info_set_polling
vs_status_e vs_snap_info_set_polling(const vs_netif_t *netif, const vs_mac_addr_t *mac, uint32_t elements, bool enable, uint16_t period_seconds)
Set pooling.
vs_status_e
vs_status_e
Status code.
Definition: status_code.h:77
vs_snap_info_statistics_cb_t
vs_status_e(* vs_snap_info_statistics_cb_t)(vs_info_statistics_t *statistics)
Device statistics request.
Definition: info-client.h:182
vs_mac_addr_t
MAC address.
Definition: snap-structs.h:252
vs_snap_info_enum_devices
vs_status_e vs_snap_info_enum_devices(const vs_netif_t *netif, vs_snap_info_device_t *devices, size_t devices_max, size_t *devices_cnt, uint32_t wait_ms)
Enumerate devices.
vs_snap_info_client_service_t::general_info
vs_snap_info_general_cb_t general_info
General information.
Definition: info-client.h:191
vs_snap_info_wait_t
vs_status_e(* vs_snap_info_wait_t)(uint32_t wait_ms, int *condition, int idle)
Wait implementation.
Definition: info-client.h:137
status_code.h
Status codes and macroses.
snap-structs.h
SNAP structures.
vs_snap_service_t
SNAP service descriptor.
Definition: snap-structs.h:312
vs_snap_info_general_cb_t
vs_status_e(* vs_snap_info_general_cb_t)(vs_info_general_t *general_info)
General device information request.
Definition: info-client.h:169
vs_netif_t
Network interface.
Definition: snap-structs.h:293
vs_snap_info_start_notif_cb_t
vs_status_e(* vs_snap_info_start_notif_cb_t)(vs_snap_info_device_t *device)
Start notification request.
Definition: info-client.h:156
vs_snap_info_stop_wait_t
vs_status_e(* vs_snap_info_stop_wait_t)(int *condition, int expect)
Wait and stop callback.
Definition: info-client.h:146
info-structs.h
INFO structures.
vs_info_statistics_t
Device statistics.
Definition: info-structs.h:94
vs_info_general_t
Device general information.
Definition: info-structs.h:81
vs_snap_info_client_service_t
INFO client implementations.
Definition: info-client.h:189
vs_snap_info_client_service_t::device_start
vs_snap_info_start_notif_cb_t device_start
Startup notification.
Definition: info-client.h:190