This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Copas - TCP status and Control
#8
(15.07.2024, 10:57)admin Wrote: Please describe what your library/app is doing in more detail.
Clients are ethernet interfaces from a lighitng control system, the interfaces support 1 tcp connection only at a time.

The Library returns a table of functions

Start_server() Starts a Copas loop and checks a json file for a list of previously saved clients and connect's clients upon initialization

add_client() adds a new tcp client to conenct and then add the client to the json file
remove_client() disconnects an existing client and removes them from the json file

Each clients data is parsed and used to write to objects on change

start_udp_server starts when start_server is called and starts the listening server for object events to send data back and change lighting states. I added functions here to add and remove clients via event comma separated event strings so an event script could add and remove clients, but would prefer to call the function directly if possible.

This is all working fine but now i want to develop it into an app to make it more user friendly.

I've started to create a .lp page as attached. Currently it checks and loads a json file then displays the contents, at the moment it saves a form, then the entries can be edited or removed.

When an entry is added i want to call the add_client function.
When an entry is removed i want to call the remove_client function

At the top are buttons that would call the start_server or stop_server to start and stop everything.

Then there are buttons for each entry to allow individual conenction control.

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Copas - TCP status and Control - by Diggerz - 17.05.2024, 22:08
RE: Copas - TCP status and Control - by admin - 20.05.2024, 07:24
RE: Copas - TCP status and Control - by admin - 15.07.2024, 06:30
RE: Copas - TCP status and Control - by admin - 15.07.2024, 10:57
RE: Copas - TCP status and Control - by Diggerz - 15.07.2024, 11:29

Forum Jump: