初步完成dataRecord的全过程时序

This commit is contained in:
zhu4ling3 2018-04-12 23:56:30 -04:00
parent 12b1e10c51
commit 727ea4bae2
2 changed files with 7 additions and 24 deletions

View File

@ -1,4 +1,7 @@
@startuml @startuml
title Data Recording
database mongoDB as db database mongoDB as db
participant runDataRecord as rundr participant runDataRecord as rundr
participant Process as run participant Process as run
@ -33,7 +36,6 @@ activate rundr
run->runle ** : create runle run->runle ** : create runle
||| |||
|||
run->ee ** :create evnetEngine object run->ee ** :create evnetEngine object
activate ee activate ee
ee->ee ++ : init() ee->ee ++ : init()
@ -45,7 +47,6 @@ run->ee ** :create evnetEngine object
return return
return object return object
||| |||
|||
run->me ** : new mainEngine(ee) run->me ** : new mainEngine(ee)
activate me activate me
me->me ++ : init() me->me ++ : init()
@ -85,7 +86,6 @@ run->me ** : new mainEngine(ee)
me-->me--:return me-->me--:return
me-->run--: object me-->run--: object
||| |||
|||
run->me ++ : addGateway(ibGateway) run->me ++ : addGateway(ibGateway)
me->gw ** : Create IbGateway(ee, "IB") me->gw ** : Create IbGateway(ee, "IB")
activate gw activate gw
@ -96,15 +96,7 @@ run->me ++ : addGateway(ibGateway)
** 获取连接IB G/W的信息 ** 获取连接IB G/W的信息
end note end note
gw->wrap ** : Create IbWrapper(self) gw->wrap ** : Create IbWrapper(self)
note right note right: IbApi是基于Boost.python的封装。\n用C++实现但是可以提供给Python程序使用。
IbApi是基于Boost.python的封装。
用C++实现但是可以提供给Python程序使用。
IbApi使用IB提供的C++接口源代码,
来和IB网关进行数据交互
IbApi提供两类函数功能
主动请求IB网关的功能
接收IB网关异步返回数据的功能
end note
activate wrap activate wrap
wrap->wrap ++ : 构造函数() wrap->wrap ++ : 构造函数()
return object return object
@ -113,7 +105,6 @@ run->me ++ : addGateway(ibGateway)
return object return object
return return
||| |||
|||
run->me ++ : addApp() run->me ++ : addApp()
me->dr**: new DrEngine(me,ee) me->dr**: new DrEngine(me,ee)
activate dr activate dr
@ -137,7 +128,6 @@ run->me ++ : addApp()
run<--me -- : return run<--me -- : return
||| |||
|||
run->ee: ee.regiser() 注册日志处理事件 run->ee: ee.regiser() 注册日志处理事件
activate ee activate ee
note right note right
@ -146,7 +136,6 @@ run->ee: ee.regiser() 注册日志处理事件
end note end note
return return
||| |||
|||
run->me++: me.Connect(IB) run->me++: me.Connect(IB)
note right: 连接IB网关 note right: 连接IB网关
me->gw ++ : gw.connect() me->gw ++ : gw.connect()
@ -201,29 +190,21 @@ run->me++: me.Connect(IB)
return return
return return
run<--me--:return run<--me--:return
|||
||| |||
run->ee ++ : ee.register(EVENT_LOG, le.processLogEvent) run->ee ++ : ee.register(EVENT_LOG, le.processLogEvent)
return return
|||
||| |||
run->ee ++ : ee.register(EVENT_ERROR, le.processErrorEvent) run->ee ++ : ee.register(EVENT_ERROR, le.processErrorEvent)
return return
|||
||| |||
loop loop
run->run: sleep(1) run->run: sleep(1)
end loop end loop
deactivate run deactivate run
||| |||
|||
gw->eeq ++: queue.put(tick/bar) gw->eeq ++: queue.put(tick/bar)
return return
||| |||
|||
eetm->ee -- : ee.__runTimer() eetm->ee -- : ee.__runTimer()
activate ee #green activate ee #green
loop loop
@ -233,7 +214,6 @@ eetm->ee -- : ee.__runTimer()
end loop end loop
deactivate ee deactivate ee
||| |||
|||
eet->ee--: ee.run() eet->ee--: ee.run()
activate ee #red activate ee #red
loop loop

3
UML/version.puml Normal file
View File

@ -0,0 +1,3 @@
@startuml
version
@enduml