Enumeration ConfContextInterfaceSignal

The ConfContextInterfaceSignal lists all the signals that may be sent by the ConfContextInterface.

These signals are emitted by the ConfContextInterface when some data is available.

/** 
* Sample to illustrate the use of signals in the ConfContextInterface.
*/
import { ConfContextInterface, ConfigurationInterface, ConfContextInterfaceSignal, tListenerCallback, DataSessionInterface } from 'generated/documentation/appinfiniteapi';

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;

// the callback called when the conf context has changed
let myCallback : tListenerCallback;
// create a configuration Context
const lConfContextInterface : ConfContextInterface = lDataSession.createConfContext();

// gets all the configuration ids
const lConfigurations: Array<ConfigurationInterface> = lDataSession.getConfigurationList();

// add all the configurations in the conf context
const lActiveConfs = new Array<string>(0);
for (let i = 0; i < lConfigurations.length; ++i)
{
lActiveConfs.push(lConfigurations[i].getConfigurationId());
}
// we want to be signaled when the confContext changes
lConfContextInterface.addEventListener(ConfContextInterfaceSignal.ConfContextChanged, myCallback);
// and set the configurations
lConfContextInterface.setActiveConfs(lActiveConfs);
// myCallback is called right away

Please refer to the [ConfContextInterface](../interfaces/ConfContextInterface.html) to know how to handle the ConfContextInterfaceSignal.
Events

See

ConfContextInterface

Enumeration Members

ConfContextCancelled: "cancelled"

Signal sent by the ConfContextInterface when the ConfContextInterface is requested to be cancelled.

Such an event is fired if the ConfContextInterface was running and cancelUpdate is called. The ConfContextReady signal will be triggered shortly after.

No attachment for events of this type.

ConfContextChanged: "changed"

Signal sent by the ConfContextInterface when the ConfContextInterface is changed i.e. setActiveConfs has been called.

The ConfContextReady signal will be triggered after.

No attachment for events of this type.

ConfContextReady: "ready"

Signal sent by the ConfContextInterface when the ConfContextInterface is ready, i.e. getGeometricInstanceIds can be called.

Warning, the ConfContextReady signal is sent when cancelUpdate is called and the ConfContextInterface is updating.

No attachment for events of this type.