grass valley developers

Home > APIs > AppServer API > Examples > Connection and System Status > Get Channel Owner

Get Channel Owner

Below is sample code to find out who owns a K2's channel. The information returned includes the machine, the suite name, the user's name, and application that owns the channel.

[C#]
// make sure the remote system is up and running first
string channel = "C1";
string machine = "";
string suite = "";
string user = "";
string app = "";

appServerMgrProxy.GetChannelOwnerInfo(channel, out machine, out suite,
out user, out app);

Console.WriteLine("machine = {0} suite = {1} user = {2} app = {3}",
machine, suite, user, app);

[C++]
_variant_t varChan("C1");
BSTR bstrMachine;
BSTR bstrSuite;
BSTR bstrUser;
BSTR bstrApp;

spAppServerMgrProxy->GetChannelOwnerInfo(varChan, &bstrMachine, &bstrSuite, 
 &bstrUser, &bstrApp);

CString sMachine = bstrMachine;
CString sSuite = bstrSuite;
CString sUser = bstrUser;
CString sApp = bstrApp;

printf("machine = %s suite = %s user = %s app = %s\n", sMachine, sSuite, 
 sUser, sApp);