Esempio n. 1
0
 internal CommunicationFrame()
 {
     header        = new HeaderFrame();
     payload       = new PayLoad();
     data          = "";
     serialization = Communication.createSerialization();
 }
Esempio n. 2
0
 internal CommunicationFrame(HeaderFrame h, PayLoad p)
 {
     data          = "";
     Header        = h;
     PayLoad       = p;
     serialization = Communication.createSerialization();
 }
Esempio n. 3
0
        /**
         *
         * Codifica o cabeçalho
         */
        public bool encode(HeaderFrame header)
        {
            header.Append(header.Address.ToString("D5") + CONST_CHAR.SEPARATOR);
            header.Append(header.Dest.ToString("D5") + CONST_CHAR.SEPARATOR);
            header.Append(header.TimeStamp.ToString("D10") + CONST_CHAR.SEPARATOR);
            header.Append(header.Operation.ToString() + CONST_CHAR.SEPARATOR);
            header.Append(header.Resource);

            return(true);
        }
Esempio n. 4
0
        /*
         * Decodifica um header fazendo a conversão de uma lista de string para seu respectivo formato original
         */
        private HeaderFrame decoderHeader(string[] list)
        {
            HeaderFrame header = new HeaderFrame();

            FieldFrame <int>       addr      = new FieldFrame <int>(INDEX.ADDRESS, list);
            FieldFrame <int>       dest      = new FieldFrame <int>(INDEX.DEST, list);
            FieldFrame <Int32>     timestamp = new FieldFrame <Int32>(INDEX.TIME_STAMP, list);
            FieldFrame <Operation> op        = new FieldFrame <Operation>(INDEX.OPERACAO, list);
            FieldFrame <string>    res       = new FieldFrame <string>(INDEX.RESOURCE, list);
            FieldFrame <int>       s_pl      = new FieldFrame <int>(INDEX.SIZE_PAYLOAD, list);

            header.Address     = addr.getVal();
            header.Dest        = dest.getVal();
            header.TimeStamp   = timestamp.getVal();
            header.Operation   = op.getVal();
            header.Resource    = res.getVal();
            header.SizePayLoad = s_pl.getVal();

            return(header);
        }
Esempio n. 5
0
 internal FrameAMQP(HeaderFrame h, PayLoad p)
     : base(h, p)
 {
 }
Esempio n. 6
0
 internal FrameSerial(HeaderFrame h, PayLoad p)
     : base(h, p)
 {
 }