LOChannelManager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #import <Cocoa/Cocoa.h>
00037 #import "LOChannel.h"
00038 #import "LOChannelProvider.h"
00039 #import "LOSoftPatch.h"
00040 #import "LOHWBridge.h"
00041 @class LOScene;
00042 @class LOFixture;
00043
00044 #define LOChannelProviderKey @"ChannelProvider"
00045 #define LOChannelNumberKey @"ChannelNumber"
00046 #define LOChannelValueKey @"ChannelValue"
00047 #define LOChannelDidUpdateNotification @"LOChannelDidUpdateNotification"
00048 #define LOMasterFaderDidUpdateNotification @"LOMasterFaderDidUpdateNotification"
00049 #define LOChannelManagerDidUpdateConfiguration @"LOChannelManagerDidUpdateConfiguration"
00050 #define LOChannelManagerDidUpdateIntensity @"LOChannelManagerDidUpdateIntensity"
00051 #define LOChannelManagerDidUpdateType @"LOhCannelManagerDidUpdateType"
00052 #define LOChannelManagerDidAddChannel @"LOChannelManagerDidAddChannel"
00053 #define LOChannelManagerDidRemoveChannel @"LOChannelManagerDidRemoveChannel"
00054 #define LOChannelDidUpdateName @"LOChannelDidUpdateName"
00055 #define LOChannelManagerDidReset @"LOChannelManagerDidReset"
00056
00057
00071 @interface LOChannelManager : NSObject
00072 {
00073 NSMutableArray *hwBridges;
00074 NSMutableArray *channelProviders;
00075 NSMutableArray *channels;
00076 unsigned char masterFader;
00077 BOOL inBlackout;
00078
00079 NSMutableArray *fixtures;
00080 }
00081
00082
00092 + (LOChannelManager *)defaultManager;
00093
00094
00122 - (NSXMLElement *)XML;
00123
00124
00130 - (NSXMLElement *)exportLibraryXML;
00131
00132
00140 - (unsigned char)masterFader;
00141
00152 - (void)setMasterFader:(unsigned char)aFaderValue;
00153
00163 - (BOOL)isInBlackout;
00164
00177 - (void)setInBlackout:(BOOL)blackout;
00178
00179
00187 - (unsigned)count;
00188
00200 - (void)addProvider:(id<LOChannelProvider>)aProvider;
00201
00212 - (void)removeProvider:(id<LOChannelProvider>)theProvider;
00213
00214
00223 - (unsigned)numberForChannel:(LOChannel *)channel;
00224
00225
00231 - (LOChannel *)channel:(unsigned)aChannel;
00232
00233
00234 #pragma mark Channel Patching Functions
00235
00249 - (unsigned)addUniverseFromHWBridge:(LOHWBridge *)theBridge;
00250
00251
00263 - (unsigned)addUnpatchedChannel;
00264
00265
00279 - (unsigned)addChannelsFromSoftPatch:(LOSoftPatch *)thePatch;
00280
00281
00290 - (void)patchChannel:(unsigned)aChannel toSoftPatch:(LOSoftPatch *)thePatch andOffset:(unsigned)offset;
00291
00292
00301 - (void)addPatchToChannel:(unsigned)aChannel fromProxy:(LOHWChannelProxy *)aProxy;
00302
00303
00318 - (int)addFixture:(LOFixture *)aFixture;
00319
00320
00336 - (int)addFixture:(LOFixture *)aFixture onUniverse:(NSString *)serialNumber;
00337
00338
00357 - (int)addFixture:(LOFixture *)aFixture fromSoftPatch:(LOSoftPatch *)thePatch;
00358
00359
00371 - (void)patchChannel:(unsigned)aChannel asFixture:(LOFixture *)aFixture toSoftPatch:(LOSoftPatch *)thePatch;
00372
00373
00383 - (NSArray *)fixtures;
00384
00385
00394 - (LOFixture *)fixtureForChannel:(unsigned)aChannel;
00395
00396
00410 - (void)requestChannelRefresh:(unsigned)aChannel byProvider:(id<LOChannelProvider>)aProvider;
00411
00423 - (LOChannelType)channelTypeForChannel:(unsigned)aChannel;
00424
00436 - (void)setChannel:(unsigned)aChannel toType:(LOChannelType)theType;
00437
00451 - (BOOL)isIntensityChannel:(unsigned)aChannel;
00452
00453
00465 - (void)setChannel:(unsigned)aChannel intensity:(BOOL)theIntensity;
00466
00467
00479 - (BOOL)isFixtureChannel:(unsigned)aChannel;
00480
00481
00492 - (NSString *)nameForChannel:(unsigned)aChannel;
00493
00494
00506 - (void)setChannel:(unsigned)aChannel name:(NSString *)theName;
00507
00508
00516 - (id<LOChannelProvider>)lastProviderForChannel:(unsigned)aChannel;
00517
00518
00526 - (NSString *)identifierForChannel:(unsigned)aChannel;
00527
00528
00538 - (NSString *)identifierWithPhysicalForChannel:(unsigned)aChannel;
00539
00540
00550 - (NSString *)physicalAddressForChannel:(unsigned)aChannel;
00551
00552
00566 - (void)setChannelValue:(unsigned char)theValue forChannel:(unsigned)aChannel byProvider:(id<LOChannelProvider>)aProvider;
00567
00568
00587 - (void)captureChannel:(unsigned)aChannel forProvider:(id<LOChannelProvider>)aProvider;
00588
00589
00603 - (void)releaseChannel:(unsigned)aChannel forProvider:(id<LOChannelProvider>)aProvider;
00604
00605
00616 - (void)releaseChannel:(unsigned)aChannel;
00617
00618
00626 - (id<LOChannelProvider>)caputredBy:(unsigned)aChannel;
00627
00628
00641 - (LODimmerCurve *)dimmerCurveForChannel:(unsigned)aChannel;
00642
00643
00644
00657 - (void)setDimmerCurve:(LODimmerCurve *)aDimmerCurve forChannel:(unsigned)aChannel;
00658
00659
00673 - (void)addDimmerCurve:(LODimmerCurve *)aDimmerCurve forChannel:(unsigned)aChannel;
00674
00675
00688 - (LOScene *)sceneAfterMaster:(BOOL)afterMaster withZeroChannels:(BOOL)zeroChannels;
00689
00690
00703 - (LOScene *)capturedSceneAfterMaster:(BOOL)afterMaster withZeroChannels:(BOOL)zeroChannels;
00704
00705
00716 - (void)reset;
00717
00718
00729 - (void)unpatchChannel:(unsigned)aChannel;
00730
00731
00744 - (void)unpatchProxy:(LOHWChannelProxy *)aProxy fromChannel:(unsigned)aChannel;
00745
00746
00757 - (BOOL)isChannelPatched:(unsigned)aChannel;
00758
00759
00771 - (void)removeChannel:(unsigned)aChannel;
00772
00773
00789 - (BOOL)loadConfigurationFromXML:(NSXMLElement *)XMLElement;
00790
00791
00792 #pragma mark Deprecated Methods
00793
00805 - (NSString *)serialNumberForChannel:(unsigned)aChannel;
00806
00807
00821 - (NSString *)serialNumberWithPhysicalForChannel:(unsigned)aChannel;
00822
00823
00824 @end
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836