Programming Organization/Logical Descriptions
vegastech
Posts: 369
I was going through my programming, and it seems as though the netlinx programming organization leaves a little to be desired. I was wondering what methods are being used to logically order the programming events for easy reading, such as breaking out Button Events into sections based on each device, or organizing level events based on rooms, etc. Something like this:
//Macros Section
//Background Audio Section
//Theater devices
//Family Room devices
If I'm crazy for thinking this, let me know. It seems to me that organizing items into this type of order might make it easier to troubleshoot issues as they arise, no?
//Macros Section
//Background Audio Section
//Theater devices
//Family Room devices
If I'm crazy for thinking this, let me know. It seems to me that organizing items into this type of order might make it easier to troubleshoot issues as they arise, no?
0
Comments
e.g.
(* RS232 DVD PLAYER *)
DATA_EVENTs...
TIMELINE_EVENTs...
BUTTON_EVENTs...
(* RS232 RECEIVER *)
DATA_EVENTs...
TIMELINE_EVENTs...
BUTTON_EVENTs...
(* DEVICE 3... *)
etc etc etc
etc etc etc
You can also break out each individual device into an include of you want! The possibilities are, as they say, endless
The compiler is perfectly fine with this.
Kevin D.
Each of those "sections" would exist as its own include file in my workspace.
This is what I do. Easy to copy over from workspace to workspace. I prefer to keep everything in one file (I rarely use includes), that way when going through code it's easier to see the flow (IMO).
--John
How so? Netlinx pretty much leaves it up to you how to organize your code. If it leaves a little to be desired, that's your doing not Netlinx.
Paul
Some of the wording is odd, but the OP is clearly referring to his own programming practices and not criticizing NS. (at least, every other poster in the thread included some form of advice so that's what I assumed was happening)
Jeff
And how about variables & constants that aren't used? Doesn't the Axcess compiler warn of those?
Oh god please........
Awesome.
I'm going to have to remember that one.
This is pretty easy to do by activating a Perl script through the Tools menu.
Paul