예제 #1
0
 public MessageFlow SetUnit(MessageCreditUnit value)
 {
     _Unit          = value;
     packing_flags |= 512;
     Dirty          = true;
     return(this);
 }
예제 #2
0
 public override void Read(IDecoder dec)
 {
     packing_flags = (int)dec.ReadUint16();
     if ((packing_flags & 256) != 0)
     {
         _Destination = dec.ReadStr8();
     }
     if ((packing_flags & 512) != 0)
     {
         _Unit = MessageCreditUnitGetter.Get(dec.ReadUint8());
     }
     if ((packing_flags & 1024) != 0)
     {
         _Value = dec.ReadUint32();
     }
 }
예제 #3
0
        public MessageFlow(String Destination, MessageCreditUnit Unit, long Value, params Option[] options)
        {
            SetDestination(Destination);
            SetUnit(Unit);
            SetValue(Value);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
예제 #4
0
 public void MessageFlow(String Destination, MessageCreditUnit Unit, long Value, params Option[] options) {
     Invoke(new MessageFlow(Destination, Unit, Value, options));
 }
예제 #5
0
 public void MessageFlow(String Destination, MessageCreditUnit Unit, long Value, params Option[] options)
 {
     Invoke(new MessageFlow(Destination, Unit, Value, options));
 }