Пример #1
0
 public M1RequestMessage(string request)
 {
     //Constructor for an actual request message
     //for use as a reference or for making a real request.
     reqHeader.protocolVer = MsgInitValues.PROTOCOL;
     reqHeader.reqType     = BitConverter.GetBytes((UInt32)enMsgType.raMessage1Req);
     reqHeader.msgLength   = BitConverter.GetBytes((UInt32)enDefaultLength.raDefaultM1Length);
     reqHeader.nonce       = MsgInitValues.DS_ZERO_BA16;
     reqM1Body             = new ReqMsg1Body();
 }
Пример #2
0
 public M1RequestMessage()
 {
     //Constructor to populate an "empty" object with values that allow
     //dection of missing fields after deserialization.
     reqHeader.protocolVer = MsgInitValues.DS_EMPTY_BA2;
     reqHeader.reqType     = BitConverter.GetBytes((UInt32)enMsgType.raReserved);
     reqHeader.msgLength   = BitConverter.GetBytes((UInt32)enDefaultLength.raDefaultEmptyLength);
     reqHeader.nonce       = MsgInitValues.DS_ZERO_BA16;
     reqM1Body             = new ReqMsg1Body();
     reqM1Body.gaX         = MsgInitValues.DS_EMPTY_BA32;
     reqM1Body.gaY         = MsgInitValues.DS_EMPTY_BA32;
     reqM1Body.pltfrmGid   = MsgInitValues.DS_EMPTY_BA32;
 }
        //Build an M1 request
        public void buildM1Request(out M1RequestMessage m1Req)
        {
            string request = Constants.Request;

            var m1Msg  = new M1RequestMessage(request);
            var m1Body = new ReqMsg1Body();

            m1Msg.reqHeader.nonce = Constants.sn1;
            m1Body.pltfrmGid      = Constants.sampleGid;
            m1Body.gaX            = Constants.sampleGaXba;
            m1Body.gaY            = Constants.sampleGaYba;

            m1Msg.reqM1Body = m1Body;
            m1Req           = m1Msg;
            return;
        }