/// <summary> /// Initializes a new instance of the <see cref="PigsClient"/> class. /// </summary> /// <param name="host">Remote host.</param> /// <param name="port">Remote port.</param> public PigsClient(string host, int port) { this.m_host = host; this.m_port = port; this.I2C = new I2CHelper(this); this.m_callbackLock = new object(); this.m_callbacks = new List <CallbackInfo>(); this.m_control = new SocketFlux(5000); this.m_notif = new SocketFlux(100); }
private static void NC(SocketFlux socket, uint handle) { Commands cmd = Commands.NC; uint p1 = handle; uint p2 = 0; int p3 = 0; byte[] extension = new byte[0]; uint res; socket.RunCommand(cmd, p1, p2, p3, extension, out res); }
private static uint NOIB(SocketFlux socket) { Commands cmd = Commands.NOIB; uint p1 = 0; uint p2 = 0; int p3 = 0; byte[] extension = new byte[0]; int res; socket.RunCommand(cmd, p1, p2, p3, extension, out res); return(unchecked ((uint)res)); }
private static uint BR1(SocketFlux socket) { Commands cmd = Commands.BR1; uint p1 = 0; uint p2 = 0; int p3 = 0; byte[] extension = new byte[0]; uint res; socket.RunCommand(cmd, p1, p2, p3, extension, out res); return(res); }