com.amx.duet.impl.globalcache.gc100.dr1_0_0
Interface IGlobalCacheGC100UtilityComponent

All Superinterfaces:
com.amx.duet.devicesdk.component.IUtilityComponent, com.amx.duet.devicesdk.component.IUtilityComponent2, com.amx.duet.devicesdk.component.IUtilityComponentListener

public interface IGlobalCacheGC100UtilityComponent
extends com.amx.duet.devicesdk.component.IUtilityComponent2


Method Summary
 void queryDigitalInputState(int port)
          Queries the device for the current state of a digital input.
 void sendIR(int port, int handle, int freq, int repeat, int offset, int[] states)
          Control of IR devices is accomplished through this method.
 void sendRS232(byte[] data)
          This method will send RS232 data to the IP port assigned to this GlobalCache RS232 module.
 void setRelayState(int port, boolean state)
          Sets the current state of a relay.
 void stopIR(int port)
          Stops/halts a repeating IR transmission.
 
Methods inherited from interface com.amx.duet.devicesdk.component.IUtilityComponent2
getUtilityComponent, getUtilityComponentCount
 
Methods inherited from interface com.amx.duet.devicesdk.component.IUtilityComponent
addUtilityComponentListener, removeUtilityComponentListener
 

Method Detail

sendIR

public void sendIR(int port,
                   int handle,
                   int freq,
                   int repeat,
                   int offset,
                   int[] states)
Control of IR devices is accomplished through this method. Since IR commands may take several 100ms to complete, the GC-100 provides an acknowledgement to indicate when it is ready to accept the next command. This acknowledgment is reported by this API with the help of the GlobalCacheGC100AdvancedEvents.IR_COMMAND_COMPLETE advanced event.

The handle parameter is an unique identifier, chosen by you, for the IR command.

The frequency parameter is in hertz.

The repeat parameter will send the IR command the number of times specified. A value of 0 will repeat the IR pattern until halted or it has been repeated 65535 times.

The offset is used if the repeat count is greater than 1. Used for IR commands that have a preamble in order to avoid repeating the preamble during repeated IR timing patterns. The offset is always an odd value.

The states integer array stores the On and Off periods of the carry frequency. There must be an equal number of On and Off carry frequencies. Each On and Off carry frequency takes values from 1..65635. The first element in the array is always an On carry state followed by an Off carry state in the second position and then another On state in the third position followed by an Off state in the forth and so on....

Parameters:
port - [1..3]
handle - [0..65535]
freq - [20000..250000]
repeat - [0..31]
offset - [1,3,5,7,9,11,..,511] - odd only -
states -

stopIR

public void stopIR(int port)
Stops/halts a repeating IR transmission. After receipt of stop, the present IR transmission will halt at the end of the current timing pattern.

Parameters:
port - [1..3]

queryDigitalInputState

public void queryDigitalInputState(int port)
Queries the device for the current state of a digital input. If this command is issued from an improperly configured connector an unknown command will be sent from the device.

Parameters:
port - [1..3]

setRelayState

public void setRelayState(int port,
                          boolean state)
Sets the current state of a relay. If this command is issued from an improperly configured connector an unknown command will be sent from the device.

Parameters:
port - [1..3]
state -

sendRS232

public void sendRS232(byte[] data)
This method will send RS232 data to the IP port assigned to this GlobalCache RS232 module. This module must be an RS232 type connector for this method to work.

Parameters:
data -