2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef POSITIONING_CLIENT_INCLUDE_VEHICLE_SERVICE_POS_COMMON_API_H_
17 #define POSITIONING_CLIENT_INCLUDE_VEHICLE_SERVICE_POS_COMMON_API_H_
20 * @file POS_common_API.h
21 * @brief API definition file for common function
24 /** @addtogroup BaseSystem
27 /** @addtogroup vehicle_service
31 /** @addtogroup positioning
32 * @ingroup vehicle_service
35 /*---------------------------------------------------------------------------------*
37 *---------------------------------------------------------------------------------*/
38 #include <vehicle_service/POS_define.h>
41 /*---------------------------------------------------------------------------------*
43 *---------------------------------------------------------------------------------*/
44 /* State definitions can be used */
45 #define SENSORLOCATION_STATUS_DISABLE (0) //!< \~english Not available
46 #define SENSORLOCATION_STATUS_ENABLE (1) //!< \~english Available
48 /* State definitions can be used */
49 #define SENSORMOTION_STATUS_DISABLE (0) //!< \~english Not available
50 #define SENSORMOTION_STATUS_ENABLE (1) //!< \~english Available
51 /* Acquisition method */
52 #define SENSOR_GET_METHOD_AUTO (0) //!< \~english Not specified
53 #define SENSOR_GET_METHOD_GPS (1) //!< \~english GPS
54 #define SENSOR_GET_METHOD_NAVI (2) //!< \~english Navigation
55 #define SENSOR_GET_METHOD_DR (3) //!< \~english Dead Reckoning
56 #define SENSOR_GET_METHOD_POS (4) //!< \~english positioning (Internal)
59 #define LOCATIONINFO_NMEA_MAX (1020)
60 //!< \~english Max length of 'Location Information'
63 /* Vehicle sensor information notification CID (Rate information) */
66 * \~english @brief Delivery speed command ID
67 * \~english @brief If you want to catch above envents, use NSFW like below.
69 * l_eStatus = FrameworkUnifiedAttachCallbackToDispatcher(h_app, POS_NTFY_SEND_THREAD, CID_POSIF_REGISTER_LISTENER_SPEED, CBCallbackA);
72 #define CID_POSIF_REGISTER_LISTENER_SPEED (0x0203)
75 * \~english @brief Delivery longitude and latitude command ID
76 * \~english @brief If you want to catch above envents, use NSFW like below.
78 * l_eStatus = FrameworkUnifiedAttachCallbackToDispatcher(h_app, POS_NTFY_SEND_THREAD, CID_POSIF_REGISTER_LISTENER_LONLAT, CBCallbackA);
81 #define CID_POSIF_REGISTER_LISTENER_LONLAT 0x0781
84 * \~english @brief Delivery altitude command ID
85 * \~english @brief If you want to catch above envents, use NSFW like below.
87 * l_eStatus = FrameworkUnifiedAttachCallbackToDispatcher(h_app, POS_NTFY_SEND_THREAD, CID_POSIF_REGISTER_LISTENER_ALTITUDE, CBCallbackA);
90 #define CID_POSIF_REGISTER_LISTENER_ALTITUDE 0x0782
93 * \~english @brief Delivery heading command ID
94 * \~english @brief If you want to catch above envents, use NSFW like below.
96 * l_eStatus = FrameworkUnifiedAttachCallbackToDispatcher(h_app, POS_NTFY_SEND_THREAD, CID_POSIF_REGISTER_LISTENER_HEADING, CBCallbackA);
99 #define CID_POSIF_REGISTER_LISTENER_HEADING 0x0783
101 /*---------------------------------------------------------------------------------*
102 * Typedef declaration *
103 *---------------------------------------------------------------------------------*/
105 /*---------------------------------------------------------------------------------*
106 * Struct declaration *
107 *---------------------------------------------------------------------------------*/
109 * @struct POS_POSDATA
110 * \~english position information
113 int8_t status; //!< \~english data status
114 uint8_t posSts; //!< \~english position status
115 uint16_t posAcc; //!< \~english position accuracy
116 int32_t longitude; //!< \~english current longitude
117 int32_t latitude; //!< \~english current latitude
118 int32_t altitude; //!< \~english current altitude
119 int16_t heading; //!< \~english current heading
120 uint8_t reserved[2]; //!< \~english reserve
124 * @struct SENSORLOCATION_MSG_LONLATINFO
125 * \~english longitude and latitude information data delivery message
128 SENSORLOCATION_LONLATINFO_DAT data;
129 //!< \~english longitude and latitude information data
130 } SENSORLOCATION_MSG_LONLATINFO;
133 * @struct SENSORLOCATION_MSG_ALTITUDEINFO
134 * \~english altitude information data delivery message
137 SENSORLOCATION_ALTITUDEINFO_DAT data; //!< \~english altitude information data
138 } SENSORLOCATION_MSG_ALTITUDEINFO;
141 * @struct SENSORMOTION_MSG_HEADINGINFO
142 * \~english heading information data delivery message
145 SENSORMOTION_HEADINGINFO_DAT data; //!< \~english heading information data
146 } SENSORMOTION_MSG_HEADINGINFO;
149 * @struct SENSORMOTION_MSG_SPEEDINFO
150 * \~english speed information data delivery message
153 SENSORMOTION_SPEEDINFO_DAT data; //!< \~english speed information data
154 } SENSORMOTION_MSG_SPEEDINFO;
158 * @struct POS_LOCATIONINFO_NMEA
159 * \~english Structure of Location Information (NMEA)
162 uint32_t length; //!< \~english length
163 uint8_t data[LOCATIONINFO_NMEA_MAX]; //!< \~english data
164 } POS_LOCATIONINFO_NMEA;
167 /*---------------------------------------------------------------------------------*
168 * Prototype Declaration *
169 *---------------------------------------------------------------------------------*/
170 /* SENSOR_API public API */
175 ////////////////////////////////////////////////////////////////////////////////////////////
176 /// \ingroup tag_Positioning
177 /// \~english @par Brief
178 /// - Register for longitude and lattitude delivery
180 /// \~english @param [in] hApp
181 /// - HANDLE - App Handle
182 /// \~english @param [in] notifyName
183 /// - PCSTR - Destination thread name
184 /// \~english @param [in] ucCtrlFlg
185 /// - uint8_t - Delivery control flag(register)
186 /// \~english @param [in] ucDeliveryTiming
187 /// - uint8_t - Delivery timing(change/update)
188 /// \~english @param [in] ucGetMethod
189 /// - uint8_t - Get method(GPS/Navigation/Not specified)
192 /// - Delivery control flag(ucCtrlFlg)
193 /// - SENSOR_DELIVERY_REGIST - register
194 /// - Register for specified logtitude and latitude delivery
195 /// - Please note if call this function for multiple times, the data will be deliveried for multiple times.
196 /// - The specified longitude and latitude will be deliveried during the registration(first delivery)
197 /// - Delivery timing(ucDeliveryTiming)
198 /// - SENSOR_DELIVERY_TIMING_CHANGE - change. Specified longitude and latitude will be deliveried \n
199 /// only when it has been changed.
200 /// - SENSOR_DELIVERY_TIMING_UPDATE - update. Specified longitude and latitude will be deliveried \n
201 /// every time that has been updated by the vehicle sensors.
202 /// - Get method(ucGetMethod)
203 /// - SENSOR_GET_METHOD_GPS - GPS. The longitude and latitude from GPS will be deliveried.
204 /// - SENSOR_GET_METHOD_NAVI - Navi. The longitude and latitude from Navigation will be deliveried.
205 /// - SENSOR_GET_METHOD_AUTO - Not specified. The specified longitude and latitude will be deliveried \n
206 /// according to the current environment.
207 /// - Avaliable method is descriped as following:\n
208 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
209 /// In the following environment, if the unsupported method has been specified, \n
210 /// POS_RET_ERROR_PARAM will be returned.\n
212 /// \~english @retval POS_RET_NORMAL normal finish
213 /// \~english @retval POS_RET_ERROR_PARAM parameter error
214 /// \~english @retval POS_RET_ERROR_BUFFULL the register count is full
215 /// \~english @retval POS_RET_ERROR_INNER internal error
216 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
217 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
219 /// \~english @par Precondition
220 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the dispatcher for App are completed.
221 /// - Availability of positioning service is TRUE.
223 /// \~english @par changes of the internal status
224 /// - There is no changes of the internal status by this API
226 /// \~english @par Failure condition
227 /// - The parameter ucDeliveryTiming is neither update(SENSOR_DELIVERY_TIMING_UPDATE) nor change \n
228 /// (SENSOR_DELIVERY_TIMING_CHANGE) [POS_RET_ERROR_PARAM]
229 /// - The parameter ucCtrlFlg is not register(SENSOR_DELIVERY_REGIST) [POS_RET_ERROR_PARAM]
230 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
231 /// - The parameter notifyName is NULL [POS_RET_ERROR_PARAM]
232 /// - The count of message in message queue is reach to the max [POS_RET_ERROR_RESOURCE]
233 /// - The count of mutex is reach to the max [POS_RET_ERROR_RESOURCE]
234 /// - The count of item in ProcessName-ProcessNo convert table is reach to the max [POS_RET_ERROR_RESOURCE]
235 /// - The event is created in same process, but the count of reference to the event \n
236 /// is reach to the max [POS_RET_ERROR_INNER]
237 /// - The event is created in system, but the count of reference to the event \n
238 /// is reach to the max [POS_RET_ERROR_INNER]
239 /// - Memory allocate failed during the event table creation for the event registering. [POS_RET_ERROR_INNER]
240 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
241 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
242 /// - After register the thread table in event table, the event flag has already been registered. \n
243 /// [POS_RET_ERROR_INNER]
244 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
245 /// - The event table is full. [POS_RET_ERROR_INNER]
246 /// - The memory for event HANDLE allocate failed. [POS_RET_ERROR_INNER]
247 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
248 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
249 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
250 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
251 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
252 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
253 /// - ProcessNo has not been registered in message control table when message transfered between processes.\n
254 /// [POS_RET_ERROR_INNER]
255 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
256 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
257 /// - The destination process name size is larger than 20 characters when message transfer between processes. \n
258 /// [POS_RET_ERROR_INNER]
259 /// - The message queue name has not been registered in control table when message transfer between processes.\n
260 /// [POS_RET_ERROR_INNER]
261 /// - Message transfer HANDLE create failed when message transfered between process. [POS_RET_ERROR_INNER]
262 /// - Message transfer HANDLE get failed from internal table when message transfered between processes. \n
263 /// [POS_RET_ERROR_INNER]
264 /// - Message transfer failed between process. [POS_RET_ERROR_INNER]
265 /// - Specified event HANDLE has not been registered in event HANDLE table during waiting event. \n
266 /// [POS_RET_ERROR_INNER]
267 /// - The count of thread beyond max in event management table during event waiting. [POS_RET_ERROR_INNER]
268 /// - The EV_FLAG_BIT is not set in flagID during getting event. [POS_RET_ERROR_INNER]
269 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
270 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
271 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
272 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
273 /// - Getting event timeout. [POS_RET_ERROR_INNER]
274 /// - Error happened during event getting. [POS_RET_ERROR_INNER]
275 /// - The result of positioning service returned is SENSOR_RET_ERROR_PARAM. [POS_RET_ERROR_PARAM]
276 /// - The result of positioning service returned is SENSOR_RET_ERROR_BUFFULL. [POS_RET_ERROR_BUFFULL]
277 /// - The result of positioning service returned is SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
278 /// - The result of positioning service returned is not SENSOR_RET_ERROR_PARAM and SENSOR_RET_ERROR_BUFFULL \n
279 /// and SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
281 /// \~english @par Detail
282 /// - Call this API to register longitude and latitude information delivery.\n
283 /// This API return the result of registered.
287 /// Please note the following points when use this API.
288 /// - Duplication registering
289 /// - The same destination thread name has already been registered
290 /// - The registered delivery data updated and normal return.(first delivery)
291 /// - To one delivery destination, the same data will not be duplication deliveried at same time.
292 /// - After call this API, if the delivery destination thread name has been changed, please call this API again.
295 /// Notification of message
296 /// - After registered successfully, vehicle sensor information will been sent as system API \n
297 /// message with following format.\n
298 /// Command ID : @ref CID_POSIF_REGISTER_LISTENER_LONLAT \n
299 /// message structure
302 /// SENSORLOCATION_LONLATINFO_DAT data; /* message data */
303 /// } SENSORLOCATION_MSG_LONLATINFO;
305 /// message data structure \n
309 /// uint8_t getMethod; /* get method */
310 /// uint8_t SyncCnt; /* Synchrony count */
311 /// uint8_t isEnable; /* enable or not */
312 /// uint8_t posSts; /* position status */
313 /// uint16_t posAcc; /* Position accuracy */
314 /// int32_t Longitude; /* Longitude */
315 /// int32_t Latitude; /* Latitude */
316 /// } SENSORLOCATION_LONLATINFO_DAT;
318 /// - Get method(getMethod)
319 /// - SENSOR_GET_METHOD_GPS - longitude and latitude from GPS
320 /// - SENSOR_GET_METHOD_NAVI - longitude and latitude from Navigation
321 /// - Synchrony count(SyncCnt)
322 /// - Count for position data synchronous \n
323 /// When delivery altitude and heading data, position data can be synchronized by SyncCnt.\n
324 /// But the data of different method can not be synchronized by SyncCnt.\n
325 /// Example 1: [LonLat from GPS] and [Heading from GPS] can be synchronized by SyncCnt.\n
326 /// Example 2: [LonLat from GPS] and [LonLat from Navi] can not be synchronized by SyncCnt.\n
327 /// Caution: The sensor count in sensor data delivery is another data.
328 /// - Enable or not(isEnable) \n
329 /// To describe this delivery message is whether can be used or not
330 /// - 0 - not avaliable
331 /// - not 0 - avaliable
332 /// - when GPS data is specified,longitude and latitude is invalid at following condition:\n
333 /// so [not avaliable] provieded
334 /// - After system start, GPS unit has not received current location data and GPS unit \n
335 /// status is not positioning fixed.
336 /// - If it is not initialized status, certainly provide [avaliable] when Navigation data specified
337 /// - If the status is [not avaliable], data following can not be guaranteed.
338 /// - Position status(posSts)
339 /// - Bit0 : GPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_GSP)
340 /// - Bit1 : DGPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DGPS)
341 /// - Bit2 : DR data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DR)
342 /// - Bit3 : MapMatching data used result(1:used, 0:not used, definition of \n
343 /// maskbit:POS_LOC_INFO_USE_MAPMATCHING)
344 /// - Position accuracy(posAcc)
345 /// - Detected accruray of current position:1LSB=1m \n
346 /// - Longitude : (WGS-84)(10^-7degree as 1) \n
347 /// East longitude is positive value and west longitude is negative value.
348 /// - Latitude : (WGS-84)(10^-7degree as 1) \n
349 /// North latitude positive value and south latitude is negative value.
351 /// \~english @par Classification
354 /// \~english @par Type
360 ////////////////////////////////////////////////////////////////////////////////////////////
361 POS_RET_API POS_RegisterListenerLonLat(HANDLE hApp, PCSTR notifyName, uint8_t ucCtrlFlg, uint8_t ucDeliveryTiming,
362 uint8_t ucGetMethod);
364 ////////////////////////////////////////////////////////////////////////////////////////////
365 /// \ingroup tag_Positioning
366 /// \~english @par Brief
367 /// - Register altitude delivery
369 /// \~english @param [in] hApp
370 /// - HANDLE - App Handle
371 /// \~english @param [in] notifyName
372 /// - PCSTR - Destination thread name
373 /// \~english @param [in] ucCtrlFlg
374 /// - uint8_t - Delivery control flag(register)
375 /// \~english @param [in] ucDeliveryTiming
376 /// - uint8_t - Delivery timing(change/update)
377 /// \~english @param [in] ucGetMethod
378 /// - uint8_t - Get method(GPS/Not specified)
381 /// - Delivery control flag(ucCtrlFlg)
382 /// - SENSOR_DELIVERY_REGIST - register
383 /// - Register specified altitude delivery
384 /// - Please note that if the same data delivery has been registered for multiple times, the data will \n
385 /// also be deliveried for registered multiple times.
386 /// - The specified altitude will be deliveried at registered time (first delivery).
387 /// - Delivery timing(ucDeliveryTiming)
388 /// - SENSOR_DELIVERY_TIMING_CHANGE - change. Specified altitude will be deliveried only when it is changed.
389 /// - SENSOR_DELIVERY_TIMING_UPDATE - update. Specified altitude will be deliveried when it is updated by \n
391 /// - Get method(ucGetMethod)
392 /// - SENSOR_GET_METHOD_GPS - GPS. The altitude from GPS will be deliveried.
393 /// - SENSOR_GET_METHOD_AUTO - Not specified. The altitude will be deliveried according to \n
394 /// the current environment
395 /// - Avaliable method is descriped as following in each environment. \n
396 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
397 /// In the following environment, if the unsupported method has been specified, \n
398 /// POS_RET_ERROR_PARAM will be returned.
400 /// \~english @retval POS_RET_NORMAL normal finish
401 /// \~english @retval POS_RET_ERROR_PARAM parameter error
402 /// \~english @retval POS_RET_ERROR_BUFFULL the register count is full
403 /// \~english @retval POS_RET_ERROR_INNER internal error
404 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
405 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
407 /// \~english @par Precondition
408 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the dispatcher \n
409 /// for App are completed.
410 /// - Availability of positioning service is TRUE.
412 /// \~english @par changes of internal status
413 /// - There is no changes of internal status
415 /// \~english @par Failure condition
416 /// - The parameter ucDeliveryTiming is neither update(SENSOR_DELIVERY_TIMING_UPDATE) nor change \n
417 /// (SENSOR_DELIVERY_TIMING_CHANGE) [POS_RET_ERROR_PARAM]
418 /// - The parameter ucCtrlFlg is not registered(SENSOR_DELIVERY_REGIST) [POS_RET_ERROR_PARAM]
419 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
420 /// - The parameter notifyName is NULL [POS_RET_ERROR_PARAM]
421 /// - The count of message in message queue is reached to the max [POS_RET_ERROR_RESOURCE]
422 /// - The count of mutex is reached to the max [POS_RET_ERROR_RESOURCE]
423 /// - The count of item in ProcessName-ProcessNo convert table is reached to the max [POS_RET_ERROR_RESOURCE]
424 /// - The event is created in same process, but the count of reference to the event \n
425 /// is reach to max [POS_RET_ERROR_INNER]
426 /// - The event is created in system, but the count of reference to the event \n
427 /// is reach to the max [POS_RET_ERROR_INNER]
428 /// - Memory allocate failed during the event table creation for that event registering. [POS_RET_ERROR_INNER]
429 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
430 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
431 /// - After register the thread table in event table, the event flag has already been registered. \n
432 /// [POS_RET_ERROR_INNER]
433 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
434 /// - The event table is full during event creation. [POS_RET_ERROR_INNER]
435 /// - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
436 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
437 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
438 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
439 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
440 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
441 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
442 /// - ProcessNo has not been registered in message control table when message transfered between processes.\n
443 /// [POS_RET_ERROR_INNER]
444 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
445 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
446 /// - The destination process name size is larger than 20 characters when message transfer between processes.\n
447 /// [POS_RET_ERROR_INNER]
448 /// - The message queue name has not been registered in control table when message transfer between processes.\n
449 /// [POS_RET_ERROR_INNER]
450 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
451 /// - Message transfer HANDLE get failed from internal table when message transfered between processes.\n
452 /// [POS_RET_ERROR_INNER]
453 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
454 /// - Specified event HANDLE has not been registered in event HANDLE table during event waiting. \n
455 /// [POS_RET_ERROR_INNER]
456 /// - The count of thread is reach to max in event management table during event waiting.[POS_RET_ERROR_INNER]
457 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
458 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
459 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
460 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
461 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
462 /// - Getting event timeout. [POS_RET_ERROR_INNER]
463 /// - Error happened during event getting. [POS_RET_ERROR_INNER]
464 /// - The result of positioning service is SENSOR_RET_ERROR_PARAM. [POS_RET_ERROR_PARAM]
465 /// - The result of positioning service is SENSOR_RET_ERROR_BUFFULL. [POS_RET_ERROR_BUFFULL]
466 /// - The result of positioning service is SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
467 /// - The result of positioning service is not SENSOR_RET_ERROR_PARAM and SENSOR_RET_ERROR_BUFFULL and \n
468 /// SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
470 /// \~english @par Detail
471 /// - Call this API to register altitude delivery. \n
472 /// This API will finish when get the return value.
475 /// Please note the following points when use this API.
476 /// - Duplication registering
477 /// - The same destination thread name has already been registered
478 /// - The registered delivery data updated and normal return.(first delivery)
479 /// - To one delivery destination, the same data will not be duplication deliveried at same timing.
480 /// - After call this API, if the delivery destination thread name is changed, please call this API again.
483 /// Notification of message
484 /// - After registered successfully, vehicle sensor will send system API message with following format. \n
485 /// Command ID : @ref CID_POSIF_REGISTER_LISTENER_ALTITUDE \n
486 /// message structure
489 /// SENSORLOCATION_ALTITUDEINFO_DAT data; /* message data */
490 /// } SENSORLOCATION_MSG_ALTITUDEINFO;
492 /// message data structure
495 /// uint8_t getMethod; /* get method */
496 /// uint8_t SyncCnt; /* synchrony count */
497 /// uint8_t isEnable; /* enable or not */
498 /// uint8_t Reserve[3]; /* Reserve */
499 /// int32_t Altitude; /* Altitude(unit:0.01m) */
500 /// } SENSORLOCATION_ALTITUDEINFO_DAT;
502 /// - Get method(getMethod)
503 /// - SENSOR_GET_METHOD_GPS - altitude from GPS
504 /// - Synchrony count(SyncCnt)
505 /// - Count for position data synchronous \n
506 /// When delivery altitude and heading data, position data can be synchronized by SyncCnt. \n
507 /// But the data of different method can not be synchronized by SyncCnt.\n
508 /// example: [longitude and latitude from GPS] and [heading from GPS] can be synchronized by SyncCnt.\n
509 /// synchronized by SyncCnt. \n
510 /// Caution: The sensor count in sensor data delivery is another data.
511 /// - Enable or not(isEnable) \n
512 /// To describe this delivery message is whether can be used or not.
513 /// - 0 - not avaliable
514 /// - not 0 - avaliable
515 /// - when GPS data specified, Altitude is invalid at following condition(so [not avaliable] provieded):
516 /// - Immediately after system start, GPS unit has not received current location data and GPS unit status \n
517 /// is not positioning fix
518 /// - If the status is [not avaliable], data following can not be guaranteed.
520 /// - altitude data(unit 0.01m)
522 /// \~english @par Classification
525 /// \~english @par Type
528 /// \~english @see delivery
529 /// - POS_GetAltitude
531 ////////////////////////////////////////////////////////////////////////////////////////////
532 POS_RET_API POS_RegisterListenerAltitude(HANDLE hApp, PCSTR notifyName, uint8_t ucCtrlFlg, uint8_t ucDeliveryTiming,
533 uint8_t ucGetMethod);
535 ////////////////////////////////////////////////////////////////////////////////////////////
536 /// \ingroup tag_Positioning
537 /// \~english @par Brief
538 /// - Register speed delivery
540 /// \~english @param [in] hApp
541 /// - HANDLE - App Handle
542 /// \~english @param [in] notifyName
543 /// - PCSTR - Destination thread name
544 /// \~english @param [in] ucCtrlFlg
545 /// - uint8_t - Delivery control flag(register)
546 /// \~english @param [in] ucDeliveryTiming
547 /// - uint8_t - Delivery timing(change/update)
548 /// \~english @param [in] ucGetMethod
549 /// - uint8_t - Get method(POS/Navi/Not specified)
552 /// - Delivery control flag(ucCtrlFlg)
553 /// - SENSOR_DELIVERY_REGIST - register
554 /// - Register specified speed delivery
555 /// - Please note that if the same data delivery has been registered for multiple times, the data will \n
556 /// also be deliveried for registered mutiple times.
557 /// - The specified speed will be deliveried at registered time (first delivery).
558 /// - Delivery timing(ucDeliveryTiming)
559 /// - SENSOR_DELIVERY_TIMING_CHANGE - change. Specified speed will be deliveried only when it is changed.
560 /// - SENSOR_DELIVERY_TIMING_UPDATE - update. Specified speed will be deliveried when it is updated by \n
562 /// - Get method(ucGetMethod)
563 /// - SENSOR_GET_METHOD_POS - The speed calculated in positioning based on speed pulse will be deliveried.
564 /// - SENSOR_GET_METHOD_NAVI - Navi The speed from Navi will be deliveried.
565 /// - SENSOR_GET_METHOD_AUTO - Not specified The speed will be deliveried according to the current environment
567 /// - Avaliable method is descriped as following in each environment. \n
568 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
569 /// In the following environment, if the unsupported method has been specified, \n
570 /// POS_RET_ERROR_PARAM will be returned.
572 /// \~english @retval POS_RET_NORMAL normal end
573 /// \~english @retval POS_RET_ERROR_PARAM parameter error
574 /// \~english @retval POS_RET_ERROR_BUFFULL the register count is full
575 /// \~english @retval POS_RET_ERROR_INNER internal error
576 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
577 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
579 /// \~english @par Precondition
580 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the Dispatcher for App \n
582 /// - Availability of service positioning is TRUE.
584 /// \~english @par change of internal status
585 /// - There is no change of internal status
587 /// \~english @par Failure condition
588 /// - The parameter ucDeliveryTiming is neither update(SENSOR_DELIVERY_TIMING_UPDATE) \n
589 /// nor change(SENSOR_DELIVERY_TIMING_CHANGE) [POS_RET_ERROR_PARAM]
590 /// - The parameter ucCtrlFlg is not register(SENSOR_DELIVERY_REGIST) [POS_RET_ERROR_PARAM]
591 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
592 /// - The parameter notifyName is NULL [POS_RET_ERROR_PARAM]
593 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
594 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
595 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
596 /// - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
597 /// - The event is created in system, but the count of reference is reach to max [POS_RET_ERROR_INNER]
598 /// - Memory allocate failed during the event table creation for event registering. [POS_RET_ERROR_INNER]
599 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
600 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
601 /// - After register the thread table in event table, the event flag has already been registered. \n
602 /// [POS_RET_ERROR_INNER]
603 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
604 /// - The event table is full during event creation. [POS_RET_ERROR_INNER]
605 /// - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
606 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
607 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
608 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
609 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
610 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
611 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
612 /// - ProcessNo has not been registered in message control table when message transfered between processes. \n
613 /// [POS_RET_ERROR_INNER]
614 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
615 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
616 /// - The destination process name size is larger than 20 characters when message transfer between processes.\n
617 /// [POS_RET_ERROR_INNER]
618 /// - The message queue name has not been registered in control table when message transfer between processes.\n
619 /// [POS_RET_ERROR_INNER]
620 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
621 /// - Message transfer HANDLE get failed from internal table when message transfered between processes. \n
622 /// [POS_RET_ERROR_INNER]
623 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
624 /// - Specified event HANDLE has not been registered in event HANDLE table during event waiting. \n
625 /// [POS_RET_ERROR_INNER]
626 /// - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
627 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
628 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
629 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
630 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
631 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
632 /// - Getting event timeout. [POS_RET_ERROR_INNER]
633 /// - Error happened during event getting. [POS_RET_ERROR_INNER]
634 /// - The result of positioning service is SENSOR_RET_ERROR_PARAM. [POS_RET_ERROR_PARAM]
635 /// - The result of positioning service is SENSOR_RET_ERROR_BUFFULL. [POS_RET_ERROR_BUFFULL]
636 /// - The result of positioning service is SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
637 /// - The result of positioning service is not SENSOR_RET_ERROR_PARAM and SENSOR_RET_ERROR_BUFFULL \n
638 /// and SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
640 /// \~english @par Detail
641 /// - Call this API to register speed delivery. \n
642 /// This API will finish when get the return value.
645 /// Please note the following points when use this API.
646 /// - Duplication registering
647 /// - The same destination thread name has already been registered
648 /// - The registered delivery data updated and normal return.(first delivery)
649 /// - To one delivery destination, the same data will not be duplication deliveried at same timing.
650 /// - After call this API, if the delivery destination thread name is changed, please call this API again.
653 /// Notification of message
654 /// - After registered successfully, vehicle sensor will send system API message with following format. \n
655 /// Command ID : @ref CID_POSIF_REGISTER_LISTENER_SPEED \n
656 /// message structure
659 /// SENSORMOTION_SPEEDINFO_DAT data; /* message data */
660 /// } SENSORMOTION_MSG_SPEEDINFO;
662 /// message data structure
665 /// uint8_t getMethod; /* get method */
666 /// uint8_t SyncCnt; /* synchrony count */
667 /// uint8_t isEnable; /* enable or not */
668 /// uint8_t Reserve1[3]; /* Reserve */
669 /// uint16_t Speed; /* speed(unit:0.01m/sec) */
670 /// uint8_t Reserve2[2]; /* Reserve */
671 /// } SENSORMOTION_SPEEDINFO_DAT;
673 /// - Get method(getMethod)
674 /// - SENSOR_GET_METHOD_POS - The speed calculated in positioning based on speed pulse will be deliveried.
675 /// - SENSOR_GET_METHOD_NAVI - speed from Navi
676 /// - Synchrony count(SyncCnt)
677 /// - 0 (not change).
678 /// - Enable or not(isEnable) \n
679 /// To describe this data is whether enable or not.
680 /// - 0 - not avaliable
681 /// - not 0 - avaliable
682 /// - Speed is invalid at following condition when speed pulse specified, so [not avaliable] provieded
683 /// - Immediately after system start, the sensor data have not been received from SYS micon
684 /// - If it is not initialization status, certainly provide [avaliable] when Navi data specified
685 /// - If the status is [not avaliable], data following can not be guaranteed.
687 /// - speed data(unit 0.01m/sec)
689 /// \~english @par Classification
692 /// \~english @par Type
698 ////////////////////////////////////////////////////////////////////////////////////////////
699 POS_RET_API POS_RegisterListenerSpeed(HANDLE hApp, PCSTR notifyName, uint8_t ucCtrlFlg, uint8_t ucDeliveryTiming,
700 uint8_t ucGetMethod);
702 ////////////////////////////////////////////////////////////////////////////////////////////
703 /// \ingroup tag_Positioning
704 /// \~english @par Brief
705 /// - Register heading delivery
707 /// \~english @param [in] hApp
708 /// - HANDLE - App Handle
709 /// \~english @param [in] notifyName
710 /// - PCSTR - Destination thread name
711 /// \~english @param [in] ucCtrlFlg
712 /// - uint8_t - Delivery control flag(register)
713 /// \~english @param [in] ucDeliveryTiming
714 /// - uint8_t - Delivery timing(change/update)
715 /// \~english @param [in] ucGetMethod
716 /// - uint8_t - Get method(GPS/Navi/Not specified)
719 /// - Delivery control flag(ucCtrlFlg)
720 /// - SENSOR_DELIVERY_REGIST - register
721 /// - Register specified heading delivery
722 /// - Please note that if the same data delivery has been registered for mutiple times, the data will \n
723 /// also be deliveried for registered mutiple times.
724 /// - The specified heading will be deliveried at registered time (first delivery).
725 /// - Delivery timing(ucDeliveryTiming)
726 /// - SENSOR_DELIVERY_TIMING_CHANGE - change. Specified heading will be deliveried only when it is changed.
727 /// - SENSOR_DELIVERY_TIMING_UPDATE - update. Specified heading will be deliveried when it is updated by \n
729 /// - Get method(ucGetMethod)
730 /// - SENSOR_GET_METHOD_GPS - GPS. The heading from GPS will be deliveried.
731 /// - SENSOR_GET_METHOD_AUTO - Not specified. The heading will be deliveried \n
732 /// according to the current environment
733 /// - Avaliable method is descriped as following in each environment. \n
734 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
735 /// In the following environment, if the unsupported method has been specified, \n
736 /// POS_RET_ERROR_PARAM will be returned.
738 /// \~english @retval POS_RET_NORMAL normal finish
739 /// \~english @retval POS_RET_ERROR_PARAM parameter error
740 /// \~english @retval POS_RET_ERROR_BUFFULL the register count is full
741 /// \~english @retval POS_RET_ERROR_INNER internal error
742 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
743 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
745 /// \~english @par Precondition
746 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the Dispatcher \n
747 /// for App are completed.
748 /// - Availability of positioning service is TRUE.
750 /// \~english @par changes of internal status
751 /// - There is no changes of internal status
753 /// \~english @par Failure condition
754 /// - The parameter ucDeliveryTiming is neither update(SENSOR_DELIVERY_TIMING_UPDATE) nor change \n
755 /// (SENSOR_DELIVERY_TIMING_CHANGE) [POS_RET_ERROR_PARAM]
756 /// - The parameter ucCtrlFlg is not register(SENSOR_DELIVERY_REGIST) [POS_RET_ERROR_PARAM]
757 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
758 /// - The parameter notifyName is NULL [POS_RET_ERROR_PARAM]
759 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
760 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
761 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
762 /// - The event is created in same process, but the count of reference is reach max [POS_RET_ERROR_INNER]
763 /// - The event is created in system, but the count of reference is reach to max [POS_RET_ERROR_INNER]
764 /// - Memory allocate failed during the event table creation for event registering. [POS_RET_ERROR_INNER]
765 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
766 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
767 /// - After register the thread table in event table, the event flag has already \n
768 /// been registered. [POS_RET_ERROR_INNER]
769 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
770 /// - The event table is full during event creation. [POS_RET_ERROR_INNER]
771 /// - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
772 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
773 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
774 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
775 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
776 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
777 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
778 /// - ProcessNo has not been registered in message control table when message transfered between processes. \n
779 /// [POS_RET_ERROR_INNER]
780 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
781 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
782 /// - The destination process name size is larger than 20 characters when message transfer \n
783 /// between processes. [POS_RET_ERROR_INNER]
784 /// - The message queue name has not been registered in control table when message transfer between \n
785 /// processes. [POS_RET_ERROR_INNER]
786 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
787 /// - Message transfer HANDLE get failed from internal table when message transfered between processes. \n
788 /// [POS_RET_ERROR_INNER]
789 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
790 /// - Specified event HANDLE has not been registered in event HANDLE table during event waiting. \n
791 /// [POS_RET_ERROR_INNER]
792 /// - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
793 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
794 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
795 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
796 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
797 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
798 /// - Getting event timeout. [POS_RET_ERROR_INNER]
799 /// - Error happened during event getting. [POS_RET_ERROR_INNER]
800 /// - The result of positioning service is SENSOR_RET_ERROR_PARAM. [POS_RET_ERROR_PARAM]
801 /// - The result of positioning service is SENSOR_RET_ERROR_BUFFULL. [POS_RET_ERROR_BUFFULL]
802 /// - The result of positioning service is SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
803 /// - The result of positioning service is not SENSOR_RET_ERROR_PARAM and SENSOR_RET_ERROR_BUFFULL \n
804 /// and SENSOR_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
806 /// \~english @par Detail
807 /// - Call this API to register heading delivery.
808 /// This API will finish when get the return value.
811 /// Please note the following points when use this API.
812 /// - Duplication registering
813 /// - The same destination thread name has already been registered
814 /// - The registered delivery data updated and normal return.(first delivery)
815 /// - To one delivery destination, the same data will not be duplication deliveried at same timing.
816 /// - After call this API, if the delivery destination thread name is changed, please call this API again.
819 /// Notification of message
820 /// - After registered successfully, vehicle sensor will send system API message with following format. \n
821 /// Command ID : @ref CID_POSIF_REGISTER_LISTENER_HEADING \n
822 /// message structure
825 /// SENSORMOTION_HEADINGINFO_DAT data; /* message data */
826 /// } SENSORMOTION_MSG_HEADINGINFO;
828 /// message data structure
831 /// uint8_t getMethod; /* get method */
832 /// uint8_t SyncCnt; /* sync count */
833 /// uint8_t isEnable; /* enable or not */
834 /// uint8_t posSts; /* position status */
835 /// uint8_t Reserve1[2]; /* Reserve */
836 /// uint16_t Heading; /* heading(unit:0.01degree) */
837 /// uint8_t Reserve2[2]; /* Reserve */
838 /// } SENSORMOTION_HEADINGINFO_DAT;
840 /// - Get method(getMethod)
841 /// - SENSOR_GET_METHOD_GPS - Heading from GPS
842 /// - SENSOR_GET_METHOD_NAVI - Heading from Navi
843 /// - Synchrony count(SyncCnt)
844 /// - Count for position data synchronous \n
845 /// When delivery altitude and heading data, position data can be synchronized by this count. \n
846 /// But the data of different method can not be synchronized by this count.\n
847 /// example 1: [longitude and latitude from GPS] and [heading from GPS] can be synchronized by the count. \n
848 /// example 2: [longitude and latitude from GPS] and [longitude and latitude from Navi] can not be \n
849 /// synchronized by the count. \n
850 /// Caution: The sensor count in sensor data delivery is another data.
851 /// - Enable or not(isEnable) \n
852 /// To describe this data is whether enable or not.
853 /// - 0 - not avaliable
854 /// - not 0 - avaliable
855 /// - Heading is invalid at following condition when GPS data specified, so [not avaliable] provieded \n
856 /// - Immediately after system start, GPS unit has not received current location data and GPS unit status \n
857 /// is not positioning fix
858 /// - If it is not initialization status, certainly provide [avaliable] when Navi data specified
859 /// - If the status is [not avaliable], data following can not be guaranteed.
860 /// - Position status(posSts)
861 /// - Bit0 : GPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_GSP)
862 /// - Bit1 : DGPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DGPS)
863 /// - Bit2 : DR data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DR)
864 /// - Bit3 : MapMatching data used result(1:used, 0:not used, definition of \n
865 /// maskbit:POS_LOC_INFO_USE_MAPMATCHING)
868 /// \~english @par Classification
871 /// \~english @par Type
877 ////////////////////////////////////////////////////////////////////////////////////////////
878 POS_RET_API POS_RegisterListenerHeading(HANDLE hApp, PCSTR notifyName, uint8_t ucCtrlFlg, uint8_t ucDeliveryTiming,
879 uint8_t ucGetMethod);
881 ////////////////////////////////////////////////////////////////////////////////////////////
882 /// \ingroup tag_Positioning
883 /// \~english @par Brief
884 /// - Get longitude and latitude information
886 /// \~english @param [in] hApp
887 /// - HANDLE - App Handle
888 /// \~english @param [out] dat
889 /// - SENSORLOCATION_LONLATINFO_DAT* - output pointer to longitude and latitude informaiton
890 /// \~english @param [in] ucGetMethod
891 /// - uint8_t - Get method(GPS/Navi/Not specified)
894 /// - Get method(ucGetMethod)
895 /// - SENSOR_GET_METHOD_GPS - GPS The longitude and latitude from GPS will be deliveried.
896 /// - SENSOR_GET_METHOD_NAVI - Navi The longitude and latitude from Navi will be deliveried.
897 /// - SENSOR_GET_METHOD_AUTO - Not specified The longitude and latitude will be deliveried \n
898 /// according to the current environment.
899 /// - Avaliable method is descriped as following in each environment. \n
900 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
901 /// In the following environment, if the unsupported method has been specified, \n
902 /// POS_RET_ERROR_PARAM will be returned.
904 /// - SENSORLOCATION_LONLATINFO_DAT structure
907 /// uint8_t getMethod; /* get method */
908 /// uint8_t SyncCnt; /* sync count */
909 /// uint8_t isEnable; /* enable or not */
910 /// uint8_t posSts; /* position status */
911 /// uint16_t posAcc; /* Position accuracy */
912 /// int32_t Longitude; /* Longitude */
913 /// int32_t Latitude; /* Latitude */
914 /// } SENSORLOCATION_LONLATINFO_DAT;
916 /// - Get method(getMethod)
917 /// - SENSOR_GET_METHOD_GPS - longitude and latitude from GPS
918 /// - SENSOR_GET_METHOD_NAVI - longitude and latitude from Navi
919 /// - Synchrony count(SyncCnt)
920 /// - Count for position data synchronous\n
921 /// When delivery altitude and heading data, position data can be synchronized by this count. \n
922 /// But the data of different method can not be synchronized by this count. \n
923 /// example 1: [longitude and latitude from GPS] and [heading from GPS] can be synchronized by this count. \n
924 /// example 2: [longitude and latitude from GPS] and [longitude and latitude from Navi] can not be \n
925 /// synchronized by this count. \n
926 /// Caution: The sensor count in sensor data delivery is another data.
927 /// - Enable or not(isEnable) \n
928 /// To describe this data is whether enable or not.
929 /// - 0 - not avaliable
930 /// - not 0 - avaliable
931 /// - longitude and latitude is invalid at following condition when GPS data specified, \n
932 /// so [not avaliable] provieded
933 /// - Immediately after system start, GPS unit has not received current location data and \n
934 /// GPS unit status is not positioning fix
935 /// - If it is not initialization status, certainly provide [avaliable] when Navi data specified\n
936 /// - If the status is [not avaliable], data following can not be guaranteed.
937 /// - Position status(posSts)
938 /// - Bit0 : GPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_GSP)
939 /// - Bit1 : DGPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DGPS)
940 /// - Bit2 : DR data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DR)
941 /// - Bit3 : MapMatching data used result(1:used, 0:not used, definition of \n
942 /// maskbit:POS_LOC_INFO_USE_MAPMATCHING)
943 /// - Position accuracy(posAcc)
944 /// - Detected accruray of current position:1LSB=1m
945 /// - Longitude : (WGS-84)(10^-7degree as 1) \n
946 /// East longitude is positive value and west longitude is minus value.
947 /// - Latitude : (WGS-84)(10^-7degree as 1)\n
948 /// North latitudeis positive value and south latitude is minus value.
950 /// \~english @retval POS_RET_NORMAL normal finish
951 /// \~english @retval POS_RET_ERROR_PARAM parameter error
952 /// \~english @retval POS_RET_ERROR_INNER internal error
953 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
954 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
956 /// \~english @par Precondition
957 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the Dispatcher \n
958 /// for App are completed.
959 /// - Availability of positioning service is TRUE.
961 /// \~english @par change of internal status
962 /// - There is no change of internal status
964 /// \~english @par Failure condition
965 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
966 /// - The parameter dat is NULL [POS_RET_ERROR_PARAM]
967 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
968 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
969 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
970 /// - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
971 /// - The event is created in system, but the count of reference is reach to max [POS_RET_ERROR_INNER]
972 /// - Memory allocate failed during the event table creation for event registering. [POS_RET_ERROR_INNER]
973 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
974 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
975 /// - After register the thread table in event table, the event flag has already been registered. \n
976 /// [POS_RET_ERROR_INNER]
977 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
978 /// - The event table is full during event creation. [POS_RET_ERROR_INNER]
979 /// - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
980 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
981 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
982 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
983 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
984 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
985 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
986 /// - The memory for storing semaphore control data allocate failed. [POS_RET_ERROR_INNER]
987 /// - Specified semaphore ID has not been registered when lock semaphore. [POS_RET_ERROR_INNER]
988 /// - Internal mutex HANDLE is NULL when lock mutex. [POS_RET_ERROR_INNER]
989 /// - Internal mutex HANDLE has not been registered in mutex table when lock mutex. [POS_RET_ERROR_INNER]
990 /// - The owner of specified mutex is not itself when lock mutex. [POS_RET_ERROR_INNER]
991 /// - Mutex has been multiple locked [POS_RET_ERROR_INNER]
992 /// - The HANDLE is NULL when getting usable share memory address. [POS_RET_ERROR_INNER]
993 /// - Can not get usable share memory address. [POS_RET_ERROR_INNER]
994 /// - Memory allocate failed for share memory map. [POS_RET_ERROR_INNER]
995 /// - Memory allocate failed for share memory management. [POS_RET_ERROR_INNER]
996 /// - Can not open share memory. [POS_RET_ERROR_INNER]
997 /// - Failed to mapping share memory. [POS_RET_ERROR_INNER]
998 /// - No empty field in share memory. [POS_RET_ERROR_INNER]
999 /// - Failed to guarantee share memory. [POS_RET_ERROR_INNER]
1000 /// - ProcessNo has not been registered in message control table when message transfered between processes. \n
1001 /// [POS_RET_ERROR_INNER]
1002 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
1003 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1004 /// - The destination process name size is larger than 20 characters when message transfer \n
1005 /// between processes. [POS_RET_ERROR_INNER]
1006 /// - The message queue name has not been registered in control table when message transfer \n
1007 /// between processes. [POS_RET_ERROR_INNER]
1008 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
1009 /// - Message transfer HANDLE get failed from internal table when message transfered between processes. \n
1010 /// [POS_RET_ERROR_INNER]
1011 /// - Message transfer failed between process. [POS_RET_ERROR_INNER]
1012 /// - Specified event HANDLE has not been registered in event HANDLE table during event waiting. \n
1013 /// [POS_RET_ERROR_INNER]
1014 /// - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
1015 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
1016 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
1017 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
1018 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
1019 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
1020 /// - The HANDLE is NULL when getting usable share memory address for accessing received data. \n
1021 /// [POS_RET_ERROR_INNER]
1022 /// - Can not get usable share memory address for accessing received data. [POS_RET_ERROR_INNER]
1023 /// - Memory for share memory map allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1024 /// - Memory for share memory management allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1025 /// - Can not open share memory for accessing received data. [POS_RET_ERROR_INNER]
1026 /// - Failed to mapping share memory for accessing received data. [POS_RET_ERROR_INNER]
1027 /// - The size of data stored in share memory is larger than the size of received data. [POS_RET_ERROR_INNER]
1028 /// - The result of getting sensor data get is POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
1029 /// - The result of getting sensor data get is not POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
1031 /// \~english @par Detail
1032 /// - Call this API to get longitude and latitude from vehicle sensor
1034 /// \~english @par Classification
1037 /// \~english @par Type
1041 /// - POS_RegisterListenerLonLat
1043 ////////////////////////////////////////////////////////////////////////////////////////////
1044 POS_RET_API POS_GetLonLat(HANDLE hApp, SENSORLOCATION_LONLATINFO_DAT *dat, uint8_t ucGetMethod);
1046 ////////////////////////////////////////////////////////////////////////////////////////////
1047 /// \ingroup tag_Positioning
1048 /// \~english @par Brief
1049 /// - Get altitude data
1051 /// \~english @param [in] hApp
1052 /// - HANDLE - App Handle
1053 /// \~english @param [out] dat
1054 /// - SENSORLOCATION_ALTITUDEINFO_DAT* - output pointer to altitude data
1055 /// \~english @param [in] ucGetMethod
1056 /// - uint8_t - Get method(GPS/Not specified)
1059 /// - Get method(ucGetMethod)
1060 /// - SENSOR_GET_METHOD_GPS - GPS The altitude from GPS will be deliveried.
1061 /// - SENSOR_GET_METHOD_AUTO - Not specified The altitude will be deliveried \n
1062 /// according to the current environment
1063 /// - Avaliable method is descriped as following in each environment. \n
1064 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
1065 /// In the following environment, if the unsupported method has been specified, \n
1066 /// POS_RET_ERROR_PARAM will be returned.
1068 /// - SENSORLOCATION_ALTITUDEINFO_DAT structure
1070 /// typedef struct {
1071 /// uint8_t getMethod; /* get method */
1072 /// uint8_t SyncCnt; /* sync count */
1073 /// uint8_t isEnable; /* enable or not */
1074 /// uint8_t Reserve[3]; /* Reserve */
1075 /// int32_t Altitude; /* Altitude(unit:0.01m) */
1076 /// } SENSORLOCATION_ALTITUDEINFO_DAT;
1078 /// - Get method(getMethod)
1079 /// - SENSOR_GET_METHOD_GPS - altitude from GPS
1080 /// - Synchrony count(SyncCnt)
1081 /// - Count for position data synchronous \n
1082 /// When delivery altitude and heading data, position data can be synchronized by this count. \n
1083 /// But the data of different method can not be synchronized by this count. \n
1084 /// example: [longitude and latitude from GPS] and [heading from GPS] can be synchronized by the count. \n
1085 /// synchronized by the count. \n
1086 /// Caution: The sensor count in sensor data delivery is another data.
1087 /// - Enable or not(isEnable)\n
1088 /// To describe this data is whether enable or not.
1089 /// - 0 - not avaliable
1090 /// - not 0 - avaliable
1091 /// - Altitude is invalid at following condition when GPS data specified, so [not avaliable] provieded
1092 /// - Immediately after system start, GPS unit has not received current location data and GPS unit \n
1093 /// status is not positioning fix
1094 /// - If the status is [not avaliable], data following can not be guaranteed.
1096 /// - altitude data(unit 0.01m)
1098 /// \~english @retval POS_RET_NORMAL normal finish
1099 /// \~english @retval POS_RET_ERROR_PARAM parameter error
1100 /// \~english @retval POS_RET_ERROR_INNER internal error
1101 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
1102 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
1104 /// \~english @par Precondition
1105 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of \n
1106 /// the Dispatcher for App are completed.
1107 /// - Availability of positioning service is TRUE.
1109 /// \~english @par changes of internal status
1110 /// - There is no changes of internal status
1112 /// \~english @par Failure condition
1113 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
1114 /// - The parameter dat is NULL [POS_RET_ERROR_PARAM]
1115 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
1116 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
1117 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
1118 /// - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
1119 /// - The event is created in system, but the count of reference is reach to max [POS_RET_ERROR_INNER]
1120 /// - Memory allocate falied during the event table creation for event registering. [POS_RET_ERROR_INNER]
1121 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
1122 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
1123 /// - After register the thread table in event table, the event flag has already been \n
1124 /// registered. [POS_RET_ERROR_INNER]
1125 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
1126 /// - The event table is full during event creation. [POS_RET_ERROR_INNER]
1127 /// - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
1128 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
1129 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
1130 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
1131 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
1132 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
1133 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
1134 /// - The memory for storing semaphore control data allocate failed. [POS_RET_ERROR_INNER]
1135 /// - Specified semaphore ID has not been registered when lock semaphore. [POS_RET_ERROR_INNER]
1136 /// - Internal mutex HANDLE is NULL when lock mutex. [POS_RET_ERROR_INNER]
1137 /// - Internal mutex HANDLE has not been registered in mutex table when lock mutex. [POS_RET_ERROR_INNER]
1138 /// - The owner of specified mutex is not itself when lock mutex. [POS_RET_ERROR_INNER]
1139 /// - Mutex has been multiple locked [POS_RET_ERROR_INNER]
1140 /// - The HANDLE is NULL when getting usable share memory address. [POS_RET_ERROR_INNER]
1141 /// - Can not get usable share memory address. [POS_RET_ERROR_INNER]
1142 /// - Memory allocate failed for share memory map. [POS_RET_ERROR_INNER]
1143 /// - Memory allocate failed for share memory management. [POS_RET_ERROR_INNER]
1144 /// - Can not open share memory. [POS_RET_ERROR_INNER]
1145 /// - Failed to mapping share memory. [POS_RET_ERROR_INNER]
1146 /// - No empty field in share memory. [POS_RET_ERROR_INNER]
1147 /// - Failed to guarantee share memory. [POS_RET_ERROR_INNER]
1148 /// - ProcessNo has not been registered in message control table when message \n
1149 /// transfered between processes. [POS_RET_ERROR_INNER]
1150 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
1151 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1152 /// - The destination process name size is larger than 20 characters when message transfer \n
1153 /// between processes. [POS_RET_ERROR_INNER]
1154 /// - The message queue name has not been registered in control table when message \n
1155 /// transfer between processes. [POS_RET_ERROR_INNER]
1156 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
1157 /// - Message transfer HANDLE get failed from internal table when message transfered \n
1158 /// between processes. [POS_RET_ERROR_INNER]
1159 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1160 /// - Specified event HANDLE has not been registered in event HANDLE table during \n
1161 /// event waiting. [POS_RET_ERROR_INNER]
1162 /// - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
1163 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
1164 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
1165 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
1166 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
1167 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
1168 /// - The HANDLE is NULL when getting usable share memory address for accessing
1169 /// received data. [POS_RET_ERROR_INNER]
1170 /// - Can not get usable share memory address for accessing received data. [POS_RET_ERROR_INNER]
1171 /// - Memory for share memory map allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1172 /// - Memory for share memory management allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1173 /// - Can not open share memory for accessing received data. [POS_RET_ERROR_INNER]
1174 /// - Failed to mapping share memory for accessing received data. [POS_RET_ERROR_INNER]
1175 /// - The size of data stored in share memory is larger than the size of received data. [POS_RET_ERROR_INNER]
1176 /// - The result of getting sensor data is POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
1177 /// - The result of getting sensor data is not POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
1179 /// \~english @par Detail
1180 /// - Call this API to get altitude from vehicle sensor
1182 /// \~english @par Classification
1185 /// \~english @par Type
1189 /// - POS_RegisterListenerAltitude
1190 ////////////////////////////////////////////////////////////////////////////////////////////
1191 POS_RET_API POS_GetAltitude(HANDLE hApp, SENSORLOCATION_ALTITUDEINFO_DAT *dat, uint8_t ucGetMethod);
1193 ////////////////////////////////////////////////////////////////////////////////////////////
1194 /// \ingroup tag_Positioning
1195 /// \~english @par Brief
1196 /// - Get speed data
1198 /// \~english @param [in] hApp
1199 /// - HANDLE - App Handle
1200 /// \~english @param [out] dat
1201 /// - SENSORMOTION_SPEEDINFO_DAT* - output buffer pointer to store speed data
1202 /// \~english @param [in] ucGetMethod
1203 /// - uint8_t - Get method(POS/Navi/Not specified)
1206 /// - Get method(ucGetMethod)
1207 /// - SENSOR_GET_METHOD_POS - The speed calculated in positioning based on speed pulse will be deliveried.
1208 /// - SENSOR_GET_METHOD_NAVI - Navi The speed from Navi will be deliveried.
1209 /// - SENSOR_GET_METHOD_AUTO - Not specified The speed will be deliveried according to current \n
1211 /// - Avaliable method is descriped as following in each environment. \n
1212 /// In the following environment, if the SENSOR_GET_METHOD_AUTO is set,treated as default \n
1213 /// In the following environment, if the unsupported method has been specified, \n
1214 /// POS_RET_ERROR_PARAM will be returned.
1217 /// - SENSORMOTION_SPEEDINFO_DAT structure
1219 /// typedef struct {
1220 /// uint8_t getMethod; /* get method */
1221 /// uint8_t SyncCnt; /* sync count */
1222 /// uint8_t isEnable; /* enable or not */
1223 /// uint8_t Reserve1[3]; /* Reserve */
1224 /// uint16_t Speed; /* speed(unit:0.01m/sec) */
1225 /// uint8_t Reserve2[2]; /* Reserve */
1226 /// } SENSORMOTION_SPEEDINFO_DAT;
1228 /// - Get method(getMethod)
1229 /// - SENSOR_GET_METHOD_POS - The speed calculated in positioning based on speed pulse will be deliveried.
1230 /// - Sync count(SyncCnt)
1232 /// - Enable or not(isEnable) \n
1233 /// To describe this data is whether enable or not.
1234 /// - 0 - not avaliable
1235 /// - not 0 - avaliable
1236 /// - Speed is invalid at following condition when speed pulse specified, so [not avaliable] provieded
1237 /// - Immediately after system start, the sensor data have not been received from SYS micon
1238 /// - If it is not initialization status, certainly provide [avaliable] when Navi data specified
1239 /// - If the status is [not avaliable], data following can not be guaranteed.
1241 /// - speed data(unit 0.01m/sec)
1243 /// \~english @retval POS_RET_NORMAL normal finish
1244 /// \~english @retval POS_RET_ERROR_PARAM parameter error
1245 /// \~english @retval POS_RET_ERROR_INNER internal error
1246 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
1247 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
1249 /// \~english @par Precondition
1250 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) \n
1251 /// of the dispatcher for App are completed.
1252 /// - Availability of positioning service is TRUE.
1254 /// \~english @par changes of internal status
1255 /// - There is no changes of internal status
1257 /// \~english @par Failure condition
1258 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
1259 /// - The parameter dat is NULL [POS_RET_ERROR_PARAM]
1260 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
1261 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
1262 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
1263 /// - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
1264 /// - The event is created in system, but the count of reference is reach to max [POS_RET_ERROR_INNER]
1265 /// - Memory allocate falied when the event table creation that for event registering. [POS_RET_ERROR_INNER]
1266 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
1267 /// - Memory allocate failed in event table when the thread table creation. [POS_RET_ERROR_INNER]
1268 /// - After register the thread table in event table, the event flag has already been \n
1269 /// registered. [POS_RET_ERROR_INNER]
1270 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
1271 /// - The event table is full when event creation. [POS_RET_ERROR_INNER]
1272 /// - The memory for event HANDLE allocate failed when event table creation. [POS_RET_ERROR_INNER]
1273 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
1274 /// - In event table, to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
1275 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
1276 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
1277 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
1278 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
1279 /// - The memory for storing semaphore control data allocate failed. [POS_RET_ERROR_INNER]
1280 /// - Specified semaphore ID has not been registered when semaphore lock. [POS_RET_ERROR_INNER]
1281 /// - Internal mutex HANDLE is NULL when mutex lock. [POS_RET_ERROR_INNER]
1282 /// - Internal mutex HANDLE has not been registered in mutex table when mutex lock. [POS_RET_ERROR_INNER]
1283 /// - The owner of specified mutex is not itself when mutex lock. [POS_RET_ERROR_INNER]
1284 /// - Mutex has been multiple locked [POS_RET_ERROR_INNER]
1285 /// - The HANDLE is NULL when getting usable share memory address. [POS_RET_ERROR_INNER]
1286 /// - Can not get usable share memory address. [POS_RET_ERROR_INNER]
1287 /// - Memory allocate failed for share memory map. [POS_RET_ERROR_INNER]
1288 /// - Memory allocate failed for share memory management. [POS_RET_ERROR_INNER]
1289 /// - Can not open share memory. [POS_RET_ERROR_INNER]
1290 /// - Failed to mapping share memory. [POS_RET_ERROR_INNER]
1291 /// - No empty field in share memory. [POS_RET_ERROR_INNER]
1292 /// - Failed to guarantee share memory. [POS_RET_ERROR_INNER]
1293 /// - ProcessNo has not been registered in message control table when message transfered \n
1294 /// between processes. [POS_RET_ERROR_INNER]
1295 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
1296 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1297 /// - The destination process name size is larger than 20 characters when message transfer \n
1298 /// between processes. [POS_RET_ERROR_INNER]
1299 /// - The message queue name has not been registered in control table when message transfer \n
1300 /// between processes [POS_RET_ERROR_INNER]
1301 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
1302 /// - Message transfer HANDLE get failed from internal table when message transfered between \n
1303 /// processes. [POS_RET_ERROR_INNER]
1304 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1305 /// - Specified event HANDLE has not been registered in event HANDLE table during event \n
1306 /// waiting. [POS_RET_ERROR_INNER]
1307 /// - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
1308 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
1309 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
1310 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
1311 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
1312 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
1313 /// - The HANDLE is NULL when getting usable share memory address for accessing \n
1314 /// received data. [POS_RET_ERROR_INNER]
1315 /// - Can not get usable share memory address for accessing received data. [POS_RET_ERROR_INNER]
1316 /// - Memory for share memory map allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1317 /// - Memory for share memory management allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1318 /// - Can not open share memory for accessing received data. [POS_RET_ERROR_INNER]
1319 /// - Failed to mapping share memory for accessing received data. [POS_RET_ERROR_INNER]
1320 /// - The size of data stored in share memory is larger than the size of received data. [POS_RET_ERROR_INNER]
1321 /// - The result of getting sensor data is POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
1322 /// - The result of getting sensor data is not POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
1324 /// \~english @par Detail
1325 /// - Call this API to get speed from vehicle sensor.
1327 /// \~english @par Classification
1330 /// \~english @par Type
1334 /// - POS_RegisterListenerSpeed
1336 ////////////////////////////////////////////////////////////////////////////////////////////
1337 POS_RET_API POS_GetSpeed(HANDLE hApp, SENSORMOTION_SPEEDINFO_DAT *dat, uint8_t ucGetMethod);
1339 ////////////////////////////////////////////////////////////////////////////////////////////
1340 /// \ingroup tag_Positioning
1341 /// \~english @par Brief
1342 /// - Get heading data
1344 /// \~english @param [in] hApp
1345 /// - HANDLE - App Handle
1346 /// \~english @param [out] dat
1347 /// - SENSORMOTION_HEADINGINFO_DAT* - output buffer pointer to store heading data
1348 /// \~english @param [in] ucGetMethod
1349 /// - uint8_t - Get method(GPS/Navi/Not specified)
1352 /// - Get method(ucGetMethod)
1353 /// - SENSOR_GET_METHOD_GPS - GPS The heading from GPS will be deliveried.
1354 /// - SENSOR_GET_METHOD_NAVI - Navi The heading from Navi will be deliveried.
1355 /// - SENSOR_GET_METHOD_AUTO - Not specified The heading which most suitable in current environment \n
1356 /// - Avaliable method is descriped as following in each environment. \n
1357 /// In corresponding environment, the SENSOR_GET_METHOD_AUTO is set as default. \n
1358 /// In corresponding environment, if the unsupported method has been specified, \n
1359 /// POS_RET_ERROR_PARAM will be returned.
1361 /// - SENSORMOTION_HEADINGINFO_DAT structure
1363 /// typedef struct {
1364 /// uint8_t getMethod; /* get method */
1365 /// uint8_t SyncCnt; /* sync count */
1366 /// uint8_t isEnable; /* enable or not */
1367 /// uint8_t posSts; /* position status */
1368 /// uint8_t Reserve1[2]; /* Reserve */
1369 /// uint16_t Heading; /* heading(unit:0.01degree) */
1370 /// uint8_t Reserve2[2]; /* Reserve */
1371 /// } SENSORMOTION_HEADINGINFO_DAT;
1373 /// - Get method(getMethod)
1374 /// - SENSOR_GET_METHOD_GPS - Heading from GPS
1375 /// - SENSOR_GET_METHOD_NAVI - Heading from Navi
1376 /// - Synchrony count(SyncCnt)
1377 /// - Count for position data synchronous \n
1378 /// When delivery altitude and heading data, position data can be synchronized by this count. \n
1379 /// But the data of different method can not be synchronized by this count. \n
1380 /// example 1: [longitude and latitude from GPS] and [heading from GPS] can be synchronized by the count. \n
1381 /// example 2: [longitude and latitude from GPS] and [longitude and latitude from Navi] can not be \n
1382 /// synchronized by the count. \n
1383 /// Caution: The sensor count in sensor data delivery is another data.
1384 /// - Enable or not(isEnable) \n
1385 /// To describe this data is whether enable or not.
1386 /// - 0 - not avaliable
1387 /// - not 0 - avaliable
1388 /// - Heading is invalid at following condition when GPS data specified, so [not avaliable] provieded
1389 /// - Immediately after system start, GPS unit has not received current location data and GPS unit \n
1390 /// status is not positioning fix
1391 /// - If it is not initialization status, certainly provide [avaliable] when Navi data specified
1392 /// - If the status is [not avaliable], data following can not be guaranteed.
1393 /// - Position status(posSts)
1394 /// - Bit0 : GPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_GSP)
1395 /// - Bit1 : DGPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DGPS)
1396 /// - Bit2 : DR data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DR)
1397 /// - Bit3 : MapMatching data use result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_MAPMATCHING)
1400 /// \~english @retval POS_RET_NORMAL normal finish
1401 /// \~english @retval POS_RET_ERROR_PARAM parameter error
1402 /// \~english @retval POS_RET_ERROR_INNER internal error
1403 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
1404 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
1406 /// \~english @par Precondition
1407 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the Dispatcher
1408 /// - for App are completed.
1409 /// - Availability of positioning service is TRUE.
1411 /// \~english @par changes of internal status
1412 /// - There is no changes of internal status
1414 /// \~english @par Failure condition
1415 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
1416 /// - The parameter dat is NULL [POS_RET_ERROR_PARAM]
1417 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
1418 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
1419 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
1420 /// - The event is created in same process, but the count of reference is reach to max [POS_RET_ERROR_INNER]
1421 /// - The event is created in system, but the count of reference is reach to max [POS_RET_ERROR_INNER]
1422 /// - Memory allocate falied during the event table creation for event registering. [POS_RET_ERROR_INNER]
1423 /// - The thread can not register in the event table. [POS_RET_ERROR_INNER]
1424 /// - Memory allocate failed in event table during the thread table creation. [POS_RET_ERROR_INNER]
1425 /// - After register the thread table in event table, the event flag has already been \n
1426 /// registered. [POS_RET_ERROR_INNER]
1427 /// - After register the thread table in event table, the event flag register failed. [POS_RET_ERROR_INNER]
1428 /// - The event table is full during event creation. [POS_RET_ERROR_INNER]
1429 /// - The memory for event HANDLE allocate failed during event table creation. [POS_RET_ERROR_INNER]
1430 /// - The thread can not be registered in event table. [POS_RET_ERROR_INNER]
1431 /// - In event table, try to allocate the memory of the thread table creation, but failed. [POS_RET_ERROR_INNER]
1432 /// - After register the thread in event table, the event flag has already been registered. [POS_RET_ERROR_INNER]
1433 /// - After register the thread in event table, the event flag register failed. [POS_RET_ERROR_INNER]
1434 /// - Specified event ID has not been registered in table. [POS_RET_ERROR_INNER]
1435 /// - Initialize event object failed. [POS_RET_ERROR_INNER]
1436 /// - The memory for storing semaphore control data allocate failed. [POS_RET_ERROR_INNER]
1437 /// - Specified semaphore ID has not been registered when semaphore lock. [POS_RET_ERROR_INNER]
1438 /// - Internal mutex HANDLE is NULL when mutex lock. [POS_RET_ERROR_INNER]
1439 /// - Internal mutex HANDLE has not been registered in mutex table when mutex lock. [POS_RET_ERROR_INNER]
1440 /// - The owner of specified mutex is not itself when mutex lock. [POS_RET_ERROR_INNER]
1441 /// - Mutex has been multiple locked [POS_RET_ERROR_INNER]
1442 /// - The HANDLE is NULL when getting usable share memory address. [POS_RET_ERROR_INNER]
1443 /// - Can not get usable share memory address. [POS_RET_ERROR_INNER]
1444 /// - Memory allocate failed for share memory map. [POS_RET_ERROR_INNER]
1445 /// - Memory allocate failed for share memory management. [POS_RET_ERROR_INNER]
1446 /// - Can not open share memory. [POS_RET_ERROR_INNER]
1447 /// - Failed to mapping share memory. [POS_RET_ERROR_INNER]
1448 /// - No empty field in share memory. [POS_RET_ERROR_INNER]
1449 /// - Failed to guarantee share memory. [POS_RET_ERROR_INNER]
1450 /// - ProcessNo has not been registered in message control table when message transfered \n
1451 /// between processes. [POS_RET_ERROR_INNER]
1452 /// - Message transfer HANDLE get failed when message transfered between processes. [POS_RET_ERROR_INNER]
1453 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1454 /// - The destination process name size is larger than 20 characters when message transfer \n
1455 /// between processes. [POS_RET_ERROR_INNER]
1456 /// - The message queue name has not been registered in control table when message transfer \n
1457 /// between processes. [POS_RET_ERROR_INNER]
1458 /// - Message transfer HANDLE create failed when message transfered between processes. [POS_RET_ERROR_INNER]
1459 /// - Message transfer HANDLE get failed from internal table when message transfered between \n
1460 /// processes. [POS_RET_ERROR_INNER]
1461 /// - Message transfer failed between processes. [POS_RET_ERROR_INNER]
1462 /// - Specified event HANDLE has not been registered in event HANDLE table \n
1463 /// during event waiting[POS_RET_ERROR_INNER]
1464 /// - The count of thread is reach to max in event management table during event waiting. [POS_RET_ERROR_INNER]
1465 /// - The EV_FLAG_BIT is not set in flagID during event getting. [POS_RET_ERROR_INNER]
1466 /// - The ID of message event queue has not been created during event getting. [POS_RET_ERROR_INNER]
1467 /// - The flagID has not been registered during event getting. [POS_RET_ERROR_INNER]
1468 /// - The interruption happened during event getting [POS_RET_ERROR_INNER]
1469 /// - Whatever error happened during event getting. [POS_RET_ERROR_INNER]
1470 /// - The HANDLE is NULL when getting usable share memory address for accessing received \n
1471 /// data. [POS_RET_ERROR_INNER]
1472 /// - Can not get usable share memory address for accessing received data. [POS_RET_ERROR_INNER]
1473 /// - Memory for share memory map allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1474 /// - Memory for share memory management allocate failed for accessing received data. [POS_RET_ERROR_INNER]
1475 /// - Can not open share memory for accessing received data. [POS_RET_ERROR_INNER]
1476 /// - Failed to mapping share memory for accessing received data. [POS_RET_ERROR_INNER]
1477 /// - The size of data stored in share memory is larger than the size of received data. [POS_RET_ERROR_INNER]
1478 /// - The result of getting sensor data is POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_RESOURCE]
1479 /// - The result of getting sensor data is not POS_RET_ERROR_RESOURCE. [POS_RET_ERROR_INNER]
1481 /// \~english @par Detail
1482 /// - Call this API to get heading from vehicle sensor.
1484 /// \~english @par Classification
1487 /// \~english @par Type
1491 /// - POS_RegisterListenerHeading
1493 ////////////////////////////////////////////////////////////////////////////////////////////
1494 POS_RET_API POS_GetHeading(HANDLE hApp, SENSORMOTION_HEADINGINFO_DAT *dat, uint8_t ucGetMethod);
1496 ////////////////////////////////////////////////////////////////////////////////////////////
1497 /// \ingroup tag_Positioning
1498 /// \~english @par Brief
1499 /// - Set speed information
1501 /// \~english @param [in] hApp
1502 /// - HANDLE - App Handle
1503 /// \~english @param [in] navispeed
1504 /// - uint16_t - speed data[unit: 1.0km/h]
1506 /// \~english @retval POS_RET_NORMAL normal finish
1507 /// \~english @retval POS_RET_ERROR_PARAM parameter error
1508 /// \~english @retval POS_RET_ERROR_INNER internal error
1509 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
1510 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
1512 /// \~english @par Precondition
1513 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of \n
1514 /// the Dispatcher for App are completed.
1515 /// - Availability of positioning service is TRUE.
1517 /// \~english @par changes of internal status
1518 /// - There is no changes of internal status
1520 /// \~english @par Failure condition
1521 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
1522 /// - The data size is larger than specified value(POS_MSG_INFO_DSIZE) [POS_RET_ERROR_RESOURCE]
1523 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
1524 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
1525 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
1526 /// - The message queue name has not been registered in control table. [POS_RET_ERROR_INNER]
1527 /// - Message transfer HANDLE create failed. [POS_RET_ERROR_INNER]
1528 /// - Message transfer HANDLE get failed from internal table. [POS_RET_ERROR_INNER]
1529 /// - Speed data setting message transfer failed. [POS_RET_ERROR_INNER]
1531 /// \~english @par Detail
1532 /// - Call this API to set speed to vehicle sensor. \n
1533 /// This API will finish when get the return value. \n
1534 /// The speed set by this API is saved in positioning as the speed calculated by Navi.
1537 /// - Please note the following points when use this API.
1538 /// - This API is only called by Navi proxy.
1540 /// \~english @par Classification
1543 /// \~english @par Type
1544 /// - Fire and Forget
1549 ////////////////////////////////////////////////////////////////////////////////////////////
1550 POS_RET_API POS_SetSpeedInfo(HANDLE hApp, uint16_t navispeed);
1552 ////////////////////////////////////////////////////////////////////////////////////////////
1553 /// \ingroup tag_Positioning
1554 /// \~english @par Brief
1555 /// - Set location information
1557 /// \~english @param [in] hApp
1558 /// - HANDLE - App Handle
1559 /// \~english @param [in] pstPosData
1560 /// - POS_POSDATA * - pointer to location information
1563 /// - POS_POSDATA structure
1567 /// int8_t status; /* data status */
1568 /// uint8_t posSts; /* position status */
1569 /// uint16_t posAcc; /* Position accuracy 1LSB=1m */
1570 /// int32_t Longitude; /* Longitude(unit:1/128sec) */
1571 /// int32_t Latitude; /* Latitude(unit:1/128sec) */
1572 /// int32_t altitude; /* altitude (unit:0.01m) */
1573 /// int16_t heading; /* heading (unit:1degree) */
1574 /// uint8_t reserved[2]; /* reserve */
1579 /// - data status(status) \n
1580 /// Do not set the invalid data(do not update data).
1581 /// - data valid/invalid status
1582 /// - Bit0 : latitude(1:valid, 0:invalid, definition of maskbit:POS_LOC_INFO_LAT)
1583 /// - Bit1 : longitude(1:valid, 0:invalid, definition of maskbit:POS_LOC_INFO_LON)
1584 /// - Bit2 : altitude (1:valid, 0:invalid, definition of maskbit:POS_LOC_INFO_ALT)
1585 /// - Bit3 : heading (1:valid, 0:invalid, definition of maskbit:POS_LOC_INFO_HEAD)
1586 /// - Bit4~7 : reserve
1587 /// - Position status(posSts)
1588 /// - Bit0 : GPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_GSP)
1589 /// - Bit1 : DGPS data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DGPS)
1590 /// - Bit2 : DR data used result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_DR)
1591 /// - Bit3 : MapMatching data use result(1:used, 0:not used, definition of maskbit:POS_LOC_INFO_USE_MAPMATCHING)
1592 /// - Bit4~7 : reserve
1593 /// - Position accuracy(posAcc)
1594 /// - Detected accruray of current position:1LSB=1m
1596 /// - data range: -180deg ~ +180deg
1597 /// - +: east longitude -: west longitude
1599 /// - data range:-90deg ~ +90deg
1600 /// - +: north latitude -: south latitude
1602 /// - data range:-179deg ~ +180deg
1603 /// - Based on north, west(counter-clockwise) is +, east(clockwise) is -
1605 /// \~english @retval POS_RET_NORMAL normal finish
1606 /// \~english @retval POS_RET_ERROR_PARAM parameter error
1607 /// \~english @retval POS_RET_ERROR_INNER internal error
1608 /// \~english @retval POS_RET_ERROR_NOSUPPORT unsupported
1609 /// \~english @retval POS_RET_ERROR_RESOURCE lack of resource
1611 /// \~english @par Precondition
1612 /// - The creation/initialization(FrameworkunifiedCreateDispatcherWithoutLoop and etc.) of the Dispatcher \n
1613 /// for App are completed.
1614 /// - Availability of positioning service is TRUE.
1616 /// \~english @par change of internal status
1617 /// - There is no change of internal status
1619 /// \~english @par Failure condition
1620 /// - The parameter pstPosData is NULL [POS_RET_ERROR_PARAM]
1621 /// - The parameter hApp is NULL [POS_RET_ERROR_PARAM]
1622 /// - The data status in parameter pstPosData is invalid value(0). [POS_RET_ERROR_PARAM]
1623 /// - The data status in parameter pstPosData is abnormal value(<15). [POS_RET_ERROR_PARAM]
1624 /// - The data size is larger than specified value(POS_MSG_INFO_DSIZE) [POS_RET_ERROR_RESOURCE]
1625 /// - The count of message in message queue is reach to max [POS_RET_ERROR_RESOURCE]
1626 /// - The count of mutex is reach to max [POS_RET_ERROR_RESOURCE]
1627 /// - The count of item in ProcessName-ProcessNo convert table is reach to max [POS_RET_ERROR_RESOURCE]
1628 /// - The message queue name has not been registered in control table. [POS_RET_ERROR_INNER]
1629 /// - Message transfer HANDLE create failed. [POS_RET_ERROR_INNER]
1630 /// - Message transfer HANDLE get failed from internal table. [POS_RET_ERROR_INNER]
1631 /// - Location data setting message transfer failed. [POS_RET_ERROR_INNER]
1633 /// \~english @par Detail
1634 /// - Call this API to set location to vehicle sensor. \n
1635 /// This API will finish when get the return value. \n
1636 /// The location set by this API is saved in positioning as the location calculated by Navi. \n
1637 /// If one of longitude and latitude is valid, the another data will be used as valid data no \n
1638 /// matter what status it is. \n
1639 /// If one of longitude and latitude is valid, the position accuracy data will be used as valid data.
1642 /// - Please note the following points when use this API.
1643 /// - This API is only called by Navi proxy.
1645 /// \~english @par Classification
1648 /// \~english @par Type
1649 /// - Fire and Forget
1654 ////////////////////////////////////////////////////////////////////////////////////////////
1655 POS_RET_API POS_SetLocationInfo(HANDLE hApp, POS_POSDATA* pstPosData);
1660 /** @}*/ // end of positioning
1661 /** @}*/ // end of vehicle_service
1662 /** @}*/ // end of BaseSystem
1663 #endif // POSITIONING_CLIENT_INCLUDE_VEHICLE_SERVICE_POS_COMMON_API_H_