OBMSGID
The OBMSGID
key value pair is available in
both Reply_Gen and IB_Reply TPS when is selected. OBMSGID
can be explicitly appended to dispList
. If not, then the reserved OB message is
removed from both the memory and Recovery database when the IB reply comes in and
the await reply mode of the protocol is shut down.
When OBMSGID
key is introduced into TPS in RUN mode. The
OBMSGID
key holds reserved OB messages.
In the IB reply TPS the string is:
ibreplyUPoC {MSGID message0} {OBMSGID message1} {CONTEXT sms_ib_reply} {ARGS {}} {MODE run} …
A typical RUN mode of the ib_reply UPoC could be similar to:
roc ibreplyUPoC {args} {
keylget args MODE mode ;#Fetch mode
set dispList {} ;#Nothing to return
switch -exact -- $mode {
:
run {
# ’run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
keylget args OBMSGID ob_mh
lappend dispList "CONTINUE $mh"
if { [info exist ob_mh]} {
lappend dispList "KILL $0b_mh"
}
}
:
}
return $dispList
}
Another example of how this argument can be used is:
proc hcitpsobresend4ibreply {args} {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
switch -exact -- $mode{
start {
#Perform special init functions
#NB.: there may or may not be a MSGID key in args
}
run {
# ’run’ mode always has a MSGID; fetch and process it
keylget args MSGID
keylget args CONTEXT ctx
keylget args OBMSGID ob_mh
if {[info exist ob_mh]} {
if { $ctx == "reply_gen"} {
if {[msglength $ob_mh] ! = 0} {
#Resend reserved OB message when IB Reply comes late
lappend dispList "PROTO $ob_mh";
lappend dispList "KILL $mh";
} else {
# 0-length control message should not be resent, shutdown reply mode then.
lappend dispList "KILL $ob_mh";
lappend dispList "CONTINUE $mh";
}
} elseif {$ctx == "sms_ib_reply"} {
#IB Reply comes in
lappend dispList "KILLREPLY $mh";
lappend dispList "KILL $ob_mh";
}
} else {
# When there is no reserved OB message.
lappend dispList "CONTINUE $mh"
}
}
time {
#Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
#Doing some clean-up work
}
}
return $dispList
}