Example #1
0
        public AstmStart GetCloseConnectionRequest()
        {
            AstmStart msg = GetNewRequest((byte)SessionVariables.GetNextSessionNumber(), (byte)AstmCommandType.CLOSE_CONNECTION);

            ((MedtronicMessage2)msg.Message2).Message = new ConnectionRequest(SessionDevice.Device.HMACbyte);
            return(msg);
        }
Example #2
0
        public AstmStart GetChannelRequest(byte radioChannel)
        {
            AstmStart msg = GetNewRequest((byte)SessionVariables.GetNextSessionNumber(), (byte)AstmCommandType.SEND_MESSAGE);

            ((MedtronicMessage2)msg.Message2).Message = new RadioChannelRequest(radioChannel, SessionCommunicationParameters.LinkMac, SessionCommunicationParameters.PumpMac);
            return(msg);
        }
Example #3
0
        private AstmStart GetPumpEnvelope(byte prefix, AstmSendMessageType messageType, byte[] message)
        {
            AstmStart    msg  = GetNewRequest((byte)SessionVariables.GetNextSessionNumber(), (byte)AstmCommandType.SEND_MESSAGE);
            PumpEnvelope penv = new PumpEnvelope(this.SessionCommunicationParameters.PumpMac, (byte)SessionVariables.GetNextSequenceNumber());

            penv.Message = new PumpMessage(prefix, messageType, message);
            ((MedtronicMessage2)msg.Message2).Message = penv;
            return(msg);
        }
Example #4
0
 private AstmStart GetNewRequest(AstmCommandType commandType)
 {
     return(GetNewRequest((byte)SessionVariables.GetNextSessionNumber(), (byte)commandType));
 }