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

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

public interface IGlobalcacheGC100
extends com.amx.duet.devicesdk.IUtility

Author:
Cnina Device Notes:

- By default from the factory the RS232 ports on the GlobalCache operate at 19200 baud.

Programming Notes:

- The module sends the commands received from the User Interface to the GC100 as fast as they are received. The module will not wait for any replies from the device before sending the next command, therefore any timing issues certain devices connected to the GC100 may have must be handled in the User Interface.

- The module will not automatically reinitialize itself after a reboot of the AMX master. You must determine when to do this step. In order to communicate with the GC100, you must set the IP_Address property and calling reinitialize().

- Once connected, the module will automatically determine the current configuration of the GlobalCache.


Method Summary
 java.lang.String getFWVersion()
           
 com.amx.duet.devicesdk.component.IUtilityComponent2 getUtilityComponent(int index)
           
 int getUtilityComponentCount()
           
 boolean isDataInitialized()
           
 boolean isDeviceOnLine()
           
 void passThru(byte[] buffer)
           
 void queryDigitalInputState(int port)
          Queries the device for the current state of a digital input.
 void reinitialize()
           
 void sendIR(int port, int handle, int freq, int repeat, int offset, int[] states)
          Control of IR devices is accomplished through this method.
 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.IUtilityComponent
addUtilityComponentListener, removeUtilityComponentListener
 

Method Detail

isDeviceOnLine

public boolean isDeviceOnLine()

isDataInitialized

public boolean isDataInitialized()

getUtilityComponent

public com.amx.duet.devicesdk.component.IUtilityComponent2 getUtilityComponent(int index)

getUtilityComponentCount

public int getUtilityComponentCount()

reinitialize

public void reinitialize()

getFWVersion

public java.lang.String getFWVersion()

passThru

public void passThru(byte[] buffer)

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 -