Main Content

modifyRoute

Modify彭博EMSX route

Description

例子

事件= modifyRoute(C,,,,modroutemodifies a Bloomberg®使用彭博社EMSX连接的EMSX路线C和路线请求modroutemodifyRoute返回a status message using the default event handler.

例子

事件= modifyRoute(C,,,,modroute,'暂停',暂停指定超时值暂停为执行默认事件处理程序。

例子

modifyRoute(___,“ underefeaulteventhandler”,false)使用以前的语法和自定义事件处理程序中的任何输入参数修改彭博社EMSX路由。编写一个自定义事件处理程序来处理与修改路由相关的事件。该语法没有输出参数,因为自定义事件处理程序处理事件队列的内容。如果要使用默认事件处理程序,请设置标志'useDefaultEventHandler'trueand use the事件输出参数。默认情况下,标志'useDefaultEventHandler'is set totrue

例子

___= modifyRoute(C,,,,modroute,,,,选项使用选项结构ure to customize the output, which is useful to preconfigure and save your options for repeated use. The available选项结构ure fields are暂停anduseDefaultEventHandler。使用事件标志时输出参数useDefaultEventHandleris set totrue并省略此输出参数useDefaultEventHandleris set to错误的

Examples

Collapse all

To modify a route for a Bloomberg EMSX order:

  • 创建连接C使用emsx

  • 使用订单和路线订阅使用ordersandroutes

  • 创建并使用createorderAndRoute

有关展示这些活动的例子,请参阅管理彭博社EMSX订单和路线

Define themodroute包含这些字段的结构:

  • 彭博社EMSX订单序列编号EMSX_SEQUENCE

  • 彭博社EMSX股票符号emsx_ticker

  • 彭博社EMSXnumber of sharesEMSX_AMOUNT

  • 彭博社EMSXroute identifierEMSX_ROUTE_ID

该代码指示彭博社EMSX将IBM的100股汇®for order sequence number731128and route identifier1。使用数字转换为32位签名的整数int32

modroute.emsx_sequence = int32(731128)modroute.emsx_ticker ='IBM';modroute.emsx_amount = int32(100);modroute.emsx_route_id = int32(1);

使用提单修改路线oomberg EMSX connectionCandmodroute

事件= modifyRoute(c,modroute)
事件= EMSX_SEQUENCE: 0 EMSX_ROUTE_ID: 0 MESSAGE: 'Route modified'

默认事件处理程序处理与修改路由相关的事件。modifyRoute返回事件作为包含这些字段的结构:

  • 彭博社EMSX订单编号

  • 彭博社EMSXroute identifier

  • 彭博社EMSX消息

使用彭博社EMSX订阅列表对象取消订阅订单和路线事件osubsandrsubs。该代码假设ordersCreatesosubsandroutesCreatesrsubs

C。Session.unsubscribe(osubs) c.Session.unsubscribe(rsubs)

关the Bloomberg EMSX connection.

关闭(c)

To modify a route for a Bloomberg EMSX order:

  • 创建连接C使用emsx

  • 使用订单和路线订阅使用ordersandroutes

  • 创建并使用createorderAndRoute

有关展示这些活动的例子,请参阅管理彭博社EMSX订单和路线

Define themodroute包含这些字段的结构:

  • 彭博社EMSX订单序列编号EMSX_SEQUENCE

  • 彭博社EMSX股票符号emsx_ticker

  • 彭博社EMSXnumber of sharesEMSX_AMOUNT

  • 彭博社EMSXroute identifierEMSX_ROUTE_ID

This code modifies the route to 100 shares of IBM for order sequence number731128and route identifier1。使用数字转换为32位签名的整数int32

modroute.emsx_sequence = int32(731128)modroute.emsx_ticker ='IBM';modroute.emsx_amount = int32(100);modroute.emsx_route_id = int32(1);

使用提单修改路线oomberg EMSX connectionCandmodroute。Set the timeout value to 200 milliseconds.

事件= modifyRoute(c,modroute,'暂停',200)
事件= EMSX_SEQUENCE: 0 EMSX_ROUTE_ID: 0 MESSAGE: 'Route modified'

默认事件处理程序处理与修改路由相关的事件。modifyRoute返回事件作为包含这些字段的结构:

  • 彭博社EMSX订单编号

  • 彭博社EMSXroute identifier

  • 彭博社EMSX消息

使用彭博社EMSX订阅列表对象取消订阅订单和路线事件osubsandrsubs。该代码假设ordersCreatesosubsandroutesCreatesrsubs

C。Session.unsubscribe(osubs) c.Session.unsubscribe(rsubs)

关the Bloomberg EMSX connection.

关闭(c)

To modify a route for a Bloomberg EMSX order:

  • 创建连接C使用emsx

  • 使用订单和路线订阅使用ordersandroutes

  • 创建并使用createorderAndRoute

有关展示这些活动的例子,请参阅管理彭博社EMSX订单和路线

Define themodroute包含这些字段的结构:

  • 彭博社EMSX订单序列编号EMSX_SEQUENCE

  • 彭博社EMSX股票符号emsx_ticker

  • 彭博社EMSXnumber of sharesEMSX_AMOUNT

  • 彭博社EMSXroute identifierEMSX_ROUTE_ID

This code modifies the route to 100 shares of IBM for order sequence number731128and route identifier1。使用数字转换为32位签名的整数int32

modroute.emsx_sequence = int32(731128)modroute.emsx_ticker ='IBM';modroute.emsx_amount = int32(100);modroute.emsx_route_id = int32(1);

Suppose you create a custom event handler function calledeventhandlerwith input argumentC。Runeventhandler使用timer。启动计时器运行eventhandler立即使用开始。有关详细信息,请参阅Writing and Running Custom Event Handler Functions

t= timer('timerfcn',,,,{@c.eventhandler},'时期',,,,1,,,,...'executionMode',,,,'固定利率')开始(t)

t是matlab®计时器对象。有关详细信息,请参阅timer

使用提单修改路线oomberg EMSX connectionCandmodroute。设置标志'useDefaultEventHandler'错误的以便eventhandler处理与修改路线相关的事件。

modifyRoute(c,modroute,'useDefaultEventHandler',,,,错误的)

使用彭博社EMSX订阅列表对象取消订阅订单和路线事件osubsandrsubs。该代码假设ordersCreatesosubsandroutesCreatesrsubs。Stop the timer to stop data updates using停止

C。Session.unsubscribe(osubs) c.Session.unsubscribe(rsubs) stop(t)

如果您完成了处理数据更新,请使用delete

删除(t)

关the Bloomberg EMSX connection.

关闭(c)

To modify a route for a Bloomberg EMSX order:

  • 创建连接C使用emsx

  • 使用订单和路线订阅使用ordersandroutes

  • 创建并使用createorderAndRoute

有关展示这些活动的例子,请参阅管理彭博社EMSX订单和路线

Define themodroute包含这些字段的结构:

  • 彭博社EMSX订单序列编号EMSX_SEQUENCE

  • 彭博社EMSX股票符号emsx_ticker

  • 彭博社EMSXnumber of sharesEMSX_AMOUNT

  • 彭博社EMSXroute identifierEMSX_ROUTE_ID

This code modifies the route to 100 shares of IBM for order sequence number731128and route identifier1。使用数字转换为32位签名的整数int32

modroute.emsx_sequence = int32(731128)modroute.emsx_ticker ='IBM';modroute.emsx_amount = int32(100);modroute.emsx_route_id = int32(1);

创建一个结构选项。To use the default event handler, set the fielduseDefaultEventHandlertrue。设置字段暂停200毫秒。使用提单修改路线oomberg EMSX connectionC,,,,modroute,,,,and options structure选项

options.usedefaulteventhandler = true;options.timeout = 200;事件= modifyRoute(c,modroute,options)
事件= EMSX_SEQUENCE: 0 EMSX_ROUTE_ID: 0 MESSAGE: 'Route modified'

默认事件处理程序处理与修改路由相关的事件。modifyRoute返回事件作为包含这些字段的结构:

  • 彭博社EMSX订单编号

  • 彭博社EMSXroute identifier

  • 彭博社EMSX消息

使用彭博社EMSX订阅列表对象取消订阅订单和路线事件osubsandrsubs。该代码假设ordersCreatesosubsandroutesCreatesrsubs

C。Session.unsubscribe(osubs) c.Session.unsubscribe(rsubs)

关the Bloomberg EMSX connection.

关闭(c)

输入参数

Collapse all

彭博社EMSX服务连接,指定为创建的连接对象emsx

修改路由请求,,,,specified as a structure with these fields.

UsegetAllFieldMetaData查看所有可用字段modroute。使用数字转换为32位签名的整数int32

场地

Description

EMSX_SEQUENCE

彭博社EMSX订单序列编号

emsx_ticker

彭博社EMSX股票符号

EMSX_AMOUNT

彭博社EMSXnumber of shares

EMSX_ROUTE_ID

彭博社EMSXroute identifier

Example:modroute.emsx_sequence = int32(731128);
modroute.EMSX_TICKER = 'XYZ';
modroute.emsx_amount = int32(100);
modroute.emsx_route_id = int32(1);

数据类型:结构

Timeout value, specified as a nonnegative integer. This integer denotes the time, in milliseconds, that the event handler listens to the event queue for each iteration of the code. The event handler can be a default or custom event handler.

数据类型:double

定制事件处理程序或超时值的选项,指定为结构。要重用设置以指定事件处理程序的自定义事件处理程序或超时值,请使用选项结构体。

例如,使用自定义事件处理程序指定和超时值为200毫秒。

options.usedefaulteventhandler = false;options.timeout = 200;

数据类型:结构

输出参数

Collapse all

事件队列内容,作为双重或结构返回。

如果事件队列包含事件,事件is a structure containing the current contents of the event queue. Otherwise,事件是一个空的双人。

版本历史记录

Introduced in R2013a