public static AmpMessage CreateResponseMessage(int serviceId, ushort messageId) { AmpMessage message = new AmpMessage { ServiceId = serviceId, MessageId = messageId, Version = 1, CodecType = 0, InvokeMessageType = InvokeMessageType.Response }; return message; }
public static AmpMessage CreateResponseMessage(string requestId) { var data = requestId.Split('|'); AmpMessage message = new AmpMessage { ServiceId = int.Parse(data[0]), MessageId = ushort.Parse(data[1]), InvokeMessageType = InvokeMessageType.Response }; return(message); }
public static AmpMessage CreateRequestMessage(int serviceId,ushort messageId,bool withOutResponse =false) { AmpMessage msg = new AmpMessage { ServiceId = serviceId, MessageId = messageId, Version = 1, CodecType = 0, InvokeMessageType = withOutResponse ? InvokeMessageType.InvokeWithoutResponse : InvokeMessageType.Request }; return msg; }