public MessageTransceiver(SlaveContext contextManager, int session) { this._slaveContext = contextManager; // 创建上行队列 _formatterType = contextManager.GetProperty <FormatterType>("EngineQueueFormat"); MessengerOption receiveOption = new MessengerOption(CoreConstants.UpLinkMQName, typeof(ControlMessage), typeof(DebugMessage), typeof(RmtGenMessage), typeof(StatusMessage), typeof(TestGenMessage)) { Type = contextManager.GetProperty <MessengerType>("MessengerType") }; _uplinkMessenger = Messenger.GetMessenger(receiveOption); // 创建下行队列 MessengerOption sendOption = new MessengerOption(CoreConstants.DownLinkMQName, typeof(ControlMessage), typeof(DebugMessage), typeof(RmtGenMessage), typeof(StatusMessage), typeof(TestGenMessage)) { Type = contextManager.GetProperty <MessengerType>("MessengerType") }; _downLinkMessenger = Messenger.GetMessenger(sendOption); _messageQueue = new LocalMessageQueue <MessageBase>(CoreConstants.DefaultEventsQueueSize); this.SessionId = session; }
public AppDomainTestLauncher(string configDataStr) { I18NOption i18NOption = new I18NOption(typeof(TestLauncher).Assembly, "i18n_SlaveCore_zh", "i18n_SlaveCore_en") { Name = Constants.I18nName }; I18N.InitInstance(i18NOption); _slaveContext = new SlaveContext(configDataStr); }
public TestLauncher(string configDataStr) { I18NOption i18NOption = new I18NOption(typeof(TestLauncher).Assembly, "i18n_SlaveCore_zh", "i18n_SlaveCore_en") { Name = Constants.I18nName }; I18N.InitInstance(i18NOption); _contextManager = new SlaveContext(configDataStr); // _transceiver = new MessageTransceiver(_contextManager, ); }
public SlaveController(SlaveContext context) { this._transceiver = context.MessageTransceiver; this._context = context; }