![]() |
![]() |
The GX is the base system for the majority of the Adaptive Recognition products. It is a collection of loadable modules and library functions and gives an ease to program interface to the hardware devices.
The specific product functionalities are built in specific GX modules, that can be accessed through the gxsd
. Apart from the module handling functions the gxsd module contains general functions like property, memory and image handling functions, as well.
This file contains the descriptions of classes and functions of the module handling module.
Go to the source code of this file.
Data Structures | |
struct | gxRCT |
Rectangle definition. More... | |
struct | gxPNT |
Defines a single point. More... | |
struct | gxPG2 |
Defines two points. More... | |
struct | gxPG4 |
Defines four points. More... | |
struct | gxPNTF |
Defines one point with floating-point values. More... | |
struct | gxERRITEM |
One entry in the error table of GX module. More... | |
struct | gxHANDLE |
Handle of the GX module. More... | |
struct | gxMODULEINFO |
Information structure of GX modules. More... | |
struct | GX_DEVICE_INFO |
Information structure for a device (Unicode). More... | |
struct | GX_DEVICE_INFOA |
Information structure for a device (ASCII). More... | |
struct | GX_SYSTEM_INFO |
Information structure for the GX system. More... | |
Defines | |
#define | gx_globalrealloc_dbg(buf, sbuf, f, l) gx_globalrealloc(buf,sbuf) |
Release/Debug workaround. | |
#define | gx_globalalloc_dbg(buf, sbuf, f, l) gx_globalalloc(buf,sbuf) |
Release/Debug workaround. | |
Typedefs | |
typedef struct gxRCT | gxRCT |
Workaround for ANSI C. | |
typedef struct gxPNT | gxPNT |
Workaround for ANSI C. | |
typedef gxPNT | gxPNT_ARRAY [] |
Point array type definition. | |
typedef struct gxPG2 | gxPG2 |
Workaround for ANSI C. | |
typedef struct gxPG4 | gxPG4 |
Workaround for ANSI C. | |
typedef struct gxPNTF | gxPNTF |
Workaround for ANSI C. | |
typedef struct gxERRITEM | gxERRITEM |
Workaround for ANSI C. | |
typedef struct gxHANDLE | gxHANDLE |
Workaround for ANSI C. | |
typedef int GXAPI | gxmodule_process_t (gxHANDLE mhandle, int function, void *param) |
Function definition for gxMODULEINFO structure (type of the entry function). | |
typedef struct gxMODULEINFO | gxMODULEINFO |
Workaround for ANSI C. | |
typedef struct GX_DEVICE_INFO | GX_DEVICE_INFO |
Workaround for ANSI C. | |
typedef struct GX_DEVICE_INFOA | GX_DEVICE_INFOA |
Workaround for ANSI C. | |
typedef struct GX_SYSTEM_INFO | GX_SYSTEM_INFO |
Workaround for ANSI C. | |
Enumerations | |
enum | GX_ERROR_FLAGS { GX_ERR_FLAG_CLEAR = 0, GX_ERR_FLAG_APPEND = 1, GX_ERR_FLAG_PREPEND = 2, GX_ERR_FLAG_APPMODE = (GX_ERR_FLAG_CLEAR | GX_ERR_FLAG_APPEND | GX_ERR_FLAG_PREPEND), GX_ERR_FLAG_NOARGS = 0x100, GX_ERR_FLAG_LOCAL = 0x1000, GX_ERR_FLAG_DIRECT = 0x2000 } |
Enumerations for flags parameter of gx_seterror() function. More... | |
enum | GX_INFO_IDS { GXMODULE_INFO_ID = 0x67780000, GXUSRDRV_INFO_ID = 0x67786400 } |
Identification numbers for gxMODULEINFO structure (for GXSD 7.x modules). More... | |
enum | GX_DEVICE_FLAGS { GX_DEVICE_FLAG_TYPE = 1, GX_DEVICE_FLAG_NAME = 2, GX_DEVICE_FLAG_SERIAL = 4, GX_DEVICE_FLAG_SERIAL_NOMSK = 8, GX_DEVICE_FLAG_EXCLUSIVE = 0x100 } |
Flags for device operations. More... | |
enum | GX_SYSINFO_FLAGS { GX_SYSINFO_FLAG_FREEFLOW = 1, GX_SYSINFO_FLAG_PARKING = 2, GX_SYSINFO_FLAG_ACCR = 3, GX_SYSINFO_FLAG_PARKINGLANE = 4, GX_SYSINFO_FLAG_FACE = 5, GX_SYSINFO_FLAG_PR = 6 } |
Flags for querying the GX system info. More... | |
Functions | |
int GXAPI | gx_call (struct gxHANDLE handle, int function, void *params) |
Calls a module process with the specified parameters. | |
static gxHANDLE | gx_direct (int call_group) |
Creates a handle for the direct access. | |
static int | gx_listmodules (unsigned int flags, const wchar_t *filter, wchar_t ***files, unsigned int **versions, int *nitems) |
Lists path and version of modules (Unicode version). | |
static int | gx_listmodulesa (unsigned int flags, const char *filter, char ***files, unsigned int **versions, int *nitems) |
Lists path and version of modules (ASCII version). | |
static int | gx_globalrealloc (void **buffer, int sbuffer) |
Reallocates or frees a previously allocated memory area or allocates a new area. | |
static int | gx_globalalloc (void **buffer, int sbuffer) |
Allocates a memory area that can be passed between modules. | |
static int | gx_globalfree (void *buffer) |
Frees a previously allocated memory area. | |
static int | gx_globalsize (int *sbuffer, void *buffer) |
Gets the size of a previously allocated memory area in bytes. | |
static int | gx_globalrealloc_dbg (void **buffer, int sbuffer, const char *file, int line) |
Reallocates or frees a previously allocated memory area or allocates a new area (Debug version). | |
static int | gx_globalalloc_dbg (void **buffer, int sbuffer, const char *file, int line) |
Allocates a memory area that can be passed between modules (Debug version). | |
static int | gx_globalcheck_dbg () |
Checks the memory consistency previously allocated with the gx_globalalloc() or gx_globalrealloc() functions (Debug version). | |
static int | gx_globaltestmem_dbg (int index, char *fnbuffer, int fnbsize, char *membuffer, int mbsize, int *line, int *size, void **address) |
Returns details about the unfreed memory previously allocated with the gx_globalalloc() or gx_globalrealloc() functions (Debug version). | |
static int | gx_creatememslot (int *handle, void **mem) |
Allocates a memory slot and returns a handle to it. | |
static int | gx_getmemslot (int handle, void **mem) |
Returns the memory pointer to use on data update. | |
static int | gx_unrefmemslot (int handle) |
Decrements the memory slot's reference counter. | |
static int | gx_openmodule (gxHANDLE *handle, const wchar_t *modulename, const wchar_t *groupname) |
Opens a GX system compatible module (Unicode version). | |
static int | gx_openmodulea (gxHANDLE *handle, const char *modulename, const char *groupname) |
Opens a GX system compatible module (ASCII version). | |
static int | gx_closehandle (gxHANDLE *handle) |
Closes a previously opened module. | |
static int | gx_refhandle (gxHANDLE handle) |
Increases the reference counter of a GX handle. | |
static int | gx_unrefhandle (gxHANDLE *handle) |
Decreases the reference counter of a GX handle. | |
static int | gx_isvalidhandle (gxHANDLE handle) |
Checks if the handle of a module is valid. | |
static int | gx_getmoduleinfo (gxHANDLE handle, const gxMODULEINFO **moduleinfo) |
Gives information about an opened module. | |
static int | gx_getmoduleproperty (gxHANDLE handle, const wchar_t *name, wchar_t *string, int maxlen) |
Gets a property of the specified module (Unicode version). | |
static int | gx_getmodulepropertya (gxHANDLE handle, const char *name, char *string, int maxlen) |
Gets a property of the specified module (ASCII version). | |
static int | gx_getmodulepropertyint (gxHANDLE handle, const wchar_t *name, int *ivalue) |
Gets an integer property of the specified module (Unicode version). | |
static int | gx_getmodulepropertyinta (gxHANDLE handle, const char *name, int *ivalue) |
Gets an integer property of the specified module (ASCII version). | |
static int | gx_getmodulepropertyfloat (gxHANDLE handle, const wchar_t *name, double *fvalue) |
Gets a floating-point property of the specified module (Unicode version). | |
static int | gx_getmodulepropertyfloata (gxHANDLE handle, const char *name, double *fvalue) |
Gets a floating-point property of the specified module (ASCII version). | |
static int | gx_getmodulepropertyversion (gxHANDLE handle, const wchar_t *name, unsigned int *version) |
Gets a version property of the specified module (Unicode version). | |
static int | gx_getmodulepropertyversiona (gxHANDLE handle, const char *name, unsigned int *version) |
Gets a version property of the specified module (ASCII version). | |
static int | gx_setmoduleproperty (gxHANDLE handle, const wchar_t *name, const wchar_t *string) |
Sets a property of the specified module (Unicode version). | |
static int | gx_setmodulepropertya (gxHANDLE handle, const char *name, const char *string) |
Sets a property of the specified module (ASCII version). | |
static int | gx_setmodulepropertyint (gxHANDLE handle, const wchar_t *name, int ivalue) |
Sets an integer property of the specified module (Unicode version). | |
static int | gx_setmodulepropertyinta (gxHANDLE handle, const char *name, int ivalue) |
Sets an integer property of the specified module (ASCII version). | |
static int | gx_setmodulepropertyfloat (gxHANDLE handle, const wchar_t *name, double fvalue) |
Sets a floating-point property of the specified module (Unicode version). | |
static int | gx_setmodulepropertyfloata (gxHANDLE handle, const char *name, double fvalue) |
Sets a floating-point property of the specified module (ASCII version). | |
static int | gx_mpstarttransaction (gxHANDLE handle) |
It starts the property transaction. | |
static int | gx_mpcommit (gxHANDLE handle) |
It ends the property transaction and updates your changes to module. | |
static int | gx_savemoduleproperties (gxHANDLE handle, const wchar_t *name, int level) |
Saves properties of a module stored in the memory to a branch of the property tree stored on a mass storage device (Unicode version). | |
static int | gx_savemodulepropertiesa (gxHANDLE handle, const char *name, int level) |
Saves properties of a module stored in the memory to a branch of the property tree stored on a mass storage device (ASCII version). | |
static int | gx_geterror (int *code, wchar_t *string, int maxlen) |
You can query the error code and string with this function (Unicode version). | |
static int | gx_geterrora (int *code, char *string, int maxlen) |
You can query the error code and string with this function (ASCII version). | |
static int | gx_geterrorcode (void) |
You can query the error code with this function. | |
static int | gx_seterrorfv (int flags, int code, const wchar_t *wformat, va_list args) |
Updates a thread-local error buffer (Unicode version). | |
static int | gx_seterrorafv (int flags, int code, const char *wformat, va_list args) |
Updates a thread-local error buffer (ASCII version). | |
static int | gx_seterrorv (int code, const wchar_t *wformat, va_list args) |
Clears and updates a thread-local error buffer (Unicode version). | |
static int | gx_seterrorav (int code, const char *wformat, va_list args) |
Clears and updates a thread-local error buffer (ASCII version). | |
static int | gx_appenderrorv (int code, const wchar_t *wformat, va_list args) |
Appends a thread-local error buffer (Unicode version). | |
static int | gx_appenderrorav (int code, const char *wformat, va_list args) |
Appends a thread-local error buffer (ASCII version). | |
static int | gx_prependerrorv (int code, const wchar_t *wformat, va_list args) |
Prepends a thread-local error buffer (Unicode version). | |
static int | gx_prependerrorav (int code, const char *wformat, va_list args) |
Prepends a thread-local error buffer (ASCII version). | |
static int | gx_seterrorf (int flags, int code, const wchar_t *wformat,...) |
Updates a thread-local error buffer with variable number of arguments (. | |
static int | gx_seterroraf (int flags, int code, const char *wformat,...) |
Updates a thread-local error buffer with variable number of arguments (. | |
static int | gx_clearerror (void) |
Clears a thread-local error buffer. | |
static int | gx_seterrorcodef (int flags, int code) |
Updates a thread-local error buffer with flags and error code. | |
static int | gx_seterrorcode (int code) |
Updates a thread-local error buffer with error code. | |
static int | gx_appenderrorcode (int code) |
Appends a thread-local error buffer with error code. | |
static int | gx_prependerrorcode (int code) |
Prepends a thread-local error buffer with error code. | |
static int | gx_seterror (int code, const wchar_t *wformat,...) |
Clears and updates a thread-local error buffer (Unicode version). | |
static int | gx_seterrora (int code, const char *wformat,...) |
Clears and updates a thread-local error buffer (ASCII version). | |
static int | gx_appenderror (int code, const wchar_t *wformat,...) |
Appends a thread-local error buffer (Unicode version). | |
static int | gx_appenderrora (int code, const char *wformat,...) |
Appends a thread-local error buffer (ASCII version). | |
static int | gx_prependerror (int code, const wchar_t *wformat,...) |
Prepends a thread-local error buffer (Unicode version). | |
static int | gx_prependerrora (int code, const char *wformat,...) |
Prepends a thread-local error buffer (ASCII version). | |
static int | gx_updateerrtable (int nitems, const gxERRITEM *items) |
Updates the error table in the memory. | |
static int | gx_pusherror (void) |
Pushes the error code and string to the error stack. | |
static int | gx_poperror (void) |
Pops the error code and string from the error stack. | |
static int | gx_listdevices (int *nitems, GX_DEVICE_INFO *items, unsigned int flags, GX_DEVICE_INFO *filter) |
Lists the available GX devices (Unicode version). | |
static int | gx_listdevicesa (int *nitems, GX_DEVICE_INFOA *items, unsigned int flags, GX_DEVICE_INFOA *filter) |
Lists the available GX devices (ASCII version). | |
static int | gx_opendevicea (gxHANDLE *handle, GX_DEVICE_INFOA *info, unsigned int flags, GX_DEVICE_INFOA *filter, int nproperties, const char **properties, int timeoutms) |
Selects and opens a device in the GX system (ASCII version). | |
static int | gx_opendevice (gxHANDLE *handle, GX_DEVICE_INFO *info, unsigned int flags, GX_DEVICE_INFO *filter, int nproperties, const wchar_t **properties, int timeoutms) |
Selects and opens a device in the GX system (Unicode version). | |
static int | gx_getsysteminfo (GX_SYSTEM_INFO *info) |
Returns information about the GX system. |
enum GX_ERROR_FLAGS |
Enumerations for flags parameter of gx_seterror() function.
enum GX_INFO_IDS |
Identification numbers for gxMODULEINFO structure (for GXSD 7.x modules).
GXMODULE_INFO_ID |
Module identification number for gxMODULEINFO structure (for GXSD 7.x modules).
|
GXUSRDRV_INFO_ID |
User driver identification number for gxMODULEINFO structure (for GXSD 7.x modules).
|
enum GX_DEVICE_FLAGS |
enum GX_SYSINFO_FLAGS |
Flags for querying the GX system info.
int GXAPI gx_call | ( | struct gxHANDLE | handle, | |
int | function, | |||
void * | params | |||
) |
Calls a module process with the specified parameters.
The functions and parameters usable inside the modules can be found in the documentation of the modules. The headers given with the modules contain inline functions, that make the access to the functions of the module easier.
handle | Handle of an opened module or special system handle ( see gx_direct() ). | |
function | Identifier of the function (GX_CALL_xxx). | |
params | Parameters to give for the function (GX_PARM_xxx). |
Calls a module process with the specified parameters.
The functions and parameters usable inside the modules can be found in the documentation of the modules. The headers given with the modules contain inline functions, that make the access to the functions of the module easier.
handle | Handle of an opened module or special system handle ( see gx_direct() ). | |
function | Identifier of the function (GX_CALL_xxx). | |
params | Parameters to give for the function (GX_PARM_xxx). |
References gxsdldr_errstr, and gxsdldr_modulename.
Referenced by gx_addvariantchild(), gx_addvariantitem(), gx_addvariantvalue(), gx_allocimage(), gx_alloctrafo(), gx_alloctrafo_dbg(), gx_calculatezipcrc(), gx_changevariantid(), gx_changevariantname(), gx_closefileinzip(), gx_closegz(), gx_closehandle(), gx_closezip(), gx_closezipa(), gx_coloradjust(), gx_colormixer(), gx_convertimage(), gx_convertpixels(), gx_convertvariant(), gx_convertvariantbypath(), gx_convertvariantbypatha(), gx_copyimage(), gx_copytrafo(), gx_createfileinzip(), gx_createfileinzipa(), gx_creategz(), gx_creategza(), gx_createimage(), gx_creatememslot(), gx_createtrafo(), gx_createvariant(), gx_createzip(), gx_createzipa(), gx_createzipinmemory(), gx_cutvariantchild(), gx_cutvariantitem(), gx_cutvariantvalue(), gx_drawtext(), gx_duplicatevariant(), gx_fastreconvert(), gx_fileinfoinzip(), gx_fileinfoinzipa(), gx_findvariantchild(), gx_findvariantitem(), gx_firstfileinzip(), gx_firstfileinzipa(), gx_flushproperties(), gx_freeimage(), gx_freetrafo(), gx_getallproperties(), gx_getallpropertiesa(), gx_geterror(), gx_geterrora(), gx_geterrorcode(), gx_getinitialzipcrc(), gx_getmemslot(), gx_getmoduleinfo(), gx_getmoduleproperty(), gx_getmodulepropertya(), gx_getpixelptr(), gx_getpixelsize(), gx_getproperties(), gx_getpropertiesa(), gx_getproperty(), gx_getpropertya(), gx_getpropertyparent(), gx_getpropertyparenta(), gx_getpropertytype(), gx_getpropertytypea(), gx_getsysteminfo(), gx_getvariant(), gx_getvariantbypath(), gx_getvariantbypatha(), gx_getvariantchild(), gx_getvariantinfo(), gx_getvariantitem(), gx_getvariantvalue(), gx_getzipcomment(), gx_getzipcommenta(), gx_getzipinfo(), gx_getzipinmemory(), gx_globalcheck_dbg(), gx_globalrealloc(), gx_globalrealloc_dbg(), gx_globalsize(), gx_globaltestmem_dbg(), gx_gzcompress(), gx_gzuncompress(), gx_imagecompose(), gx_imagedifference(), gx_imagefromvariant(), gx_imageftransform(), gx_imagetovariant(), gx_imagetransform(), gx_initimage(), gx_inittrafo(), gx_isvalidimage(), gx_isvalidtrafo(), gx_itrafo(), gx_itrafo_pnt(), gx_leavevariant(), gx_listdevices(), gx_listdevicesa(), gx_listmodules(), gx_listmodulesa(), gx_loadfrommem(), gx_loadimage(), gx_loadimagea(), gx_loadproperties(), gx_loadpropertiesa(), gx_loadtrafo(), gx_loadtrafoa(), gx_locatefileinzip(), gx_locatefileinzipa(), gx_mirrorimage(), gx_mirrorpixels(), gx_motdetiteration(), gx_mpcommit(), gx_mpstarttransaction(), gx_nextfileinzip(), gx_nextfileinzipa(), gx_opendevice(), gx_opendevicea(), gx_openfileinzip(), gx_openfileinzipa(), gx_opengz(), gx_opengza(), gx_openmodule(), gx_openmodulea(), gx_openzip(), gx_openzipa(), gx_openzipinmemory(), gx_poperror(), gx_pusherror(), gx_readfromfileinzip(), gx_readgz(), gx_readlexfieldzip(), gx_refhandle(), gx_refimage(), gx_reftrafo(), gx_refvariant(), gx_removevariantchild(), gx_removevariantitem(), gx_removevariantvalue(), gx_rmproperties(), gx_rmpropertiesa(), gx_rotateimage(), gx_rotatepixels(), gx_saveimage(), gx_saveimagea(), gx_savemoduleproperties(), gx_savemodulepropertiesa(), gx_saveproperties(), gx_savepropertiesa(), gx_savetomem(), gx_savetrafo(), gx_savetrafoa(), gx_seterrorafv(), gx_seterrorfv(), gx_setmoduleproperty(), gx_setmodulepropertya(), gx_setproperty(), gx_setpropertya(), gx_setpropertyparent(), gx_setpropertyparenta(), gx_testimagefileformat(), gx_testimagefileformata(), gx_testimagefileformatid(), gx_testimagefileformatidmem(), gx_testimagefileformatmem(), gx_trafo(), gx_trafo_pnt(), gx_trafofromvariant(), gx_trafotovariant(), gx_unrefhandle(), gx_unrefimage(), gx_unrefmemslot(), gx_unreftrafo(), gx_unrefvariant(), gx_updateerrtable(), gx_updatevariant(), gx_updatevariantdata(), gx_watchdog(), gx_writegz(), gx_writelogv(), gx_writelogva(), gx_writetofileinzip(), gx_zoomimage(), and gx_zoompixels().
static gxHANDLE gx_direct | ( | int | call_group | ) | [static] |
Creates a handle for the direct access.
call_group | Call-group of the module (specified in gxsd.h: GX_CALL_GROUP_xxx). |
References gxHANDLE::handle.
Referenced by gx_calculatezipcrcd(), gx_getinitialzipcrcd(), gx_gzcompressd(), and gx_gzuncompressd().
static int gx_listmodules | ( | unsigned int | flags, | |
const wchar_t * | filter, | |||
wchar_t *** | files, | |||
unsigned int ** | versions, | |||
int * | nitems | |||
) | [static] |
Lists path and version of modules (Unicode version).
flags | Reserved for future usage. Currently must be 0. | |
filter | Name of the module (usable '*' and '?' character, e.g. 'cmanpr*') | |
files | The function creates a table with full path and module names. You must free every item and table by gx_globalfree function. 'for(int ix = 0; ix < nitems; ix++) { gx_globalfree(files[ix]); } gx_globalfree(files);' | |
versions | The function creates a table with file versions (it can be 0.0.0.0). You must free the table with gx_globalfree function. | |
nitems | The function returns number of items of tables (files, versions). |
References gx_call().
static int gx_listmodulesa | ( | unsigned int | flags, | |
const char * | filter, | |||
char *** | files, | |||
unsigned int ** | versions, | |||
int * | nitems | |||
) | [static] |
Lists path and version of modules (ASCII version).
flags | Reserved for future usage. Currently must be 0. | |
filter | Name of the module (usable '*' and '?' character, e.g. 'cmanpr*') | |
files | The function creates a table with full path and module names. You must free every item and table by gx_globalfree function. 'for(int ix = 0; ix < nitems; ix++) { gx_globalfree(files[ix]); } gx_globalfree(files);' | |
versions | The function creates a table with file versions (it can be 0.0.0.0). You must free the table with gx_globalfree function. | |
nitems | The function returns number of items of tables (files, versions). |
References gx_call().
static int gx_isvalidhandle | ( | gxHANDLE | handle | ) | [static] |
Checks if the handle of a module is valid.
handle | Handle of the module. |
References gxHANDLE::handle.