gclib 2.1.20
Galil Communications Library
All Classes Files Functions Variables Typedefs Macros Modules Pages
Unsolicited Data

Receive messages and interrupts. More...

Functions

byte gclibjava.GclibJava.GInterrupt () throws GclibJavaException
 Provides access to PCI and UDP interrupts from the controller.
 
String gclibjava.GclibJava.GMessage () throws GclibJavaException
 Provides access to unsolicited messages from the controller.
 

Function Documentation

◆ GInterrupt()

byte gclibjava.GclibJava.GInterrupt ( ) throws GclibJavaException
inline

Provides access to PCI and UDP interrupts from the controller.

Interrupts can be generated automatically by the firmware on important events via EI (Enable Interrupt) or by the user in embedded DMC code via UI (User Interrupt). To use this function, -s EI must be used in the GOpen() address string to subscribe to interrupts.

Returns
The status byte of the interrupt.
Exceptions
GclibJavaExceptionIf an error is generated by gclib.

Definition at line 260 of file GclibJava.java.

◆ GMessage()

String gclibjava.GclibJava.GMessage ( ) throws GclibJavaException
inline

Provides access to unsolicited messages from the controller.

To use this function, -s MG must be used in the GOpen() address string to subscribe to messages. Unsolicited bytes must be flagged by the high-bit setting, CW 1. The driver will automatically set this when subscribing to messages. The user should not overwrite this setting.

Unsolicited messages are data generated by the controller that are not in response to a command, a data record, or an interrupt.

GMessage() will block until a message is received, or the function times out.

Messages are unframed byte streams. There is no guarantee that the user will get complete messages or single messages in a call to GMessage().

Returns
the message received.
Exceptions
GclibJavaExceptionIf an error is generated by gclib.

Definition at line 288 of file GclibJava.java.