public class YHub extends Object
Modifier and Type | Field and Description |
---|---|
protected YAPIContext |
_ctx |
protected int |
_hubref |
protected Object |
_userData |
Modifier | Constructor and Description |
---|---|
protected |
YHub(YAPIContext yctx,
int hubref) |
Modifier and Type | Method and Description |
---|---|
int |
_getIntAttr(String attrName) |
String |
_getStrAttr(String attrName) |
void |
_setIntAttr(String attrName,
int value) |
static YHub |
FirstHubInUse()
Starts the enumeration of hubs currently in use by the API.
|
static YHub |
FirstHubInUseInContext(YAPIContext yctx)
Starts the enumeration of hubs currently in use by the API
in a given YAPI context.
|
String |
get_connectionUrl()
Returns the URL currently in use to communicate with this hub.
|
String |
get_errorMessage()
Returns the error message of the latest error with the hub.
|
int |
get_errorType()
Returns the numerical error code of the latest error with the hub.
|
ArrayList<String> |
get_knownUrls_internal() |
ArrayList<String> |
get_knownUrls()
Returns all known URLs that have been used to register this hub.
|
int |
get_networkTimeout()
Returns the network connection delay for this hub.
|
String |
get_registeredUrl()
Returns the URL that has been used first to register this hub.
|
String |
get_serialNumber()
Returns the hub serial number, if the hub was already connected once.
|
Object |
get_userData()
Returns the value of the userData attribute, as previously stored
using method set_userData.
|
boolean |
isInUse()
Tells if this hub is still registered within the API.
|
boolean |
isOnline()
Tells if there is an active communication channel with this hub.
|
boolean |
isReadOnly()
Tells if write access on this hub is blocked.
|
YHub |
nextHubInUse()
Continues the module enumeration started using YHub.FirstHubInUse().
|
void |
set_networkTimeout(int networkMsTimeout)
Modifies tthe network connection delay for this hub.
|
void |
set_userData(Object data)
Stores a user context provided as argument in the userData
attribute of the function.
|
protected YAPIContext _ctx
protected int _hubref
protected Object _userData
protected YHub(YAPIContext yctx, int hubref)
public ArrayList<String> get_knownUrls_internal() throws YAPI_Exception
YAPI_Exception
public int _getIntAttr(String attrName)
public void _setIntAttr(String attrName, int value)
public String get_registeredUrl()
public ArrayList<String> get_knownUrls() throws YAPI_Exception
YAPI_Exception
public String get_connectionUrl()
public String get_serialNumber()
public boolean isInUse()
public boolean isOnline()
public boolean isReadOnly()
public void set_networkTimeout(int networkMsTimeout)
networkMsTimeout
- : the network connection delay in milliseconds.public int get_networkTimeout()
public int get_errorType()
public String get_errorMessage()
public Object get_userData()
public void set_userData(Object data)
data
- : any kind of object to be storedpublic static YHub FirstHubInUse()
public static YHub FirstHubInUseInContext(YAPIContext yctx)
yctx
- : a YAPI contextpublic YHub nextHubInUse()
Copyright © 2023. All rights reserved.