Commit 013a6305 authored by Claes Sjofors's avatar Claes Sjofors

Mh removed qcom buffering of alarm status messages

parent 3feac8d9
...@@ -525,7 +525,7 @@ static void scanTimerList(); ...@@ -525,7 +525,7 @@ static void scanTimerList();
static void sendEventListToOutunit(sOutunit*); static void sendEventListToOutunit(sOutunit*);
static pwr_tBoolean sendEventToOutunit(sOutunit*, sEventTab*); static pwr_tBoolean sendEventToOutunit(sOutunit*, sEventTab*);
static pwr_tStatus sendMessage(mh_eMsg, qcom_sQid*, co_sPlatform*, void*, pwr_tUInt32); static pwr_tStatus sendMessage(mh_eMsg, qcom_sQid*, co_sPlatform*, void*, pwr_tUInt32);
static pwr_tStatus sendToOutunit(sOutunit*, mh_eMsg, int, void*, int); static pwr_tStatus sendToOutunit(sOutunit*, mh_eMsg, int, unsigned int, void*, int);
static void setTimerActive(int, pwr_tBoolean); static void setTimerActive(int, pwr_tBoolean);
static sSupActive *supListGet(pwr_tAttrRef*); static sSupActive *supListGet(pwr_tAttrRef*);
static void timeOut(); static void timeOut();
...@@ -1340,7 +1340,7 @@ sendAlarmStatus( sOutunit *op) ...@@ -1340,7 +1340,7 @@ sendAlarmStatus( sOutunit *op)
default: ; default: ;
} }
} }
sts = sendToOutunit(op, mh_eMsg_HandlerAlarmStatus, 0, msg, msg_size); sts = sendToOutunit(op, mh_eMsg_HandlerAlarmStatus, 0, op->outunit.oix, msg, msg_size);
free( (char *)msg); free( (char *)msg);
} }
...@@ -1369,7 +1369,7 @@ checkOutunits () ...@@ -1369,7 +1369,7 @@ checkOutunits ()
cdh_ObjidToString(NULL, op->outunit, 1), cdh_ObjidToString(NULL, op->outunit, 1),
op->syncedIdx, op->eventIdx); op->syncedIdx, op->eventIdx);
#endif #endif
sendToOutunit(op, mh_eMsg_HandlerSync, 0, NULL, 0); sendToOutunit(op, mh_eMsg_HandlerSync, 0, 0, NULL, 0);
} else { } else {
op->check = 1; op->check = 1;
} }
...@@ -2132,7 +2132,7 @@ fromOutunit ( ...@@ -2132,7 +2132,7 @@ fromOutunit (
outunitSync(hp, op); outunitSync(hp, op);
break; break;
case mh_eMsg_OutunitSync: case mh_eMsg_OutunitSync:
sendToOutunit(op, mh_eMsg_Sync, 0, NULL, 0); sendToOutunit(op, mh_eMsg_Sync, 0, 0, NULL, 0);
break; break;
case mh_eMsg_OutunitAlarmReq: case mh_eMsg_OutunitAlarmReq:
outunitAlarmReq(hp, op); outunitAlarmReq(hp, op);
...@@ -2221,7 +2221,7 @@ fromEvent ( ...@@ -2221,7 +2221,7 @@ fromEvent (
} }
for (ol = LstFir(&l.outunit_l); ol != LstEnd(&l.outunit_l); ol = LstNex(ol)) { for (ol = LstFir(&l.outunit_l); ol != LstEnd(&l.outunit_l); ol = LstNex(ol)) {
op = LstObj(ol); op = LstObj(ol);
sendToOutunit(op, mh_eMsg_OutunitClear, 0, NULL, 0); sendToOutunit(op, mh_eMsg_OutunitClear, 0, 0, NULL, 0);
} }
for (ol = LstFir(&l.outunit_l); ol != LstEnd(&l.outunit_l); ol = LstNex(ol)) { for (ol = LstFir(&l.outunit_l); ol != LstEnd(&l.outunit_l); ol = LstNex(ol)) {
op = LstObj(ol); op = LstObj(ol);
...@@ -2245,7 +2245,7 @@ fromEvent ( ...@@ -2245,7 +2245,7 @@ fromEvent (
for (ol = LstFir(&l.outunit_l); ol != LstEnd(&l.outunit_l); ol = LstNex(ol)) { for (ol = LstFir(&l.outunit_l); ol != LstEnd(&l.outunit_l); ol = LstNex(ol)) {
op = LstObj(ol); op = LstObj(ol);
if (op->syncedIdx == op->eventIdx) if (op->syncedIdx == op->eventIdx)
sendToOutunit(op, mh_eMsg_OutunitClear, 0, NULL, 0); sendToOutunit(op, mh_eMsg_OutunitClear, 0, 0, NULL, 0);
} }
printf( "rt_emon: SimLoadStart\n"); printf( "rt_emon: SimLoadStart\n");
} }
...@@ -3352,7 +3352,7 @@ isValidOutunit ( ...@@ -3352,7 +3352,7 @@ isValidOutunit (
if (op->birthTime.tv_sec != hp->birthTime.tv_sec) { if (op->birthTime.tv_sec != hp->birthTime.tv_sec) {
if ( hp->type == mh_eMsg_OutunitInfo) { if ( hp->type == mh_eMsg_OutunitInfo) {
//sendToOutunit(op, mh_eMsg_OutunitClear, 0, NULL, 0); //sendToOutunit(op, mh_eMsg_OutunitClear, 0, 0, NULL, 0);
if ( hp->nix == l.head.nix) if ( hp->nix == l.head.nix)
handlerEvent(pwr_eSystemEventTypeEnum_OutunitRestart, hp->nix, 1); handlerEvent(pwr_eSystemEventTypeEnum_OutunitRestart, hp->nix, 1);
...@@ -3498,7 +3498,7 @@ outunitAck ( ...@@ -3498,7 +3498,7 @@ outunitAck (
sApplActive *aap; sApplActive *aap;
op->ackGen = ip->ackGen; op->ackGen = ip->ackGen;
sendToOutunit(op, mh_eMsg_Sync, 0, NULL, 0); sendToOutunit(op, mh_eMsg_Sync, 0, 0, NULL, 0);
if ((ap = activeListGet(ip->targetIdx)) == NULL) { if ((ap = activeListGet(ip->targetIdx)) == NULL) {
/* Alarm does not exist */ /* Alarm does not exist */
...@@ -3564,7 +3564,7 @@ outunitBlock ( ...@@ -3564,7 +3564,7 @@ outunitBlock (
pwr_tNodeIndex nix; pwr_tNodeIndex nix;
op->blockGen = ip->blockGen; op->blockGen = ip->blockGen;
sendToOutunit(op, mh_eMsg_Sync, 0, NULL, 0); sendToOutunit(op, mh_eMsg_Sync, 0, 0, NULL, 0);
for (bl = LstFir(&l.block_l); bl != LstEnd(&l.block_l); bl = LstNex(bl)) for (bl = LstFir(&l.block_l); bl != LstEnd(&l.block_l); bl = LstNex(bl))
if (cdh_ObjidIsEqual(ip->object, LstObj(bl)->link.object.Objid)) if (cdh_ObjidIsEqual(ip->object, LstObj(bl)->link.object.Objid))
...@@ -3694,7 +3694,7 @@ outunitInfo ( ...@@ -3694,7 +3694,7 @@ outunitInfo (
op->check = 0; op->check = 0;
} }
sendToOutunit(op, mh_eMsg_Sync, 0, NULL, 0); sendToOutunit(op, mh_eMsg_Sync, 0, 0, NULL, 0);
sendEventListToOutunit(op); sendEventListToOutunit(op);
} }
...@@ -4051,7 +4051,7 @@ reSendEventToOutunit ( ...@@ -4051,7 +4051,7 @@ reSendEventToOutunit (
break; break;
} }
sts = sendToOutunit(op, mh_eMsg_Event, etp->event, &event.message, size); sts = sendToOutunit(op, mh_eMsg_Event, etp->event, 0, &event.message, size);
return ODD(sts); return ODD(sts);
} }
...@@ -4278,7 +4278,7 @@ sendEventToOutunit ( ...@@ -4278,7 +4278,7 @@ sendEventToOutunit (
pwr_tStatus sts; pwr_tStatus sts;
sEvent *ep = etp->ep; sEvent *ep = etp->ep;
sts = sendToOutunit(op, mh_eMsg_Event, ep->msg.info.EventType, &ep->msg, ep->msgSize); sts = sendToOutunit(op, mh_eMsg_Event, ep->msg.info.EventType, 0, &ep->msg, ep->msgSize);
if (EVEN(sts)) { if (EVEN(sts)) {
// errh_Error("%s\n%m", "sendEventToOutunit", sts); // errh_Error("%s\n%m", "sendEventToOutunit", sts);
...@@ -4326,7 +4326,7 @@ sendMessage ( ...@@ -4326,7 +4326,7 @@ sendMessage (
target = *qid; target = *qid;
} }
sts = mh_NetSendMessage(&target, platform, prio, 0, (mh_sHead *)mp, size); sts = mh_NetSendMessage(&target, platform, prio, 0, 0, (mh_sHead *)mp, size);
if (EVEN(sts) && sts != QCOM__LINKDOWN) { if (EVEN(sts) && sts != QCOM__LINKDOWN) {
errh_Error("%s\n%m", "SendMessage: mh_NetSendMessage", sts); errh_Error("%s\n%m", "SendMessage: mh_NetSendMessage", sts);
} }
...@@ -4341,6 +4341,7 @@ sendToOutunit ( ...@@ -4341,6 +4341,7 @@ sendToOutunit (
sOutunit *op, sOutunit *op,
mh_eMsg type, mh_eMsg type,
int subType, int subType,
unsigned int id,
void *msg, void *msg,
int msgSize int msgSize
) )
...@@ -4373,7 +4374,7 @@ sendToOutunit ( ...@@ -4373,7 +4374,7 @@ sendToOutunit (
hp->selGen = op->selGen; hp->selGen = op->selGen;
// printf( "sendToOutunit: eventIdx %d\n", hp->eventIdx); // printf( "sendToOutunit: eventIdx %d\n", hp->eventIdx);
sts = mh_NetSendMessage(&op->link.qid, &op->link.platform, prio, subType, (mh_sHead *)mp, size); sts = mh_NetSendMessage(&op->link.qid, &op->link.platform, prio, subType, id, (mh_sHead *)mp, size);
if (EVEN(sts) && sts != QCOM__LINKDOWN) { if (EVEN(sts) && sts != QCOM__LINKDOWN) {
errh_Error("%s\n%m", "SendMessage: mh_NetSendMessage", sts); errh_Error("%s\n%m", "SendMessage: mh_NetSendMessage", sts);
} }
......
...@@ -56,6 +56,7 @@ mh_NetSendMessage( ...@@ -56,6 +56,7 @@ mh_NetSendMessage(
co_sPlatform *recPlatform, co_sPlatform *recPlatform,
int prio, int prio,
int subtype, int subtype,
unsigned int id,
mh_sHead *hp, mh_sHead *hp,
unsigned int size unsigned int size
) { ) {
...@@ -71,7 +72,7 @@ mh_NetSendMessage( ...@@ -71,7 +72,7 @@ mh_NetSendMessage(
msg.type.s = subtype; msg.type.s = subtype;
msg.reply = hp->qid; msg.reply = hp->qid;
msg.size = size; msg.size = size;
msg.msg_id = 0; msg.msg_id = id;
if (recPlatform == NULL || co_IsXdrNeeded(&hp->platform, recPlatform)) { if (recPlatform == NULL || co_IsXdrNeeded(&hp->platform, recPlatform)) {
hp->xdr = TRUE; hp->xdr = TRUE;
......
...@@ -471,6 +471,7 @@ struct mh_sOutunitAlarmReq { ...@@ -471,6 +471,7 @@ struct mh_sOutunitAlarmReq {
% co_sPlatform *recPlatform, % co_sPlatform *recPlatform,
% int prio, % int prio,
% int subtype, % int subtype,
% unsigned int id,
% mh_sHead *hp, % mh_sHead *hp,
% unsigned int size % unsigned int size
%); %);
......
...@@ -1009,7 +1009,6 @@ handlerAlarmStatus ( ...@@ -1009,7 +1009,6 @@ handlerAlarmStatus (
{ {
pwr_tStatus sts; pwr_tStatus sts;
mh_sAlarmStatus *mp = (mh_sAlarmStatus *) (p + 1); mh_sAlarmStatus *mp = (mh_sAlarmStatus *) (p + 1);
int i;
/* Skip events sent from an old select list. */ /* Skip events sent from an old select list. */
if (p->selGen != l.selGen) if (p->selGen != l.selGen)
...@@ -1017,7 +1016,6 @@ handlerAlarmStatus ( ...@@ -1017,7 +1016,6 @@ handlerAlarmStatus (
if (l.cbAlarmStatus != NULL) if (l.cbAlarmStatus != NULL)
sts = l.cbAlarmStatus( mp); sts = l.cbAlarmStatus( mp);
} }
...@@ -1208,7 +1206,7 @@ sendToHandler ( ...@@ -1208,7 +1206,7 @@ sendToHandler (
pfp = &hp->platform; pfp = &hp->platform;
} }
sts = mh_NetSendMessage(&qid, pfp, 0, 0, (mh_sHead *)mp, msize); sts = mh_NetSendMessage(&qid, pfp, 0, 0, 0, (mh_sHead *)mp, msize);
free(mp); free(mp);
if (ODD(sts)) if (ODD(sts))
......
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