yang.fourier Posted June 17, 2017 Share Posted June 17, 2017 I am trying to create a client driver to receive message from the remote server. In the control4 sdk api, there is a Lua TCP Client interface, it may be helpful. But I have one question. CreateTCPClient function could create a class worked like a socket. The class has OnRead method as a callback funciton. The question is how do we know the read data is available? I just can not find the way how the class notifies the driver. Is there anyone can help me? Thank you! Link to comment Share on other sites More sharing options...
RyanE Posted June 17, 2017 Share Posted June 17, 2017 Callbacks don't have notifications, they just get called when data is available. I haven't much used CreateTCPClient, but I believe you would just put in the callback, and your defined OnRead callback would be called when data is ready. RyanE Link to comment Share on other sites More sharing options...
yang.fourier Posted November 19, 2017 Author Share Posted November 19, 2017 On 2017/6/18 at 4:15 AM, RyanE said: Callbacks don't have notifications, they just get called when data is available. I haven't much used CreateTCPClient, but I believe you would just put in the callback, and your defined OnRead callback would be called when data is ready. RyanE Thank you so much. Now I have a new problem. I plan to write a driver to communicate with my phone. The driver consists of the C library code and lua code. Everything went well in my own computer before I run it in the HC-800. When the lua interpreter in C4 requires my C library, it always complains error "undefined symbol: lua_getfield(lua api function)" or other errors like this, which never happens in my computer. I use the same lua5.1.4 in my computer. I have checked all documents about the C4 drivers, and there is nothing about how to use the c library in the driver. Can you give me any tips? Thank you! Link to comment Share on other sites More sharing options...
msgreenf Posted November 19, 2017 Share Posted November 19, 2017 Thank you so much. Now I have a new problem. I plan to write a driver to communicate with my phone. The driver consists of the C library code and lua code. Everything went well in my own computer before I run it in the HC-800. When the lua interpreter in C4 requires my C library, it always complains error "undefined symbol: lua_getfield(lua api function)" or other errors like this, which never happens in my computer. I use the same lua5.1.4 in my computer. I have checked all documents about the C4 drivers, and there is nothing about how to use the c library in the driver. Can you give me any tips? Thank you!I believe only control4 can. Not driver devsSent from my BBB100-1 using Tapatalk Link to comment Share on other sites More sharing options...
RyanE Posted November 20, 2017 Share Posted November 20, 2017 There is no support in DriverWorks for C/C++ driver libraries, other than those built-in by Control4. RyanE Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.