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

LOProportionalFixtureElement Class Reference

A proportional element is an element used to define the channels and ranges used by either an 8 or a 16 bit proportional attribute. More...

#import <LOProportionalFixtureElement.h>


Public Member Functions

(id) - init
 Initilise.
(id) - initWithXML:withinFixture:
 Initilise from an XML element.
(NSXMLElement *) - XML
 Get the element as an XML element.
(NSString *) - name
 Get the attribute name.
(void) - setName:
 Set the attribute name.
(BOOL) - is16Bit
 Test if this is a 16 bit element.
(void) - set16bit:
 Sets if the element is 16 bit.
(void) - setRange:forByte:
 Set the range for the given byte type.
(void) - updateOutput:forByte:
 Update the fixture output for a given byte type (LSB or MSB).
(void) - updateOutput:
 Update the fixture output, automatically taking into account if its a 16 bit attribute.
(void) - updateOutputReal:
 Update the fixture output, automatically taking into account if its a 16 bit attribute.

Protected Attributes

BOOL is16Bit
 True is this is a 16 bit proportional attribute.
LOFixtureRangeLSBRange
 The range used to hold the Least Signifcant Byte, also used where !is16Bit.
LOFixtureRangeMSBRange
 The range used to hold the Most Significant Byte.
NSString * name


Detailed Description

A proportional element is an element used to define the channels and ranges used by either an 8 or a 16 bit proportional attribute.

Member Function Documentation

- (id) init  

Initilise.

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

Initilise from an XML element.

- (BOOL) is16Bit  

Test if this is a 16 bit element.

See also:
set16Bit;

- (NSString *) name  

Get the attribute name.

See also:
- setName:

- (void) set16bit: (BOOL)  the16Bit  

Sets if the element is 16 bit.

See also:
is16Bit:

- (void) setName: (NSString *)  aName  

Set the attribute name.

See also:
name:

- (void) setRange: (LOFixtureRange *)  range
forByte: (LOFixtureAttributeByteType)  byte 

Set the range for the given byte type.

Setting a LSB byte automatically changes the the element to 16 bit.

- (void) updateOutput: (unsigned)  level  

Update the fixture output, automatically taking into account if its a 16 bit attribute.

Parameters:
level 0-255 for an 8bit attribute, or 0-65535 for a 16 bit one.
See also:
- updateOutput:forByte:

- (void) updateOutput: (unsigned char)  level
forByte: (LOFixtureAttributeByteType)  byte 

Update the fixture output for a given byte type (LSB or MSB).

See also:
- updateOutput:

- (void) updateOutputReal: (float)  level  

Update the fixture output, automatically taking into account if its a 16 bit attribute.

Parameters:
level 0 - 1
See also:
- updateOutput:

- (NSXMLElement *) XML  

Get the element as an XML element.


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