private void getLevelInfo( MamdaOrderBookPriceLevel level, MamaMsg plMsg, MamdaOrderBook deltaBook) { level.setPrice(plMsg.getPrice(MamdaOrderBookFields.PL_PRICE)); level.setSize((long)plMsg.getF64(MamdaOrderBookFields.PL_SIZE, 0)); level.setNumEntries((int)plMsg.getF64(MamdaOrderBookFields.PL_NUM_ENTRIES, 1)); level.setAction((MamdaOrderBookPriceLevel.Actions)plMsg.getChar( MamdaOrderBookFields.PL_ACTION, 'A')); level.setSide((MamdaOrderBookPriceLevel.Sides)plMsg.getChar( MamdaOrderBookFields.PL_SIDE, 'B')); /* Optional order book fields: */ level.setSizeChange((long)plMsg.getF64(MamdaOrderBookFields.PL_SIZE_CHANGE, 0)); //default 0 level.setTime(plMsg.getDateTime(MamdaOrderBookFields.PL_TIME, deltaBook.getBookTime())); }
void getEntryInfo( MamdaOrderBookEntry entry, MamaMsg entMsg, MamdaOrderBookPriceLevel level) { entry.setAction((MamdaOrderBookEntry.Actions)entMsg.getChar( MamdaOrderBookFields.ENTRY_ACTION, 'D')); entry.setId(entMsg.getString(MamdaOrderBookFields.ENTRY_ID)); entry.setSize((long)entMsg.getF64(MamdaOrderBookFields.ENTRY_SIZE, 0)); entry.setTime(entMsg.getDateTime(MamdaOrderBookFields.ENTRY_TIME, level.getTime())); }