/////////////////////////////////////////////////////////////////////////////// | |
// | |
// Copyright (c) 2000-2019 Ericsson Telecom AB | |
// | |
// All rights reserved. This program and the accompanying materials | |
// are made available under the terms of the Eclipse Public License v2.0 | |
// which accompanies this distribution, and is available at | |
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html | |
/////////////////////////////////////////////////////////////////////////////// | |
// File: EPTF_LwM2M_CoapApplibTransport_Definitions.ttcn | |
// Description: | |
// Rev: R1A | |
// Prodnr: CNL 113 859 | |
// Updated: 2017-09-01 | |
// Contact: http://ttcn.ericsson.se | |
/////////////////////////////////////////////////////////////////////////////// | |
/////////////////////////////////////////////////////////// | |
// Module: EPTF_LwM2M_CoapApplibTransport_Definitions | |
// | |
// Purpose: | |
// This module contains the definitions for the LWM2M transport layer that uses the COAP applib | |
// | |
// Module depends on: | |
// - <EPTF_LwM2M_Transport_Definitions> | |
// - <EPTF_COAP_LGen_Definitions> | |
// - <EPTF_CLL_Base_Definitions> | |
// | |
// Module Parameters: | |
// tsp_EPTF_LwM2M_CoapApplibTransport_debug - <tsp_EPTF_LwM2M_CoapApplibTransport_debug> - *boolean* - Enable/disable debug logging | |
// | |
/////////////////////////////////////////////////////////////// | |
module EPTF_LwM2M_CoapApplibTransport_Definitions | |
{ | |
import from EPTF_LwM2M_Transport_Definitions all; | |
import from EPTF_COAP_LGen_Definitions all; | |
import from EPTF_CLL_Base_Definitions all; | |
/////////////////////////////////////////////////////////// | |
// Module parameter: tsp_EPTF_LwM2M_CoapApplibTransport_debug | |
// | |
// Purpose: | |
// Enabled/disable debug logging | |
// | |
// Type: | |
// *boolean* | |
// | |
// Default value: | |
// *false* | |
/////////////////////////////////////////////////////////// | |
modulepar boolean tsp_EPTF_LwM2M_CoapApplibTransport_debug := false; | |
/***************************************************************** | |
@startuml EPTF_LwM2M_CoapApplibTransport_Definitions.EPTF_LwM2M_CoapApplibTransport_CT.jpg | |
class EPTF_LwM2M_CoapApplibTransport_CT { | |
boolean v_EPTF_LwM2M_CoapApplibTransport_initialized | |
f_EPTF_LwM2M_CoapApplibTransport_init(in charstring pl_name) | |
f_EPTF_LwM2M_CoapApplibTransport_cleanup() | |
f_EPTF_LwM2M_CoapApplibTransport_send(in EPTF_LwM2M_PDU pl_msg) | |
f_EPTF_LwM2M_CoapApplibTransport_messageReceived(in EPTF_COAP_PDU pl_message, in boolean p_duplicate) | |
f_EPTF_LwM2M_CoapApplibTransport_eventIndication(in EPTF_COAP_EventDescriptor pl_event) | |
f_EPTF_LwM2M_CoapApplibTransport_ObjectPath_to_resourceIdString(in ObjectPath p_path) | |
} | |
@enduml | |
******************************************************************/ | |
/////////////////////////////////////////////////////////// | |
// Type: EPTF_LwM2M_CoapApplibTransport_CT | |
// | |
// Purpose: | |
// LWM2M local transport component realized with <EPTF_COAP_LGen_CT> | |
// | |
// Class: | |
// (see EPTF_LwM2M_CoapApplibTransport_Definitions.EPTF_LwM2M_CoapApplibTransport_CT.jpg) | |
// | |
// Extensions: | |
// - <EPTF_LwM2M_Transport_Provider_CT> | |
// - <EPTF_COAP_LGen_CT> | |
// - <EPTF_Base_CT> | |
// | |
// Ports: | |
// - | |
// | |
// Timers: | |
// - | |
// | |
// Variables: | |
// v_EPTF_LwM2M_CoapApplibTransport_initialized - *boolean* - Flag to indicate if the init function was already called | |
// | |
// Related Functions: | |
// - <f_EPTF_LwM2M_CoapApplibTransport_init> (*in charstring* pl_name) | |
// - <f_EPTF_LwM2M_CoapApplibTransport_cleanup> () | |
// - <f_EPTF_LwM2M_CoapApplibTransport_send> (*in* <EPTF_LwM2M_PDU> pl_msg) | |
// - <f_EPTF_LwM2M_CoapApplibTransport_messageReceived> (*in* <EPTF_COAP_PDU> pl_message, in *boolean* p_duplicate) | |
// - <f_EPTF_LwM2M_CoapApplibTransport_eventIndication> (*in* <EPTF_COAP_EventDescriptor> pl_event) | |
// - <f_EPTF_LwM2M_CoapApplibTransport_ObjectPath_to_resourceIdString> (*in* <ObjectPath> p_path) | |
/////////////////////////////////////////////////////////// | |
type component EPTF_LwM2M_CoapApplibTransport_CT | |
extends EPTF_LwM2M_Transport_Provider_CT, EPTF_Base_CT, EPTF_COAP_LGen_CT | |
{ | |
var boolean v_EPTF_LwM2M_CoapApplibTransport_initialized := false; | |
var EPTF_LwM2M_CoapApplibTransport_Statistics v_EPTF_LwM2M_CoapApplibTransport_stats := c_EPTF_LwM2M_CoapApplibTransport_Statistics_empty; | |
} | |
/***************************************************************** | |
@startuml EPTF_LwM2M_CoapApplibTransport_Definitions.EPTF_LwM2M_CoapApplibTransport_Statistics.jpg | |
class EPTF_COAP_Transport_Statistics { | |
integer nofOpenConnections | |
integer nofTransportWarnings | |
float nofReceivedMessages | |
float nofSentMessages | |
float nofReceivedBytes | |
float nofSentBytes | |
} | |
@enduml | |
******************************************************************/ | |
/////////////////////////////////////////////////////////// | |
// Type: EPTF_LwM2M_CoapApplibTransport_Statistics | |
// | |
// Purpose: | |
// Storing counters for transport related statistics | |
// | |
// Class: | |
// (see EPTF_LwM2M_CoapApplibTransport_Definitions.EPTF_LwM2M_CoapApplibTransport_Statistics.jpg) | |
// | |
// Elements: | |
// nofReceivedMessages - *integer* - number of received messages | |
// nofSentMessages - *integer* - number of sent messages | |
// nofDecodingErrors - *integer* - number of times the COAP messages couldn't be mapped to LwM2M | |
/////////////////////////////////////////////////////////// | |
type record EPTF_LwM2M_CoapApplibTransport_Statistics | |
{ | |
integer nofSentMessages, | |
integer nofReceivedMessages, | |
integer nofDecodingErrors | |
} | |
const EPTF_LwM2M_CoapApplibTransport_Statistics c_EPTF_LwM2M_CoapApplibTransport_Statistics_empty := | |
{ | |
nofSentMessages := 0, | |
nofReceivedMessages := 0, | |
nofDecodingErrors := 0 | |
} | |
} |