Driver for the "USBDMX" USB Device by Lighting Solutions.
Alpha-Release
You need to put this driver into system folder:system extensions. Otherwise the Mac always will bother you with a dialog saying that there is no suitable driver when you connect the USBDMX.
If you are an user there is nothing more to do - you may directly launch an application that makes use of the USBDMX via this driver.
If you are a developer you'll need to study the drivers' api to see what you can do in your code.
Genral Information :
The driver does all the communication between the USBDMX and the Mac. As you know it does not present any user interface to the uus.
The driver is fully buffered so that you cannot halt the system with an call. Therefore the driver instantiates a own cycle that does all the usb-communication for you and presents some nice accessors API to the user.
All communication and accessor calls are buffered and don't need to be flushed ; Also the driver prevents you from accessing data in the middle of a usb transaction which would give you false endians on a Mac.
For convinience the driver gives you pointers to two 512 byte blocks in its heap (which is in the system heap) where the DMXdata is present. So if you want to read DMX just read from the pointer, but be aware that the driver constantly updates this memory. Writing is the same. Thanks to the Mac multitasking this can happen without waiting on each other cause the USB transactions are block transactions which are thread and interrupt safe.
You can, if you need, set the driver to use other pointers in your application heap; Be aware of the usual gotchas like moved memory at interrupt time and so on.
All functions do exactly what their name says. The neccassery headers are included in the packages on the download page. The functions upto 'getRUNMODE' are fixed but for further inventions the struct definitely will expanded more or less.
Notes about the API use :
In first keep in mind that the driver runs in the system heap and so its not the place to waste cycles cause the driver already puts a constant load on the system.
Second, based on first, there is done no checking about the put in pointers and sizes of buffers. If you are a child trying to do a so called hack for your personal fame you are completely wrong here. This software is intended to be used by professionals who respect the directions of the author cause they want a silently working machine. The author does not give any support to modifications in the driver or on how to implement other functionality. Therefore you have to write an appl.
General Information special functions :
Cause in most cases you place the USBDMX in the DMX512 line the driver has a copy function that copies received data directly to the transmitter to pass it along the DXM line. The copy function can be used with a selector-table that rises the work to be done in the drivers cycle to at least 512 more instructions cause this copy decision has to be checked (if/else) on every single char while in the usb transaction completition of a data read in ! (see blow)
Same applies to the limit in the output cycle where the if/else does two comparisons and one change at 44Hz...
These functions are implemented slight easy. Initially the driver only exports a second symbol called "cen". cen is declared as struct dmxcensor in dmx512.h. If, at load/init, there are resources present in the driver file ('Copy',128 / 'Limi',128, preload, system heap, locked) they are stuffed into the corresponding cen.boundaries, cen.channels. Otherwise the handles are 0. You can change them later by your appl as you like - do not release the resources if they were loaded ! If you alter these values keep a local copy of the original handle to set the values back, if.
struct dmxacc {
dmx_pP setTXmemaddr;// so you say where the data is
dmx_pP setRXmemaddr;// and you say whereto write
dmx_rP getTXmemaddr;
dmx_rP getRXmemaddr;
dmx_r16 getTXslots;
dmx_p16 setTXslots;
dmx_r8 getTXstartcode;
dmx_p8 setTXstartcode;
dmx_r32 getTXframecount;
dmx_r16 getRXslots;
dmx_r8 getRXstartcode;
dmx_p8 setRXstartcode;
dmx_r32 getRXframecount;
dmx_r16 getSTATUS;
dmx_r16 getRUNMODE;
dmx_p16 setCOPYMODE; /* 0 means copy off - rest is on - boolean short*/
dmx_p16 setBLOCKING; /* guess */
}; // apicmds in code for api commands
For more information about programming or purchasing the USB2DMX Interface please refer to www.lighting-solutions.de. Information on how to get an Apple Computer with usb should be obvious.
Please note that I only develop software for a device that is built by someone else. This means I do not sell this equipment, neither I do the support for it. I only bring it to the MacOS.
USB2DMX Device Download Page ; read the licence agreement and then download the software to let your Mac talk to your lighting gear. Enjoy !
Ask me for different versions or drivers for other interfaces. I do custom-built-to-order.
Copyright : All rights reserved Hado Hein, 2001-2002, Berlin, Fed.Rep of Germany.