protected void PublishPrivateState()
        {
            ITagRWSimEngineState pubObj = new TagRWSimEngineState(privateState) as ITagRWSimEngineState;

            stateIVA.Set(pubObj);
            publicStateNotifier.Object = pubObj;
        }
 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();
 }
        private void InitializePrivateState()
        {
            privateState = new TagRWSimEngineState()
            {
                Config           = new TagRWSimEngineConfig(CurrentConfig),
                ContentByteArray = (byte[])CurrentConfig.InitialPageContentsByteArray.Clone(),
                Count            = CurrentConfig.InitialCounterValue,
                TagIsPresent     = true,
            };

            stateIVA            = IVI.GetValueAccessor("{0}.State".CheckedFormat(PartID));
            tagIsPresentIVA     = IVI.GetValueAccessor("{0}.TagIsPresent".CheckedFormat(PartID)).Set(privateState.TagIsPresent);
            counterIsEnabledIVA = IVI.GetValueAccessor("{0}.CounterIsEnabled".CheckedFormat(PartID)).Set(true);
            isOnlineIVA         = IVI.GetValueAccessor("{0}.IsOnline".CheckedFormat(PartID)).Set(true);

            privateState.UpdateCounterPostfix();

            PublishPrivateState();
        }