AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones de puertos serie y paralelo
  • Using an external library: RXTX
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Retrieves the number of pending bytes in the input buffer of a specified serial port or infrared port.
Remarks:
  • This function cannot be used with a parallel port.
  • WEBDEV - Código Servidor This function returns information regarding the server.
  • Java Infrared ports are not supported.
  • Linux Only serial ports are supported.
Ejemplo
// The port is opened. Retrieves the number of pending bytes
// in the input buffer of COM4 and read them.
PortNum is int
PortNum = sOpen("COM4", 2000, 2000)
Number is int
MessageRead is string
Number = sInEntryQueue(PortNum)
MessageRead = sRead(PortNum, Number)
// Equivalent to: MessageRead = sRead(PortNum, sInEntryQueue(PortNum))
Sintaxis
<Result> = sInEntryQueue(<Port number>)
<Result>: Integer
  • Number of pending bytes in the input buffer of the specified port,
  • 0 if the function failed. The ErrorOccurred variable is set to True if an error occurred on the port (parity bit for example). The error details are returned by ErrorInfo.
<Port number>: Integer
Port number to use:
  • Serial port number: 1, 2, 3, ... 32 for COM1, COM2, COM3, ... COM32.
  • Infrared port number: 1, 2, 3, ... 32 for IR1, IR2, IR3, ... IR32.
    Java The management of infrared ports is not available in Java.
  • Port number returned by sOpen (if this function was called with a port name).
Observaciones
Java

Using an external library: RXTX

In Java, the use of serial and parallel port manipulation functions (functions sOpen, sWrite, sRead, ...) requires the presence of an external library: RXTX.
This library includes a Jar archive and one or more native libraries that depend on the operating system on which the application is run. To use these functions:
  • the Jar archive (RXTXComm.jar) must:
    • be found in the same directory as the Java application generated by WINDEV,
    • be found in the execution classpath of the application,
    • be directly included in the generated application (from the wizard for Java generation).
  • the native libraries corresponding to the operating system on which the application is run must be found:
    • in the same directory as the Java application generated by WINDEV,
    • in the path of the application libraries (librarypath).
You can download the RXTX library and its documentation from the following link: http://users.frii.com/jarvi/rxtx/index.html (link valid at the time of writing).
Attention: Infrared port management not available in Java.
Clasificación Lógica de negocio / UI: Lógica de negocio
Componente: wd300com.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local