示例#1
0
        public async Task UpdateCellsAsync(List <Cell> cells)
        {
            WebsocketData update = new WebsocketData()
            {
                MsgType = "updateCells",
                Cells   = cells
            };

            await SendDataAsync(WS, update);
        }
示例#2
0
        public async Task UpdateColumnAsync(List <MiniColumn> columns)
        {
            WebsocketData update = new WebsocketData()
            {
                MsgType = "updateOverlap",
                Columns = columns
            };


            await SendDataAsync(WS, update);
        }
示例#3
0
        public async Task InitModelAsync(NeuroModel model)
        {
            WebsocketData dataModel = new WebsocketData()
            {
                MsgType = "init",
                Model   = model
            };


            await SendDataAsync(WS, dataModel);
        }
示例#4
0
        public async Task UpdateSynapsesAsync(List <Synapse> synapses)
        {
            WebsocketData update = new WebsocketData()
            {
                MsgType  = "updateOrAddSynapse",
                Synapses = synapses
            };

            await SendDataAsync(WS, update);

            //WebsocketData updateSynapses = new WebsocketData()
            //{
            //    MsgType = "updateSynapse",
            //    Synapses = synapses

            //};

            //SynapseData synData = null;


            //for (int syn = 0; syn < synapses.Count; syn++)
            //{
            //    synData = new SynapseData
            //    {
            //        PreCell = synapses[syn].Synapse.SourceCell,


            //    };

            //    if (synapses[syn].Synapse.Segment is DistalDendrite)
            //    {
            //        DistalDendrite seg = (DistalDendrite)synapses[syn].Synapse.Segment;
            //        synData.PostCell = seg.ParentCell;
            //    }
            //    else if (synapses[syn].Synapse.Segment is ProximalDendrite)
            //    {
            //        ProximalDendrite seg = (ProximalDendrite)synapses[syn].Synapse.Segment;
            //        // synData.PostCell = seg.

            //        // DimX = seg.ParentColumnIndex
            //        // DImZ = 4;
            //    }
            //    else
            //        throw new ApplicationException("");

            //}

            //await SendDataAsync(websocket, updateSynapses);
        }