processEvent

Sample Bloomberg EMSX event handler

Syntax

Description

example

processEvent(c) displays and flushes the event queue associated with the Bloomberg® EMSX connection c. processEvent is a sample event handler function. You can build a custom event handler function to process Bloomberg EMSX events.

Examples

expand all

Continually Process the Bloomberg EMSX Event Queue

Create the Bloomberg EMSX connection c.

 c = emsx('//blp/emapisvc_beta');

Use timer to continually process the Bloomberg EMSX event queue.

 t = timer('TimerFcn',{@processEvent,c},'Period',1,...
           'ExecutionMode','fixedRate')

t is the MATLAB® timer object. For details, see timer.

Close the Bloomberg EMSX connection.

close(c)

Process the Bloomberg EMSX Event Queue Once

Create the Bloomberg EMSX connection c.

 c = emsx('//blp/emapisvc_beta');

Use the default event handler function processEvent to process the Bloomberg EMSX event queue once.

processEvent(c)
SessionConnectionUp = {

    server = "localhost/127.0.0.1:8194"

}

SessionStarted = {

}

ServiceOpened = {

    serviceName = "//blp/emapisvc_beta"

}

processEvent clears the Bloomberg EMSX event queue.

Close the Bloomberg EMSX connection.

close(c)

Input Arguments

expand all

c — Bloomberg EMSX service connectionconnection object

Bloomberg EMSX service connection, specified as a connection object created using emsx.

More About

expand all

Tips

For details about Bloomberg EMSX, see the EMSX API Programmer's Guide using the WAPI <GO> option from the Bloomberg terminal.

Was this topic helpful?