MultiCam Boards Documentation > MultiCam Documentation > MultiCam User Guide > MultiCam Basics > Parameters > Accessing a Parameter > Code Examples for getting a MultiCam Parameter > How to get an Enumerated MultiCam Parameter

How to get an Enumerated MultiCam Parameter

The mandatory MultiCam API functions to obtain the value from an enumerated parameter are:

Function

Method

McGetParamInt

By-ident reference method
By-ident enumerated item reference method

McGetParamNmInt

By-name reference method
By-ident enumerated item reference method

McGetParamStr

By-ident reference method
By-name enumerated item reference method

McGetParamNmStr

By-name reference method
By-name enumerated item reference method

For the by-ident enumerated item reference method, the returned value is of the INT32 type.

For the by-name enumerated item reference method, the returned value is of the PCCHAR type.

Example

The following code gets the channel-class expert-level enumerated parameter SyncMode according to all four methods:

//Declaring an integer variable

INT32 MyMode;

//Getting the parameter using the by-ident parameter
//and by-ident enumerated method

Status = McGetParamInt(ObjectHandle, MC_SyncMode, &MyMode);

//Getting the parameter using the by-name parameter
//and by-ident enumerated method

Status = McGetParamNmInt(ObjectHandle, "SyncMode", &MyMode);

//Declaring a string variable

PCCHAR MyModeStr;

//Getting the parameter using the by-ident parameter
//and by-name enumerated method

Status = McGetParamStr(ObjectHandle, MC_SyncMode, &MyModeStr, 32);

//Getting the parameter using the by-name parameter
//and by-name enumerated method

Status = McGetParamNmStr(ObjectHandle, "SyncMode", &MyModeStr, 32);

The Status variable can be used for error checking.