Hi All,
Recently I needed to interact between my own software and Freestyler.
So I decided to dive into the TCP / ASCII protocol and wrote a C# client which can be used to control Freestyler.
It is a little bit quick and dirty but for what's worth, I've put the code on Github:
https://github.com/matthijsderidder/FreeStyler .
I've released it under the MIT license, so it means you can basically do anything with it you would like.
I provide it "as is" but feel free to extend.
Best Regards!
C# Freestyler Client
Forum rules
FreeStyler is made by Rapheal Wellekens there is no other person developing the software so please be aware that adding new features
and changing current ones may require a lot of work. This is a place to discuss ideas, please make requests via the feature request option on the BUG TRACKER
FreeStyler is made by Rapheal Wellekens there is no other person developing the software so please be aware that adding new features
and changing current ones may require a lot of work. This is a place to discuss ideas, please make requests via the feature request option on the BUG TRACKER
-
- Knows how to turn Lights ON
- Posts: 3
- Joined: 26 Nov 2022, 04:39
- FreeStyler Version: 4.1.1
- I Use FreeStyler for: Just for the Fun of it.
- djSupport
- Hosts the Freestyler Forum and is an Admin!
- Posts: 1912
- Joined: 09 Jul 2007, 18:57
- FreeStyler Version: Forum la
- I Use FreeStyler for: Just for the Fun of it.
- Contact:
Re: C# Freestyler Client
Cheers for sharing!
Heather Trott, You Babe! I Drive a Dacia Duster and Explore! Check it out
-
- Knows how to turn Lights ON
- Posts: 3
- Joined: 26 Nov 2022, 04:39
- FreeStyler Version: 4.1.1
- I Use FreeStyler for: Just for the Fun of it.
Re: C# Freestyler Client
You're welcome!
Currently I'm updating / extending the Client.
I'm also working on a WinForms Test App and a WinForms Control Library with some default controls.
I was wondering how to deal with the responses from FreeStyler. After sending a command or request there is a continuously 0xFF byte, I assume this is something like a heartbeat which tells that FS is still "alive".
Even after disconnecting the client (right click at icon in FS and select "Disconnect All"), the TCP Connection remains open.
While sending a request command, I'm not sure how to recognize a response e.g. when requesting button captions and states sometimes It results in the buttons obtaining the state (0 or 1) as caption, I think because my parser misses the button captions and recognizes the button states as captions.
So, how is the send / receive process intended?
Only receive data after sending a request or use a continuous loop which runs as long as the connection is open, but if this is the case, how do I know what response I receive (is it a list of captions or a list of button states).
And last question: The button states, do I have to poll for the states, so if something in FS changes, I receive the change or is there a call / package from FS to my software which tells me that something has changed and needs to be updated?
Best Regards!
Currently I'm updating / extending the Client.
I'm also working on a WinForms Test App and a WinForms Control Library with some default controls.
I was wondering how to deal with the responses from FreeStyler. After sending a command or request there is a continuously 0xFF byte, I assume this is something like a heartbeat which tells that FS is still "alive".
Even after disconnecting the client (right click at icon in FS and select "Disconnect All"), the TCP Connection remains open.
While sending a request command, I'm not sure how to recognize a response e.g. when requesting button captions and states sometimes It results in the buttons obtaining the state (0 or 1) as caption, I think because my parser misses the button captions and recognizes the button states as captions.
So, how is the send / receive process intended?
Only receive data after sending a request or use a continuous loop which runs as long as the connection is open, but if this is the case, how do I know what response I receive (is it a list of captions or a list of button states).
And last question: The button states, do I have to poll for the states, so if something in FS changes, I receive the change or is there a call / package from FS to my software which tells me that something has changed and needs to be updated?
Best Regards!
- djSupport
- Hosts the Freestyler Forum and is an Admin!
- Posts: 1912
- Joined: 09 Jul 2007, 18:57
- FreeStyler Version: Forum la
- I Use FreeStyler for: Just for the Fun of it.
- Contact:
Re: C# Freestyler Client
The best person to answer this is the developer you may be best to pop it onto the bug tracker to get his attention
Heather Trott, You Babe! I Drive a Dacia Duster and Explore! Check it out
-
- Knows how to turn Lights ON
- Posts: 3
- Joined: 26 Nov 2022, 04:39
- FreeStyler Version: 4.1.1
- I Use FreeStyler for: Just for the Fun of it.
Re: C# Freestyler Client
Thanks!
I assume that's @lj_raph right?
I'll post this question onto the bug tracker.
Best regards!
I assume that's @lj_raph right?
I'll post this question onto the bug tracker.
Best regards!