Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreantwuh2018-12-13 07:26:29 -0500
committereantwuh2018-12-13 07:26:29 -0500
commit526d88490dad56f64d9f0d929dbbe80f1b8ba81d (patch)
treec3dfbf41ff2dc1db63ade2904ce8ad200fb3800b
parentab26fee61ad9382907e8a416cb4c2919e12cd299 (diff)
downloadtitan.ApplicationLibraries.CoAP-526d88490dad56f64d9f0d929dbbe80f1b8ba81d.tar.gz
titan.ApplicationLibraries.CoAP-526d88490dad56f64d9f0d929dbbe80f1b8ba81d.tar.xz
titan.ApplicationLibraries.CoAP-526d88490dad56f64d9f0d929dbbe80f1b8ba81d.zip
transport statistics related modifications
Signed-off-by: eantwuh <antal.wu-hen-chang@ericsson.com>
-rw-r--r--src/EPTF_COAP_LocalTransport_Definitions.ttcn4
-rw-r--r--src/EPTF_COAP_LocalTransport_Functions.ttcn9
2 files changed, 8 insertions, 5 deletions
diff --git a/src/EPTF_COAP_LocalTransport_Definitions.ttcn b/src/EPTF_COAP_LocalTransport_Definitions.ttcn
index 9b8f6a5..8482d35 100644
--- a/src/EPTF_COAP_LocalTransport_Definitions.ttcn
+++ b/src/EPTF_COAP_LocalTransport_Definitions.ttcn
@@ -423,7 +423,7 @@ module EPTF_COAP_LocalTransport_Definitions
///////////////////////////////////////////////////////////
type record EPTF_COAP_Transport_Statistics
{
- integer nofOpenConnections,
+ integer nofOpenSockets,
integer nofTransportWarnings,
float nofReceivedMessages,
float nofSentMessages,
@@ -433,7 +433,7 @@ module EPTF_COAP_LocalTransport_Definitions
const EPTF_COAP_Transport_Statistics c_EPTF_COAP_Transport_Statistics_empty :=
{
- nofOpenConnections := 0,
+ nofOpenSockets := 0,
nofTransportWarnings := 0,
nofReceivedMessages := 0.0,
nofSentMessages := 0.0,
diff --git a/src/EPTF_COAP_LocalTransport_Functions.ttcn b/src/EPTF_COAP_LocalTransport_Functions.ttcn
index c16456e..f737a93 100644
--- a/src/EPTF_COAP_LocalTransport_Functions.ttcn
+++ b/src/EPTF_COAP_LocalTransport_Functions.ttcn
@@ -352,7 +352,6 @@ module EPTF_COAP_LocalTransport_Functions
)
)
{
- v_EPTF_COAP_Transport_stats.nofTransportWarnings := v_EPTF_COAP_Transport_stats.nofTransportWarnings + 1;
var EPTF_COAP_Transport_Response vl_rsp := c_EPTF_COAP_Transport_Response_init;
vl_rsp.succ := false;
vl_rsp.params.transportError := "Couldn't connect DTLS";
@@ -542,7 +541,7 @@ module EPTF_COAP_LocalTransport_Functions
}
}
- log("ipl4 options: ", v_options);
+ f_COAP_Transport_Logging_DEBUG(log2str("ipl4 options: ", v_options));
f_EPTF_Transport_connect(
pl_transportType := IPL4,
@@ -725,6 +724,9 @@ module EPTF_COAP_LocalTransport_Functions
f_EPTF_FBQ_moveFromFreeHeadToBusyTail(v_COAP_LocalTransport_localSocketDB.queue);
f_COAP_Transport_Logging_DEBUG(log2str(": "," adding socket ", v_idx, " ", p_entry));
+
+ v_EPTF_COAP_Transport_stats.nofOpenSockets :=
+ v_EPTF_COAP_Transport_stats.nofOpenSockets + 1;
if (ispresent(p_entry.dtls))
{
@@ -1002,6 +1004,7 @@ module EPTF_COAP_LocalTransport_Functions
if (c_EPTF_Common_debugSwitch) {
f_EPTF_Logging_debugV2(pl_message, v_EPTF_COAP_LocalTransport_loggingMaskId, {c_COAP_LocalTransport_Logging_WARNING});
}
+ v_EPTF_COAP_Transport_stats.nofTransportWarnings := v_EPTF_COAP_Transport_stats.nofTransportWarnings + 1;
}
///////////////////////////////////////////////////////////
@@ -1022,6 +1025,7 @@ module EPTF_COAP_LocalTransport_Functions
if (c_EPTF_Common_debugSwitch) {
f_EPTF_Logging_debugV2(pl_message, v_EPTF_COAP_LocalTransport_loggingMaskId, {c_COAP_LocalTransport_Logging_ERROR});
}
+ v_EPTF_COAP_Transport_stats.nofTransportWarnings := v_EPTF_COAP_Transport_stats.nofTransportWarnings + 1;
}
///////////////////////////////////////////////////////////
@@ -1043,7 +1047,6 @@ module EPTF_COAP_LocalTransport_Functions
if (ispresent(p_res.errorCode) and (p_res.errorCode != IPL4_ERROR_TEMPORARILY_UNAVAILABLE))
{
f_COAP_Transport_Logging_WARNING(log2str("Warning: f_EPTF_COAP_IPL4asp_handleResult: IPL4 error: ", p_res));
- v_EPTF_COAP_Transport_stats.nofTransportWarnings := v_EPTF_COAP_Transport_stats.nofTransportWarnings + 1;
return false;
}
return true;

Back to the top