diff options
author | 2020-11-20 23:36:23 +0900 | |
---|---|---|
committer | 2020-11-22 09:02:55 +0900 | |
commit | 17cf21bcf8a2e29d2cbcf0a313474d2a4ee44f5d (patch) | |
tree | 582a9768558d9eaf261ca5df6136e9de54c95816 /service/vehicle/positioning/server/include/Sensor/VehicleUtility.h | |
parent | 9e86046cdb356913ae026f616e5bf17f6f238aa5 (diff) |
Re-organized sub-directory by category
Since all the sub-directories were placed in the
first level, created sub-directories, "hal", "module",
and "service" for classification and relocated each component.
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Change-Id: Ifdf743ac0d1893bd8e445455cf0d2c199a011d5c
Diffstat (limited to 'service/vehicle/positioning/server/include/Sensor/VehicleUtility.h')
-rwxr-xr-x | service/vehicle/positioning/server/include/Sensor/VehicleUtility.h | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/service/vehicle/positioning/server/include/Sensor/VehicleUtility.h b/service/vehicle/positioning/server/include/Sensor/VehicleUtility.h new file mode 100755 index 0000000..e7ebef0 --- /dev/null +++ b/service/vehicle/positioning/server/include/Sensor/VehicleUtility.h @@ -0,0 +1,128 @@ +/* + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. + * + * 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/licenses/LICENSE-2.0 + * + * 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. + */ + +/*************************************************************************** +@file VehicleUtility.h +@detail Common processing function header file of Vehicle<BR> + Vehicle Common Functions Header Files +*****************************************************************************/ +#ifndef POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLEUTILITY_H_ +#define POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLEUTILITY_H_ + +#include <stdint.h> +#include <vehicle_service/positioning_base_library.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/*------------------------------------------------------------------------------* + * Definition * + *------------------------------------------------------------------------------*/ +/* GPS-related timer value */ +#define TIMVAL_GPS_STARTUP 500 /* 5Sec Start confirmation monitoring timer */ +#define TIMVAL_GPS_RCVCYCLDAT 500 /* 5Sec Periodic reception data monitoring timer */ +#define TIMVAL_GPS_RCVACK 500 /* 5Sec ACK reception monitoring timer */ +#define TIMVAL_GPS_RCVDAT 500 /* 5Sec Data reception monitoring timer(Not used) */ +#define TIMVAL_GPS_NAVIFST 3000 /* 30sec Initial Navigation Monitoring Timer */ +#define TIMVAL_GPS_NAVICYCLE 300 /* 3sec Navi monitoring timer */ +#define TIMVAL_GPS_NAVIDISRPT 1000 /* 10Sec Navigation Monitoring Disruption Log Output Timer */ +#define TIMVAL_GPS_DIAGCLKGUARD 1000 /* 10sec Diag provision time guard monitoring timer */ +#define TIMVAL_GPS_NMEADATAGUARD 1000 /* 10sec NMEA data-providing guard monitoring timer */ +#define TIMVAL_GPS_RECOVERY 60000 /* 600sec GPS recovery timer */ +#define TIMVAL_GPS_RECEIVERERR 60000 /* 600sec GPS receiver anomaly detection timer */ + +/* Sensor-related timer value */ +#define TIMVAL_SNS_RCVFSTDAT 3000 /* 30Sec Initial sensor data reception monitoring timer */ +#define TIMVAL_SNS_RCVCYCLDAT 300 /* 3Sec Cyclic sensor data reception monitoring timer */ +#define TIMVAL_SNS_RCVDISRPT 1000 /* 10Sec Cyclic sensor data interruption log output timer */ + +/* Timer management table */ +#define TIM_NON 0x00 /* Timer counter initial value */ +#define TIM_CNTMIN 0x01 /* Timer counter minimum value */ +#define TIM_CNTMAX 0xff /* Maximum value of timer counter */ +#define TIMER_OFF 0 /* Timer enable flag OFF */ +#define TIMER_ON 1 /* Timer enable flag ON */ + +/*------------------------------------------------------------------------------* + * Structure * + *------------------------------------------------------------------------------*/ +/*! + @brief Timer type + */ +typedef enum _VEHICLEUTILITY_TIM_KIND { + GPS_STARTUP_TIMER = 0, /* 0 Start confirmation monitoring timer */ + GPS_CYCL_TIMER, /* 1 Cyclic GPS data reception monitoring timer */ + GPS_RECV_ACK_TIMER, /* 2 ACK reception monitoring timer */ + GPS_NAVIFST_TIMER, /* 3 Initial Navigation Monitoring Timer */ + GPS_NAVICYCLE_TIMER, /* 4 Navi monitoring timer */ + GPS_NAVIDISRPT_TIMER, /* 5 Navigation Monitoring Disruption Log Output Timer */ + GPS_DIAGCLK_GUARDTIMER, /* 6 Diag provision time guard monitoring timer */ + GPS_NMEADATA_GUARDTIMER, /* 7 NMEA data-providing guard monitoring timer */ + GPS_RECOVERY_TIMER, /* 8 GPS recovery timer */ + GPS_RECEIVERERR_TIMER, /* 9 GPS receiver anomaly detection timer */ + SNS_FST_TIMER, /* 10 Initial sensor data reception monitoring timer */ + SNS_CYCLE_TIMER, /* 11 Cyclic sensor data reception monitoring timer */ + SNS_DISRPT_TIMER, /* 12 Cyclic sensor data interruption log output timer */ + TIM_NUM /* 13 Number of timer types */ +} VEHICLEUTILITY_TIM_KIND; + +/*! + @brief Master status +*/ +typedef struct { + u_int8 flag; /**< Timer flag OFF:Stop,ON:Start */ + u_int8 cnt; /**< Start counter */ + int8 rsv[2]; /**< Reserved */ +} VEHICLEUTILITY_TIM_STS; + +/*! + @brief Master status management table + */ +typedef struct { + VEHICLEUTILITY_TIM_STS sts[TIM_NUM]; /**< Master status */ +} VEHICLEUTILITY_TIM_MNG; + +/*! + @brief Timer setting information table +*/ +typedef struct { + uint32_t timer_val; /**< Timer value */ + PNO pno; /**< Event notification destination process number */ +} VEHICLEUTILITY_TIM_INFO; + +/* + Function prototype declaration + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +RET_API VehicleUtilitySndMsg(PNO pno, u_int16 size, void *msgbuf, u_int16 mode); +RET_API VehicleUtilityRcvMsg(PNO pno, u_int16 size, void **msgbuf, u_int16 mode); +void VehicleUtilityDiagCodePut(u_int32 err_id, u_int16 positioning_code); +void VehicleUtilityInitTimer(void); +BOOL VehicleUtilitySetTimer(VEHICLEUTILITY_TIM_KIND tim_kind); +BOOL VehicleUtilityStopTimer(VEHICLEUTILITY_TIM_KIND tim_kind); +BOOL VehicleUtilityTimeJdgKnd(uint16_t seqno); + +void LineSensDrvExtTermStsReq(void); +RET_API DEVGpsSndBackupDataLoadReq(void); +void DEVGpsGetDebugGpsFormatFailCnt(void* p_buf); +u_int8 LineSensDrvGetSysRecvFlag(void); +uint16_t DEVGpsGetWknRollover(void); + +#ifdef __cplusplus +} +#endif + +#endif // POSITIONING_SERVER_INCLUDE_SENSOR_VEHICLEUTILITY_H_ */ |