Ejemplo n.º 1
0
        /// <summary>
        /// Store the KAnp event specified with the status specified.
        /// </summary>
        public void StoreKAnpEvent(UInt64 kwsID, AnpMsg msg, KwsAnpEventStatus status)
        {
            try
            {
                DbCommand cmd = m_db.GetCmd("INSERT INTO kanp_events (kws_id, evt_id, evt_data, status) VALUES (?, ?, ?, ?);");
                m_db.AddParamToCmd(cmd, kwsID);
                m_db.AddParamToCmd(cmd, msg.ID);
                m_db.AddParamToCmd(cmd, msg.ToByteArray(true));
                m_db.AddParamToCmd(cmd, status);
                cmd.ExecuteNonQuery();
            }

            catch (Exception ex)
            {
                KBase.HandleException(ex, true);
            }
        }
Ejemplo n.º 2
0
 public void SendMsg(AnpMsg msg)
 {
     outState = OutState.Sending;
     outBuf = msg.ToByteArray(true);
     outPos = 0;
 }