[Previous] [Contents] [Index] [Next]

PhSysInfo_t

Data structure for system information

Synopsis:

typedef struct Ph_sys_info {
        PhGeneralSysInfo_t   gen;
        PhGrafxInfo_t        gfx;
        PhKbdInfo_t          kbd;
        PhPtrInfo_t          ptr;
        PhIgInfo_t           ig;
} PhSysInfo_t;

Description:

The PhSysInfo_t structure contains system information, and is filled in by PhQuerySystemInfo() and PtQuerySystemInfo(). This structure includes at least:

PhGeneralSysInfo_t gen
General information. Always examine this.
PhGrafxInfo_t gfx
Information for graphics regions.
PhKbdInfo_t kbd
Information for keyboard regions.
PhPtrInfo_t ptr
Information for graphics regions.
PhIgInfo_t ig
Information for input-group regions.

Note: Always examine the general information gen first, to see which of the other structures contain data.

The gen member is a PhGeneralSysInfo_t structure that contains at least:

ulong_t valid_fields
Indicates which of the other fields are valid, as described below.
ushort_t version
the version of the Photon server
ulong_t bandwidth
the estimated bandwidth between your process and the Photon server
ulong_t capabilities
not in use
ushort_t num_gfx
the number of graphics regions
ushort_t num_kbd
the number of keyboard regions
ushort_t num_ptr
the number of pointer regions
ushort_t num_ig
the number of input-group regions

The valid_fields field is a set of flags that indicates which of the other fields are valid. The flags include:

For example, before referring to gfx in the PhSysInfo_t structure, you should check that it's valid:

if (sysinfo.gen.valid_fields & Ph_GEN_INFO_NUM_GFX)
{
  /* It's valid. */
  ...
}

The other fields in the PhSysInfo_t structure are similar. Each has a valid_fields field that you should check before using the data. For details on these structures, see the <photon/PhT.h> header file.

Classification:

Photon

See also:

PhQuerySystemInfo(), PtQuerySystemInfo()

"System information" in the Regions chapter of the Programmer's Guide.


[Previous] [Contents] [Index] [Next]