<< Click to Display Table of Contents > 

Client Control Interface Manual > Programming Examples > Get Server Status with Mask

Get Server Status with Mask
Previous pageReturn to chapter overviewNext page

The following examples shows how to get the status of the USC server and explains how to use masks for this purpose.

 

Get Server Status with Mask

 

// Get the over all server status

cci.ScGetLongValue((int)ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus )

 

//Only ask for the documented server stati using a mask combined with & at the end

cci.ScGetLongValue( (int)ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus ) & 0x3000B

 

// Here, the mask 0x3000B ensures only to look for the bits at the position x in binary representation: 00xx 0000 0000 0000 x0xx, which are the documented parameters (1, 2, 8, 65536 and 131072 in decimal representation) for scComSAMLightClientCtrlLongValueTypeServerStatus.

 

cci.ScGetLongValue( (int)ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeServerStatus ) & 0x30000

//If you only want to know if the connected device is a USC-1 or USC-2 card, use a mask for the corresponding values (x in binary representation 00xx 0000 0000 0000 0000, 65536 and 131072 in decimal representation) which would be 0x30000 in hexadecimal representation.

 

Table 409: Get Server Status with Mask