示例#1
0
文件: mux.py 项目: smandy/pyfix
 def __init__(self, mux):
     FIXApplication.__init__(self, fix)
     self.mux = mux
     self.dispatchDict = {fix.OrderSingle: self.onOrder,
                          fix.Heartbeat: self.noop}
     self.recovery_dict = {fix.ExecutionReport: self.onRecoveredExecution,
                          fix.OrderSingle: self.onRecoveredOrder,
                          fix.ResendRequest: self.noop,
                          fix.Heartbeat: self.noop,
                          fix.Logon: self.noop}
     self.orders = 0
     self.execs = 0
示例#2
0
文件: sender.py 项目: smandy/pyfix
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatch_dict = {
            fix.ExecutionReport: self.on_execution,
            fix.Heartbeat: beep
        }

        self.recovery_dict = {
            fix.ExecutionReport: self.recovered_execution,
            fix.Heartbeat: self.noop,
            fix.Logon: self.noop,
            fix.OrderSingle: self.on_recovered_new_order_single,
        }
示例#3
0
文件: sender.py 项目: smandy/pyfix
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatch_dict = {
            fix.ExecutionReport: self.on_execution,
            fix.Heartbeat: beep
        }

        self.recovery_dict = {
            fix.ExecutionReport: self.recovered_execution,
            fix.Heartbeat: self.noop,
            fix.Logon: self.noop,
            fix.OrderSingle: self.on_recovered_new_order_single,
        }
示例#4
0
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatchDict = {fix.Heartbeat: self.onHeartbeat}
        self.testRequests = {}
        self.latencies = defaultdict(lambda: DelayData())

        #frequncies = [ 1., 10, 30, 50, 75, 100, 110, 120, 130, 140, 150, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270 ]

        frequencies = range(10, 300, 5)
        self.delays = [1. / x for x in frequencies]

        #self.delays = [ 0.0005, 0.0001]

        self.delay = self.delays.pop(0)
        self.stopped = False
示例#5
0
文件: sender.py 项目: smandy/pyfix
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatchDict = { fix.Heartbeat : self.onHeartbeat }
        self.testRequests = {}
        self.latencies = defaultdict( lambda: DelayData() )

        #frequncies = [ 1., 10, 30, 50, 75, 100, 110, 120, 130, 140, 150, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270 ]

        frequencies = range( 10, 300, 5)
        self.delays = [ 1./x for x in frequencies]
        
        #self.delays = [ 0.0005, 0.0001]

        self.delay = self.delays.pop(0)
        self.stopped = False
示例#6
0
文件: sinks.py 项目: smandy/pyfix
 def __init__(self):
     FIXApplication.__init__(self, fix)
     self.dispatch_dict = {fix.OrderSingle: self.on_order}
示例#7
0
文件: receiver.py 项目: smandy/pyfix
 def __init__(self, f):
     FIXApplication.__init__(self, f)
     self.dispatch_dict = {
         f.OrderSingle: self.on_order,
         f.Heartbeat: boop
     }
示例#8
0
 def __init__(self, f):
     FIXApplication.__init__(self, f)
     self.dispatch_dict = {f.OrderSingle: self.on_order, f.Heartbeat: boop}
示例#9
0
文件: sinks.py 项目: smandy/pyfix
 def __init__(self):
     FIXApplication.__init__(self, fix)
     self.dispatch_dict = {fix.OrderSingle: self.on_order}
示例#10
0
 def __init__(self, onHeartbeat, onStateChange):
     FIXApplication.__init__(self, fix)
     self.dispatchDict = { fix.Heartbeat : self.onHeartbeat }
     self.heartBeatDelegate = onHeartbeat
     self.stateDelegate = onStateChange
示例#11
0
 def __init__(self, onHeartbeat, onStateChange):
     FIXApplication.__init__(self, fix)
     self.dispatchDict = {fix.Heartbeat: self.onHeartbeat}
     self.heartBeatDelegate = onHeartbeat
     self.stateDelegate = onStateChange