Page 1 of 1

Get the client(s) connected to a net

Posted: Mon 3. Mar 2014, 17:48
by xaver2000
Hi there,

I have trouble to retrieve the connected client(s) of a net. I would be grateful for a hint regarding this matter.
I tried the follwing, but it doesn' seem to work.

Code: Select all

            StringBuilder asNetName = new StringBuilder(CanApi2.MAX_HCANCLIENT + 1);
            for (byte u8Handle = 0; u8Handle <= CanApi2.MAX_HCANNET; u8Handle++)
                ECanErr eVar = (ECanErr)CanApi2.GetNetParam(u8Handle, CanApi2.PARAM_NETCLIENTS, asNetName,      CanApi2.MAX_HCANCLIENT + 1);
                if (eVar == ECanErr.OK)
                    if (asNetName.ToString().Equals(sNetName))
                        Console.WriteLine(string.Format("{0} {1}", u8Handle, asNetName.ToString()));
Thanks in advance.

Re: Get the client(s) connected to a net

Posted: Tue 4. Mar 2014, 10:45
by M.Maidhof

please send us an email to our support address with your licence number of your PCAN.Developer package. Thank you.