Operating systems, development tools, and professional
services for connected embedded systems
Home
Developer Resources

PhSysInfo_t

PDF Documents
More resources

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 fields in the PhSysInfo_t structure each have a valid_fields field that you should check before using the data.

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. */
  ...
}

gen

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

unsigned long valid_fields
Indicates which of the other fields are valid, and can be one or more of the following:
  • Ph_GEN_INFO_BANDWIDTH
  • Ph_GEN_INFO_CAPABILITIES
  • Ph_GEN_INFO_NUM_GFX
  • Ph_GEN_INFO_NUM_KBD
  • Ph_GEN_INFO_NUM_PTR
  • Ph_GEN_INFO_NUM_IG
unsigned short version
The version of the Photon server.
unsigned long bandwidth
The estimated bandwidth between your process and the Photon server. It can be one of:
  • Ph_BAUD_MIN — the minimum possible badnwidth
  • Ph_BAUD_SLOW — a slow connection
  • Ph_BAUD_NETWORK — a network speed connection
  • Ph_BAUD_CONSOLE — a fast connection
  • Ph_BAUD_MAX — the fastest possible connection
unsigned long capabilities
Not used.
unsigned short num_gfx
The number of graphics regions.
unsigned short num_kbd
The number of keyboard regions.
unsigned short num_ptr
The number of pointer regions.
unsigned short num_ig
The number of input-group regions.

gfx

The gfx member is a PhGrafxInfo_t structure that contains at least:

unsigned long valid_fields
Indicates which of the other fields are valid, as described below.
unsigned long reserved1, reserved2[3]
Reserved for QNX internal use.
unsigned long bandwidth
Connection speed (PhRelay only).
unsigned long capabilities
Indicates the lowest common denominator graphics rendering capabilities of all graphics drivers in the system. This bitfield can be one or more of the following:
  • Ph_GCAP_BLIT — the driver supports blitting.
  • Ph_GCAP_DIRECT — the driver is in direct mode.
  • Ph_GCAP_DIRECTCOLOR — the current video mode is a direct color mode.
  • Ph_GCAP_DRAW_ALPHA — the driver supports alpha blending.
  • Ph_GCAP_DRAW_CHROMA — the driver supports chroma keying.
  • Ph_GCAP_DRAW_GRADIENTS — the driver supports gradient drawing.
  • Ph_GCAP_DRAW_OFFSCREEN — offscreen memory contexts are supported.
  • Ph_GCAP_DRAW_TERN_ROPS — the driver supports ternary raster operations.
  • Ph_GCAP_FRAME_READPgReadScreen() is supported.
  • Ph_GCAP_FutureSupported — reserved.
  • Ph_GCAP_LOCALHW — the driver region is created by io-graphics running on the current node.
  • Ph_GCAP_MASKED_BLIT — the driver supports planemasked blitting.
  • Ph_GCAP_NONINTERLACED — the display framebuffer is not interlaced.
  • Ph_GCAP_OVERLAY — the driver supports video overlay.
  • Ph_GCAP_PALETTE — the driver supports a hardware palette.
  • Ph_GCAP_PHINDOWS — the driver region is created by phindows.
  • Ph_GCAP_RELAY — the driver region is created by phrelay.
  • Ph_GCAP_SHMEM — the driver supports draw data sent in shared memory.
  • Ph_GCAP_TEXT_AREAPgDrawTextArea() is supported.
  • Ph_GCAP_VIDEO_READABLE — the display framebuffer can be read linearly.
unsigned char color_bits
The current video mode's bits per pixel.
unsigned long possibilities
Indicates the best possible graphics rendering capabilities of all graphics drivers in the system. The flags are the same as for capabilities.

The other fields in the PhSysInfo_t structure are similar. 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.

 
©2013 QNX Software Systems Limited, a subsidiary of BlackBerry.   BlackBerry Logo