Sensor Scol plugin
Multi platform sensors for handled devices
Functions
Scol functions

Functions

int _IsSensorAvailable (mmachine m)
 _IsSensorAvailable : indicates if whether or not a sensor of the given type is available on the current device.
 
int _IsSensorEnabled (mmachine m)
 _IsSensorEnabled : indicates if whether or not the sensor of the given type is enabled.
 
int _SetSensorEnableSync (mmachine m)
 _SetSensorEnable : enable or disable a sensor of a given type.
 
int _GetVectorData (mmachine m)
 _GetVectorData : get data from a sensor : get a 3D vector with float value
 
int _GetDeviceQuaternionOrientation (mmachine m)
 _GetDeviceQuaternionOrientation : get device orientation in x seconds (quaternion)
 
int _GetFloatData (mmachine m)
 _GetDeviceEulerOrientation : get device orientation as euler angles
 
int _SetDeviceVibration (mmachine m)
 _SetDeviceVibration : Set a vibration time duration on the device
 
int _SetDeviceVibrationPattern (mmachine m)
 _SetDeviceVibrationPattern : Set a vibration pattern from a time / pause list
 
int _StartDeviceVibration (mmachine m)
 _StartDeviceVibration : Start the device vibration
 
int _StopDeviceVibration (mmachine m)
 _StopDeviceVibration : Stop the device vibration
 
int _StartDeviceLocation (mmachine m)
 _StartDeviceLocation : Start the device location service
 
int _StopDeviceLocation (mmachine m)
 _StopDeviceLocation : Stop the device location service
 
int _GetDeviceLocation (mmachine m)
 _GetDeviceLocation : Get the device location
 
int _GetLocationOffset (mmachine m)
 _GetLocationOffset : Get the offset from a longitude / latitude reference in meters
 
int _DsSensorCallBack (mmachine m)
 _DsSensorCallBack : Destroy sensor callback object
 

Detailed Description

Scol functions for devices sensors manipulation

Function Documentation

◆ _DsSensorCallBack()

int _DsSensorCallBack ( mmachine  m)

_DsSensorCallBack : Destroy sensor callback object

fun [ObjSensorCB] I

Parameters
ObjSensorCB: sensor callback object to destroy
Returns
I : 0 if success, NIL otherwise

Definition at line 996 of file scolplugin.cpp.

◆ _GetDeviceLocation()

int _GetDeviceLocation ( mmachine  m)

_GetDeviceLocation : Get the device location

Prototype: fun [] [F F F]

Returns
[F F F] : return [longitude latitude altitude] on success, NIL otherwise

Definition at line 817 of file scolplugin.cpp.

◆ _GetDeviceQuaternionOrientation()

int _GetDeviceQuaternionOrientation ( mmachine  m)

_GetDeviceQuaternionOrientation : get device orientation in x seconds (quaternion)

Prototype: fun [I] [F F F F]

Parameters
Ithe delay (ms) after last orientation computing (last sensor event received), or NIL / 0 if you want the last computed orientation.
Returns
F : the orientation of the device (a quaternion)

Definition at line 377 of file scolplugin.cpp.

◆ _GetFloatData()

int _GetFloatData ( mmachine  m)

_GetDeviceEulerOrientation : get device orientation as euler angles

Prototype: fun [] [F F F]

Returns
F : a tuple that contains the device orientation (x,y,z,w).

_GetFloatData : get data from a sensor : get a float value

Prototype: fun [I] F

Parameters
I: the type of the sensor (see SSensorType enum in SensorTypes.h - include dir - )
Returns
F : the sensor data (a float value)

Definition at line 487 of file scolplugin.cpp.

◆ _GetLocationOffset()

int _GetLocationOffset ( mmachine  m)

_GetLocationOffset : Get the offset from a longitude / latitude reference in meters

Prototype: fun [F F F F] [F F]

Parameters
F: longitude point for reference in radian
F: latitude point for reference in radian
F: longitude point in radian
F: latitude point in radian
Returns
[F F] : return [x y] offset on success, NIL otherwise

Definition at line 867 of file scolplugin.cpp.

◆ _GetVectorData()

int _GetVectorData ( mmachine  m)

_GetVectorData : get data from a sensor : get a 3D vector with float value

Prototype: fun [I] [F F F]

Parameters
I: the type of the sensor (see SSensorType enum in SensorTypes.h - include dir - )
Returns
F : a tuple that contains data of the sensor (x,y,z).

Definition at line 310 of file scolplugin.cpp.

◆ _IsSensorAvailable()

int _IsSensorAvailable ( mmachine  m)

_IsSensorAvailable : indicates if whether or not a sensor of the given type is available on the current device.

Prototype: fun [I] I

Parameters
I: the type of the sensor (see SSensorType enum in SensorTypes.h - include dir - )
Returns
I : whether (1) or not (0) a sensor of the given type is available on the current device.

Definition at line 154 of file scolplugin.cpp.

◆ _IsSensorEnabled()

int _IsSensorEnabled ( mmachine  m)

_IsSensorEnabled : indicates if whether or not the sensor of the given type is enabled.

Prototype: fun [I] I

Parameters
I: the type of the sensor (see SSensorType enum in SensorTypes.h - include dir - )
Returns
I : whether (1) or not (0) the sensor of the given type is enabled.

Definition at line 195 of file scolplugin.cpp.

◆ _SetDeviceVibration()

int _SetDeviceVibration ( mmachine  m)

_SetDeviceVibration : Set a vibration time duration on the device

Prototype: fun [I] I

Parameters
I: The vibration time in millisecond
Returns
I : return 1 on success, NIL otherwise

Definition at line 544 of file scolplugin.cpp.

◆ _SetDeviceVibrationPattern()

int _SetDeviceVibrationPattern ( mmachine  m)

_SetDeviceVibrationPattern : Set a vibration pattern from a time / pause list

Prototype: fun [I] I

Parameters
[Ir1] : The pattern list contains 0::100::400::100::nil for example
I: 1 for loop enable, 0 otherwise
Returns
I : return 1 on success, NIL otherwise

Definition at line 592 of file scolplugin.cpp.

◆ _SetSensorEnableSync()

int _SetSensorEnableSync ( mmachine  m)

_SetSensorEnable : enable or disable a sensor of a given type.

Prototype: fun [I I] I

Parameters
I: the type of the sensor (see SSensorType enum in SensorTypes.h - include dir - )
I: the state to set (1 = enabled, 0 = disabled)
Returns
I : 1 if the sensor state been set, NIL otherwise.

Definition at line 247 of file scolplugin.cpp.

◆ _StartDeviceLocation()

int _StartDeviceLocation ( mmachine  m)

_StartDeviceLocation : Start the device location service

Prototype: fun [] I

Returns
I : return 1 on success, NIL otherwise

Definition at line 709 of file scolplugin.cpp.

◆ _StartDeviceVibration()

int _StartDeviceVibration ( mmachine  m)

_StartDeviceVibration : Start the device vibration

Prototype: fun [] I

Returns
I : return 1 on success, NIL otherwise

Definition at line 647 of file scolplugin.cpp.

◆ _StopDeviceLocation()

int _StopDeviceLocation ( mmachine  m)

_StopDeviceLocation : Stop the device location service

Prototype: fun [] I

Returns
I : return 1 on success, NIL otherwise

Definition at line 786 of file scolplugin.cpp.

◆ _StopDeviceVibration()

int _StopDeviceVibration ( mmachine  m)

_StopDeviceVibration : Stop the device vibration

Prototype: fun [] I

Returns
I : return 1 on success, NIL otherwise

Definition at line 678 of file scolplugin.cpp.