usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

LOSoftPatch.h

00001 /*
00002  *
00003  * Copyright (c) 2006, Ben Suffolk <ben@usbdmx.com>
00004  * All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without 
00007  * modification, are permitted provided that the following conditions are met:
00008  *
00009  * 1. Redistributions of source code must retain the above copyright notice,
00010  *    this list of conditions and the following disclaimer.
00011  *
00012  * 2. Redistributions in binary form must reproduce the above copyright notice,
00013  *    this list of conditions and the following disclaimer in the documentation
00014  *    and/or other materials provided with the distribution.
00015  *
00016  * 3. Neither the name of the usbdmx.com web site nor the names of its 
00017  *    contributors may be used to endorse or promote products derived from this
00018  *    software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
00023  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
00024  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
00025  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
00026  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
00029  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00030  * POSSIBILITY OF SUCH DAMAGE.
00031  *
00032  * $Id: LOSoftPatch.h 260 2010-11-11 18:58:13Z ben.suffolk $
00033  *
00034  */
00035 
00036 #import <Cocoa/Cocoa.h>
00037 @class LOHWBridge;
00038 @class LOHWChannelProxy;
00039 
00040 
00054 @interface LOSoftPatch : NSObject
00055 {
00056  NSMutableArray *hwBridges;     
00057  unsigned count;                
00058  LOHWChannelProxy **proxyArray; 
00059 }
00060 
00061 
00072 - (id)initUniverseWithHWBridge:(LOHWBridge *)aHWBridge;
00073 
00074 
00082 - (id)initWithCapacity:(unsigned)theCapacity;
00083 
00084 
00100 - (NSXMLElement *)XMLForOffset:(unsigned)anOffset;
00101 
00102 
00110 - (unsigned)count;
00111 
00112 
00120 - (NSArray *)hwBridges;
00121 
00122 
00134 - (NSString *)identifierForOffset:(unsigned)anOffset;
00135 
00136 
00150 - (NSString *)identifierWithPhysicalForOffset:(unsigned)anOffset;
00151 
00152 
00165 - (NSString *)physicalAddressForOffset:(unsigned)anOffset;
00166 
00167 
00180 - (unsigned)physicalForOffset:(unsigned)anOffset;
00181 
00182 
00192 - (void)setProxy:(LOHWChannelProxy *)aProxy forOffset:(unsigned)anOffset;
00193 
00194 
00204 - (void)addProxy:(LOHWChannelProxy *)aProxy forOffset:(unsigned)anOffset;
00205 
00206 
00216 - (LOHWChannelProxy *)proxyForOffset:(unsigned)anOffset;
00217 
00218 
00232 - (void)setPatchForOffset:(unsigned)anOffset toPhysicalChannel:(unsigned)aChannel onHWBridge:(LOHWBridge *)aHWBridge; 
00233 
00234 
00249 - (void)addPatchForOffset:(unsigned)anOffset toPhysicalChannel:(unsigned)aChannel onHWBridge:(LOHWBridge *)aHWBridge; 
00250 
00251 
00262 - (void)updateOffset:(unsigned)anOffset withValue:(unsigned char)theValue;
00263 
00264 
00279 - (void)removeProxy:(LOHWChannelProxy *)proxy atOffset:(unsigned)anOffset;
00280 
00281 
00291 - (void)unpatchForOffset:(unsigned)anOffset;
00292 
00293 
00301 - (void)unpatch;
00302 
00303 
00312 - (BOOL)isPatchedAtOffset:(unsigned)anOffset;
00313 
00314 
00315 #pragma mark Deprecated Functions
00316 
00322 - (NSString *)serialNumberForOffset:(unsigned)anOffset;
00323 
00324 
00330 - (NSString *)serialNumberWithPhysicalForOffset:(unsigned)anOffset;
00331 
00332 
00333 @end
00334 
00335 
00336 
00337 
00338 
00339 
00340 
00341 
00342 
00343 
00344 
00345 
00346 
00347 
00348