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

LOChannel Class Reference

A soft channel, is a channel that can be patched to one or more hard (physical) channels. More...

#import <LOChannel.h>


Public Member Functions

(id) - initWithSoftPatch:andSoftPatchOffset:
 Initilise the channel.
(id) - initWithFixture:
 Initilise the channel as a fixture channel.
(NSXMLElement *) - XML
 Get the Channel details as XML.
(unsigned) - channelNumber
 Get the number for this channel.
(unsigned char) - channelValue
 Get the channel value.
(void) - setChannelValue:byProvider:
 Set the channel value for this channel.
(NSString *) - name
 Get the name of the channel, or nil if not set.
(void) - setName:
 Set the name of the channel.
(id< LOChannelProvider >) - lastProvider
 Get the last channel provider to update this channel.
(void) - captureChannelForProvider:
 Capture a channel so that only theProvider may update it.
(void) - releaseChannelForProvider:
 If a channel is currently captured it will be released.
(void) - releaseChannel
 If a channel is currently captured it will be released.
(BOOL) - isCaptured
 Return the current captured status of the channel.
(id< LOChannelProvider >) - caputredBy
 Get the provider that is currently capturing this channel.
(LOChannelType) - channelType
 Get the channel type for this channel.
(void) - setChannelType:
 Set the channle type for this channel.
(BOOL) - isIntensity
 Is this an intensity channel.
(void) - setIntensity:
 Set if this channel is an intensity channel.
(BOOL) - isFixture
 Is this an fixture channel.
(LOFixture *) - fixture
 Get the fixture, if this is a fixture channel.
(void) - setFixture:
 Change the channels fixture.
(LOSoftPatch *) - softPatch
 Get the soft patch that this channel uses.
(unsigned) - softPatchOffset
 Get the offset into the soft patch for this channel.
(LOHWChannelProxy *) - channelProxy
 Get the channel proxy used by this channel.
(void) - patchWithSoftPatch:withOffset:
 Repatch a channel with a new softPatch and offet.
(void) - unpatch
 Unpatch the channel.
(BOOL) - isPatched
 See if a channel is currently patched.
(LODimmerCurve *) - dimmerCurve
 Get the dimmer curve associated with this channel.
(void) - setDimmerCurve:
 Set the dimmer curve for this channel.
(void) - addDimmerCurve:
 Add a dimmer curve for this channel, if one already exists, add the new curve to the end of the chain.

Protected Attributes

unsigned char channelValue
 This is the channel value as provided by the provider (i.e pre master fader).
LOChannelType channelType
 The type of channel.
BOOL isIntensity
 Is this an intensity channel.
LOSoftPatchsoftPatch
 The soft patch for this channel.
unsigned softPatchOffset
 The offset into the soft patch.
id< LOChannelProviderlastProvider
 The last provider to update the channel.
NSString * name
 Optional name for a channel.
LOFixturefixture
 If the channel is a fixture, this is it.
id< LOChannelProvidercapturedProvider
 The provider that has captured this channel, or nil.
NSMutableArray * capturedProviders
 Array of providers that have captured this channel.
LODimmerCurvedimmerCurve
 The dimmer curve assocaited with the channel.


Detailed Description

A soft channel, is a channel that can be patched to one or more hard (physical) channels.

A channel can either be an HTP type or an LTP type channel. And it can also be an intensity channel (that it one that is affected by the master fader value).

The actual value of a channel is provided by one or more channel providers. The channel manager calculates this value based on a set of rules determined by the channel type.

See also:
LOChannelManager

LOSoftPatch

LOChannelProvider

LODimmerCurve


Member Function Documentation

- (void) addDimmerCurve: (LODimmerCurve *)  aDimmerCurve  

Add a dimmer curve for this channel, if one already exists, add the new curve to the end of the chain.

Parameters:
aDimmerCurve The dimmer curve to add to this channel
See also:
dimmerCurve:

- setDimmerCurve:

- (void) captureChannelForProvider: (id<LOChannelProvider>)  theProvider  

Capture a channel so that only theProvider may update it.

This in itself does not actually stop a channel being updated, it is just a flag to so the channel manager may make the relevant choices about updating.

If a channel is currently captured then this new provider will be added to the top of the captured list, thus capturing the channel. Once released the previous captured provider will once again become the captured provider.

In the event that the new cpatured provider is already lower down the capture chain, it will be moved form its current position to the top.

This method should only reall be called by the channel manager

See also:
LOChannelManager

- (id< LOChannelProvider >) caputredBy  

Get the provider that is currently capturing this channel.

Returns:
the provider, or nil if the channel is not captured.

- (unsigned) channelNumber  

Get the number for this channel.

Returns:
The channel number, or NSNotFound if the channel is not being managed

- (LOHWChannelProxy *) channelProxy  

Get the channel proxy used by this channel.

- (LOChannelType) channelType  

Get the channel type for this channel.

Returns:
The channels type
See also:
- setChannelType:

- (unsigned char) channelValue  

Get the channel value.

Returns:
The channel value
See also:
setChannelValue:

Get the dimmer curve associated with this channel.

Returns:
The dimmer curve
See also:
- setDimmerCurve:

- addDimmerCurve:

- (LOFixture *) fixture  

Get the fixture, if this is a fixture channel.

- (id) initWithFixture: (LOFixture *)  theFixture  

Initilise the channel as a fixture channel.

Parameters:
theFixture The soft fixture
Returns:
The channel or nil

- (id) initWithSoftPatch: (LOSoftPatch *)  theSoftPatch
andSoftPatchOffset: (unsigned)  theSoftPatchOffset 

Initilise the channel.

By default a channel is initilised as an HTP intensity channel

Parameters:
theSoftPatch The soft patch used by the channel
theSoftPatchOffset The offset into the soft patch for this channel
Returns:
The channel or nil

- (BOOL) isCaptured  

Return the current captured status of the channel.

- (BOOL) isFixture  

Is this an fixture channel.

Returns:
YES if this is an fixture channel
See also:
- initWithFixture:

- (BOOL) isIntensity  

Is this an intensity channel.

Returns:
YES if this is an intensity channel
See also:
- setIntensity:

- (BOOL) isPatched  

See if a channel is currently patched.

See also:
- unpatch

Get the last channel provider to update this channel.

Returns:
the last provider.

- (NSString *) name  

Get the name of the channel, or nil if not set.

- (void) patchWithSoftPatch: (LOSoftPatch *)  aSoftPatch
withOffset: (unsigned)  offset 

Repatch a channel with a new softPatch and offet.

- (void) releaseChannel  

If a channel is currently captured it will be released.

This does not change the channels current value though. That will be upto the channel manager, and so this method should only realy be called by the channel manager.

This will release the channel from all providers.

See also:
LOChannelManager

- (void) releaseChannelForProvider: (id<LOChannelProvider>)  theProvider  

If a channel is currently captured it will be released.

This does not change the channels current value though. That will be upto the channel manager, and so this method should only realy be called by the channel manager.

This will release the channel from the specific provider only

See also:
LOChannelManager

- (void) setChannelType: (LOChannelType)  theChannelType  

Set the channle type for this channel.

Parameters:
theChannelType The channels type
See also:
channelType

- (void) setChannelValue: (unsigned char)  theValue
byProvider: (id<LOChannelProvider>)  theProvider 

Set the channel value for this channel.

Parameters:
theValue The new channel value
theProvider The channel provider with the data
See also:
channelValue

- (void) setDimmerCurve: (LODimmerCurve *)  aDimmerCurve  

Set the dimmer curve for this channel.

Parameters:
aDimmerCurve The dimmer curve to set for this channel
See also:
dimmerCurve:

- addDimmerCurve:

- (void) setFixture: (LOFixture *)  aFixture  

Change the channels fixture.

- (void) setIntensity: (BOOL)  intensity  

Set if this channel is an intensity channel.

Parameters:
intensity YES if this is an intensity channel
See also:
isIntensity

- (void) setName: (NSString *)  theName  

Set the name of the channel.

Get the soft patch that this channel uses.

Returns:
The soft patch

- (unsigned) softPatchOffset  

Get the offset into the soft patch for this channel.

Returns:
The channels offset

- (void) unpatch  

Unpatch the channel.

See also:
- isPatched

- (NSXMLElement *) XML  

Get the Channel details as XML.

 <channel type="HTP|LTP" intensity="true|false">
  <fixture manufacturer="name" name="name">
   <base name="name">
    <interfaces>
     <interface serial="1001" physical="1"/>
    </interfaces>
   </base>
  </fixture>

  <interfaces>
   <interface serial="1001" physical="1"/>
  </interfaces>
  <curves>
   <curve/>
  </curves>
 </channel>

Returns:
The XML Representation of the Channel


The documentation for this class was generated from the following files: