Commit 1042d823 authored by claes's avatar claes

Sound support for ge dynamic and alarms

parent 12f3e62b
/*
* Proview $Id: rt_emon.c,v 1.10 2005-11-02 14:05:26 claes Exp $
* Proview $Id: rt_emon.c,v 1.11 2005-11-14 16:35:55 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -140,6 +140,7 @@ struct s_Active {
mh_mEventFlags eventFlags;
mh_uEventInfo status;
mh_eEvent event;
pwr_tAttrRef eventSound;
pwr_tBoolean local;
sEventTab *detect_etp;
sEventTab *return_etp;
......@@ -237,6 +238,7 @@ struct s_Sup {
mh_eEvent EventType;
mh_eEventPrio EventPriority;
mh_mEventFlags EventFlags;
pwr_tAttrRef Sound;
/* Internal attributes */
pwr_sAttrRef Attribute;
mh_uEventInfo AlarmStatus;
......@@ -907,6 +909,7 @@ applMessage (
cdh_ToUpper(aap->link.objName, NULL);
strncpy(aap->link.eventName, ip->EventName, sizeof(aap->link.eventName));
aap->link.eventFlags = ip->EventFlags;
aap->link.eventSound = ip->EventSound;
aap->link.event = ip->EventType;
aap->message = *ip;
......@@ -1494,6 +1497,7 @@ formatApplEvent (
strncpy(mp->EventText, aap->message.EventText, sizeof(mp->EventText));
mp->SupInfo.SupType = aap->message.SupInfo.SupType;
memcpy(&mp->SupInfo, &aap->message.SupInfo, sizeof(mh_uSupInfo));
mp->EventSound = aap->link.eventSound;
*size = sizeof(mh_sMessage);
break;
case mh_eEvent_Ack:
......@@ -1587,6 +1591,7 @@ formatSupEvent (
sp->supInfoSize = sizeof(mp->SupInfo.mh_uSupInfo_u);
}
#endif
mp->EventSound = sp->link.eventSound;
memcpy(&mp->SupInfo.mh_uSupInfo_u, sp->supInfoP, sp->supInfoSize);
*size = sizeof(mh_sMessage);
break;
......@@ -2583,6 +2588,7 @@ initSupActiveCB (
sp->supInfoSize = sizeof(mh_sASupInfo);
sp->supInfoP = &asp->Info;
sp->attribute = asp->Sup.Attribute;
sp->link.eventSound = asp->Sup.Sound;
sp->timer = &asp->Timer;
sp->op = (void *) asp;
sp->agent = getAgent(sp);
......@@ -2596,6 +2602,7 @@ initSupActiveCB (
sp->supInfoSize = sizeof(mh_sDSupInfo);
sp->supInfoP = &dsp->Info;
sp->attribute = dsp->Sup.Attribute;
sp->link.eventSound = dsp->Sup.Sound;
sp->timer = &dsp->Timer;
sp->op = (void *) dsp;
sp->agent = getAgent(sp);
......@@ -2608,6 +2615,7 @@ initSupActiveCB (
sp->sup = (sSup *)&nlsp->ControlP;
sp->supInfoSize = 0;
sp->supInfoP = NULL;
sp->link.eventSound = nlsp->Sound;
sp->attribute.Objid = Object;
sp->attribute.Offset = pwr_Offset(nlsp, LinkUp);
sp->attribute.Size = sizeof(nlsp->LinkUp);
......@@ -2623,6 +2631,7 @@ initSupActiveCB (
sp->sup = (sSup *)&csp->ControlP;
sp->supInfoSize = 0;
sp->supInfoP = NULL;
sp->link.eventSound = csp->Sound;
sp->attribute.Objid = Object;
sp->attribute.Offset = pwr_Offset(csp, DelayLimit);
sp->attribute.Size = sizeof(csp->DelayLimit);
......
......@@ -43,10 +43,22 @@ sources := $(sort \
gif_sources := $(filter %.gif,$(sources))
sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(source_dirs), \
$(wildcard $(dir)/*.wav) \
), $(notdir $(file)) \
) \
)
wav_sources := $(filter %.wav,$(sources))
export_obj := $(patsubst %.c,$(obj_dir)/%.o,$(c_sources))
clean_obj := $(patsubst %.c,clean_%.o,$(c_sources))
export_gif := $(patsubst %.gif,$(exe_dir)/%.gif,$(gif_sources))
export_gifdoc := $(patsubst %.gif,$(doc_dir)/help/%.gif,$(gif_sources))
export_wav := $(patsubst %.wav,$(exe_dir)/%.wav,$(wav_sources))
.PHONY : all init copy lib exe clean realclean\
$(clean_c)
......@@ -55,7 +67,7 @@ all : init copy lib
init :
copy : $(exe_dir)/xtt_help.dat $(exe_dir)/sv_se/pwrb_xtthelp.dat $(exe_dir)/pwr_logga.gif $(export_gif) $(export_gifdoc)
copy : $(exe_dir)/xtt_help.dat $(exe_dir)/sv_se/pwrb_xtthelp.dat $(exe_dir)/pwr_logga.gif $(export_gif) $(export_gifdoc) $(export_wav)
lib : $(export_obj)
......@@ -65,6 +77,12 @@ clean :
realclean : clean $(clean_obj)
.SUFFIXES:
$(exe_dir)/%.wav : ../../%.wav
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/xtt_help.dat : xtt_help.dat
@ echo "Copying xtt_help.dat"
@ $(cp) $(cpflags) $(source) $(target)
......
!
! Proview $Id: rt_xnav_msg.msg,v 1.4 2005-09-01 14:58:00 claes Exp $
! Proview $Id: rt_xnav_msg.msg,v 1.5 2005-11-14 16:37:59 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -49,9 +49,10 @@ objnotfound <Object is not found> /error
stringtolong <String is too long> /error
fastconfig <Error in fast configuration> /error
nochildren <Item has no children> /error
queued <Request queued> /info
queuefull <Queue is full> /error
waveformat <Unsupported wavefile format> /error
filecorrupt <File is corrupt> /error
......
This diff is collapsed.
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