diff options
author | 2020-11-19 12:45:32 +0900 | |
---|---|---|
committer | 2020-11-19 12:45:32 +0900 | |
commit | 8e0e00d21146a84c18f9cf9409e187b4fb0248aa (patch) | |
tree | ef791689dad216ac61091a1d1bd3b928d563aba6 /vehicleservice/positioning/client/include/Dead_Reckoning_Local_Api.h | |
parent | 18df6e21c6743a137e2760c52ca89d0789e90417 (diff) |
Init basesystem source codes.
Signed-off-by: Riku Nomoto <riku_nomoto@mail.toyota.co.jp>
Change-Id: I55aa2f1406ce7f751ae14140b613b53b68995528
Diffstat (limited to 'vehicleservice/positioning/client/include/Dead_Reckoning_Local_Api.h')
-rwxr-xr-x | vehicleservice/positioning/client/include/Dead_Reckoning_Local_Api.h | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/vehicleservice/positioning/client/include/Dead_Reckoning_Local_Api.h b/vehicleservice/positioning/client/include/Dead_Reckoning_Local_Api.h new file mode 100755 index 0000000..c513e9b --- /dev/null +++ b/vehicleservice/positioning/client/include/Dead_Reckoning_Local_Api.h @@ -0,0 +1,147 @@ +/* + * @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. + */ + +#ifndef POSITIONING_CLIENT_INCLUDE_DEAD_RECKONING_LOCAL_API_H_ +#define POSITIONING_CLIENT_INCLUDE_DEAD_RECKONING_LOCAL_API_H_ +/**************************************************************************** + * File name :Dead_Reckoning_Local_Api.h + * System name :PastModel002 + * Subsystem name : + ******************************************************************************/ + +#include <vehicle_service/positioning_base_library.h> +#include "Sensor_Common_API.h" +#include "SensorLocation_API.h" +#include "SensorMotion_API.h" +#include "DR_API.h" + +/************************************************************************ +* Macro definitions * +************************************************************************/ + +/*----------------------------------------------------------------------* + * DEADRECKONING_RET_API define * + *----------------------------------------------------------------------*/ +/* Normal system */ +#define DEAD_RECKONING_RET_NORMAL 0 /* Normal completion */ +/* Abnormal system */ +#define DEADRECKONING_RET_ERROR_PID (-1) /* Thread ID error */ +#define DEADRECKONING_RET_ERROR_DID (-2) /* Unregistered DID */ +#define DEADRECKONING_RET_ERROR_PARAM (-4) /* Parameter error */ +#define DEADRECKONING_RET_ERROR_BUFFULL (-5) /* FULL of registered numbers */ +#define DEADRECKONING_RET_ERROR_CREATE_EVENT (-6) /* Event generation failure */ +#define DEADRECKONING_RET_ERROR_OUTOF_MEMORY (-8) /* Shared memory allocation failed */ +#define DEADRECKONING_RET_ERROR_SIZE (-9) /* Storage destination size error */ +#define DEADRECKONING_RET_ERROR_MIN (-10) + +/*----------------------------------------------------------------------* + * DEADRECKONING delivery registry APIs * + *----------------------------------------------------------------------*/ +/* Delivery control */ +#define DEADRECKONING_DELIVERY_REGIST 0x01 /* Delivery registration */ + +/* Delivery timing */ +#define DEADRECKONING_DELIVERY_TIMING_UPDATE 0x01 /* Updating */ + +/*----------------------------------------------------------------------* + * Command ID * + *----------------------------------------------------------------------*/ +/* Vehicle Sensor -> Vehicle Sensor(DR) */ +#define CID_DEAD_RECKONING_DELIVERY_ENTRY 0x0310 /* DR Transmission Registration Signal Notification */ + +/* Vehicle Sensor -> Vehicle Sensor(DR) */ +#define CID_DEAD_RECKONING_SENS_DATA 0x0311 /* DR data signal notification */ +#define CID_DEAD_RECKONING_GPS_DATA 0x0312 /* DR data signal notification */ +#define CID_DEAD_RECKONING_SENS_FST_DATA 0x0313 /* DR data signal notification */ + +/* Message Data Size(byte) */ +#define DEADRECKONING_MSGBUF_DSIZE 512 /* Message body MAX */ + +/*----------------------------------------------------------------------* + * Shared Memory Related Extensions * + *----------------------------------------------------------------------*/ +/* Semaphore name(MAX 32Byte) Synchronize with VehicleDebug_API_private.h */ +#define SENSOR_LOG_SETTING_SEMAPHO_NAME ("SEBSIR_GET_LOG_SETTING_SEMAPHO") + +/* Shared memory name(MAX 32Byte) Synchronize with VehicleDebug_API_private */ +#define LOG_SETTING_SHARE_MEMORY_NAME ("LOG_SETTING_SHARE_MEMORY") + +/************************************************************************ +* typedef Definition * +************************************************************************/ +typedef RET_API DEAD_RECKONING_RET_API; /* API return value */ + +/************************************************************************ +* Struct definitions * +************************************************************************/ + +/************************************************************************ +* TAG : DEADRECKONING_MSG_BUF +* ABSTRACT : message buffer +************************************************************************/ + +typedef struct { + T_APIMSG_MSGBUF_HEADER hdr; /* Message header */ + u_int8 data[DEADRECKONING_MSGBUF_DSIZE]; /* Message data */ +} DEADRECKONING_MSG_BUF; + +/************************************************************************ +* TAG : DEADRECKONING_MSG_DELIVERY_ENTRY +* ABSTRACT : Registration message delivery vehicle sensor information(->Vehicle sensor) +************************************************************************/ +typedef struct { + DID did; /* ID data corresponding to the vehicle sensor information */ + PNO pno; /* Shipping addressPNO */ + u_int8 delivery_timing; /* Delivery opportunity */ + u_int8 ctrl_flg; /* Delivery control */ + EventID event_id; /* Event ID */ +} DEADRECKONING_MSG_DELIVERY_ENTRY_DAT; + +typedef struct { + T_APIMSG_MSGBUF_HEADER hdr; /* Message header */ + DEADRECKONING_MSG_DELIVERY_ENTRY_DAT data; /* Message data */ +} DEADRECKONING_MSG_DELIVERY_ENTRY; + +/************************************************************************ +* TAG : DEADRECKONING_MSG_GET_DR_DATA +* ABSTRACT : Vehicle sensor information acquisition message(->Vehicle sensor) +************************************************************************/ +typedef struct { + DID did; /* Data ID corresponding to vehicle sensor information */ + PNO pno; /* Destination PNO */ + u_int16 offset; /* Offset to shared memory storage area */ + u_int16 size; /* Size of shared memory storage area */ + u_int8 reserve[2]; + EventID event_id; /* Event ID */ +} DEADRECKONING_MSG_GET_DR_DATA_DAT; + +typedef struct { + T_APIMSG_MSGBUF_HEADER hdr; /* Message header */ + DEADRECKONING_MSG_GET_DR_DATA_DAT data; /* Message data */ +} DEADRECKONING_MSG_GET_DR_DATA; + +/************************************************************************ +* Function prototype * +************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif // POSITIONING_CLIENT_INCLUDE_DEAD_RECKONING_LOCAL_API_H_ |