blob: 32466206605cb8ab47c72cd15b683a4a7f3a71cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/license/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MODEL_MODEL_CAR_CONNECTION_H_
#define MODEL_MODEL_CAR_CONNECTION_H_
#include "model/model_base.h"
#include "car_connection_manager.h"
#include <stdbool.h>
typedef struct _s_model_car_connection_cb_data {
e_model_type type;
} s_model_car_connection_cb_data;
typedef void (*t_model_car_connection_update_cb)(s_model_car_connection_cb_data *data);
void model_car_connection_init(void);
void model_car_connection_subscribe_event(t_model_car_connection_update_cb model_update_cb);
void model_car_connection_unsubscirbe_event();
void model_car_connection_start_connection(const char *address, int port);
void model_car_connection_end_connection(void);
void model_car_connection_send_direction(float direction);
void model_car_connection_send_throttle(float throttle);
void model_car_connection_ready_to_drive(bool is_ready);
void model_car_connection_set_stop(bool stop);
void model_car_connection_send_cam_elevation(float cam_elevation);
void model_car_connection_send_cam_azimuth(float cam_azimuth);
bool model_car_connection_is_connected();
bool model_car_connection_player_name_set(const char *player_name);
void model_car_connection_set_paused(bool is_paused);
#endif /* MODEL_MODEL_CAR_CONNECTION_H_ */
|