public class YWireless extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YWireless.TimedReportCallback
TimedReportCallback for Wireless
|
static interface |
YWireless.UpdateCallback
Deprecated UpdateCallback for Wireless
|
Modifier and Type | Field and Description |
---|---|
protected int |
_channel |
protected int |
_linkQuality |
protected String |
_message |
protected int |
_security |
protected String |
_ssid |
protected YWireless.UpdateCallback |
_valueCallbackWireless |
protected String |
_wlanConfig |
protected int |
_wlanState |
static int |
CHANNEL_INVALID
invalid channel value
|
static int |
LINKQUALITY_INVALID
invalid linkQuality value
|
static String |
MESSAGE_INVALID
invalid message value
|
static int |
SECURITY_INVALID |
static int |
SECURITY_OPEN |
static int |
SECURITY_UNKNOWN
invalid security value
|
static int |
SECURITY_WEP |
static int |
SECURITY_WPA |
static int |
SECURITY_WPA2 |
static String |
SSID_INVALID
invalid ssid value
|
static String |
WLANCONFIG_INVALID
invalid wlanConfig value
|
static int |
WLANSTATE_CONNECTED |
static int |
WLANSTATE_DOWN
invalid wlanState value
|
static int |
WLANSTATE_INVALID |
static int |
WLANSTATE_REJECTED |
static int |
WLANSTATE_SCANNING |
_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 |
YWireless(String func) |
protected |
YWireless(YAPIContext yctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
int |
adhocNetwork(String ssid,
String securityKey)
Changes the configuration of the wireless lan interface to create an ad-hoc
wireless network, without using an access point.
|
static YWireless |
FindWireless(String func)
Retrieves a wireless lan interface for a given identifier.
|
static YWireless |
FindWirelessInContext(YAPIContext yctx,
String func)
Retrieves a wireless lan interface for a given identifier in a YAPI context.
|
static YWireless |
FirstWireless()
Starts the enumeration of wireless lan interfaces currently accessible.
|
static YWireless |
FirstWirelessInContext(YAPIContext yctx)
Starts the enumeration of wireless lan interfaces currently accessible.
|
int |
get_channel()
Returns the 802.11 channel currently used, or 0 when the selected network has not been found.
|
ArrayList<YWlanRecord> |
get_detectedWlans()
Returns a list of YWlanRecord objects that describe detected Wireless networks.
|
int |
get_linkQuality()
Returns the link quality, expressed in percent.
|
String |
get_message()
Returns the latest status message from the wireless interface.
|
int |
get_security()
Returns the security algorithm used by the selected wireless network.
|
String |
get_ssid()
Returns the wireless network name (SSID).
|
String |
get_wlanConfig() |
int |
get_wlanState()
Returns the current state of the wireless interface.
|
int |
getChannel()
Returns the 802.11 channel currently used, or 0 when the selected network has not been found.
|
int |
getLinkQuality()
Returns the link quality, expressed in percent.
|
String |
getMessage()
Returns the latest status message from the wireless interface.
|
int |
getSecurity()
Returns the security algorithm used by the selected wireless network.
|
String |
getSsid()
Returns the wireless network name (SSID).
|
int |
getWlanState()
Returns the current state of the wireless interface.
|
int |
joinNetwork(String ssid,
String securityKey)
Changes the configuration of the wireless lan interface to connect to an existing
access point (infrastructure mode).
|
YWireless |
nextWireless()
Continues the enumeration of wireless lan interfaces started using yFirstWireless().
|
int |
registerValueCallback(YWireless.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_wlanConfig(String newval) |
int |
softAPNetwork(String ssid,
String securityKey)
Changes the configuration of the wireless lan interface to create a new wireless
network by emulating a WiFi access point (Soft AP).
|
int |
startWlanScan()
Triggers a scan of the wireless frequency and builds the list of available networks.
|
_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, _uploadEx, 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_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final int LINKQUALITY_INVALID
public static final String SSID_INVALID
public static final int CHANNEL_INVALID
public static final int SECURITY_UNKNOWN
public static final int SECURITY_OPEN
public static final int SECURITY_WEP
public static final int SECURITY_WPA
public static final int SECURITY_WPA2
public static final int SECURITY_INVALID
public static final String MESSAGE_INVALID
public static final String WLANCONFIG_INVALID
public static final int WLANSTATE_DOWN
public static final int WLANSTATE_SCANNING
public static final int WLANSTATE_CONNECTED
public static final int WLANSTATE_REJECTED
public static final int WLANSTATE_INVALID
protected int _linkQuality
protected String _ssid
protected int _channel
protected int _security
protected String _message
protected String _wlanConfig
protected int _wlanState
protected YWireless.UpdateCallback _valueCallbackWireless
protected YWireless(YAPIContext yctx, String func)
func
- : functionidprotected YWireless(String func)
protected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int get_linkQuality() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getLinkQuality() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_ssid() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getSsid() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_channel() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getChannel() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_security() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getSecurity() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_message() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getMessage() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_wlanConfig() throws YAPI_Exception
YAPI_Exception
public int set_wlanConfig(String newval) throws YAPI_Exception
YAPI_Exception
public int get_wlanState() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getWlanState() throws YAPI_Exception
YAPI_Exception
- on errorpublic static YWireless FindWireless(String func)
func
- : a string that uniquely characterizes the wireless lan interfacepublic static YWireless FindWirelessInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the wireless lan interfacepublic int registerValueCallback(YWireless.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 int startWlanScan() throws YAPI_Exception
YAPI_Exception
- on errorpublic int joinNetwork(String ssid, String securityKey) throws YAPI_Exception
ssid
- : the name of the network to connect tosecurityKey
- : the network key, as a character stringYAPI_Exception
- on errorpublic int adhocNetwork(String ssid, String securityKey) throws YAPI_Exception
ssid
- : the name of the network to connect tosecurityKey
- : the network key, as a character stringYAPI_Exception
- on errorpublic int softAPNetwork(String ssid, String securityKey) throws YAPI_Exception
ssid
- : the name of the network to connect tosecurityKey
- : the network key, as a character stringYAPI_Exception
- on errorpublic ArrayList<YWlanRecord> get_detectedWlans() throws YAPI_Exception
YAPI_Exception
- on errorpublic YWireless nextWireless()
public static YWireless FirstWireless()
public static YWireless FirstWirelessInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2019. All rights reserved.