Soletta machine learning
Machine learning for IoT devices
 All Data Structures Files Functions Typedefs Enumerations Enumerator Groups Pages
sml_main_loop.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Soletta Project
3  *
4  * Copyright (C) 2015 Intel Corporation. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #pragma once
20 #include <stdbool.h>
21 
22 #include <sml.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
48 int sml_main_loop_init(void);
49 
55 void sml_main_loop_run(void);
56 
63 void sml_main_loop_quit(void);
64 
70 void sml_main_loop_shutdown(void);
71 
84 int sml_main_loop_schedule_sml_process(struct sml_object *sml, unsigned int timeout);
85 
98 bool sml_main_loop_unschedule_sml_process(int sml_timeout_id);
99 
103 #ifdef __cplusplus
104 }
105 #endif
void sml_main_loop_shutdown(void)
Clean up the SML mainloop.
int sml_main_loop_init(void)
Init the SML mainloop.
int sml_main_loop_schedule_sml_process(struct sml_object *sml, unsigned int timeout)
Schedule a timer to call sml_process automatically.
void sml_main_loop_run(void)
Start the SML mainloop.
bool sml_main_loop_unschedule_sml_process(int sml_timeout_id)
Unschedule the SML mainloop.
void sml_main_loop_quit(void)
Stops the SML mainloop.