ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Serial/Parallel Ports functions
  • Closing the port
  • Using an external library: RXTX
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Disables the detection of an event on a serial port. The event was managed by sEvent.
Example
// Detect characters on COM1 port
sEvent(1, sEveCharReceived, "Read")
sEvent(1, sEveBreak, "Break")
...
sEndEvent(1, sEveBreak)
...

// --Procedure Read(PortNum, Event)
Trace(sRead(1, sInEntryQueue(1)))
Syntax
<Result> = sEndEvent(<Port number> [, <Event to stop>])
<Result>: Boolean
  • True if the function was run,
  • False otherwise.
<Port number>: Integer
  • Number of the serial port (1, 2, 3, up to 32 for COM1, COM2, COM3, ... COM32).
  • Port number returned by sOpen (if this function was called with a port name).
<Event to stop>: Optional Integer constant (or combination of constants)
Event whose management must be stopped. If this parameter is not specified, all the events managed on the port are disabled.
sEveBreakReceive a "Break line" event
sEveCharReceivedReceive a character
sEveCTSChange of CTS status
sEveDSRChange of DSR status
sEveEntryQueue80The input buffer is full at 80%
Java This constant is not available.
sEveErrorDetect an error on the line
Java This constant is not available.
sEvePrinterErrorPrinter error detected
Java This constant is not available.
sEveRingDetect the "Ring" signal (ring)
sEveRLSDChange of RLSD status
Java This constant is not available.
sEveTransmitCompletedThe output buffer is empty
Remarks

Closing the port

When closing the port, all the events managed on this port are disabled. When re-opening the port, sEvent must be re-run to define the events managed on this port.
Java

Using an external library: RXTX

In Java, the use of functions for handling the serial and parallel ports (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).
The RXTX library and its documentation can be downloaded from: http://users.frii.com/jarvi/rxtx/index.html (link valid at the time this documentation was published).
Caution: The management of infrared ports is not available in Java.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help