Mercurial > hg > Database > Christie-sharp
changeset 4:a6f7466473f5
add command
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 23 Jun 2020 19:27:24 +0900 |
parents | f27db91a852e |
children | 5f2af64540be |
files | datagear/command/Command.cs datagear/command/CommandType.cs datagear/dg/DataGears.cs |
diffstat | 3 files changed, 50 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datagear/command/Command.cs Tue Jun 23 19:27:24 2020 +0900 @@ -0,0 +1,5 @@ +namespace Christie_net.datagear.command { + public abstract class Command { + public CommandTy + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datagear/command/CommandType.cs Tue Jun 23 19:27:24 2020 +0900 @@ -0,0 +1,16 @@ +namespace Christie_net.datagear.command { + public enum CommandType { + PUT, + TAKE, + PEEK, + REMOTETAKE, + REMOTEPEEK, + REPLY, + CLOSE, + FINISH + }; + + public static class CommandTypeEtx { + + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datagear/dg/DataGears.cs Tue Jun 23 19:27:24 2020 +0900 @@ -0,0 +1,29 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; + +namespace Christie_net.datagear.dg { + public class DataGears { + protected SortedDictionary<string, BlockingCollection<DataGear<Type>>> dataGears = + new SortedDictionary<string, BlockingCollection<DataGear<Type>>>(); + private object syncObject = new object(); + + public void Put(string key, DataGear<Type> dg) { + lock (syncObject) { + + } + } + + public object Peek(string key) { + return dataGears. + } + + public object GetData(Command cm) { + switch (cm.type) { + + } + } + + public void SetData() + } +} \ No newline at end of file