![]() |
gclib 2.4.0
Galil Communications Library
|
Receive messages, interrupts, and data records. More...
Functions | |
| GCLIB_DEPRECATED GReturn | GRecord (GCon g, union GDataRecord *record, GOption method) |
| Provides a fresh copy of the controller's data record. Data is cast into a union, GDataRecord. | |
| GCLIB_DEPRECATED GReturn | GMessage (GCon g, GCStringOut buffer, GSize buffer_len) |
| Provides access to unsolicited messages from the controller. | |
| GCLIB_DEPRECATED GReturn | GInterrupt (GCon g, GStatus *status_byte) |
| Provides access to PCI and UDP interrupts from the controller. | |
| GCLIB_DEPRECATED GReturn | GRecordRate (GCon g, double period_ms) |
| Sets the asynchronous data record to a user-specified period via DR. | |
Receive messages, interrupts, and data records.
| GCLIB_DEPRECATED GReturn GRecord | ( | GCon | g, |
| union GDataRecord * | record, | ||
| GOption | method ) |
Provides a fresh copy of the controller's data record. Data is cast into a union, GDataRecord.
| g | Connection's handle. |
| record | A pointer to the user's DataRecord union to hold the copy. |
| method | Determines the method for acquiring the data.
|
When using G_DR, the asynchronous data record must already be set up.
GRecord() will block until the data record is received, or the transaction times out.
| GCLIB_DEPRECATED GReturn GMessage | ( | GCon | g, |
| GCStringOut | buffer, | ||
| GSize | buffer_len ) |
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. Examples follow.
| g | Connection's handle. |
| buffer | The buffer to write the message data. The buffer will be null terminated. |
| buffer_len | The length of the user's buffer. |
GMessage() will block until a message is received, or the function times out.
| GCLIB_DEPRECATED GReturn GInterrupt | ( | GCon | g, |
| GStatus * | status_byte ) |
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.
| g | Connection's handle. |
| status_byte | A pointer to a GStatus to receive the status byte. |
GInterrupt() will block until an interrupt is received, or the function times out.
| GCLIB_DEPRECATED GReturn GRecordRate | ( | GCon | g, |
| double | period_ms ) |
Sets the asynchronous data record to a user-specified period via DR.
Takes TM and product type into account and sets the DR period to the period requested by the user, if possible.
| g | Connection's handle. |
| period_ms | Period, in milliseconds, to set up for the asynchronous data record. |