示例#1
0
        protected SecsHost(SecsMessageParserBase parser)
        {
            m_Locker            = new object();
            m_Parser            = parser;
            m_ItemManager       = new SecsItemManager();
            m_DeviceId          = 0;
            m_SecsTransaction   = new Dictionary <uint, SecsMessageBase>();
            m_TransactionIdSeed = 0;

            m_SyncContext = SynchronizationContext.Current;
            if (m_SyncContext == null)
            {
                m_SyncContext = new SynchronizationContext();
            }

            m_SecsLogEnabled = true;
            System.IO.FileInfo fi = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);
            m_LogDirectory = fi.DirectoryName;
        }