All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_pos_sample_interface.h File Reference
#include "legato.h"
#include "le_pos_interface.h"

Go to the source code of this file.

Functions

void le_pos_sample_StartClient (const char *serviceInstanceName)
 
void le_pos_sample_StopClient (void)
 
le_result_t le_pos_sample_Get2DLocation (le_pos_SampleRef_t positionSampleRef, int32_t *latitudePtr, int32_t *longitudePtr, int32_t *horizontalAccuracyPtr)
 
le_result_t le_pos_sample_GetAltitude (le_pos_SampleRef_t positionSampleRef, int32_t *altitudePtr, int32_t *altitudeAccuracyPtr)
 
le_result_t le_pos_sample_GetHorizontalSpeed (le_pos_SampleRef_t positionSampleRef, uint32_t *hspeedPtr, int32_t *hspeedAccuracyPtr)
 
le_result_t le_pos_sample_GetVerticalSpeed (le_pos_SampleRef_t positionSampleRef, int32_t *vspeedPtr, int32_t *vspeedAccuracyPtr)
 
le_result_t le_pos_sample_GetHeading (le_pos_SampleRef_t positionSampleRef, int32_t *headingPtr, int32_t *headingAccuracyPtr)
 
le_result_t le_pos_sample_GetDirection (le_pos_SampleRef_t positionSampleRef, int32_t *directionPtr, int32_t *directionAccuracyPtr)
 
void le_pos_sample_Release (le_pos_SampleRef_t positionSampleRef)
 

Detailed Description

Legato Positioning Service include file.

Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.

Function Documentation

le_result_t le_pos_sample_Get2DLocation ( le_pos_SampleRef_t  positionSampleRef,
int32_t *  latitudePtr,
int32_t *  longitudePtr,
int32_t *  horizontalAccuracyPtr 
)

Get the position sample's 2D location (latitude, longitude, horizontal accuracy).

Returns
LE_FAULT Function failed to find the positionSample.
LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
LE_OK Function succeeded.
Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
latitudePtr, longitudePtr, horizontalAccuracyPtr can be set to NULL if not needed.
Parameters
[in]positionSampleRefPosition sample's reference.
[out]latitudePtrLatitude in degrees.
[out]longitudePtrLongitude in degrees.
[out]horizontalAccuracyPtrHorizontal's accuracy estimate in metres.
le_result_t le_pos_sample_GetAltitude ( le_pos_SampleRef_t  positionSampleRef,
int32_t *  altitudePtr,
int32_t *  altitudeAccuracyPtr 
)

Get the position sample's altitude.

Returns
LE_FAULT Function failed to find the positionSample.
LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
LE_OK Function succeeded.
Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
altitudePtr, altitudeAccuracyPtr can be set to NULL if not needed.
Parameters
[in]positionSampleRefPosition sample's reference.
[out]altitudePtrAltitude in metres.
[out]altitudeAccuracyPtrAltitude's accuracy estimate in metres.
le_result_t le_pos_sample_GetDirection ( le_pos_SampleRef_t  positionSampleRef,
int32_t *  directionPtr,
int32_t *  directionAccuracyPtr 
)

Get the position sample's direction. Direction of movement is the direction that the vehicle/person is actually moving.

Returns
LE_FAULT Function failed to find the positionSample.
LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
LE_OK Function succeeded.
Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
directionPtr, directionAccuracyPtr can be set to NULL if not needed.
Parameters
[in]positionSampleRefPosition sample's reference.
[out]directionPtrDirection in degrees (where 0 is True North).
[out]directionAccuracyPtrDirection's accuracy estimate in degrees.
le_result_t le_pos_sample_GetHeading ( le_pos_SampleRef_t  positionSampleRef,
int32_t *  headingPtr,
int32_t *  headingAccuracyPtr 
)

Get the position sample's heading. Heading is the direction that the vehicle/person is facing.

Returns
LE_FAULT Function failed to find the positionSample.
LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX).
LE_OK TFunction succeeded.
Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
headingPtr, headingAccuracyPtr can be set to NULL if not needed.
Parameters
[in]positionSampleRefPosition sample's reference.
[out]headingPtrHeading in degrees (where 0 is True North).
[out]headingAccuracyPtrHeading's accuracy estimate in degrees.
le_result_t le_pos_sample_GetHorizontalSpeed ( le_pos_SampleRef_t  positionSampleRef,
uint32_t *  hspeedPtr,
int32_t *  hspeedAccuracyPtr 
)

Get the position sample's horizontal speed.

Returns
LE_FAULT Function failed to find the positionSample.
LE_OUT_OF_RANGE One of the retrieved parameter is invalid (set to INT32_MAX, UINT32_MAX).
LE_OK Function succeeded.
Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
hSpeedPtr, hSpeedAccuracyPtr can be set to NULL if not needed.
Parameters
[in]positionSampleRefPosition sample's reference.
[out]hspeedPtrHorizontal speed.
[out]hspeedAccuracyPtrHorizontal speed's accuracy estimate.
le_result_t le_pos_sample_GetVerticalSpeed ( le_pos_SampleRef_t  positionSampleRef,
int32_t *  vspeedPtr,
int32_t *  vspeedAccuracyPtr 
)

Get the position sample's vertical speed.

Returns
LE_FAULT The function failed to find the positionSample.
LE_OUT_OF_RANGE One of the retrieved parameter is not valid (set to INT32_MAX).
LE_OK The function succeeded.
Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
vSpeedPtr, vSpeedAccuracyPtr can be set to NULL if not needed.
Parameters
[in]positionSampleRefPosition sample's reference.
[out]vspeedPtrVertical speed.
[out]vspeedAccuracyPtrVertical speed's accuracy estimate.
void le_pos_sample_Release ( le_pos_SampleRef_t  positionSampleRef)

Release the position sample.

Note
If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
Parameters
[in]positionSampleRefPosition sample's reference.
void le_pos_sample_StartClient ( const char *  serviceInstanceName)

Start the service for the client main thread

Parameters
[in]serviceInstanceName
void le_pos_sample_StopClient ( void  )

Stop the service for the current client thread