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

LOFixtureRange Class Reference

A Range is a set of channel values within a given channel. More...

#import <LOFixtureRange.h>


Public Member Functions

(id) - initWithType:
 Initilise the range with a specific type.
(id) - initWithXML:withinFixture:
 Initilise the range from an XML element.
(NSXMLElement *) - XML
 Get the range as an XML Element.
(LOFixtureRangeType) - type
 Get the range type.
(void) - setType:
 Set the range type.
(LOFixtureChannel *) - channel
 Get the range channel.
(void) - setChannel:
 Set the range channel.
(unsigned char) - start
 Get the start value for the range.
(void) - setStart:
 Set the start value for the range.
(unsigned char) - end
 Get the end value for the range.
(void) - setEnd:
 Set the end value for the range.
(NSString *) - startName
 Get the name of the start point.
(void) - setStartName:
 Set the name of the start point.
(NSString *) - endName
 Get the name of the end point.
(void) - setEndName:
 Set the name of the end point.
(LOFixtureRangeDirection) - direction
 Check which direction this range is set up for.
(unsigned) - stepCount
 Return how many steps between the start and end points there are (inclusive).
(BOOL) - overlaps:
 Check to see if there is an overlap with theRange.
(void) - updateRangeOutput
 Update the physical channel, via the fixtures softPatch, that this range belong to.
(void) - updateRangeOutputAtOffset:
 Update the physical channel, via the fixtures softPatch, that this range belong to.
(void) - updateRageOutputInProportionTo:
 Update the physical channel, via the fixtures softPatch, that this range belong to.

Protected Attributes

LOFixtureRangeType type
LOFixtureChannelchannel
unsigned char start
unsigned char end
NSString * startName
NSString * endName


Detailed Description

A Range is a set of channel values within a given channel.

Member Function Documentation

- (LOFixtureChannel *) channel  

Get the range channel.

See also:
setType

- (LOFixtureRangeDirection) direction  

Check which direction this range is set up for.

This is done by checking the start and end values, If the start value is greater than the end value then is a negative direction, othewise its a positive one.

- (unsigned char) end  

Get the end value for the range.

See also:
setEnd

- (NSString *) endName  

Get the name of the end point.

See also:
setEndName

- (id) initWithType: (LOFixtureRangeType)  aType  

Initilise the range with a specific type.

start and end are set to 0 and 255 respectivly

- (id) initWithXML: (NSXMLElement *)  XMLElement
withinFixture: (LOFixture *)  theFixture 

Initilise the range from an XML element.

- (BOOL) overlaps: (LOFixtureRange *)  theRange  

Check to see if there is an overlap with theRange.

Returns:
yes is the ranges overlaps.

- (void) setChannel: (LOFixtureChannel *)  theChannel  

Set the range channel.

See also:
type

- (void) setEnd: (unsigned char)  newEnd  

Set the end value for the range.

See also:
end

- (void) setEndName: (NSString *)  newEndName  

Set the name of the end point.

See also:
endName

- (void) setStart: (unsigned char)  newStart  

Set the start value for the range.

See also:
start

- (void) setStartName: (NSString *)  newStartName  

Set the name of the start point.

See also:
startName

- (void) setType: (LOFixtureRangeType)  theType  

Set the range type.

See also:
type

- (unsigned char) start  

Get the start value for the range.

See also:
setStart

- (NSString *) startName  

Get the name of the start point.

See also:
setStartName

- (unsigned) stepCount  

Return how many steps between the start and end points there are (inclusive).

This is only useful for proportional ranges, and other types of range always return 1

- (LOFixtureRangeType) type  

Get the range type.

See also:
setType

- (void) updateRageOutputInProportionTo: (unsigned char)  level  

Update the physical channel, via the fixtures softPatch, that this range belong to.

Very much like updateRangeOutputAtOffset: but the offste is first calculated as a proportion to the level, that is to say that if the range is 100 values long, and level is 128 then the offset would be calculated as 50.

Parameters:
level The proportional offset from the start channel.
See also:
- updateRangeOutput

updateRageOutput:inProportionTo:

- (void) updateRangeOutput  

Update the physical channel, via the fixtures softPatch, that this range belong to.

The value of the channel will be set to a value within this range.

This function is only really relevant to ranges of type LOFixtureRangeTypeBlock or LOFixtureRangeTypeSingle.

See also:
updateRangeOutput:atOffset:

updateRageOutput:inProportionTo:

- (void) updateRangeOutputAtOffset: (unsigned char)  offset  

Update the physical channel, via the fixtures softPatch, that this range belong to.

The value of the channel will be set to the start value of the range plus the offset (or in the case of a negative range the start value of the range minus the offset).

Parameters:
offset The offset from the start channel.
See also:
- updateRangeOutput

updateRageOutput:inProportionTo:

- (NSXMLElement *) XML  

Get the range as an XML Element.

 <range base="name" offset="x" type="block|proportional|single" start="x" end="x" [startName="name"] [endName="name"]/>


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