PDA

View Full Version : Need help trying to write serial plug-in for Vixen



steve
09-17-2007, 03:00 AM
I have a set of custom controller boards I want to control with Vixen, but I'm not getting too far with the supplied programmer guide and sample code. I think the main problem is that I'm a long-time Unix programmer but don't know my way around the .NET framework, so I'm not really sure how to get this started.

Is there anyone willing to lend a hand in writing the plug-in for these boards? These take a simple sequence of 1, 2, or 3-byte commands on a serial port, with commands like "all channels off", "turn on/off channel X" or "set channel X to level Y".

Any help or advice would be greatly appreciated.

teberle
09-18-2007, 10:18 AM
Steve,

I have looked at the protocol that you sent and should be able to get something roughed in shortly. I will be using the 2.0 vixen which can be downloaded from the Beta2 section. Look for additional pm's or emails as I progress.

Tony

steve
09-18-2007, 11:43 AM
Steve,

I have looked at the protocol that you sent and should be able to get something roughed in shortly. I will be using the 2.0 vixen which can be downloaded from the Beta2 section. Look for additional pm's or emails as I progress.

Tony

Thanks! This will be a big help. I'll download 2.0 in the mean time and check it out.

wingrunr
09-23-2007, 09:32 AM
Is the API for 1.0 the same for 2.0?

teberle
09-23-2007, 11:13 PM
No it is a little different. You will inherit from Vixen.IEventDrivenOutputPlugIn versus Vixen.Plugin. It looks like KC has made it more compartmentalized.

A Marchini
09-25-2007, 12:58 PM
No it is a little different. You will inherit from Vixen.IEventDrivenOutputPlugIn versus Vixen.Plugin. It looks like KC has made it more compartmentalized.

Not having looked at it yet, and not being the most experienced with Visual Studio, how do you get the funcitons in the inherited class? Does it just create a template from them?

I am just curious, I am hoping to get back to my TCP/IP plugin after I have a heart attack from my current software ship date.
Nothing like a stay in the hospital to relax with the ole computer.
(thats a joke, I am busy though)
Tony

teberle
09-25-2007, 03:05 PM
Tony,

When you inherit from the Vixen.IEventDriverOutputPlugin in VS 2005 it will put a little blue line under the V, you can click on it and it will automatically generate the method stubs for you. Here is what a blank class would look like.

using System;
using System.Collections.Generic;
using System.Text;

using Vixen;

namespace SWSerialController
{
public class SerialController : Vixen.IEventDrivenOutputPlugIn
{
#region IEventDrivenOutputPlugIn Members

public void Event(byte[] channelValues)
{
throw new Exception("The method or operation is not implemented.");
}

public void Initialize(IExecutable executableObject, SetupData setupData, System.Xml.XmlNode setupNode)
{
throw new Exception("The method or operation is not implemented.");
}

#endregion

#region IOutputPlugIn Members

public HardwareMap[] HardwareMap
{
get { throw new Exception("The method or operation is not implemented."); }
}

public void Setup()
{
throw new Exception("The method or operation is not implemented.");
}

public void Shutdown()
{
throw new Exception("The method or operation is not implemented.");
}

public List<System> Startup()
{
throw new Exception("The method or operation is not implemented.");
}

#endregion

#region IPlugIn Members

public string Author
{
get { throw new Exception("The method or operation is not implemented."); }
}

public string Description
{
get { throw new Exception("The method or operation is not implemented."); }
}

public string Name
{
get { throw new Exception("The method or operation is not implemented."); }
}

#endregion
}
}