示例#1
0
 public static void reset()
 {
     if (MamdaCommonFields.isSet())
     {
         MamdaCommonFields.reset();
     }
     mInitialised           = false;
     CONTRACT_SYMBOL       = null;
     UNDERLYING_SYMBOL     = null;
     EXPIRATION_DATE       = null;
     STRIKE_PRICE          = null;
     PUT_CALL              = null;
     EXERCISE_STYLE        = null;
     OPEN_INTEREST         = null;
 }
        private static void addUpdaterToList(
            SecurityStatusUpdate[] updaters,
            MamaFieldDescriptor fieldDesc,
            SecurityStatusUpdate updater)
        {
            if (fieldDesc == null)
            {
                return;
            }
            int fieldId = fieldDesc.getFid();

            if (fieldId <= mMaxFid)
            {
                updaters[fieldId] = updater;
            }
        }
示例#3
0
        private static void addToUpdatersList(
            AuctionUpdate[]         updaters,
            MamaFieldDescriptor fieldDesc,
            AuctionUpdate updater)
        {
            if (fieldDesc == null)
            {
                return;
            }
            int fieldId = fieldDesc.getFid();

            if (fieldId <= mMaxFid)
            {
                updaters[fieldId] = updater;
            }
        }
 public static void reset()
 {
     if (MamdaCommonFields.isSet())
     {
         MamdaCommonFields.reset();
     }
     mInitialised				= false;
     MAX_FID					= 0;
     SRC_TIME				= null;
     ACTIVITY_TIME			= null;
     SECURITY_STATUS			= null;
     SECURITY_STATUS_QUAL	= null;
     SECURITY_STATUS_TIME	= null;
     SECURITY_STATUS_ORIG	= null;
     SHORT_SALE_CIRCUIT_BREAKER = null;
     SEQNUM					= null;
     REASON					= null;
     LULDINDICATOR           = null;
     LULDTIME                = null;
 }
示例#5
0
        /// <summary>
        /// Try to get a vector of prices.
        /// </summary>
        public bool tryVectorPrice(
			MamaFieldDescriptor descriptor, 
			ref MamaPrice[] result)
        {
            return tryVectorPrice (null, (ushort)descriptor.getFid(), ref result);
        }
示例#6
0
        /// <summary>
        /// Try to get a vector of signed 32 bit integers.
        /// </summary>
        public bool tryVectorI32(
			MamaFieldDescriptor descriptor, 
			ref int[] result)
        {
            return tryVectorI32 (null, (ushort)descriptor.getFid(), ref result);
        }
示例#7
0
        /// <summary>
        /// Try to get a vector of chars.
        /// </summary>
        public bool tryVectorChar(
			MamaFieldDescriptor descriptor, 
			ref char[] result)
        {
            return tryVectorChar (null, (ushort)descriptor.getFid(), ref result);
        }
示例#8
0
        public bool tryStringAnsi(
			MamaFieldDescriptor descriptor,
			ref IntPtr result)
        {
            return tryStringAnsi (null, (ushort)descriptor.getFid(), ref result);
        }
示例#9
0
        /// <summary>
        /// Try to get a I8, signed 8 bit integer, field.
        /// </summary>
        public bool tryI8(
			MamaFieldDescriptor descriptor,
			ref sbyte result)
        {
            return tryI8 (null, (ushort)descriptor.getFid(), ref result);
        }
示例#10
0
        /// <summary>
        /// Try to get a f64 field.
        /// </summary>
        public bool tryF64(
			MamaFieldDescriptor descriptor,
			ref double result)
        {
            return tryF64 (null, (ushort)descriptor.getFid(), ref result);
        }
示例#11
0
        /// <summary>
        /// Get a vector of unsigned 8 bit integers.
        /// </summary>
        public byte[] getVectorU8(
			MamaFieldDescriptor descriptor,
			byte[] valueIfMissing)
        {
            return getVectorU8 (null, (ushort)descriptor.getFid(), valueIfMissing);
        }
示例#12
0
        /// <summary>
        /// Get a vector of submessages.
        /// </summary>
        public MamaMsg[] getVectorMsg(
			MamaFieldDescriptor descriptor)
        {
            return getVectorMsg(null, (ushort)descriptor.getFid());
        }
示例#13
0
        /// <summary>
        /// Get a vector of signed 16 bit integers.
        /// </summary>
        public short[] getVectorI16(
			MamaFieldDescriptor descriptor,
			short[] valueIfMissing)
        {
            return getVectorI16 (null, (ushort)descriptor.getFid(), valueIfMissing);
        }
示例#14
0
        /// <summary>
        /// Get a vector of signed 16 bit integers.
        /// </summary>
        public short[] getVectorI16(
			MamaFieldDescriptor descriptor)
        {
            return getVectorI16 (null, (ushort)descriptor.getFid());
        }
示例#15
0
        /// <summary>
        /// Try to get a vector of unsigned 64 bit integers.
        /// </summary>
        public bool tryVectorU64(
			MamaFieldDescriptor descriptor, 
			ref ulong[] result)
        {
            return tryVectorU64 (null, (ushort)descriptor.getFid(), ref result);
        }
示例#16
0
        /// <summary>
        /// Set the dictionary for common orderbook fields.
        /// Maintains a cache of MamaFieldDescriptors for common orderbook
        /// related fields. The <code>properties</code> parameter allows users
        /// of the API to map the common dictionary names to something else
        /// if they are beig published under different names.
        /// </summary>
        /// <param name="dictionary">A reference to a valid MamaDictionary</param>
        /// <param name="properties">A Properties object containing field mappings. (See
        /// MamdaFields for more information</param>
        public static void setDictionary(
            MamaDictionary dictionary,
            NameValueCollection properties)
        {
            if (mInitialised)
            {
                return;
            }

            MamdaCommonFields.setDictionary(dictionary, null);

            string wSrcTime      = lookupFieldName(properties, "wSrcTime");
            string wActivityTime = lookupFieldName(properties, "wActivityTime");
            string wLineTime     = lookupFieldName(properties, "wLineTime");
            string wPartId       = lookupFieldName(properties, "wPartId");
            string wSeqNum       = lookupFieldName(properties, "wSeqNum");
            string wBookTime     = lookupFieldName(properties, "wBookTime");
            string wNumLevels    = lookupFieldName(properties, "wNumLevels");
            string wPriceLevels  = lookupFieldName(properties, "wPriceLevels");
            string wPlAction     = lookupFieldName(properties, "wPlAction");
            string wPlPrice      = lookupFieldName(properties, "wPlPrice");
            string wPlSide       = lookupFieldName(properties, "wPlSide");
            string wPlSize       = lookupFieldName(properties, "wPlSize");
            string wPlSizeChange = lookupFieldName(properties, "wPlSizeChange");
            string wPlTime       = lookupFieldName(properties, "wPlTime");
            string wPlNumEntries = lookupFieldName(properties, "wPlNumEntries");
            string wPlNumAttach  = lookupFieldName(properties, "wPlNumAttach");
            string wPlEntries    = lookupFieldName(properties, "wPlEntries");
            string wEntryId      = lookupFieldName(properties, "wEntryId");
            string wEntryAction  = lookupFieldName(properties, "wEntryAction");
            string wEntryReason  = lookupFieldName(properties, "wEntryReason");
            string wEntrySize    = lookupFieldName(properties, "wEntrySize");
            string wEntryTime    = lookupFieldName(properties, "wEntryTime");
            string wEntryStatus  = lookupFieldName(properties, "wEntryStatus");

            SRC_TIME       = dictionary.getFieldByName(wSrcTime);
            ACTIVITY_TIME  = dictionary.getFieldByName(wActivityTime);
            LINE_TIME      = dictionary.getFieldByName(wLineTime);
            PART_ID        = dictionary.getFieldByName(wPartId);
            SEQNUM         = dictionary.getFieldByName(wSeqNum);
            BOOK_TIME      = dictionary.getFieldByName(wBookTime);
            NUM_LEVELS     = dictionary.getFieldByName(wNumLevels);
            PRICE_LEVELS   = dictionary.getFieldByName(wPriceLevels);
            PL_ACTION      = dictionary.getFieldByName(wPlAction);
            PL_PRICE       = dictionary.getFieldByName(wPlPrice);
            PL_SIDE        = dictionary.getFieldByName(wPlSide);
            PL_SIZE        = dictionary.getFieldByName(wPlSize);
            PL_SIZE_CHANGE = dictionary.getFieldByName(wPlSizeChange);
            PL_TIME        = dictionary.getFieldByName(wPlTime);
            PL_NUM_ENTRIES = dictionary.getFieldByName(wPlNumEntries);
            PL_NUM_ATTACH  = dictionary.getFieldByName(wPlNumAttach);
            PL_ENTRIES     = dictionary.getFieldByName(wPlEntries);
            ENTRY_ID       = dictionary.getFieldByName(wEntryId);
            ENTRY_ACTION   = dictionary.getFieldByName(wEntryAction);
            ENTRY_REASON   = dictionary.getFieldByName(wEntryReason);
            ENTRY_SIZE     = dictionary.getFieldByName(wEntrySize);
            ENTRY_TIME     = dictionary.getFieldByName(wEntryTime);
            ENTRY_STATUS   = dictionary.getFieldByName(wEntryStatus);

            mNumLevelFields = 0;
            while (true)
            {
                string wPriceLevel = lookupFieldName(
                    properties,
                    "wPriceLevel" + (mNumLevelFields + 1));
                if (dictionary.getFieldByName(wPriceLevel) == null)
                {
                    break;
                }
                mNumLevelFields++;
            }

            PRICE_LEVEL = new MamaFieldDescriptor[mNumLevelFields + 1];
            for (int i = 1; i <= mNumLevelFields; i++)
            {
                string wPriceLevel = lookupFieldName(properties, "wPriceLevel" + i);
                PRICE_LEVEL[i] = dictionary.getFieldByName(wPriceLevel);
            }

            mNumEntryFields = 0;
            while (true)
            {
                string wPlEntry = lookupFieldName(
                    properties,
                    "wPlEntry" + (mNumEntryFields + 1));
                if (dictionary.getFieldByName(wPlEntry) == null)
                {
                    break;
                }
                mNumEntryFields++;
            }

            PL_ENTRY = new MamaFieldDescriptor[mNumEntryFields + 1];
            for (int i = 1; i <= mNumEntryFields; i++)
            {
                string wPlEntry = lookupFieldName(properties, "wPlEntry" + i);
                PL_ENTRY[i] = dictionary.getFieldByName(wPlEntry);
            }

            mInitialised = true;
        }
示例#17
0
        /// <summary>
        /// Get a vector of prices.
        /// </summary>
        public MamaPrice[] getVectorPrice(
			MamaFieldDescriptor descriptor)
        {
            return getVectorPrice (null, (ushort)descriptor.getFid());
        }
示例#18
0
        /// <summary>
        /// Try to get a bool field.
        /// </summary>
        public bool tryBool(
			MamaFieldDescriptor descriptor,
			ref bool result)
        {
            return tryBool (null, (ushort)descriptor.getFid(), ref result);
        }
示例#19
0
        /// <summary>
        /// Get a vector of prices.
        /// </summary>
        public MamaPrice[] getVectorPrice(
			MamaFieldDescriptor descriptor,
			MamaPrice[] valueIfMissing)
        {
            return getVectorPrice (null, (ushort)descriptor.getFid(), valueIfMissing);
        }
示例#20
0
        public bool tryI64(
			MamaFieldDescriptor descriptor,
			ref NullableLong result)
        {
            return tryI64(null, (ushort)descriptor.getFid(), ref result);
        }
示例#21
0
        /// <summary>
        /// Get a vector of strings (char*).
        /// </summary>
        public string[] getVectorString(
			MamaFieldDescriptor descriptor)
        {
            return getVectorString (null, (ushort)descriptor.getFid());
        }
示例#22
0
        /// <summary>
        /// Try to get a submessage.
        /// </summary>
        public bool tryMsg(
			MamaFieldDescriptor descriptor,
			ref MamaMsg result)
        {
            return tryMsg (null, (ushort)descriptor.getFid(), ref result);
        }
示例#23
0
        /// <summary>
        /// Get a vector of strings (char*).
        /// </summary>
        public string[] getVectorString(
			MamaFieldDescriptor descriptor,
			string[] valueIfMissing)
        {
            return getVectorString (null, (ushort)descriptor.getFid(), valueIfMissing);
        }
示例#24
0
        /// <summary>
        /// Try to get a U32, unsigned 32 bit integer, field.
        /// </summary>
        public bool tryU32(
			MamaFieldDescriptor descriptor,
			ref uint result)
        {
            return tryU32 (null, (ushort)descriptor.getFid(), ref result);
        }
示例#25
0
        /// <summary>
        /// Get a vector of unsigned 32 bit integers.
        /// </summary>
        public uint[] getVectorU32(
			MamaFieldDescriptor descriptor)
        {
            return getVectorU32 (null, (ushort)descriptor.getFid());
        }
示例#26
0
        /// <summary>
        /// Try to get a vector of timestamps.
        /// </summary>
        public bool tryVectorDateTime(
			MamaFieldDescriptor descriptor, 
			ref DateTime[] result)
        {
            return tryVectorDateTime (null, (ushort)descriptor.getFid(), ref result);
        }
示例#27
0
        /// <summary>
        /// Get a vector of unsigned 32 bit integers.
        /// </summary>
        public uint[] getVectorU32(
			MamaFieldDescriptor descriptor,
			uint[] valueIfMissing)
        {
            return getVectorU32 (null, (ushort)descriptor.getFid(), valueIfMissing);
        }
示例#28
0
        public bool tryVectorMsg(
			MamaFieldDescriptor descriptor,
			ref MamaMsg[] result)
        {
            return tryVectorMsgImpl (null, (ushort)descriptor.getFid(), ref result, false);
        }
示例#29
0
        /// <summary>
        /// Get a vector of unsigned 64 bit integers.
        /// </summary>
        public ulong[] getVectorU64(
			MamaFieldDescriptor descriptor)
        {
            return getVectorU64 (null, (ushort)descriptor.getFid());
        }
示例#30
0
        /// <summary>
        /// Try to get a vector of strings (char*).
        /// </summary>
        public bool tryVectorString(
			MamaFieldDescriptor descriptor, 
			ref string[] result)
        {
            return tryVectorString (null, (ushort)descriptor.getFid(), ref result);
        }
示例#31
0
        /// <summary>
        /// Get a vector of unsigned 64 bit integers.
        /// </summary>
        public ulong[] getVectorU64(
			MamaFieldDescriptor descriptor,
			ulong[] valueIfMissing)
        {
            return getVectorU64 (null, (ushort)descriptor.getFid(), valueIfMissing);
        }
示例#32
0
        /// <summary>
        /// Try to get a vector of unsigned 8 bit integers.
        /// </summary>
        public bool tryVectorU8(
			MamaFieldDescriptor descriptor, 
			ref byte[] result)
        {
            return tryVectorU8 (null, (ushort)descriptor.getFid(), ref result);
        }
示例#33
0
        /// <summary>
        /// Get a vector of unsigned 8 bit integers.
        /// </summary>
        public byte[] getVectorU8(
			MamaFieldDescriptor descriptor)
        {
            return getVectorU8 (null, (ushort)descriptor.getFid());
        }