What is the best way to test code, without a device?
PKennedy
Posts: 7
Well I'm new to the forums and also new to the AV world on top of that. I was just wondering what are some of the best ways to test out your code, especially when you don't have the device right in front of you...
Right now I'm having to work with some Polycom systems (VSX 7000s) and they are not exactly user friendly.
Does anyone have any ideas on ways to getting around these challenges?
Thanks,
Paul
Right now I'm having to work with some Polycom systems (VSX 7000s) and they are not exactly user friendly.
Does anyone have any ideas on ways to getting around these challenges?
Thanks,
Paul
0
Comments
I will not take on many situations that require me to work on gear that does not exist in some fashion that I can test. If I'm pressed into doing something like that with a complex piece of gear, I'll put in a disclaimer that I am not in control of the costs of programming the device and switch to time and materials.
I have my standards. If you don't like them, I have others.
Oh I agree,
My thing is that since it's a user owned device and we have the rest of the system it just turns out to be one of those jobs that I'm going to have to program when I get to the field. Still its a little scary taking on something like this for the first time.
Nice, I didn't know that I could do that...I'll try it out and see how it goes. Thanks
The Polycom VSX7000 codecs really aren't too bad. The documentation pretty much describes how they work. The Visual Concert thing (in order to select a VGA input) is a tad strange, in my opinion, and setting up multiple cameras may be a bit tricky. Most of the problems that we have with these are a result of setup issues, not programming issues. Though, most of the setup can be done through the RS232 port which means that I usually get blamed even if it has to do with ISDN setup or something.
You might consider the AMX module for this thing though that might make testing impossible without the device. Lots of AMX modules seem to depend on some sort of inscrutable secret handshake before they'll send out proper strings and parse proper responses.
I'm often put in this position unfortunately, as our sales staff have a large variety of old and new gear they will integrate, and after a while you get better at it. At first, for some devices with hairy protocols, I wrote a test driver that repsonded the same way the device was supposed to, or sent unsolicited feedback when I hit virtual buttons. This way you can make test cases and include incomplete strings to mimic real life connections or error conditions.
These days, as long as I have the command document, I pretty much just write it without testing it and it will usually require only minor timing modifications on site, or perhaps a workaround for a firmware bug. I would suggest doing this as well, and think it out without testing it. It takes longer but the rewards are worthwhile. The Polycom has a prewritten Duet module so I would just use that and simulate feedback with a virtual device, or make a button event that will send whatever string you want to your module using Control a Device and test it that way if need be. The constant type/compile/test routine is a habit to get out of if you can.
Paul
Yeah that's what I just came across was the Java Duet Module for the 8000 series and Polycom told me that it should work with the 7000 series model, since the commands are the same. So I'm hoping that it'll work, that would save me a lot of time. I just wish I could crack open their module and see how they did it, cause I know Java and that would be sweet to see.
Thanks : D
Java code is boring to look at. All the cool stuff is done behind the scenes in the libraries.
Paul
tcp server listening on port 1001:
netcat -l -p 1001
They sell various great hardware bits for sniffing and emulation too.
http://www.rs232pro.com/
Here's a thread that discusses testing your parsing routines with emulate a device if there's no real device handy...
http://www.amxforums.com/showthread.php?6199-Using-Emulate-a-Device-to-test-your-parsing-routines
-John
Just trying combine_device and fiddling the on/off of the virtual device, it didn't trigger any events on the combined device.
Tried DO_PUSH too. Didn't think it would work and it didn't.
Emulate Device doesn't work for you?
I'd run wires from one port to another, but the NI-700 I have doesn't have enough ports.
As Eric said, "Emulate a Device" in NetLinx Studio does exactly what you are asking.
Here are some cheap ports guaranteed not DOA:
http://cgi.ebay.com/Panja-AMX-Axcent-3-Integrated-Axcess-Controller-/120740858336?pt=LH_DefaultDomain_0&hash=item1c1cb749e0
http://nmap.org/ncat/
Made a batch file that says:
start ncat.exe -l 5000
start ncat.exe -l 6101
start ncat.exe -l 6103
start ncat.exe -l 6102
4 instant fake tcp servers (for testing multiple instances of the same module, or a bunch of different modules)