gclib  2.0.8
Communications API for Galil controllers and PLCs
GDataRecord Union Reference

Data record union, containing all structs and a generic byte array accessor. More...

#include <gclib_record.h>

Data Fields

struct GDataRecord4000 dmc4000
 The DMC-4000 data record.
 
struct GDataRecord4000 dmc4103
 The DMC-4103 data record.
 
struct GDataRecord4000 dmc50000
 The DMC-50000 data record.
 
struct GDataRecord52000 dmc52000
 The DMC-52000 data record.
 
struct GDataRecord30000 dmc30000
 The DMC-30000 data record.
 
struct GDataRecord2103 dmc2103
 The DMC-21x3 data record.
 
struct GDataRecord1806 dmc1806
 The DMC-1806 data record.
 
struct GDataRecord1802 dmc1802
 The DMC-1802 data record.
 
struct GDataRecord47000_ENC rio47000
 The RIO-471xx & 472xx data record, including encoder support.
 
struct GDataRecord47300_ENC rio47300
 The RIO 473xx data record, including encoder support.
 
struct GDataRecord47300_24EX rio47300_24ex
 The RIO 473xx data record, with 24EXOUT/24EXIN support.
 
struct GDataRecord47162 rio47162
 The RIO 47162 data record.
 
unsigned char byte_array [GALILDATARECORDMAXLENGTH]
 Generic byte array for offsets.
 

Detailed Description

Data record union, containing all structs and a generic byte array accessor.

Named structs can be used to access typed data by name. Offsets into the data record can also be used by referencing the member byte_array.

//Getting the sample counter for the DMC-4000.
cout << data_record->dmc4000.sample_number << '\n'; //access by 4000 product
cout << * ((unsigned short *) (data_record->byte_array + 4)) << '\n'; //access by pointer arithmetic

Definition at line 1082 of file gclib_record.h.


The documentation for this union was generated from the following file: