Object <- ConsumerIRDevice |
|
|
SendIRCommand |
|
DeviceManufacturer DeviceName RepeatIRCommand |
| Field | Type | |
|---|---|---|
| ConsumerIRDevice: | deviceName: | Text |
| deviceManufacturer: | Text | |
| irBaudValue: | Unsigned | |
| irPeriod: | Unsigned | |
| irOnTime: | Unsigned | |
| commandTime: | Unsigned | |
| irCommandSize: | Unsigned | |
| irCommandLength: | Unsigned | |
| repeatIRCommand: | Unsigned | |
| cmdTable: | Object | |
| pulseTable: | Object |
instance ConsumerIRDevice tag; deviceName: nilObject; deviceManufacturer: nilObject; irBaudValue: 0; irPeriod: 0; irOnTime: 0; commandTime: 0; irCommandSize: 0; irCommandLength: 0; repeatIRCommand: 0; cmdTable: nilObject; pulseTable: nilObject; end instance;
#endif Define Class ConsumerIRDevice; inherits from Object; uses extra; field deviceName: Text, getter; // device name, e.g. Television, LaserDisc Player, etc. field deviceManufacturer: Text, getter; // manufacturer, e.g. Sony, Panasonic, Mitsubishi, etc. field irBaudValue: Unsigned; field irPeriod: Unsigned; field irOnTime: Unsigned; field commandTime: Unsigned; // How long should each command take (in microseconds) field irCommandSize: Unsigned; // Cmd Size - Number of bits to index each pulse (Must be 2^n in length) field irCommandLength: Unsigned; // Cmd Length - Length of each cmd in table (Number of Pulses per command) field repeatIRCommand: Unsigned, getter, setter; // Number of times to repeat each command field cmdTable: Object; // Object ID of IR Code Table field pulseTable: Object; // Pulse Shaping Table (List) -- 16 Entries -- Each Pulse Shape has variable List // Remember there is variable length (Extra) data at the end of this Object, // the prefix/suffix Command Strings attribute DeviceName: Text, readOnly; attribute DeviceManufacturer: Text, readOnly; attribute RepeatIRCommand: Unsigned; operation SendIRCommand(commandNum: Unsigned); // Look up a cmd in the table and send it out end class;