Exemple #1
0
 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));
     }
 }
 public SizeAllocInstruction(SizeAllocCommand command, SizeAlloc parameter)
     : base(command, parameter) { }
Exemple #3
0
 public SizeAllocDataPacket(SizeAlloc alloc)
     : base(alloc.DestinationAddr)
 {
     this.alloc = alloc;
 }