2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 * @brief header file of Apprications Controller
15 #ifndef _ICO_SYC_APC_H_
16 #define _ICO_SYC_APC_H_
18 #include "ico_apf_log.h"
19 #include "ico_uxf_sysdef.h"
20 #include "ico_uxf_conf.h"
21 #include "ico_uxf_def.h"
22 #include "ico_syc_def.h"
29 #define ICO_SYC_APC_REGULATION_LISTENERS 4 /* number of regulation listeners */
31 /* Vehicle information values */
32 #define ICO_SYC_APC_REGULATION_SPEED_RUNNING (4.0)
33 #define ICO_SYC_APC_REGULATION_SHIFT_NEUTRALS (0)
34 #define ICO_SYC_APC_REGULATION_SHIFT_1ST (1)
35 #define ICO_SYC_APC_REGULATION_SHIFT_2ND (2)
36 #define ICO_SYC_APC_REGULATION_SHIFT_3RD (3)
37 #define ICO_SYC_APC_REGULATION_SHIFT_DRIVE (4)
38 #define ICO_SYC_APC_REGULATION_SHIFT_REVERSES (128)
39 #define ICO_SYC_APC_REGULATION_SHIFT_PARKING (255)
40 #define ICO_SYC_APC_REGULATION_BLINKER_NONE (0)
41 #define ICO_SYC_APC_REGULATION_BLINKER_RIGHT (1)
42 #define ICO_SYC_APC_REGULATION_BLINKER_LEFT (2)
44 #define ICO_SYC_APC_REGULATION_REGULATION (0)
45 #define ICO_SYC_APC_REGULATION_NOREGULATION (1)
46 #define ICO_SYC_APC_REGULATION_NOCHANGE (9)
48 typedef struct _ico_apc_reguration_control {
49 unsigned char display; /* display(1=visible/0=invisible) */
50 unsigned char sound; /* sound(1=play/0=mute) */
51 unsigned char input; /* inputsw(1=use/0=unuse) */
52 unsigned char res; /* (unused) */
53 } ico_apc_reguration_control_t;
54 /* application context (pointer only)*/
55 typedef struct _ico_apc_context *ico_apc_context_h;
57 /* regulation event callback function*/
58 typedef void (*ico_apc_regulation_cb_t)(const int appcategory,
59 const ico_apc_reguration_control_t control,
61 /* respurce control */
62 typedef void (*ico_apc_resource_control_t)(const Ico_Uxf_conf_application *conf,
66 /* Apps Controller initialize/terminate */
67 /* initialize Apps Controller */
68 int ico_syc_apc_init(ico_apc_resource_control_t display,
69 ico_apc_resource_control_t sound,
70 ico_apc_resource_control_t input);
71 /* Terminate Apps Controller */
72 void ico_syc_apc_term(void);
73 /* Select active application */
74 void ico_syc_apc_active(const char *appid);
76 /* Apps Controller regulation control */
77 /* regulation controller initialize */
78 int ico_syc_apc_regulation_init(void);
79 /* regulation controller terminate */
80 int ico_syc_apc_regulation_term(void);
81 /* set regulation change listener */
82 void ico_syc_apc_regulation_listener(ico_apc_regulation_cb_t func, void *user_data);
83 /* get application visible control */
84 int ico_syc_apc_regulation_app_visible(const int category);
85 /* get application sound control */
86 int ico_syc_apc_regulation_app_sound(const int category);
87 /* get application input control */
88 int ico_syc_apc_regulation_app_input(const int category);
93 #endif /*_ICO_SYC_APC_H_*/