Get the client(s) connected to a net

CAN Development Packages for Windows®
Post Reply
xaver2000
Posts: 1
Joined: Mon 3. Mar 2014, 17:38

Get the client(s) connected to a net

Post by xaver2000 » Mon 3. Mar 2014, 17:48

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.

M.Maidhof
Support
Support
Posts: 1303
Joined: Wed 22. Sep 2010, 14:00

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

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

Hi,

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

regards

Michael

Post Reply