Télécharger Imprimer la page

Yoctopuce YoctoHub-Wireless-g Mode D'emploi page 207

Publicité

network→useDHCP()
Modifie la configuration de l'interface réseau pour utiliser une adresse assignée automatiquement
par le serveur DHCP.
function useDHCP( fallbackIpAddr, fallbackSubnetMaskLen, fallbackRouter)
js
int useDHCP( string fallbackIpAddr,
cpp
int fallbackSubnetMaskLen,
string fallbackRouter)
-(int) useDHCP : (NSString*)
m
function useDHCP( fallbackIpAddr: string,
pas
function useDHCP( ) As Integer
vb
int useDHCP( string fallbackIpAddr,
cs
int fallbackSubnetMaskLen,
string fallbackRouter)
int useDHCP( String fallbackIpAddr,
java
int fallbackSubnetMaskLen,
String fallbackRouter)
async Task<int> useDHCP( string fallbackIpAddr,
uwp
useDHCP( fallbackIpAddr, fallbackSubnetMaskLen, fallbackRouter)
py
function useDHCP( $fallbackIpAddr, $fallbackSubnetMaskLen, $fallbackRouter)
php
async useDHCP( fallbackIpAddr, fallbackSubnetMaskLen, fallbackRouter)
es
YNetwork
target
cmd
En attendant qu'une adresse soit reçue (et indéfiniment si aucun serveur DHCP ne répond), le module
utilisera les paramètres IP spécifiés à cette fonction. N'oubliez pas d'appeler la méthode
saveToFlash()
et de redémarrer le module pour que le paramètre soit appliqué.
Paramètres :
fallbackIpAddr
fallbackSubnetMaskLen
fallbackRouter
Retourne :
YAPI_SUCCESS
En cas d'erreur, déclenche une exception ou retourne un code d'erreur négatif.
www.yoctopuce.com
fallbackIpAddr
: (int)
fallbackSubnetMaskLen
: (NSString*)
fallbackRouter
fallbackSubnetMaskLen: LongInt,
fallbackRouter: string): LongInt
int fallbackSubnetMaskLen,
string fallbackRouter)
useDHCP
fallbackIpAddr fallbackSubnetMaskLen fallbackRouter
adresse IP à utiliser si aucun serveur DHCP ne répond
longueur du masque de sous-réseau à utiliser si aucun serveur DHCP ne
répond. Par exemple, la valeur 24 représente 255.255.255.0.
adresse de la passerelle à utiliser si aucun serveur DHCP ne répond
si l'opération se déroule sans erreur.
11. Référence de l'API de haut niveau
YNetwork
203

Publicité

loading