These adverts are supporting the forum's costs and the products/services are not endorsed by the forum owners.
First have you tried?
Log in to Search the Forum for help!
Learn more about using FreeStyler at the FreeStyler WIKI HERE
Learn more about DMX in General at The DMX Wiki HERE

if all else fails and you need a fixture consider the fixture building service HERE

C# Freestyler Client

Discuss suggestions here for the FreeStyler program then request them via the Bug Tracker
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
Post Reply
mastermattie
Knows how to turn Lights ON
Posts: 3
Joined: November 26th, 2022, 4:39 am
FreeStyler Version: 4.1.1
I Use FreeStyler for: Just for the Fun of it.

C# Freestyler Client

Post by mastermattie »

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!


User avatar
djSupport
Hosts the Freestyler Forum and is an Admin!
Posts: 1901
Joined: July 9th, 2007, 6:57 pm
FreeStyler Version: Forum la
I Use FreeStyler for: Just for the Fun of it.
Contact:

Re: C# Freestyler Client

Post by djSupport »

Cheers for sharing!
Heather Trott, You Babe! I Drive a Dacia Duster and Explore! Check it out
mastermattie
Knows how to turn Lights ON
Posts: 3
Joined: November 26th, 2022, 4:39 am
FreeStyler Version: 4.1.1
I Use FreeStyler for: Just for the Fun of it.

Re: C# Freestyler Client

Post by mastermattie »

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!
User avatar
djSupport
Hosts the Freestyler Forum and is an Admin!
Posts: 1901
Joined: July 9th, 2007, 6:57 pm
FreeStyler Version: Forum la
I Use FreeStyler for: Just for the Fun of it.
Contact:

Re: C# Freestyler Client

Post by djSupport »

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
mastermattie
Knows how to turn Lights ON
Posts: 3
Joined: November 26th, 2022, 4:39 am
FreeStyler Version: 4.1.1
I Use FreeStyler for: Just for the Fun of it.

Re: C# Freestyler Client

Post by mastermattie »

Thanks!

I assume that's @lj_raph right?
I'll post this question onto the bug tracker.

Best regards!
Post Reply

Return to “Ideas and Remarks”