Пример #1
0
        protected E099TagRWSimEngine(string partID, IValuesInterconnection ivi)
            : base(partID, initialSettings: SimpleActivePartBaseSettings.DefaultVersion2.Build(partBaseIVI: ivi))
        {
            ActionLoggingConfig = Modular.Action.ActionLoggingConfig.Info_Error_Trace_Trace;    // redefine the log levels for actions

            IVI = ivi ?? Values.Instance;

            //This part is a simulated primary part
            PrivateBaseState = new BaseState(true, true)
            {
                ConnState = ConnState.NotApplicable
            };

            TagRWSimEngineConfig defaultConfig = new TagRWSimEngineConfig()
            {
                ReaderType = ReaderType.TIRIS, Mode = E099TagRWSimEngineMode.IDOnly
            };

            configAccessAdapter = new ConfigValueSetAdapter <TagRWSimEngineConfig>()
            {
                ValueSet = defaultConfig, SetupIssueEmitter = Log.Error, UpdateIssueEmitter = Log.Error, ValueNoteEmitter = Log.Debug
            }.Setup(PartID + ".");
            configAccessAdapter.UpdateNotificationList.AddItem(threadWakeupNotifier);
            AddExplicitDisposeAction(() => configAccessAdapter.UpdateNotificationList.RemoveItem(threadWakeupNotifier));

            InitializePrivateState();

            PublishBaseState("Constructor.Complete");
        }
Пример #2
0
 public TagRWSimEngineState(TagRWSimEngineState rhs)
 {
     Config              = new TagRWSimEngineConfig(rhs.Config);
     ContentByteArray    = rhs.ContentByteArray.Clone() as byte [];
     Count               = rhs.Count;
     TagIsPresent        = rhs.TagIsPresent;
     rawCounterIsEnabled = rhs.rawCounterIsEnabled;
     BuildPages();
 }
Пример #3
0
 public TagRWSimEngineState()
 {
     Config = new TagRWSimEngineConfig()
     {
         ReaderType = ReaderType.TIRIS, Mode = E099TagRWSimEngineMode.IDOnly
     };
     ContentByteArray = EmptyByteArray;
     Count            = 0;
     TagIsPresent     = false;
     BuildPages();
 }
Пример #4
0
 public TagRWSimEngineConfig(TagRWSimEngineConfig rhs)
 {
     ReaderType                    = rhs.ReaderType;
     NumPages                      = rhs.NumPages;
     PageDataSize                  = rhs.PageDataSize;
     PageReadDelay                 = rhs.PageReadDelay;
     PageWriteDelay                = rhs.PageWriteDelay;
     IDStartOffset                 = rhs.IDStartOffset;
     IDSize                        = rhs.IDSize;
     InitialCounterValue           = rhs.InitialCounterValue;
     InitialPageContentsHex        = rhs.InitialPageContentsHex;
     InitialPageContentsStrOverlay = rhs.InitialPageContentsStrOverlay;
     Mode = rhs.Mode;
 }
Пример #5
0
 public bool IsEqualTo(TagRWSimEngineConfig rhs)
 {
     return(rhs != null &&
            ReaderType == rhs.ReaderType &&
            NumPages == rhs.NumPages &&
            PageDataSize == rhs.PageDataSize &&
            PageReadDelay == rhs.PageReadDelay &&
            PageWriteDelay == rhs.PageWriteDelay &&
            IDStartOffset == rhs.IDStartOffset &&
            IDSize == rhs.IDSize &&
            InitialCounterValue == rhs.InitialCounterValue &&
            InitialPageContentsHex == rhs.InitialPageContentsHex &&
            InitialPageContentsStrOverlay == rhs.InitialPageContentsStrOverlay &&
            Mode == rhs.Mode
            );
 }