Commit fb79e77a authored by claes's avatar claes

Listen to qcom events

parent 975bbfaa
/* /*
* Proview $Id: rt_sevhistmon.cpp,v 1.4 2008-11-10 08:00:06 claes Exp $ * Proview $Id: rt_sevhistmon.cpp,v 1.5 2008-11-12 15:49:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "rt_gdh.h" #include "rt_gdh.h"
#include "rt_qcom.h" #include "rt_qcom.h"
#include "rt_qcom_msg.h" #include "rt_qcom_msg.h"
#include "rt_ini_event.h"
#include "rt_errh.h" #include "rt_errh.h"
#include "rt_sevhistmon.h" #include "rt_sevhistmon.h"
#include "rt_sev_net.h" #include "rt_sev_net.h"
...@@ -44,6 +45,7 @@ int rt_sevhistmon::init() ...@@ -44,6 +45,7 @@ int rt_sevhistmon::init()
unsigned int a_size, a_offset, a_dim; unsigned int a_size, a_offset, a_dim;
pwr_tAName hname; pwr_tAName hname;
qcom_sQid qid; qcom_sQid qid;
qcom_sQid qini;
qcom_sNode node; qcom_sNode node;
pwr_tNid nid; pwr_tNid nid;
pwr_tOid conf_oid; pwr_tOid conf_oid;
...@@ -86,6 +88,10 @@ int rt_sevhistmon::init() ...@@ -86,6 +88,10 @@ int rt_sevhistmon::init()
throw co_error( sts); throw co_error( sts);
} }
qini = qcom_cQini;
if (!qcom_Bind(&sts, &qid, &qini))
throw co_error(sts);
// Get all qcom nodes // Get all qcom nodes
qcom_MyNode( &m_sts, &node); qcom_MyNode( &m_sts, &node);
if ( EVEN(m_sts)) throw co_error(m_sts); if ( EVEN(m_sts)) throw co_error(m_sts);
...@@ -439,6 +445,15 @@ int rt_sevhistmon::mainloop() ...@@ -439,6 +445,15 @@ int rt_sevhistmon::mainloop()
default: ; default: ;
} }
break; break;
case qcom_eBtype_event: {
ini_mEvent new_event;
qcom_sEvent *ep = (qcom_sEvent*) get.data;
new_event.m = ep->mask;
if (new_event.b.terminate)
exit(0);
break;
}
default: ; default: ;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment