public class YGps extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YGps.TimedReportCallback
TimedReportCallback for Gps
|
static interface |
YGps.UpdateCallback
Deprecated UpdateCallback for Gps
|
Modifier and Type | Field and Description |
---|---|
protected double |
_altitude |
protected String |
_command |
protected int |
_coordSystem |
protected String |
_dateTime |
protected double |
_dilution |
protected double |
_direction |
protected double |
_groundSpeed |
protected int |
_isFixed |
protected String |
_latitude |
protected String |
_longitude |
protected long |
_satCount |
protected long |
_unixTime |
protected int |
_utcOffset |
protected YGps.UpdateCallback |
_valueCallbackGps |
static double |
ALTITUDE_INVALID
invalid altitude value
|
static String |
COMMAND_INVALID
invalid command value
|
static int |
COORDSYSTEM_GPS_D |
static int |
COORDSYSTEM_GPS_DM |
static int |
COORDSYSTEM_GPS_DMS
invalid coordSystem value
|
static int |
COORDSYSTEM_INVALID |
static String |
DATETIME_INVALID
invalid dateTime value
|
static double |
DILUTION_INVALID
invalid dilution value
|
static double |
DIRECTION_INVALID
invalid direction value
|
static double |
GROUNDSPEED_INVALID
invalid groundSpeed value
|
static int |
ISFIXED_FALSE
invalid isFixed value
|
static int |
ISFIXED_INVALID |
static int |
ISFIXED_TRUE |
static String |
LATITUDE_INVALID
invalid latitude value
|
static String |
LONGITUDE_INVALID
invalid longitude value
|
static long |
SATCOUNT_INVALID
invalid satCount value
|
static long |
UNIXTIME_INVALID
invalid unixTime value
|
static int |
UTCOFFSET_INVALID
invalid utcOffset value
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YGps(String func) |
protected |
YGps(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YGps |
FindGps(String func)
Retrieves a GPS for a given identifier.
|
static YGps |
FindGpsInContext(YAPIContext yctx,
String func)
Retrieves a GPS for a given identifier in a YAPI context.
|
static YGps |
FirstGps()
Starts the enumeration of GPS currently accessible.
|
static YGps |
FirstGpsInContext(YAPIContext yctx)
Starts the enumeration of GPS currently accessible.
|
double |
get_altitude()
Returns the current altitude.
|
String |
get_command() |
int |
get_coordSystem()
Returns the representation system used for positioning data.
|
String |
get_dateTime()
Returns the current time in the form "YYYY/MM/DD hh:mm:ss".
|
double |
get_dilution()
Returns the current horizontal dilution of precision,
the smaller that number is, the better .
|
double |
get_direction()
Returns the current move bearing in degrees, zero
is the true (geographic) north.
|
double |
get_groundSpeed()
Returns the current ground speed in Km/h.
|
int |
get_isFixed()
Returns TRUE if the receiver has found enough satellites to work.
|
String |
get_latitude()
Returns the current latitude.
|
String |
get_longitude()
Returns the current longitude.
|
long |
get_satCount()
Returns the count of visible satellites.
|
long |
get_unixTime()
Returns the current time in Unix format (number of
seconds elapsed since Jan 1st, 1970).
|
int |
get_utcOffset()
Returns the number of seconds between current time and UTC time (time zone).
|
double |
getAltitude()
Returns the current altitude.
|
int |
getCoordSystem()
Returns the representation system used for positioning data.
|
String |
getDateTime()
Returns the current time in the form "YYYY/MM/DD hh:mm:ss".
|
double |
getDilution()
Returns the current horizontal dilution of precision,
the smaller that number is, the better .
|
double |
getDirection()
Returns the current move bearing in degrees, zero
is the true (geographic) north.
|
double |
getGroundSpeed()
Returns the current ground speed in Km/h.
|
int |
getIsFixed()
Returns TRUE if the receiver has found enough satellites to work.
|
String |
getLatitude()
Returns the current latitude.
|
String |
getLongitude()
Returns the current longitude.
|
long |
getSatCount()
Returns the count of visible satellites.
|
long |
getUnixTime()
Returns the current time in Unix format (number of
seconds elapsed since Jan 1st, 1970).
|
int |
getUtcOffset()
Returns the number of seconds between current time and UTC time (time zone).
|
YGps |
nextGps()
Continues the enumeration of GPS started using yFirstGps().
|
int |
registerValueCallback(YGps.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_command(String newval) |
int |
set_coordSystem(int newval)
Changes the representation system used for positioning data.
|
int |
set_utcOffset(int newval)
Changes the number of seconds between current time and UTC time (time zone).
|
int |
setCoordSystem(int newval)
Changes the representation system used for positioning data.
|
int |
setUtcOffset(int newval)
Changes the number of seconds between current time and UTC time (time zone).
|
_AddToCache, _clearDataStreamCache, _devRequest, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final int ISFIXED_FALSE
public static final int ISFIXED_TRUE
public static final int ISFIXED_INVALID
public static final long SATCOUNT_INVALID
public static final int COORDSYSTEM_GPS_DMS
public static final int COORDSYSTEM_GPS_DM
public static final int COORDSYSTEM_GPS_D
public static final int COORDSYSTEM_INVALID
public static final String LATITUDE_INVALID
public static final String LONGITUDE_INVALID
public static final double DILUTION_INVALID
public static final double ALTITUDE_INVALID
public static final double GROUNDSPEED_INVALID
public static final double DIRECTION_INVALID
public static final long UNIXTIME_INVALID
public static final String DATETIME_INVALID
public static final int UTCOFFSET_INVALID
public static final String COMMAND_INVALID
protected int _isFixed
protected long _satCount
protected int _coordSystem
protected String _latitude
protected String _longitude
protected double _dilution
protected double _altitude
protected double _groundSpeed
protected double _direction
protected long _unixTime
protected String _dateTime
protected int _utcOffset
protected String _command
protected YGps.UpdateCallback _valueCallbackGps
protected YGps(YAPIContext ctx, String func)
func
- : functionidprotected YGps(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int get_isFixed() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getIsFixed() throws YAPI_Exception
YAPI_Exception
- on errorpublic long get_satCount() throws YAPI_Exception
YAPI_Exception
- on errorpublic long getSatCount() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_coordSystem() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getCoordSystem() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_coordSystem(int newval) throws YAPI_Exception
newval
- : a value among YGps.COORDSYSTEM_GPS_DMS, YGps.COORDSYSTEM_GPS_DM and
YGps.COORDSYSTEM_GPS_D corresponding to the representation system used for positioning dataYAPI_Exception
- on errorpublic int setCoordSystem(int newval) throws YAPI_Exception
newval
- : a value among Y_COORDSYSTEM_GPS_DMS, Y_COORDSYSTEM_GPS_DM and Y_COORDSYSTEM_GPS_D
corresponding to the representation system used for positioning dataYAPI_Exception
- on errorpublic String get_latitude() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getLatitude() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_longitude() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getLongitude() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_dilution() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getDilution() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_altitude() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getAltitude() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_groundSpeed() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getGroundSpeed() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_direction() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getDirection() throws YAPI_Exception
YAPI_Exception
- on errorpublic long get_unixTime() throws YAPI_Exception
YAPI_Exception
- on errorpublic long getUnixTime() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_dateTime() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getDateTime() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_utcOffset() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getUtcOffset() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_utcOffset(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of seconds between current time and UTC time (time zone)YAPI_Exception
- on errorpublic int setUtcOffset(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of seconds between current time and UTC time (time zone)YAPI_Exception
- on errorpublic String get_command() throws YAPI_Exception
YAPI_Exception
public int set_command(String newval) throws YAPI_Exception
YAPI_Exception
public static YGps FindGps(String func)
func
- : a string that uniquely characterizes the GPSpublic static YGps FindGpsInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the GPSpublic int registerValueCallback(YGps.UpdateCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback
in class YFunction
public YGps nextGps()
public static YGps FirstGps()
public static YGps FirstGpsInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2017. All rights reserved.