func (l *TobLogger) MessageArrived(idm *sim.SimMessage) { l.consumeOps = idm.BookUpdates() if idm.BookSides() == 2 { // XXX why do we need this? l.bid.Check, l.ask.Check = true, true } else { l.bid.Check, l.ask.Check = false, false } l.curOps = 0 l.hasOldTob = false }
func (l *EfhLogger) MessageArrived(idm *sim.SimMessage) { l.stream.MessageArrived(idm) l.tobLogger.MessageArrived(idm) if oid, price, size, err := idm.TradeInfo(); err == nil { l.genUpdateTrades(oid, price, size) return } switch m := l.stream.getExchangeMessage().(type) { case *nasdaq.IttoMessageOptionDirectory: l.genUpdateDefinitionsNom(m) case *bats.PitchMessageSymbolMapping: l.genUpdateDefinitionsBats(m) case *miax.TomMessageSeriesUpdate: l.genUpdateDefinitionsMiax(m) } }