Yoctopuce YoctoHub-Ethernet Mode D'emploi page 200

Table des Matières

Publicité

10. Référence de l'API de haut niveau
network→useStaticIP()
Modifie la configuration de l'interface réseau pour utiliser une adresse IP assignée manuellement
(adresse IP statique).
function useStaticIP( ipAddress, subnetMaskLen, router)
js
int useStaticIP( string ipAddress, int subnetMaskLen, string router)
cpp
-(int) useStaticIP : (NSString*)
m
LongInt useStaticIP( ipAddress: string,
pas
function useStaticIP( ByVal
vb
int useStaticIP( string ipAddress,
cs
int useStaticIP( String ipAddress,
java
async Task<int> useStaticIP( string ipAddress,
uwp
useStaticIP( ipAddress, subnetMaskLen, router)
py
function useStaticIP( $ipAddress, $subnetMaskLen, $router)
php
async useStaticIP( ipAddress: string, subnetMaskLen: number, router: string): Promise<number>
ts
async useStaticIP( ipAddress, subnetMaskLen, router)
es
int useStaticIP( string ipAddress,
dnp
int useStaticIP( string ipAddress,
cp
YNetwork
target
cmd
N'oubliez pas d'appeler la méthode
paramètre soit appliqué.
Paramètres :
adresse IP à utiliser par le module
ipAddress
subnetMaskLen
longueur du masque de sous-réseau à utiliser. Par exemple, la valeur 24 représente
255.255.255.0.
router
adresse IP de la passerelle à utiliser ("default gateway")
Retourne :
YAPI.SUCCESS
si l'opération se déroule sans erreur.
En cas d'erreur, déclenche une exception ou retourne un code d'erreur négatif.
196
ipAddress
: (int)
subnetMaskLen
: (NSString*)
router
subnetMaskLen: LongInt,
router: string): LongInt
ipAddress
As String,
ByVal
subnetMaskLen
ByVal
router
As String) As Integer
int subnetMaskLen,
string router)
int subnetMaskLen,
String router)
int subnetMaskLen,
string router)
int subnetMaskLen,
string router)
int subnetMaskLen,
string router)
useStaticIP
ipAddress subnetMaskLen router
saveToFlash()
As Integer,
et de redémarrer le module pour que le
YNetwork
www.yoctopuce.com

Publicité

Table des Matières
loading

Table des Matières