MultiCam Boards Documentation > MultiCam Documentation > MultiCam User Guide > Channel Class > How to configure a Channel? > Code example to configure a channel

Code example to configure a channel

The following code fully creates and configures a channel for a Domino Alpha 2 board that is designated by DriverIndex=1:

//Connecting to driver

MCSTATUS Status = McOpenDriver(NULL);

//Declaring the topology

Status = McSetParamStr(MC_BOARD + 1, MC_BoardTopology, "2_2");

//Creating an Alpha channel

MCHANDLE MyAlphaChannel;
Status = McCreate(MC_CHANNEL_ALPHA_Y, &MyAlphaChannel);

//Assigning the Alpha board to the channel

Status = McSetParamInt(MyAlphaChannel, MC_DriverIndex, 1);

//Playing the CAM file

Status = McSetParamStr(MyAlphaChannel, MC_CamFile, "XC-HR300_P100RA");

//... Application code ...

//Deleting the Alpha channels

Status = McDelete(MyAlphaChannel);

//Disconnecting from driver

Status = McCloseDriver();

The channel creation model specifies the Y connector, which is consistent with the chosen topology "2_2".

The Status variable can be used for error checking.