Exemplo n.º 1
0
        private void RegisterNamedPipePort(NamedPipeConnectData connectData)
        {
            VerifyAccess();

            AsyncFileStream stream = new AsyncFileStream(connectData._pipeName, connectData._pipe);

            ComPortToNamedPipe namedPipePort = new ComPortToNamedPipe(connectData._pipeName, stream);

            namedPipePort.ComPortHandle = connectData._comPortHandle;

            this.Emulator.RegisterComponent(namedPipePort);

            connectData._isRegistered = true;

            //The TinyCLR doesn't call Initialize for the debug NamedPipe ports always
            //and we are swapping out components anyway, so we need to force the
            //initialization here to start the reading
            namedPipePort.DeviceInitialize();
        }
Exemplo n.º 2
0
        private void RegisterNamedPipePort(NamedPipeConnectData connectData)
        {
            VerifyAccess();

            AsyncFileStream stream = new AsyncFileStream(connectData._pipeName, connectData._pipe);

            ComPortToNamedPipe namedPipePort = new ComPortToNamedPipe(connectData._pipeName, stream);

            namedPipePort.ComPortHandle = connectData._comPortHandle;

            this.Emulator.RegisterComponent(namedPipePort);

            connectData._isRegistered = true;

            //The TinyCLR doesn't call Initialize for the debug NamedPipe ports always
            //and we are swapping out components anyway, so we need to force the
            //initialization here to start the reading
            namedPipePort.DeviceInitialize();
        }