Data Initialized Channel Not Turning On

JasonSJasonS If I had known it was going to be that kind of party...Posts: 222
I am having trouble with the data initialized channel (252) not turning on from my Duet Module.
public boolean isDeviceOnLine() {
    return obixInitialized;
}

public boolean isDataInitialized() {
    return obixInitialized;
}
The Device Online Channel turns on, but not the Data Initialized. I tried adding this in relevant locations
processDataInitializedEvent(new ModuleComponentEvent(this, obixInitialized, 1));
Data Initialized channel is not affected. Anyone know how to make this work?

Comments

  • AMXJeffAMXJeff Senior Member Posts: 450
    This works for me...
    	public boolean isDeviceOnLine()
    	{
    		return deviceonline;
    	}
    
    	public boolean isDataInitialized()
    	{
    		return datainitialized;
    	}
    
    	////////////////////////////////////////////////////////	
    	// Device Online/Initialize
    	////////////////////////////////////////////////////////
    	private void setDeviceOnline(boolean state)
    	{
    		if (state != this.deviceonline)
    		{
    			this.deviceonline = state;
    			this.processDeviceOnLineEvent(new ModuleComponentEvent(this, state, 1));
    		}
    	}
    	
    	private void setDataInitialize(boolean state)
    	{
    		if (state != this.datainitialized)
    		{
    			this.datainitialized = state;
    			this.processDataInitializedEvent(new ModuleComponentEvent(this, state, 1));			
    		}		
    	}
    
  • JasonSJasonS If I had known it was going to be that kind of party... Posts: 222
    I overrided/implemented the refresh() method and put the processDataInitializedEvent and processDeviceOnlineEvent within, as per the Duet Module Guide. Whenever the DataInitialized or DeviceOnline state changes I call refresh(). This seems to do the trick. It would be nice if the AMX Duet documentation (what little there is) was more descriptive of what the base classes do and how the interact with each other.
Sign In or Register to comment.