Yoctopuce Yocto-RS485-V2 Mode D'emploi page 330

Table des Matières

Publicité

25. Référence de l'API de haut niveau
YSerialPort.FindSerialPort()
YSerialPort.FindSerialPort()
Permet de retrouver un port série d'après un identifiant donné.
function yFindSerialPort( func)
js
YSerialPort* FindSerialPort( string func)
cpp
+(YSerialPort*) FindSerialPort : (NSString*)
m
TYSerialPort yFindSerialPort( func: string): TYSerialPort
pas
function FindSerialPort( ByVal
vb
static YSerialPort FindSerialPort( string func)
cs
static YSerialPort FindSerialPort( String func)
java
static YSerialPort FindSerialPort( string func)
uwp
FindSerialPort( func)
py
function FindSerialPort( $func)
php
static FindSerialPort( func: string): YSerialPort
ts
static FindSerialPort( func)
es
static YSerialPortProxy FindSerialPort( string func)
dnp
static YSerialPortProxy * FindSerialPort( string func)
cp
L'identifiant peut être spécifié sous plusieurs formes:
NomLogiqueFonction
NoSerieModule.IdentifiantFonction
NoSerieModule.NomLogiqueFonction
NomLogiqueModule.IdentifiantMatériel
NomLogiqueModule.NomLogiqueFonction
Cette fonction n'exige pas que le port série soit en ligne au moment ou elle est appelée, l'objet retourné
sera néanmoins valide. Utiliser la méthode
est utilisable à un moment donné. En cas d'ambiguïté lorsqu'on fait une recherche par nom logique,
aucune erreur ne sera notifiée: la première instance trouvée sera renvoyée. La recherche se fait
d'abord par nom matériel, puis par nom logique.
Si un appel à la méthode is_online() de cet objet renvoie FAUX alors que vous êtes sûr que le module
correspondant est bien branché, vérifiez que vous n'avez pas oublié d'appeler registerHub() à
l'initialisation de de l'application.
Paramètres :
func
une chaîne de caractères qui référence le port série sans ambiguïté, par exemple
RS232MK1.serialPort
Retourne :
YSerialPort
un objet de classe
322
func
func
As String) As YSerialPort
YSerialPort.isOnline()
.
qui permet ensuite de contrôler le port série.
YSerialPort
pour tester si le port série
www.yoctopuce.com

Publicité

Table des Matières
loading

Ce manuel est également adapté pour:

Yocto-rs232

Table des Matières