Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / peripheralservice / communication / server / include / CAN / CommWatch / CAN_CommWatch.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCH_H_
18 #define COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCH_H_
19 #include <native_service/frameworkunified_types.h>
20 #include <peripheral_service/Canif_API.h>
21 #include <vector>
22 #include <map>
23 #include <string>
24 #include "CommWatchCommon.h"
25
26 typedef struct {
27   char notify_name[MAX_NAME_SIZE_APP];
28   uint32_t data_id;
29   uint8_t comm_watch_flag;
30   uint16_t set_time;
31   uint16_t timer_cnt;
32 } CAN_COMM_WATCH_VAL;
33
34 typedef std::multimap<CANID, CAN_COMM_WATCH_VAL> CAN_CommWatchTable;
35 typedef std::pair<const CANID, CAN_COMM_WATCH_VAL> CAN_CommWatchTablePair;
36 typedef CAN_CommWatchTable::iterator CAN_CommWatchTableIt;
37
38 void CANCommWatchInit(void);
39 EFrameworkunifiedStatus CANCommWatch(HANDLE h_app);
40 EFrameworkunifiedStatus CANCommWatchTimeout(HANDLE h_app);
41 void CANCommWatchClear(HANDLE h_app, CANID id);
42 #endif  // COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCH_H_