예제 #1
0
파일: Program.cs 프로젝트: zesus19/c5.v1
 static void RunSizeAllocInstruction()
 {
     using (var scope = ObjectHost.Host.BeginLifetimeScope())
     {
         var sizeAlloc = new SizeAlloc { DestinationAddr = 1 };
         sizeAlloc.Add(new AllocUnit { Address = 11, Size = 70 });
         var addrAssignCmd = scope.Resolve<SizeAllocCommand>();
         addrAssignCmd.Execute(null, Rpc.Net.Message.DuplexMessage.CreateCommandMessage(
             string.Empty,
             Rpc.Net.Message.MessageVersion.V1,
             Rpc.Net.Message.CommandCode.Test,
             Rpc.Net.Message.Filter.MessageFilterType.None,
             new byte[0],
             Rpc.Net.Message.Serializer.SerializeMode.None,
             sizeAlloc));
     }
 }
예제 #2
0
 public SizeAllocInstruction(SizeAllocCommand command, SizeAlloc parameter)
     : base(command, parameter) { }
예제 #3
0
 public SizeAllocDataPacket(SizeAlloc alloc)
     : base(alloc.DestinationAddr)
 {
     this.alloc = alloc;
 }