Commit 1e994c75 authored by Claes Sjofors's avatar Claes Sjofors

pwr_tTime replaced by net_sTime in mh communication

parent f6401695
...@@ -558,7 +558,7 @@ int main () ...@@ -558,7 +558,7 @@ int main ()
/* Init Handler head */ /* Init Handler head */
l.head.ver = mh_cVersion; l.head.ver = mh_cVersion;
time_GetTime(&l.head.birthTime); net_GetTime( &l.head.birthTime);
l.head.source = mh_eSource_Handler; l.head.source = mh_eSource_Handler;
l.head.nix = l.head.qid.nid; l.head.nix = l.head.qid.nid;
...@@ -1494,7 +1494,7 @@ formatApplEvent ( ...@@ -1494,7 +1494,7 @@ formatApplEvent (
case mh_eEvent_Info: case mh_eEvent_Info:
mp = &up->message; mp = &up->message;
ip->Id.Idx = aap->link.idx; ip->Id.Idx = aap->link.idx;
ip->EventTime = aap->message.EventTime; ip->EventTime = net_TimeToNetTime( &aap->message.EventTime);
if (aap->link.event == mh_eEvent_Alarm) if (aap->link.event == mh_eEvent_Alarm)
ip->EventPrio = aap->message.EventPrio; ip->EventPrio = aap->message.EventPrio;
strncpy(mp->EventText, aap->message.EventText, sizeof(mp->EventText)); strncpy(mp->EventText, aap->message.EventText, sizeof(mp->EventText));
...@@ -1507,13 +1507,13 @@ formatApplEvent ( ...@@ -1507,13 +1507,13 @@ formatApplEvent (
case mh_eEvent_Ack: case mh_eEvent_Ack:
acp = &up->ack; acp = &up->ack;
ip->Id.Idx = aap->link.ackIdx; ip->Id.Idx = aap->link.ackIdx;
ip->EventTime = aap->ackTime; ip->EventTime = net_TimeToNetTime( &aap->ackTime);
if (aap->link.event == mh_eEvent_Alarm) if (aap->link.event == mh_eEvent_Alarm)
ip->EventPrio = aap->message.EventPrio; ip->EventPrio = aap->message.EventPrio;
acp->TargetId.Nix = l.head.nix; acp->TargetId.Nix = l.head.nix;
acp->TargetId.BirthTime = l.head.birthTime; acp->TargetId.BirthTime = l.head.birthTime;
acp->TargetId.Idx = aap->link.idx; acp->TargetId.Idx = aap->link.idx;
acp->DetectTime = aap->message.EventTime; acp->DetectTime = net_TimeToNetTime( &aap->message.EventTime);
acp->Outunit = aap->ackOutunit; acp->Outunit = aap->ackOutunit;
acp->SupInfo.SupType = aap->message.SupInfo.SupType; acp->SupInfo.SupType = aap->message.SupInfo.SupType;
memcpy(&acp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo)); memcpy(&acp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo));
...@@ -1522,14 +1522,14 @@ formatApplEvent ( ...@@ -1522,14 +1522,14 @@ formatApplEvent (
case mh_eEvent_Cancel: case mh_eEvent_Cancel:
rp = &up->ret; rp = &up->ret;
ip->Id.Idx = aap->link.returnIdx; ip->Id.Idx = aap->link.returnIdx;
time_GetTime(&ip->EventTime); net_GetTime(&ip->EventTime);
if (aap->link.event == mh_eEvent_Alarm) if (aap->link.event == mh_eEvent_Alarm)
ip->EventPrio = aap->message.EventPrio; ip->EventPrio = aap->message.EventPrio;
strncpy(rp->EventText, text, sizeof(rp->EventText)); strncpy(rp->EventText, text, sizeof(rp->EventText));
rp->TargetId.Nix = l.head.nix; rp->TargetId.Nix = l.head.nix;
rp->TargetId.BirthTime = l.head.birthTime; rp->TargetId.BirthTime = l.head.birthTime;
rp->TargetId.Idx = aap->link.idx; rp->TargetId.Idx = aap->link.idx;
rp->DetectTime = aap->message.EventTime; rp->DetectTime = net_TimeToNetTime( &aap->message.EventTime);
rp->SupInfo.SupType = aap->message.SupInfo.SupType; rp->SupInfo.SupType = aap->message.SupInfo.SupType;
memcpy(&rp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo)); memcpy(&rp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo));
*size = sizeof(mh_sReturn); *size = sizeof(mh_sReturn);
...@@ -1537,14 +1537,14 @@ formatApplEvent ( ...@@ -1537,14 +1537,14 @@ formatApplEvent (
case mh_eEvent_Return: case mh_eEvent_Return:
rp = &up->ret; rp = &up->ret;
ip->Id.Idx = aap->link.returnIdx; ip->Id.Idx = aap->link.returnIdx;
ip->EventTime = aap->returnTime; ip->EventTime = net_TimeToNetTime( &aap->returnTime);
if (aap->link.event == mh_eEvent_Alarm) if (aap->link.event == mh_eEvent_Alarm)
ip->EventPrio = aap->message.EventPrio; ip->EventPrio = aap->message.EventPrio;
strncpy(rp->EventText, aap->returnText, sizeof(rp->EventText)); strncpy(rp->EventText, aap->returnText, sizeof(rp->EventText));
rp->TargetId.Nix = l.head.nix; rp->TargetId.Nix = l.head.nix;
rp->TargetId.BirthTime = l.head.birthTime; rp->TargetId.BirthTime = l.head.birthTime;
rp->TargetId.Idx = aap->link.idx; rp->TargetId.Idx = aap->link.idx;
rp->DetectTime = aap->message.EventTime; rp->DetectTime = net_TimeToNetTime( &aap->message.EventTime);
rp->SupInfo.SupType = aap->message.SupInfo.SupType; rp->SupInfo.SupType = aap->message.SupInfo.SupType;
memcpy(&rp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo)); memcpy(&rp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo));
*size = sizeof(mh_sReturn); *size = sizeof(mh_sReturn);
...@@ -1584,7 +1584,7 @@ formatSupEvent ( ...@@ -1584,7 +1584,7 @@ formatSupEvent (
case mh_eEvent_Info: case mh_eEvent_Info:
mp = &up->message; mp = &up->message;
ip->Id.Idx = sp->link.idx; ip->Id.Idx = sp->link.idx;
ip->EventTime = sup->DetectTime; ip->EventTime = net_TimeToNetTime( &sup->DetectTime);
strncpy(mp->EventText, sup->DetectText, sizeof(mp->EventText)); strncpy(mp->EventText, sup->DetectText, sizeof(mp->EventText));
if (sp->link.event == mh_eEvent_Alarm) if (sp->link.event == mh_eEvent_Alarm)
ip->EventPrio = sup->EventPriority; ip->EventPrio = sup->EventPriority;
...@@ -1603,27 +1603,27 @@ formatSupEvent ( ...@@ -1603,27 +1603,27 @@ formatSupEvent (
case mh_eEvent_Ack: case mh_eEvent_Ack:
acp = &up->ack; acp = &up->ack;
ip->Id.Idx = sp->link.ackIdx; ip->Id.Idx = sp->link.ackIdx;
ip->EventTime = sup->AckTime; ip->EventTime = net_TimeToNetTime( &sup->AckTime);
if (sp->link.event == mh_eEvent_Alarm) if (sp->link.event == mh_eEvent_Alarm)
ip->EventPrio = sup->EventPriority; ip->EventPrio = sup->EventPriority;
acp->TargetId.Idx = sp->link.idx; acp->TargetId.Idx = sp->link.idx;
acp->TargetId.Nix = l.head.nix; acp->TargetId.Nix = l.head.nix;
acp->TargetId.BirthTime = l.head.birthTime; acp->TargetId.BirthTime = l.head.birthTime;
acp->DetectTime = sup->DetectTime; acp->DetectTime = net_TimeToNetTime( &sup->DetectTime);
acp->Outunit = sup->AckOutunit; acp->Outunit = sup->AckOutunit;
*size = sizeof(mh_sAck); *size = sizeof(mh_sAck);
break; break;
case mh_eEvent_Return: case mh_eEvent_Return:
rp = &up->ret; rp = &up->ret;
ip->Id.Idx = sp->link.returnIdx; ip->Id.Idx = sp->link.returnIdx;
ip->EventTime = sup->ReturnTime; ip->EventTime = net_TimeToNetTime( &sup->ReturnTime);
if (sp->link.event == mh_eEvent_Alarm) if (sp->link.event == mh_eEvent_Alarm)
ip->EventPrio = sup->EventPriority; ip->EventPrio = sup->EventPriority;
strncpy(rp->EventText, sup->ReturnText, sizeof(rp->EventText)); strncpy(rp->EventText, sup->ReturnText, sizeof(rp->EventText));
rp->TargetId.Idx = sp->link.idx; rp->TargetId.Idx = sp->link.idx;
rp->TargetId.Nix = l.head.nix; rp->TargetId.Nix = l.head.nix;
rp->TargetId.BirthTime = l.head.birthTime; rp->TargetId.BirthTime = l.head.birthTime;
rp->DetectTime = sup->DetectTime; rp->DetectTime = net_TimeToNetTime( &sup->DetectTime);
rp->SupInfo.SupType = sp->supType; rp->SupInfo.SupType = sp->supType;
#if 1 #if 1
if (sp->supInfoSize > sizeof(rp->SupInfo.mh_uSupInfo_u)) { if (sp->supInfoSize > sizeof(rp->SupInfo.mh_uSupInfo_u)) {
...@@ -1639,12 +1639,12 @@ formatSupEvent ( ...@@ -1639,12 +1639,12 @@ formatSupEvent (
ip->Id.Idx = sp->link.returnIdx; ip->Id.Idx = sp->link.returnIdx;
if (sp->link.event == mh_eEvent_Alarm) if (sp->link.event == mh_eEvent_Alarm)
ip->EventPrio = sup->EventPriority; ip->EventPrio = sup->EventPriority;
time_GetTime(&ip->EventTime); net_GetTime(&ip->EventTime);
strncpy(rp->EventText, text, sizeof(rp->EventText)); strncpy(rp->EventText, text, sizeof(rp->EventText));
rp->TargetId.Idx = sp->link.idx; rp->TargetId.Idx = sp->link.idx;
rp->TargetId.Nix = l.head.nix; rp->TargetId.Nix = l.head.nix;
rp->TargetId.BirthTime = l.head.birthTime; rp->TargetId.BirthTime = l.head.birthTime;
rp->DetectTime = sup->DetectTime; rp->DetectTime = net_TimeToNetTime( &sup->DetectTime);
rp->SupInfo.SupType = sp->supType; rp->SupInfo.SupType = sp->supType;
#if 1 #if 1
if (sp->supInfoSize > sizeof(rp->SupInfo.mh_uSupInfo_u)) { if (sp->supInfoSize > sizeof(rp->SupInfo.mh_uSupInfo_u)) {
...@@ -2832,7 +2832,7 @@ isValidApplication ( ...@@ -2832,7 +2832,7 @@ isValidApplication (
ap->link.qid = hp->qid; ap->link.qid = hp->qid;
ap->link.aid = *aid; /* QCOM ApplId */ ap->link.aid = *aid; /* QCOM ApplId */
ap->link.platform = hp->platform; ap->link.platform = hp->platform;
ap->birthTime = hp->birthTime; ap->birthTime = net_NetTimeToTime( &hp->birthTime);
ap->aid = hp->aid; ap->aid = hp->aid;
ap->state = mh_eApplState_New; ap->state = mh_eApplState_New;
/* Insert in application list */ /* Insert in application list */
...@@ -2849,7 +2849,7 @@ isValidApplication ( ...@@ -2849,7 +2849,7 @@ isValidApplication (
ap->link.qid = hp->qid; ap->link.qid = hp->qid;
ap->link.aid = *aid; /* QCOM ApplId */ ap->link.aid = *aid; /* QCOM ApplId */
ap->link.platform = hp->platform; ap->link.platform = hp->platform;
ap->birthTime = hp->birthTime; ap->birthTime = net_NetTimeToTime( &hp->birthTime);
ap->aid = hp->aid; ap->aid = hp->aid;
ap->state = mh_eApplState_Restarted; ap->state = mh_eApplState_Restarted;
} }
...@@ -2895,7 +2895,7 @@ isValidOutunit ( ...@@ -2895,7 +2895,7 @@ isValidOutunit (
op->link.aid = *aid; /* QCOM ApplId */ op->link.aid = *aid; /* QCOM ApplId */
op->link.platform = hp->platform; op->link.platform = hp->platform;
op->link.nix = hp->nix; op->link.nix = hp->nix;
op->birthTime = hp->birthTime; op->birthTime = net_NetTimeToTime( &hp->birthTime);
op->outunit = hp->outunit; op->outunit = hp->outunit;
/* Insert in outunit list */ /* Insert in outunit list */
LstIns(&l.outunit_l, op, outunit_l); LstIns(&l.outunit_l, op, outunit_l);
...@@ -2913,7 +2913,7 @@ isValidOutunit ( ...@@ -2913,7 +2913,7 @@ isValidOutunit (
op->link.aid = *aid; /* QCOM ApplId */ op->link.aid = *aid; /* QCOM ApplId */
op->link.platform = hp->platform; op->link.platform = hp->platform;
op->link.nix = hp->nix; op->link.nix = hp->nix;
op->birthTime = hp->birthTime; op->birthTime = net_NetTimeToTime( &hp->birthTime);
op->outunit = hp->outunit; op->outunit = hp->outunit;
op->selGen = 0; op->selGen = 0;
op->eventGen = 0; op->eventGen = 0;
...@@ -3152,7 +3152,7 @@ outunitBlock ( ...@@ -3152,7 +3152,7 @@ outunitBlock (
switch (bp->link.event) { switch (bp->link.event) {
case mh_eEvent_Block: case mh_eEvent_Block:
bp->outunitBlock = *ip; bp->outunitBlock = *ip;
time_GetTime(&bp->outunitBlock.time); /* Update block time */ net_GetTime(&bp->outunitBlock.time); /* Update block time */
bp->link.status.Event.Prio = (pwr_tUInt8) ip->prio; bp->link.status.Event.Prio = (pwr_tUInt8) ip->prio;
bp->link.status.Event.Status = mh_mEventStatus_Block; bp->link.status.Event.Status = mh_mEventStatus_Block;
bp->targetId.Nix = l.head.nix; bp->targetId.Nix = l.head.nix;
...@@ -3161,13 +3161,13 @@ outunitBlock ( ...@@ -3161,13 +3161,13 @@ outunitBlock (
case mh_eEvent_Reblock: case mh_eEvent_Reblock:
bp->outunitUnblock = bp->outunitBlock; bp->outunitUnblock = bp->outunitBlock;
bp->outunitBlock = *ip; bp->outunitBlock = *ip;
time_GetTime(&bp->outunitBlock.time); /* Update block time */ net_GetTime(&bp->outunitBlock.time); /* Update block time */
bp->link.status.Event.Prio = (pwr_tUInt8) ip->prio; bp->link.status.Event.Prio = (pwr_tUInt8) ip->prio;
bp->link.status.Event.Status = mh_mEventStatus_Block; bp->link.status.Event.Status = mh_mEventStatus_Block;
break; break;
case mh_eEvent_Unblock: case mh_eEvent_Unblock:
bp->outunitUnblock = *ip; bp->outunitUnblock = *ip;
time_GetTime(&bp->outunitUnblock.time); /* Update unblock time */ net_GetTime(&bp->outunitUnblock.time); /* Update unblock time */
bp->link.status.All = 0; bp->link.status.All = 0;
break; break;
default: default:
......
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
% %
%/* rt_load.h -- load data files %/* rt_load.h -- load data files
% %
% PROVIEW/R
% Copyright (C) 1993-1997, 99 by Mandator AB.
%
% This file defines the data structures needed to create and read % This file defines the data structures needed to create and read
% load data files. */ % load data files. */
% %
...@@ -33,18 +30,18 @@ ...@@ -33,18 +30,18 @@
%# include "co_xdr.h" %# include "co_xdr.h"
%#endif %#endif
% %
%#define load_cLffVersionStr "V2.3.1" %#define load_cLffVersionStr "V4.7.0"
% %
%#if defined OS_VMS || defined OS_ELN %#if defined OS_VMS || defined OS_ELN
%# define load_cNameDirectory "pwrp_load:" %# define load_cNameDirectory "pwrp_load:"
%# define load_cDirectory "pwrp_load:" %# define load_cDirectory "pwrp_load:"
%# define load_cNamePlc "%splc_%s_%04d_%05d.exe" %# define load_cNamePlc "%splc_%s_%04d_%05d.exe"
% %
%# define load_cNameBootList "pwrp_root:[common.db]pwrp_cnf_bootlist.dat" %# define load_cNameBootList "pwrp_root:[src.db]pwrp_cnf_bootlist.dat"
%# define load_cNameVolumeList "pwrp_root:[common.db]pwrp_cnf_volumelist.dat" %# define load_cNameVolumeList "pwrp_root:[src.db]pwrp_cnf_volumelist.dat"
%# define load_cNamePlcVersion "pwrp_root:[common.db]pwrp_cnf_plcvers_%s.dat" %# define load_cNamePlcVersion "pwrp_root:[src.db]pwrp_cnf_plcvers_%s.dat"
%# define load_cNameDistribute "pwrp_root:[common.db]pwrp_cnf_distribute.dat" %# define load_cNameDistribute "pwrp_root:[src.db]pwrp_cnf_distribute.dat"
%# define load_cNameSysObject "pwrp_root:[common.db]pwrp_cnf_sysobject.dat" %# define load_cNameSysObject "pwrp_root:[src.db]pwrp_cnf_sysobject.dat"
%# define load_cNameGblVolumeList "pwra_db:pwr_volumelist.dat" %# define load_cNameGblVolumeList "pwra_db:pwr_volumelist.dat"
%# define load_cNameRttCrr "rtt_crr_%03.3d_%03.3d_%03.3d_%03.3d.dat" %# define load_cNameRttCrr "rtt_crr_%03.3d_%03.3d_%03.3d_%03.3d.dat"
%# define load_cNameRttCrrObj "rtt_crro_%03.3d_%03.3d_%03.3d_%03.3d.dat" %# define load_cNameRttCrrObj "rtt_crro_%03.3d_%03.3d_%03.3d_%03.3d.dat"
...@@ -57,13 +54,13 @@ ...@@ -57,13 +54,13 @@
%# define load_cDirectory "$pwrp_load/" %# define load_cDirectory "$pwrp_load/"
%# define load_cNamePlc "%splc_%s_%04d_%05d" %# define load_cNamePlc "%splc_%s_%04d_%05d"
% %
%# define load_cNameBootList "$pwrp_root/common/db/pwrp_cnf_bootlist.dat" %# define load_cNameBootList "$pwrp_root/src/db/pwrp_cnf_bootlist.dat"
%# define load_cNameVolumeList "$pwrp_root/common/db/pwrp_cnf_volumelist.dat" %# define load_cNameVolumeList "$pwrp_root/src/db/pwrp_cnf_volumelist.dat"
%# define load_cNamePlcVersion "$pwrp_root/common/db/pwrp_cnf_plcvers_%s.dat" %# define load_cNamePlcVersion "$pwrp_root/src/db/pwrp_cnf_plcvers_%s.dat"
%# define load_cNameDistribute "$pwrp_root/common/db/pwrp_cnf_distribute.dat" %# define load_cNameDistribute "$pwrp_root/src/db/pwrp_cnf_distribute.dat"
%# define load_cNameSysObject "$pwrp_root/common/db/pwrp_cnf_sysobject.dat" %# define load_cNameSysObject "$pwrp_root/src/db/pwrp_cnf_sysobject.dat"
%# define load_cNameFilePath "$pwrp_root/common/db/pwrp_cnf_dirlist.dat" %# define load_cNameFilePath "$pwrp_root/src/db/pwrp_cnf_dirlist.dat"
%# define load_cNameLocalWb "$pwrp_root/common/db/wb.wb_load" %# define load_cNameLocalWb "$pwrp_root/src/db/wb.wb_load"
%# define load_cNameGblVolumeList "$pwra_db/pwr_volumelist.dat" %# define load_cNameGblVolumeList "$pwra_db/pwr_volumelist.dat"
%# define load_cNameCmnVolumeList "pwr_volumelist.dat" %# define load_cNameCmnVolumeList "pwr_volumelist.dat"
%# define load_cNameRttCrr "rtt_crr_%3.3d_%3.3d_%3.3d_%3.3d.dat" %# define load_cNameRttCrr "rtt_crr_%3.3d_%3.3d_%3.3d_%3.3d.dat"
......
...@@ -184,7 +184,7 @@ mh_ApplConnect ( ...@@ -184,7 +184,7 @@ mh_ApplConnect (
lAppl.head.xdr = FALSE; /* To local handler only */ lAppl.head.xdr = FALSE; /* To local handler only */
lAppl.head.ver = mh_cVersion; lAppl.head.ver = mh_cVersion;
lAppl.head.source = mh_eSource_Application; lAppl.head.source = mh_eSource_Application;
time_GetTime(&lAppl.head.birthTime); net_GetTime(&lAppl.head.birthTime);
lAppl.head.qid = qid; lAppl.head.qid = qid;
lAppl.head.aid = applObject; lAppl.head.aid = applObject;
lAppl.handler.nid = qid.nid; lAppl.handler.nid = qid.nid;
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
%# include "co_xdr.h" %# include "co_xdr.h"
%#endif %#endif
% %
%#ifndef rt_net_h
%#include "rt_net.h"
%#endif
%
%#ifndef rt_mh_h %#ifndef rt_mh_h
%# include "rt_mh.h" %# include "rt_mh.h"
%#endif %#endif
...@@ -294,7 +298,7 @@ struct mh_sHead { ...@@ -294,7 +298,7 @@ struct mh_sHead {
co_sPlatform platform; co_sPlatform platform;
pwr_tUInt32 ver; pwr_tUInt32 ver;
mh_eSource source; mh_eSource source;
pwr_tTime birthTime; net_sTime birthTime;
mh_eMsg type; mh_eMsg type;
qcom_sQid qid; qcom_sQid qid;
pwr_tNodeIndex nix; pwr_tNodeIndex nix;
...@@ -317,7 +321,7 @@ struct mh_sOutunitBlock { ...@@ -317,7 +321,7 @@ struct mh_sOutunitBlock {
pwr_tObjid object; pwr_tObjid object;
pwr_tObjid outunit; pwr_tObjid outunit;
mh_eEventPrio prio; mh_eEventPrio prio;
pwr_tTime time; net_sTime time;
}; };
struct mh_sSelL { struct mh_sSelL {
...@@ -327,7 +331,7 @@ struct mh_sSelL { ...@@ -327,7 +331,7 @@ struct mh_sSelL {
struct mh_sEventId { struct mh_sEventId {
pwr_tNodeIndex Nix; pwr_tNodeIndex Nix;
pwr_tTime BirthTime; net_sTime BirthTime;
pwr_tUInt32 Idx; pwr_tUInt32 Idx;
}; };
...@@ -337,7 +341,7 @@ struct mh_sMsgInfo { ...@@ -337,7 +341,7 @@ struct mh_sMsgInfo {
pwr_tObjid Outunit; pwr_tObjid Outunit;
pwr_tObjid SupObject; pwr_tObjid SupObject;
mh_mEventFlags EventFlags; mh_mEventFlags EventFlags;
pwr_tTime EventTime; net_sTime EventTime;
pwr_tString80 EventName; pwr_tString80 EventName;
mh_eEvent EventType; mh_eEvent EventType;
mh_eEventPrio EventPrio; mh_eEventPrio EventPrio;
...@@ -346,7 +350,7 @@ struct mh_sMsgInfo { ...@@ -346,7 +350,7 @@ struct mh_sMsgInfo {
struct mh_sAck { struct mh_sAck {
mh_sMsgInfo Info; mh_sMsgInfo Info;
mh_sEventId TargetId; mh_sEventId TargetId;
pwr_tTime DetectTime; net_sTime DetectTime;
pwr_tObjid Outunit; pwr_tObjid Outunit;
mh_uSupInfo SupInfo; mh_uSupInfo SupInfo;
}; };
...@@ -354,7 +358,7 @@ struct mh_sAck { ...@@ -354,7 +358,7 @@ struct mh_sAck {
struct mh_sBlock { struct mh_sBlock {
mh_sMsgInfo Info; mh_sMsgInfo Info;
mh_sEventId TargetId; mh_sEventId TargetId;
pwr_tTime DetectTime; net_sTime DetectTime;
pwr_tObjid Outunit; pwr_tObjid Outunit;
mh_mEventStatus Status; mh_mEventStatus Status;
}; };
...@@ -372,7 +376,7 @@ struct mh_sReturn { ...@@ -372,7 +376,7 @@ struct mh_sReturn {
mh_sMsgInfo Info; mh_sMsgInfo Info;
pwr_tString80 EventText; pwr_tString80 EventText;
mh_sEventId TargetId; mh_sEventId TargetId;
pwr_tTime DetectTime; net_sTime DetectTime;
mh_uSupInfo SupInfo; mh_uSupInfo SupInfo;
}; };
......
...@@ -298,7 +298,7 @@ mh_OutunitConnect ( ...@@ -298,7 +298,7 @@ mh_OutunitConnect (
l.head.platform.hw = myNode.hw; l.head.platform.hw = myNode.hw;
l.head.source = mh_eSource_Outunit; l.head.source = mh_eSource_Outunit;
time_GetTime(&l.head.birthTime); net_GetTime(&l.head.birthTime);
l.head.outunit = outunit; l.head.outunit = outunit;
sts = gdh_GetNodeIndex(&l.head.nix); sts = gdh_GetNodeIndex(&l.head.nix);
if (EVEN(sts)) return sts; if (EVEN(sts)) return sts;
...@@ -926,7 +926,7 @@ isValidHandler ( ...@@ -926,7 +926,7 @@ isValidHandler (
if (hl == LstEnd(&l.handler_l)) { if (hl == LstEnd(&l.handler_l)) {
/* Handler not known, make it known */ /* Handler not known, make it known */
hp = (sHandler*) calloc(1, sizeof(*hp)); hp = (sHandler*) calloc(1, sizeof(*hp));
hp->birthTime = p->birthTime; hp->birthTime = net_NetTimeToTime( &p->birthTime);
hp->qid = p->qid; hp->qid = p->qid;
hp->aid = *aid; hp->aid = *aid;
hp->platform = p->platform; hp->platform = p->platform;
...@@ -941,7 +941,7 @@ isValidHandler ( ...@@ -941,7 +941,7 @@ isValidHandler (
if (memcmp(&hp->birthTime, &p->birthTime, sizeof(hp->birthTime)) != 0) { if (memcmp(&hp->birthTime, &p->birthTime, sizeof(hp->birthTime)) != 0) {
/* Different times, i.e. the handler is restarted */ /* Different times, i.e. the handler is restarted */
hp->birthTime = p->birthTime; hp->birthTime = net_NetTimeToTime( &p->birthTime);
hp->qid = p->qid; hp->qid = p->qid;
hp->aid = *aid; hp->aid = *aid;
ackListDestroy(hp); ackListDestroy(hp);
......
...@@ -356,7 +356,7 @@ mh_UtilStartScanSup ( ...@@ -356,7 +356,7 @@ mh_UtilStartScanSup (
head.xdr = FALSE; head.xdr = FALSE;
head.ver = mh_cVersion; head.ver = mh_cVersion;
sts = time_GetTime(&head.birthTime); sts = net_GetTime(&head.birthTime);
head.qid = source; head.qid = source;
co_GetOwnPlatform(&head.platform); co_GetOwnPlatform(&head.platform);
head.source = mh_eSource_Pcm; head.source = mh_eSource_Pcm;
...@@ -388,7 +388,7 @@ mh_UtilStopScanSup ( ...@@ -388,7 +388,7 @@ mh_UtilStopScanSup (
head.xdr = FALSE; head.xdr = FALSE;
head.ver = mh_cVersion; head.ver = mh_cVersion;
sts = time_GetTime(&head.birthTime); sts = net_GetTime(&head.birthTime);
head.qid = source; head.qid = source;
co_GetOwnPlatform(&head.platform); co_GetOwnPlatform(&head.platform);
head.source = mh_eSource_Pcm; head.source = mh_eSource_Pcm;
......
...@@ -784,3 +784,15 @@ net_sTime net_DeltaTimeToNetTime( const pwr_tDeltaTime *t) ...@@ -784,3 +784,15 @@ net_sTime net_DeltaTimeToNetTime( const pwr_tDeltaTime *t)
return nt; return nt;
} }
int net_GetTime( net_sTime *nt)
{
int sts;
pwr_tTime t;
sts = time_GetTime( &t);
nt->tv_sec = t.tv_sec;
nt->tv_nsec = t.tv_nsec;
return sts;
}
...@@ -1407,6 +1407,8 @@ struct net_sFileList { ...@@ -1407,6 +1407,8 @@ struct net_sFileList {
%net_sTime net_TimeToNetTime( const pwr_tTime *t); %net_sTime net_TimeToNetTime( const pwr_tTime *t);
%pwr_tDeltaTime net_NetTimeToDeltaTime( const net_sTime *nt); %pwr_tDeltaTime net_NetTimeToDeltaTime( const net_sTime *nt);
%net_sTime net_DeltaTimeToNetTime( const pwr_tDeltaTime *t); %net_sTime net_DeltaTimeToNetTime( const pwr_tDeltaTime *t);
%net_sTime net_DeltaTimeToNetTime( const pwr_tDeltaTime *t);
%int net_GetTime( net_sTime *nt);
% %
%#endif %#endif
% %
......
...@@ -1322,7 +1322,7 @@ static int rtt_menu_alarm_list_add( ...@@ -1322,7 +1322,7 @@ static int rtt_menu_alarm_list_add(
menu_ptr->arg2 = arg2; menu_ptr->arg2 = arg2;
menu_ptr->arg3 = arg3; menu_ptr->arg3 = arg3;
menu_ptr->arg4 = arg4; menu_ptr->arg4 = arg4;
menu_ptr->time = EventP->Info.EventTime; menu_ptr->time = net_NetTimeToTime( &EventP->Info.EventTime);
strncpy( menu_ptr->eventname, EventP->Info.EventName, strncpy( menu_ptr->eventname, EventP->Info.EventName,
sizeof( menu_ptr->eventname)); sizeof( menu_ptr->eventname));
strncpy( menu_ptr->eventtext, EventP->Msg.EventText, 80); strncpy( menu_ptr->eventtext, EventP->Msg.EventText, 80);
......
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