blob: aa61b4cdf731691595295541a82a3d33918ceb35 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
//
// 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_COAP_LGen_Definitions.ttcn
// Description:
// Rev: R1A
// Prodnr: CNL 113 858
// Updated: 2019-08-27
// Contact: http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_COAP_LGen_Definitions
//
// Purpose:
// This module contains the definitions for the COAP load generator component
//
// Module depends on:
// - <EPTF_COAP_Transport_Definitions>
// - <EPTF_CLL_LGenBase_Definitions>
// - <EPTF_CLL_Logging_Definitions>
// - <EPTF_CLL_FBQ_Definitions>
// - <Socket_API_Definitions>
// - <CoAP_Types>
//
// Module Parameters:
// tsp_EPTF_COAP_LGen_log_error - <tsp_EPTF_COAP_LGen_log_error> - *boolean* - Enabled/disable error logging
// tsp_EPTF_COAP_LGen_log_warning - <tsp_EPTF_COAP_LGen_log_warning> - *boolean* - Enabled/disable warning logging
// tsp_EPTF_COAP_LGen_debug - <tsp_EPTF_COAP_LGen_debug> - *boolean* - Enabled/disable debug logging
// tsp_EPTF_COAP_LGen_debugVerbose - <tsp_EPTF_COAP_LGen_debugVerbose> - *boolean* - Enabled/disable verbose debug logging
// tsp_EPTF_COAP_LGen_templates - <tsp_EPTF_COAP_LGen_templates> - <CoAP_Template_List> - COAP template definitions for sending
// tsp_EPTF_COAP_LGen_psks - <tsp_EPTF_COAP_LGen_psks> - <COAP_PSK_Params_List> - List of Pre-shared keys (PSK)
// tsp_EPTF_COAP_maxToken - <tsp_EPTF_COAP_maxToken> - *integer* - Maximum value used for token generation
// tsp_EPTF_COAP_NON_LIFETIME - <tsp_EPTF_COAP_NON_LIFETIME> - *float* - Maximum lifetime of a NON transaction in seconds
// tsp_EPTF_COAP_EXCHANGE_LIFETIME - <tsp_EPTF_COAP_EXCHANGE_LIFETIME> - *float* - Maximum lifetime of a COAP transaction in seconds
//
// Events:
// COAP Empty message - <c_COAP_eventIdx_EMPTY>, <c_COAP_eventName_EMPTY>
// COAP GET request - <c_COAP_eventIdx_GET>, <c_COAP_eventIdx_GET>
// COAP POST request - <c_COAP_eventIdx_POST>, <c_COAP_eventName_POST>
// COAP PUT request - <c_COAP_eventIdx_PUT>, <c_COAP_eventName_PUT>
// COAP DELETE request - <c_COAP_eventIdx_DELETE>, <c_COAP_eventName_DELETE>
// COAP OBSERVE request - <c_COAP_eventIdx_OBSERVE>, <c_COAP_eventName_OBSERVE>
// COAP 1xx response - <c_COAP_eventIdx_1xx>, <c_COAP_eventName_1xx>
// COAP 2xx response- <c_COAP_eventIdx_2xx>, <c_COAP_eventName_2xx>
// COAP 3xx response - <c_COAP_eventIdx_3xx>, <c_COAP_eventName_3xx>
// COAP 4xx response - <c_COAP_eventIdx_4xx>, <c_COAP_eventName_4xx>
// COAP 5xx response - <c_COAP_eventIdx_5xx>, <c_COAP_eventName_5xx>
// COAP 6xx response - <c_COAP_eventIdx_6xx>, <c_COAP_eventName_6xx>
// COAP 3xxto6xx response - <c_COAP_eventIdx_3xxto6xx>, <c_COAP_eventName_3xxto6xx>
// COAP transport succesful response - <c_COAP_eventIdx_transportSucc>, <c_COAP_eventName_transportSucc>
// COAP transport failure response - <c_COAP_eventIdx_transportFail>, <c_COAP_eventName_transportFail>
// COAP transaction reset indication - <c_COAP_eventIdx_trRST>, <c_COAP_eventName_trRST>
// COAP transaction timed out indication - <c_COAP_eventIdx_trTimeout>, <c_COAP_eventName_trTimeout>
// COAP observation canceled indication - <c_COAP_eventIdx_observeCanceled>, <c_COAP_eventName_observeCanceled>
// COAP resource not observed any more indication - <c_COAP_eventIdx_resourceNotObservedIndication>, <c_COAP_eventName_resourceNotObservedIndication>
// COAP DTLS connection closed indication - <c_COAP_eventIdx_dtlsConnectionClosed>, <c_COAP_eventName_dtlsConnectionClosed>
//
// TestSteps:
// COAP init - <f_COAP_step_init>, <c_COAP_stepIdx_init>, <c_COAP_stepName_init>
// COAP cleanUp - <f_COAP_step_cleanUp>, <c_COAP_stepIdx_init>, <c_COAP_stepIdx_init>
// COAP set local address - <f_COAP_step_setLocalAddress>, <c_COAP_stepIdx_setLocalAddress>, <c_COAP_stepName_setLocalAddress>
// COAP set remote address - <f_COAP_step_setRemoteAddress_byIntIdx>, <c_COAP_stepIdx_setRemoteAddress_byIntIdx>, <c_COAP_stepName_setRemoteAddress_byIntIdx>
// <f_COAP_step_setRemoteAddress_byVars>, <c_COAP_stepIdx_setRemoteAddress_byVars>, <c_COAP_stepName_setRemoteAddress_byVars>
// COAP send - <f_COAP_step_send>, <c_COAP_stepIdx_send>, <c_COAP_stepName_send>
// COAP load template - <f_COAP_step_loadTemplate_byIntIdx>, <c_COAP_stepIdx_loadTemplate_byIntIdx>, <c_COAP_stepName_loadTemplate_byIntIdx>
// <f_COAP_step_loadTemplate_byStringId>, <c_COAP_stepIdx_loadTemplate_byStringId>, <c_COAP_stepName_loadTemplate_byStringId>
// COAP handle request - <f_COAP_step_handleRequest>, <c_COAP_stepIdx_handleRequest>, <c_COAP_stepName_handleRequest>
// COAP send response - <f_COAP_step_sendResponse>, <c_COAP_stepIdx_sendResponse>, <c_COAP_stepName_sendResponse>
// COAP send accept - <f_COAP_step_sendAccept>, <c_COAP_stepIdx_sendAccept>, <c_COAP_stepName_sendAccept>
// COAP start listening - <f_COAP_step_startListening>, <c_COAP_stepIdx_startListening>, <c_COAP_stepName_startListening>
// COAP report COAP event for entity enable/disable - <f_COAP_step_reportCoapEventForEntity>, <c_COAP_stepIdx_reportCoapEventForEntity>, <c_COAP_stepName_reportCoapEventForEntity>
// COAP set CON/NON notifications for entity - <f_COAP_step_confirmableNotificationForEntity>, <c_COAP_stepIdx_confirmableNotificationForEntity>, <c_COAP_stepName_confirmableNotificationForEntity>
// COAP send notification - <f_COAP_step_sendNotification_byIntIdx>, <c_COAP_stepIdx_sendNotification_byIntIdx>, <c_COAP_stepName_sendNotification_byIntIdx>
// <f_COAP_step_sendNotification_byStringId>, <c_COAP_stepIdx_sendNotification_byStringId>, <c_COAP_stepName_sendNotification_byStringId>
// COAP remove resource observations - <f_COAP_step_removeResourceObservations_byIntIdx>, <c_COAP_stepIdx_removeResourceObservations_byIntIdx>, <c_COAP_stepName_removeResourceObservations_byIntIdx>
// <f_COAP_step_removeResourceObservations_byStringId>, <c_COAP_stepIdx_removeResourceObservations_byStringId>, <c_COAP_stepName_removeResourceObservations_byStringId>
// COAP start DTLS - <f_COAP_step_startDTLS>, <c_COAP_stepIdx_startDTLS>, <c_COAP_stepName_startDTLS>
// <f_COAP_step_startDTLS_byVarIds>, <c_COAP_stepIdx_startDTLS_byVarIds>, <c_COAP_stepName_startDTLS_byVarIds>
// <f_COAP_step_startDTLS_byIntIdx>, <c_COAP_stepIdx_startDTLS_byIntIdx>, <c_COAP_stepName_startDTLS_byIntIdx>
//
// Class Diagram:
// (see EPTF_COAP_LGen_Definitions.classes.jpg)
//
///////////////////////////////////////////////////////////////
module EPTF_COAP_LGen_Definitions
{
import from EPTF_COAP_Transport_Definitions all;
import from EPTF_CLL_LGenBase_Definitions all;
import from EPTF_CLL_Logging_Definitions all;
import from EPTF_CLL_FBQ_Definitions all;
import from Socket_API_Definitions all;
import from CoAP_Types all;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_LGen_log_error
//
// Purpose:
// Enabled/disable error logging
//
// Type:
// *boolean*
//
// Default value:
// *true*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_COAP_LGen_log_error := true;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_LGen_log_warning
//
// Purpose:
// Enabled/disable warning logging
//
// Type:
// *boolean*
//
// Default value:
// *true*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_COAP_LGen_log_warning := true;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_LGen_debug
//
// Purpose:
// Enabled/disable debug logging
//
// Type:
// *boolean*
//
// Default value:
// *false*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_COAP_LGen_debug := false;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_LGen_debugVerbose
//
// Purpose:
// Enabled/disable verbose debug logging
//
// Type:
// *boolean*
//
// Default value:
// *false*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_COAP_LGen_debugVerbose := false;
modulepar integer tsp_EPTF_COAP_LGen_maxBindableCtx := -1;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_LGen_templates
//
// Purpose:
// List of Pre-shared keys (PSK)
//
// Type:
// <CoAP_Template_List>
//
// Default value:
// Empty list: {}
///////////////////////////////////////////////////////////
modulepar CoAP_Template_List tsp_EPTF_COAP_LGen_templates := {};
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_LGen_psks
//
// Purpose:
// COAP template definitions for sending
//
// Type:
// <COAP_PSK_Params_List>
//
// Default value:
// Empty list: {}
///////////////////////////////////////////////////////////
modulepar COAP_PSK_Params_List tsp_EPTF_COAP_LGen_psks := {};
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_maxToken
//
// Purpose:
// Maximum value used for token generation
//
// Type:
// *integer*
//
// Default value:
// *65535*
///////////////////////////////////////////////////////////
modulepar integer tsp_EPTF_COAP_maxToken := 65535;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_NON_LIFETIME
//
// Purpose:
// Maximum lifetime of a NON transaction in seconds
//
// Type:
// *float*
//
// Default value:
// *145.0*
///////////////////////////////////////////////////////////
modulepar float tsp_EPTF_COAP_NON_LIFETIME := 145.0;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_EXCHANGE_LIFETIME
//
// Purpose:
// Maximum lifetime of a COAP transaction in seconds
//
// Type:
// *float*
//
// Default value:
// *247.0*
///////////////////////////////////////////////////////////
modulepar float tsp_EPTF_COAP_EXCHANGE_LIFETIME := 247.0;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_COAP_BlockwiseTransfer_collectContent
//
// Purpose:
// Enables/disables collecting the content of a blockwise transfer.
// Can casue overload in case of high traffic and large transfers when enabled
//
// Type:
// *float*
//
// Default value:
// *247.0*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_COAP_BlockwiseTransfer_collectContent := false;
const integer c_COAP_LGen_Logging_WARNING := 0;
const integer c_COAP_LGen_Logging_DEBUG := 1;
const integer c_COAP_LGen_Logging_DEBUGV := 2;
const integer c_COAP_LGen_Logging_ERROR := 3;
///////////////////////////////////////////////////////////
// const: c_COAP_behaviorType
//
// Purpose:
// Constant for COAP behaviour name
///////////////////////////////////////////////////////////
const charstring c_COAP_behaviorType := "COAP Behavior";
type record of integer COAP_ObservedResourceIdx_List;
type record of integer COAP_BlockwiseIdx_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.classes.jpg
class EPTF_COAP_LGen_CT {
boolean v_COAP_initialized
integer v_COAP_bIdx
integer v_COAP_loggingMaskId
COAP_EntityCtx_DB v_COAP_EntityCtxDB
COAP_FsmCtx_DB v_COAP_FsmCtxDB
COAP_TransportEndpointDB v_COAP_transportEndpointDB
COAP_Transaction_DB v_COAP_trDB
COAP_RR_DB v_COAP_rrDB
COAP_Template_DB v_COAP_templateDB
COAP_Observation_DB v_COAP_observationDB
COAP_ObservedResource_DB v_COAP_observedResourceDB
COAP_StepCtx v_COAP_ctx := c_COAP_StepCtx_empty;
COAP_TransportEndpoint v_COAP_transportEndpoint := c_COAP_TransportEndpoint_empty;
EPTF_COAP_PDU v_COAP_msgToProcess;
EPTF_COAP_PDU v_COAP_msgToSend;
fcb_EPTF_COAP_messageReceived vf_COAP_msgReceived
fcb_EPTF_COAP_eventIndication vf_COAP_eventIndication
fcb_EPTF_COAP_rttIndication vf_COAP_rttIndication
f_EPTF_COAP_LGen_init(in charstring pl_name)
f_COAP_cleanUp()
f_COAP_eCtxBind(in integer pl_eIdx)
f_COAP_eCtxUnbind(in integer pl_eIdx)
f_COAP_eCtxReset(in integer pl_eIdx)
f_EPTF_COAP_LGen_receiveMessage(in EPTF_COAP_PDU pl_message)
f_EPTF_COAP_LGen_receiveEvent(in ASP_Event p_event)
f_EPTF_COAP_LGen_transportApiResponse(in EPTF_COAP_Transport_Response pl_rsp)
f_EPTF_COAP_stack_fromApp(inout EPTF_COAP_PDU p_msg, in COAP_StepCtx p_ctx)
f_EPTF_COAP_stack_fromEnv(inout EPTF_COAP_PDU p_msg)
f_EPTF_COAP_declareEvents()
f_EPTF_COAP_declareSteps()
f_EPTF_COAP_setStepCtx(in EPTF_LGenBase_TestStepArgs pl_ptr, inout COAP_StepCtx p_ctx)
f_EPTF_COAP_setCtx(in integer p_eIdx, in integer p_fsmIdx, inout COAP_StepCtx p_ctx)
f_EPTF_COAP_isFsmInitialized(in integer pl_eIdx, in integer pl_fsmIdx, inout integer pl_fsmCtxIdx)
f_EPTF_COAP_dispatchEventsForCode(in Code pl_code, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs)
f_EPTF_COAP_dispatchEvent(in integer pl_eventIdx, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs)
}
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_EntityCtxDB" COAP_EntityCtx_DB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_FsmCtxDB" COAP_FsmCtx_DB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_transportEndpointDB" COAP_TransportEndpointDB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_trDB" COAP_Transaction_DB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_rrDB" COAP_RR_DB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_templateDB" COAP_Template_DB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_observationDB" COAP_Observation_DB
EPTF_COAP_LGen_CT "1" --> "1\n.v_COAP_observedResourceDB" COAP_ObservedResource_DB
class COAP_EntityCtx {
integer eIdx
integer localAddressIdx
integer nextMID
integer nextToken
boolean reportCoapEvent
boolean confirmableNotification
COAP_ObservedResourceIdx_List observedResourceIndices
f_EPTF_COAP_getNextMID(in COAP_StepCtx p_ctx)
f_EPTF_COAP_getNextToken(in COAP_StepCtx p_ctx)
f_EPTF_COAP_EntityCtx_addObservation(in integer p_eCtxIdx, in EPTF_COAP_PDU p_msg)
f_EPTF_COAP_EntityCtx_removeObservation(in integer pl_eCtxIdx, in integer p_obsResIdx, in boolean p_lastObserver)
f_EPTF_COAP_EntityCtx_removeObservedResource(in integer pl_eCtxIdx, in integer p_obsResIdx)
f_EPTF_COAP_EntityCtx_cleanUp(in integer p_eCtxIdx)
}
COAP_EntityCtx "*" --> "1\n.localAddressIdx" COAP_TransportEndpoint
COAP_EntityCtx "1\n.eCtxIdx" --> "*\n.observedResourceIndices[]" COAP_ObservedResource
class COAP_EntityCtx_DB {
EPTF_FreeBusyQueue queue
COAP_EntityCtx_List data
integer hashRef
f_EPTF_COAP_EntityCtxDB_init()
f_EPTF_COAP_EntityCtxDB_cleanUp()
}
COAP_EntityCtx_DB "1" --> "*\n.data[]" COAP_EntityCtx
class COAP_FsmCtx {
integer eIdx
integer remoteAddressIdx
COAP_PSK_Params psk optional
integer rrIdx
}
COAP_FsmCtx "*" --> "1\n.remoteAddressIdx" COAP_TransportEndpoint
COAP_FsmCtx "1\n.fsmCtxIdx" <--> "1\n.rrIdx" COAP_RR
class COAP_FsmCtx_DB {
EPTF_FreeBusyQueue queue,
COAP_FsmCtx_List data,
integer hashRef
f_EPTF_COAP_FsmCtxDB_init()
f_EPTF_COAP_FsmCtxDB_cleanUp()
}
COAP_FsmCtx_DB "1" --> "*\n.data[]" COAP_FsmCtx
class COAP_Transaction {
integer mid
integer eIdx
integer addrIdx
integer rrIdx
integer obsIdx
integer retransmitTimer
float retransmitTimerValue
integer lifetimeTimer
float rtt
EPTF_COAP_PDU cache optional
COAP_Transaction_State state
COAP_Transaction_Direction direction
f_EPTF_COAP_tr_fromRR(inout EPTF_COAP_PDU p_msg, in integer p_trIdx)
f_EPTF_COAP_tr_fromEnv(inout EPTF_COAP_PDU p_msg, in integer p_trIdx)
f_EPTF_COAP_tr_cancel(in integer p_trIdx)
f_EPTF_COAP_tr_lifetime(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_COAP_tr_retransmit(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_COAP_tr_startT_retransmit(in integer pl_trIdx)
f_EPTF_COAP_tr_cancelT_retransmit(in integer pl_trIdx)
f_EPTF_COAP_tr_startT_lifetime(in integer pl_trIdx, in float pl_time)
f_EPTF_COAP_tr_cancelT_lifetime(in integer pl_trIdx)
f_EPTF_COAP_tr_send(inout EPTF_COAP_PDU p_msg, in integer p_trIdx)
f_EPTF_COAP_tr_remove(in integer p_trIdx)
f_EPTF_COAP_tr_setState(in integer p_trIdx, in COAP_Transaction_State p_nextState)
}
COAP_Transaction "1\n.trIdx" <--> "1\n.rrIdx" COAP_RR
COAP_Transaction "*" --> "1\n.addrIdx" COAP_TransportEndpoint
COAP_Transaction "1\n.trIdx" <--> "0..1\n.obsIdx" COAP_Observation_Server
class COAP_Transaction_DB {
EPTF_FreeBusyQueue queue
COAP_Transaction_List data
integer hashRefOutgoing
integer hashRefIncoming
f_EPTF_COAP_trDB_init()
f_EPTF_COAP_trDB_add(in COAP_Transaction p_tr)
f_EPTF_COAP_trDB_lookUp(in Socket p_sock, in integer p_mid, COAP_Transaction_Direction p_dir)
f_EPTF_COAP_trDB_get(in integer p_idx, inout COAP_Transaction p_tr)
f_EPTF_COAP_trDB_remove(in integer p_idx)
f_EPTF_COAP_trDB_cleanUp()
}
COAP_Transaction_DB "1" --> "*\n.data[]" COAP_Transaction
class COAP_RR {
integer eIdx
integer fsmIdx
integer fsmCtxIdx
integer addrIdx
octetstring token
integer trIdx
Socket remoteAddress optional
ProtoTuple remoteProtocol optional
EPTF_COAP_PDU request optional
EPTF_COAP_PDU response optional
COAP_RR_State state
f_EPTF_COAP_rr_handleMsg(inout EPTF_COAP_PDU p_msg, in integer p_rrIdx)
f_EPTF_COAP_rr_reset(in integer p_rrIdx)
f_EPTF_COAP_rr_timeout(in integer p_rrIdx)
f_EPTF_COAP_rr_cancel(in integer p_rrIdx)
f_EPTF_COAP_rr_remove(in integer p_rrIdx)
f_EPTF_COAP_rr_setState(in integer p_rrIdx, in COAP_RR_State p_nextState)
}
COAP_RR "*" --> "1\n.addrIdx" COAP_TransportEndpoint
class COAP_RR_DB {
EPTF_FreeBusyQueue queue
COAP_RR_List data
integer hashRef
f_EPTF_COAP_rrDB_init()
f_EPTF_COAP_rrDB_add(in COAP_RR p_rr)
f_EPTF_COAP_rrDB_lookUp(in Socket p_sock, in octetstring p_token)
f_EPTF_COAP_rrDB_get(in integer p_idx, inout COAP_RR p_rr)
f_EPTF_COAP_rrDB_remove(in integer p_idx)
f_EPTF_COAP_rrDB_cleanUp()
f_EPTF_COAP_rrDB_tokenHash(in Socket p_sock, in octetstring p_token)
}
COAP_RR_DB "1" --> "*\n.data[]" COAP_RR
class COAP_TransportEndpoint {
Socket socket,
ProtoTuple proto
}
class COAP_TransportEndpointDB {
EPTF_FreeBusyQueue queue
COAP_TransportEndpoint_List data
integer hashRef
f_EPTF_COAP_transportEndpointDB_init()
f_EPTF_COAP_transportEndpointDB_add(in COAP_TransportEndpoint p_te, inout integer p_idx)
f_EPTF_COAP_transportEndpointDB_get(inout COAP_TransportEndpoint p_te, in integer p_idx)
f_EPTF_COAP_transportEndpointDB_lookUp(in COAP_TransportEndpoint p_te)
f_EPTF_COAP_transportEndpointDB_Socket2String(Socket p_sock)
f_EPTF_COAP_transportEndpointDB_cleanUp()
}
COAP_TransportEndpointDB "1" --> "*\n.data[]" COAP_TransportEndpoint
class COAP_ObservedResource {
charstring localAddress
integer localPort
charstring resourceId
UriPath_List uriPath
ObservationServerIdx_List observationServersIndices, // FIXME: Can be slow to update in case of larger nums
integer eCtxIdx
f_EPTF_COAP_ObservedResource_addObserver(in integer p_obsResIdx, in EPTF_COAP_PDU p_msg)
f_EPTF_COAP_ObservedResource_removeObserver(in integer p_obsResIdx, in integer p_obsIdx)
f_EPTF_COAP_ObservedResource_sendNotification(in integer p_obsResIdx, inout EPTF_COAP_PDU p_msg)
f_EPTF_COAP_ObservedResource_cleanUp(in integer p_obsResIdx)
}
COAP_ObservedResource "1\n.observedResourceIdx" <--> "1\n.observationServersIndices[]" COAP_Observation_Server
class COAP_ObservedResource_DB {
EPTF_FreeBusyQueue queue,
COAP_ObservedResource_List data,
integer hashRef
f_EPTF_COAP_observedResourceDB_init()
f_EPTF_COAP_observedResourceDB_add(in COAP_ObservedResource p_or)
f_EPTF_COAP_observedResourceDB_lookUp(in charstring p_localAddr, in integer p_localPort, in charstring p_resourceId)
f_EPTF_COAP_observedResourceDB_get(in integer p_idx, inout COAP_ObservedResource p_or)
f_EPTF_COAP_observedResourceDB_remove(in integer p_idx)
f_EPTF_COAP_observedResourceDB_cleanUp()
f_EPTF_COAP_observedResourceDB_tokenHash(in charstring p_localAddr, in integer p_localPort, in charstring p_resourceId)
}
COAP_ObservedResource_DB "1" --> "*\n.data[]" COAP_ObservedResource
class COAP_Observation_Server {
charstring remoteAddress,
integer remotePort,
ProtoTuple protocol,
charstring resourceId,
octetstring token,
integer seqNum,
boolean confirmable,
integer observedResourceIdx,
integer trIdx
f_EPTF_COAP_ObservationServer_sendNotification(in integer p_obsIdx, inout EPTF_COAP_PDU p_msg)
f_EPTF_COAP_ObservationServer_cancelReceivedFromEnv(in integer p_obsIdx)
}
class COAP_Observation_DB {
EPTF_FreeBusyQueue queue,
COAP_Observation_Server_List data,
integer hashRef
f_EPTF_COAP_observationDB_init()
f_EPTF_COAP_observationDB_add(in COAP_Observation_Server p_os)
f_EPTF_COAP_observationDB_lookUp(in charstring p_remoteAddr, in integer p_remotePort, in charstring p_resId)
f_EPTF_COAP_observationDB_get(in integer p_idx, inout COAP_Observation_Server p_os)
f_EPTF_COAP_observationDB_remove(in integer p_idx)
f_EPTF_COAP_observationDB_cleanUp()
f_EPTF_COAP_observationDB_tokenHash(in charstring p_remoteAddr, in integer p_remotePort, in charstring p_resId)
}
COAP_Observation_DB "1" --> "*\n.data[]" COAP_Observation_Server
@enduml
******************************************************************/
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_EntityCtx.jpg
class COAP_EntityCtx {
integer eIdx
integer localAddressIdx
integer nextMID
integer nextToken
boolean reportCoapEvent
boolean confirmableNotification
COAP_ObservedResourceIdx_List observedResourceIndices
f_EPTF_COAP_getNextMID(in COAP_StepCtx p_ctx)
f_EPTF_COAP_getNextToken(in COAP_StepCtx p_ctx)
f_EPTF_COAP_EntityCtx_addObservation(in integer p_eCtxIdx, in EPTF_COAP_PDU p_msg)
f_EPTF_COAP_EntityCtx_removeObservation(in integer pl_eCtxIdx, in integer p_obsResIdx, in boolean p_lastObserver)
f_EPTF_COAP_EntityCtx_removeObservedResource(in integer pl_eCtxIdx, in integer p_obsResIdx)
f_EPTF_COAP_EntityCtx_cleanUp(in integer p_eCtxIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_EntityCtx
//
// Purpose:
// A COAP entity is a simulated COAP device, this structures stores data for one simulated device.
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_EntityCtx.jpg)
//
// Elements:
// eIdx - *integer* - pointer to the entity itself
// localAddressIdx - *integer* - pointer to the local address in *v_COAP_transportEndpointDB*
// nextMID - *integer* - used for MID generation
// nextToken - *integer* - used for token generation
// reportCoapEvent - *boolean* - COAP events (e.g. COAP GET, COAP 200 will be reported for this entity), should be false when using LwM2M applib
// confirmableNotification - *boolean* - CON transactions will be used for sending nitifications when this field is set to true
// observedResourceIndices - <COAP_ObservedResourceIdx_List> - pointers to all observed resources in *v_COAP_observedResourceDB*
// blockwiseIndices - <COAP_BlockwiseIdx_List> - pointers to the running blockwise FSMs in *v_COAP_blockwiseDB*
//
// Related Functions:
// - <f_EPTF_COAP_getNextMID> (in <COAP_StepCtx> p_ctx)
// - <f_EPTF_COAP_getNextToken> (in <COAP_StepCtx> p_ctx)
// - <f_EPTF_COAP_EntityCtx_addObservation> (in *integer* p_eCtxIdx, in <EPTF_COAP_PDU> p_msg)
// - <f_EPTF_COAP_EntityCtx_removeObservation> (in *integer* pl_eCtxIdx, in *integer* p_obsResIdx, in *boolean* p_lastObserver)
// - <f_EPTF_COAP_EntityCtx_removeObservedResource> (in *integer* pl_eCtxIdx, in *integer* p_obsResIdx)
// - <f_EPTF_COAP_EntityCtx_cleanUp> (in *integer* p_eCtxIdx)
///////////////////////////////////////////////////////////
type record COAP_EntityCtx
{
integer eIdx,
integer localAddressIdx,
integer nextMID,
integer nextToken,
boolean reportCoapEvent,
boolean confirmableNotification,
integer preferredBlocksize optional,
COAP_ObservedResourceIdx_List observedResourceIndices, // FIXME: Can be slow to update in case of larger nums
COAP_BlockwiseIdx_List blockwiseIndices // FIXME: Can be slow to update in case of larger nums
}
const COAP_EntityCtx c_COAP_EntityCtx_init :=
{
eIdx := -1,
localAddressIdx := -1,
nextMID := -1,
nextToken := -1,
reportCoapEvent := true,
confirmableNotification := false,
preferredBlocksize := omit,
observedResourceIndices := {},
blockwiseIndices := {}
}
///////////////////////////////////////////////////////////
// Type: COAP_EntityCtx_List
//
// Purpose:
// List of <COAP_EntityCtx>
///////////////////////////////////////////////////////////
type record of COAP_EntityCtx COAP_EntityCtx_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_EntityCtx_DB.jpg
class COAP_EntityCtx_DB {
EPTF_FreeBusyQueue queue
COAP_EntityCtx_List data
integer hashRef
f_EPTF_COAP_EntityCtxDB_init()
f_EPTF_COAP_EntityCtxDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_EntityCtx_DB
//
// Purpose:
// Storing COAP entity contexts
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_EntityCtx_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - FBQ for the stored elements
// data - <COAP_EntityCtx_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_EntityCtxDB_init> ()
// - <f_EPTF_COAP_EntityCtxDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record COAP_EntityCtx_DB
{
EPTF_FreeBusyQueue queue,
COAP_EntityCtx_List data,
integer hashRef
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_FsmCtx.jpg
class COAP_FsmCtx {
integer eIdx
integer remoteAddressIdx
COAP_PSK_Params psk optional
integer rrIdx
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_FsmCtx
//
// Purpose:
// Storing COAP data for each FSM
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_FsmCtx.jpg)
//
// Elements:
// eIdx - *integer* - pointer to the entity itself
// remoteAddressIdx - *integer* - pointer to the remote address <COAP_TransportEndpoint> in *v_COAP_transportEndpointDB*
// psk - <COAP_PSK_Params> - Pre-shared key information for DTLS PSK
// rrIdx - *integer* - pointer to the request-response state machine <COAP_RR> in *v_COAP_rrDB*
///////////////////////////////////////////////////////////
type record COAP_FsmCtx
{
integer eIdx,
integer remoteAddressIdx,
COAP_PSK_Params psk optional,
integer rrIdx
}
///////////////////////////////////////////////////////////
// Type: COAP_PSK_Params
//
// Purpose:
// Storing COAP data for each FSM
//
// Elements:
// identity - *charstring* - PSK identity
// key - *charstring* - PSK key
///////////////////////////////////////////////////////////
type record COAP_PSK_Params
{
charstring identity,
charstring key
}
///////////////////////////////////////////////////////////
// Type: COAP_PSK_Params_List
//
// Purpose:
// List of <COAP_PSK_Params>
///////////////////////////////////////////////////////////
type record of COAP_PSK_Params COAP_PSK_Params_List;
const COAP_FsmCtx c_COAP_FsmCtx_init :=
{
eIdx := -1,
remoteAddressIdx := -1,
psk := omit,
rrIdx := -1
}
///////////////////////////////////////////////////////////
// Type: COAP_FsmCtx_List
//
// Purpose:
// List of <COAP_FsmCtx>
///////////////////////////////////////////////////////////
type record of COAP_FsmCtx COAP_FsmCtx_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_FsmCtx_DB.jpg
class COAP_FsmCtx_DB {
EPTF_FreeBusyQueue queue,
COAP_FsmCtx_List data,
integer hashRef
f_EPTF_COAP_FsmCtxDB_init()
f_EPTF_COAP_FsmCtxDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_FsmCtx_DB
//
// Purpose:
// Storing COAP FSM contexts
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_FsmCtx_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - FBQ for the stored elements
// data - <COAP_EntityCtx_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_FsmCtxDB_init> ()
// - <f_EPTF_COAP_FsmCtxDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record COAP_FsmCtx_DB
{
EPTF_FreeBusyQueue queue,
COAP_FsmCtx_List data,
integer hashRef
}
///////////////////////////////////////////////////////////
// Enum: COAP_Transaction_State
//
// Purpose:
// States of a <COAP_Transaction> state machine
//
// Elements:
// - CLOSED
// - RELIABLE_TX
// - ACK_PENDING
// - REMOVING
///////////////////////////////////////////////////////////
type enumerated COAP_Transaction_State
{
CLOSED,
RELIABLE_TX,
ACK_PENDING,
REMOVING
}
///////////////////////////////////////////////////////////
// Enum: COAP_Transaction_Direction
//
// Purpose:
// Direction of a <COAP_Transaction>: either INCOMING or OUTGOING
//
// Elements:
// - OUTGOING
// - INCOMING
///////////////////////////////////////////////////////////
type enumerated COAP_Transaction_Direction
{
OUTGOING,
INCOMING
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_Transaction.jpg
class COAP_Transaction {
integer mid
integer eIdx
integer addrIdx
integer rrIdx
integer obsIdx
integer retransmitTimer
float retransmitTimerValue
integer lifetimeTimer
float rtt
EPTF_COAP_PDU cache optional
COAP_Transaction_State state
COAP_Transaction_Direction direction
f_EPTF_COAP_tr_fromRR(inout EPTF_COAP_PDU p_msg, in integer p_trIdx)
f_EPTF_COAP_tr_fromEnv(inout EPTF_COAP_PDU p_msg, in integer p_trIdx)
f_EPTF_COAP_tr_cancel(in integer p_trIdx)
f_EPTF_COAP_tr_lifetime(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_COAP_tr_retransmit(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_COAP_tr_startT_retransmit(in integer pl_trIdx)
f_EPTF_COAP_tr_cancelT_retransmit(in integer pl_trIdx)
f_EPTF_COAP_tr_startT_lifetime(in integer pl_trIdx, in float pl_time)
f_EPTF_COAP_tr_cancelT_lifetime(in integer pl_trIdx)
f_EPTF_COAP_tr_send(inout EPTF_COAP_PDU p_msg, in integer p_trIdx)
f_EPTF_COAP_tr_remove(in integer p_trIdx)
f_EPTF_COAP_tr_setState(in integer p_trIdx, in COAP_Transaction_State p_nextState)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_Transaction
//
// Purpose:
// Implements a COAP transaction in a state machine
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_Transaction.jpg)
//
// Elements:
// mid - *integer* - message id of the transaction
// eIdx - *integer* - entity index
// addrIdx - *integer* - remote address of <COAP_TransportEndpoint>
// rrIdx - *integer* - index of the parent <COAP_RR>
// obsIdx - *integer* - index of <COAP_Observation_Server>
// retransmitTimer - *integer* - timer id of T_retransmit
// retransmitTimerValue - *integer* - initial timer value of T_retransmit
// rtt - *float* - round trip time for initiated CON transactions
// cache - <EPTF_COAP_PDU> - cache for retransmission
// state - <COAP_Transaction_State> - state of the transaction FSM
// direction - <COAP_Transaction_Direction> - direction of the transaction FSM
//
// Related Functions:
// - <f_EPTF_COAP_tr_fromRR> (inout <EPTF_COAP_PDU> p_msg, in integer p_trIdx)
// - <f_EPTF_COAP_tr_fromEnv> (inout <EPTF_COAP_PDU> p_msg, in integer p_trIdx)
// - <f_EPTF_COAP_tr_cancel> (in *integer* p_trIdx)
// - <f_EPTF_COAP_tr_lifetime> (in <EPTF_ScheduledAction> pl_action, in *integer* pl_eventIndex)
// - <f_EPTF_COAP_tr_retransmit> (in EPTF_ScheduledAction pl_action, in *integer* pl_eventIndex)
// - <f_EPTF_COAP_tr_startT_retransmit> (in *integer* pl_trIdx)
// - <f_EPTF_COAP_tr_cancelT_retransmit> (in *integer* pl_trIdx)
// - <f_EPTF_COAP_tr_startT_lifetime> (in *integer* pl_trIdx, in *float* pl_time)
// - <f_EPTF_COAP_tr_cancelT_lifetime> (in *integer* pl_trIdx)
// - <f_EPTF_COAP_tr_send> (inout <EPTF_COAP_PDU> p_msg, in *integer* p_trIdx)
// - <f_EPTF_COAP_tr_remove> (in *integer* p_trIdx)
// - <f_EPTF_COAP_tr_setState> (in *integer* p_trIdx, in <COAP_Transaction_State> p_nextState)
//
// FSM Diagram:
// (see EPTF_COAP_LGen_Functions.COAP_Transaction.jpg)
///////////////////////////////////////////////////////////
type record COAP_Transaction
{
integer mid,
integer eIdx,
integer addrIdx,
integer rrIdx,
integer obsIdx,
integer retransmitTimer,
float retransmitTimerValue,
integer lifetimeTimer,
float rtt optional,
EPTF_COAP_PDU cache optional,
COAP_Transaction_State state,
COAP_Transaction_Direction direction
}
const COAP_Transaction c_COAP_Transaction_init :=
{
mid := -1,
eIdx := -1,
addrIdx := -1,
rrIdx := -1,
obsIdx := -1,
retransmitTimer := -1,
retransmitTimerValue := 1.0,
lifetimeTimer := -1,
rtt := omit,
cache := omit,
state := CLOSED,
direction := OUTGOING
}
///////////////////////////////////////////////////////////
// Type: COAP_Transaction_List
//
// Purpose:
// List of <COAP_Transaction>
///////////////////////////////////////////////////////////
type record of COAP_Transaction COAP_Transaction_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_Transaction_DB.jpg
class COAP_Transaction_DB {
EPTF_FreeBusyQueue queue
COAP_Transaction_List data
integer hashRefOutgoing
integer hashRefIncoming
f_EPTF_COAP_trDB_init()
f_EPTF_COAP_trDB_add(in COAP_Transaction p_tr)
f_EPTF_COAP_trDB_lookUp(in Socket p_sock, in integer p_mid, COAP_Transaction_Direction p_dir)
f_EPTF_COAP_trDB_get(in integer p_idx, inout COAP_Transaction p_tr)
f_EPTF_COAP_trDB_remove(in integer p_idx)
f_EPTF_COAP_trDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_Transaction_DB
//
// Purpose:
// Storing <COAP_Transaction> instances
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_Transaction_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - FBQ for the stored elements
// data - <COAP_Transaction_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_trDB_init> ()
// - <f_EPTF_COAP_trDB_add> (in <COAP_Transaction> p_tr)
// - <f_EPTF_COAP_trDB_lookUp> (in <Socket> p_sock, in *integer* p_mid, <COAP_Transaction_Direction> p_dir)
// - <f_EPTF_COAP_trDB_get> (in *integer* p_idx, inout <COAP_Transaction> p_tr)
// - <f_EPTF_COAP_trDB_remove> (in *integer* p_idx)
// - <f_EPTF_COAP_trDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record COAP_Transaction_DB
{
EPTF_FreeBusyQueue queue,
COAP_Transaction_List data,
integer hashRefOutgoing,
integer hashRefIncoming
}
///////////////////////////////////////////////////////////
// Enum: COAP_RR_Client_State
//
// Purpose:
// Pssoible clientstates of a <COAP_RR>
//
// Elements:
// - IDLE
// - WAITING
// - REMOVING
///////////////////////////////////////////////////////////
type enumerated COAP_RR_Client_State
{
IDLE,
WAITING,
REMOVING
}
///////////////////////////////////////////////////////////
// Enum: COAP_RR_Server_State
//
// Purpose:
// Pssoible clientstates of a <COAP_RR>
//
// Elements:
// - IDLE
// - SEPARATE
// - SERVING
// - REMOVING
///////////////////////////////////////////////////////////
type enumerated COAP_RR_Server_State
{
IDLE,
SEPARATE,
SERVING,
REMOVING
}
///////////////////////////////////////////////////////////
// Type: COAP_RR_State
//
// Purpose:
// A <COAP_RR> can be either a client or a server request response
//
// Elements:
// client - <COAP_RR_Client_State> - client states
// server - <COAP_RR_Server_State> - server states
///////////////////////////////////////////////////////////
type union COAP_RR_State
{
COAP_RR_Client_State client,
COAP_RR_Server_State server
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_RR.jpg
class COAP_RR {
integer eIdx
integer fsmIdx
integer fsmCtxIdx
integer addrIdx
octetstring token
integer trIdx
Socket remoteAddress optional
ProtoTuple remoteProtocol optional
EPTF_COAP_PDU request optional
EPTF_COAP_PDU response optional
COAP_RR_State state
f_EPTF_COAP_rr_handleMsg(inout EPTF_COAP_PDU p_msg, in integer p_rrIdx)
f_EPTF_COAP_rr_reset(in integer p_rrIdx)
f_EPTF_COAP_rr_timeout(in integer p_rrIdx)
f_EPTF_COAP_rr_cancel(in integer p_rrIdx)
f_EPTF_COAP_rr_remove(in integer p_rrIdx)
f_EPTF_COAP_rr_setState(in integer p_rrIdx, in COAP_RR_State p_nextState)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_RR
//
// Purpose:
// Models a COAP request-response state machine
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_RR.jpg)
//
// Elements:
// eIdx - *integer* - entity index
// fsmIdx - *integer* - fsm index
// fsmCtxIdx - *integer* - index of the COAP FSM context in <COAP_FsmCtx> *v_COAP_FsmCtxDB*
// addrIdx - *integer* - index of the remote address <COAP_TransportEndpoint> in *v_COAP_transportEndpointDB*
// token - *octetstring* - token identifier of the request reponse
// trIdx - *integer* - index of the currently active transaction <COAP_Transaction> in *v_COAP_trDB*
// remoteAddress - <Socket> - remote address of the request response
// remoteProtocol - <ProtoTuple> - used protocol (ie UDP or DTLS)
// request - <EPTF_COAP_PDU> - The request that initiated this request-reponse
// response - <EPTF_COAP_PDU> - The response that answered this request-reponse
// state - <COAP_RR_State> - current state of the request-response FSM
//
// Related Functions:
// - <f_EPTF_COAP_rr_handleMsg> (inout <EPTF_COAP_PDU> p_msg, in *integer* p_rrIdx)
// - <f_EPTF_COAP_rr_reset> (in *integer* p_rrIdx)
// - <f_EPTF_COAP_rr_timeout> (in *integer* p_rrIdx)
// - <f_EPTF_COAP_rr_cancel> (in *integer* p_rrIdx)
// - <f_EPTF_COAP_rr_remove> (in *integer* p_rrIdx)
// - <f_EPTF_COAP_rr_setState> (in *integer* p_rrIdx, in <COAP_RR_State> p_nextState)
//
// FSM Diagram of client request-response:
// (see EPTF_COAP_LGen_Functions.COAP_RR_Client.jpg)
//
// FSM Diagram of server request-response:
// (see EPTF_COAP_LGen_Functions.COAP_RR_Server.jpg)
///////////////////////////////////////////////////////////
type record COAP_RR
{
integer eIdx,
integer fsmIdx,
integer fsmCtxIdx,
integer addrIdx,
octetstring token,
integer trIdx,
Socket remoteAddress optional,
ProtoTuple remoteProtocol optional,
EPTF_COAP_PDU request optional,
EPTF_COAP_PDU response optional,
COAP_RR_State state
}
const COAP_RR c_COAP_RR_init :=
{
eIdx := -1,
fsmIdx := -1,
fsmCtxIdx := -1,
addrIdx := -1,
token := ''O,
trIdx := -1,
remoteAddress := omit,
remoteProtocol := omit,
request := omit,
response := omit,
state := { client := IDLE }
}
///////////////////////////////////////////////////////////
// Type: COAP_RR_List
//
// Purpose:
// List of <COAP_RR>
///////////////////////////////////////////////////////////
type record of COAP_RR COAP_RR_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_RR_DB.jpg
class COAP_RR_DB {
EPTF_FreeBusyQueue queue
COAP_RR_List data
integer hashRef
f_EPTF_COAP_rrDB_init()
f_EPTF_COAP_rrDB_add(in COAP_RR p_rr)
f_EPTF_COAP_rrDB_lookUp(in Socket p_sock, in octetstring p_token)
f_EPTF_COAP_rrDB_get(in integer p_idx, inout COAP_RR p_rr)
f_EPTF_COAP_rrDB_remove(in integer p_idx)
f_EPTF_COAP_rrDB_cleanUp()
f_EPTF_COAP_rrDB_tokenHash(in Socket p_sock, in octetstring p_token)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_RR_DB
//
// Purpose:
// Storing <COAP_RR> instances
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_RR_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - FBQ for the stored elements
// data - <COAP_RR_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_rrDB_init> ()
// - <f_EPTF_COAP_rrDB_add> (in <COAP_RR> p_rr)
// - <f_EPTF_COAP_rrDB_lookUp> (in <Socket> p_sock, in *octetstring* p_token)
// - <f_EPTF_COAP_rrDB_get> (in *integer* p_idx, inout <COAP_RR> p_rr)
// - <f_EPTF_COAP_rrDB_remove> (in *integer* p_idx)
// - <f_EPTF_COAP_rrDB_cleanUp> ()
// - <f_EPTF_COAP_rrDB_tokenHash> (in <Socket> p_sock, in *octetstring* p_token)
///////////////////////////////////////////////////////////
type record COAP_RR_DB
{
EPTF_FreeBusyQueue queue,
COAP_RR_List data,
integer hashRef
}
///////////////////////////////////////////////////////////
// Type: CoAP_Template
//
// Purpose:
// Grouping a <CoAP_ReqResp> with an id
//
// Elements:
// id - *charstring* - identifier
// msg - <CoAP_ReqResp> - COAP PDU
///////////////////////////////////////////////////////////
type record CoAP_Template
{
charstring id,
CoAP_ReqResp msg
}
///////////////////////////////////////////////////////////
// Type: CoAP_Template_List
//
// Purpose:
// List of <CoAP_Template>
///////////////////////////////////////////////////////////
type record of CoAP_Template CoAP_Template_List;
///////////////////////////////////////////////////////////
// Type: COAP_Template_DB
//
// Purpose:
// Storing <CoAP_Template> instances
//
// Elements:
// data - <CoAP_Template_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_templateDB_init> ()
// - <f_EPTF_COAP_templateDB_add> (in <CoAP_Template> p_template)
// - <f_EPTF_COAP_templateDB_lookUp> (in *charstring* p_id)
// - <f_EPTF_COAP_templateDB_get> (in *integer* p_idx, inout <CoAP_ReqResp> p_pdu)
// - <f_EPTF_COAP_templateDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record COAP_Template_DB
{
CoAP_Template_List data,
integer hashRef
}
///////////////////////////////////////////////////////////
// Type: COAP_StepCtx
//
// Purpose:
// Stores the most important pointers
//
// Elements:
// eIdx - *integer* - entity index
// fsmIdx - *integer* - fsm index
// eCtxIdx - *integer* - entity context index <COAP_EntityCtx>
// fsmCtxIdx - *integer* - fsm contextg index <COAP_FsmCtx>
///////////////////////////////////////////////////////////
type record COAP_StepCtx
{
integer eIdx,
integer fsmIdx,
integer eCtxIdx,
integer fsmCtxIdx
}
const COAP_StepCtx c_COAP_StepCtx_empty :=
{
eIdx := -1,
fsmIdx := -1,
eCtxIdx := -1,
fsmCtxIdx := -1
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_TransportEndpoint.jpg
class COAP_TransportEndpoint {
Socket socket,
ProtoTuple proto
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_TransportEndpoint
//
// Purpose:
// Stores the transport related parameters for a COAP endpoint
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_TransportEndpoint.jpg)
//
// Elements:
// socket - <Socket> - socket parameters (ie hostname + port number)
// proto - <ProtoTuple> - transport protocol (ie UDP or DTLS)
///////////////////////////////////////////////////////////
type record COAP_TransportEndpoint
{
Socket socket,
ProtoTuple proto
}
const COAP_TransportEndpoint c_COAP_TransportEndpoint_empty :=
{
socket := {
hostName := "",
portNumber := -1
},
proto := { udp := {} }
}
///////////////////////////////////////////////////////////
// Type: COAP_TransportEndpoint_List
//
// Purpose:
// List of <COAP_TransportEndpoint>
///////////////////////////////////////////////////////////
type record of COAP_TransportEndpoint COAP_TransportEndpoint_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_TransportEndpointDB.jpg
class COAP_TransportEndpointDB {
EPTF_FreeBusyQueue queue
COAP_TransportEndpoint_List data
integer hashRef
f_EPTF_COAP_transportEndpointDB_init()
f_EPTF_COAP_transportEndpointDB_add(in COAP_TransportEndpoint p_te, inout integer p_idx)
f_EPTF_COAP_transportEndpointDB_get(inout COAP_TransportEndpoint p_te, in integer p_idx)
f_EPTF_COAP_transportEndpointDB_lookUp(in COAP_TransportEndpoint p_te)
f_EPTF_COAP_transportEndpointDB_Socket2String(Socket p_sock)
f_EPTF_COAP_transportEndpointDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_TransportEndpointDB
//
// Purpose:
// Storing <COAP_TransportEndpoint> instances
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_TransportEndpointDB.jpg)
//
// Elements:
// data - <COAP_TransportEndpoint_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_transportEndpointDB_init> ()
// - <f_EPTF_COAP_transportEndpointDB_add> (in <COAP_TransportEndpoint> p_te, inout *integer* p_idx)
// - <f_EPTF_COAP_transportEndpointDB_get> (inout <COAP_TransportEndpoint> p_te, in *integer* p_idx)
// - <f_EPTF_COAP_transportEndpointDB_lookUp> (in <COAP_TransportEndpoint> p_te)
// - <f_EPTF_COAP_transportEndpointDB_Socket2String> (<Socket> p_sock)
// - <f_EPTF_COAP_transportEndpointDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record COAP_TransportEndpointDB
{
EPTF_FreeBusyQueue queue,
COAP_TransportEndpoint_List data,
integer hashRef
}
///////////////////////////////////////////////////////////
// Type: ObservationServerIdx_List
//
// Purpose:
// List of *integer*
///////////////////////////////////////////////////////////
type record of integer ObservationServerIdx_List;
///////////////////////////////////////////////////////////
// Type: UriPath_List
//
// Purpose:
// List of *universal charstring*
///////////////////////////////////////////////////////////
type record of universal charstring UriPath_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_ObservedResource.jpg
class COAP_ObservedResource {
charstring localAddress
integer localPort
charstring resourceId
UriPath_List uriPath
ObservationServerIdx_List observationServersIndices, // FIXME: Can be slow to update in case of larger nums
integer eCtxIdx
f_EPTF_COAP_ObservedResource_addObserver(in integer p_obsResIdx, in EPTF_COAP_PDU p_msg)
f_EPTF_COAP_ObservedResource_removeObserver(in integer p_obsResIdx, in integer p_obsIdx)
f_EPTF_COAP_ObservedResource_sendNotification(in integer p_obsResIdx, inout EPTF_COAP_PDU p_msg)
f_EPTF_COAP_ObservedResource_cleanUp(in integer p_obsResIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_ObservedResource
//
// Purpose:
// Represents an observed resource
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_ObservedResource.jpg)
//
// Elements:
// localAddress - *charstring* - local host of the resource
// localPort - *integer* - local port of the resource
// resourceId - *charstring* - path to the resource (eg "/3303/1/13", "/home/myResource")
// uriPath - <UriPath_List> - tokenized path to the resource (eg /"3303"/"1"/"13", /"home"/"myResource")
// observationServersIndices - <ObservationServerIdx_List> - Pointing to the observation servers <COAP_Observation_Server>
// eCtxIdx - *integer* - entity context index pointing to <COAP_EntityCtx>
//
// Related Functions:
// - <f_EPTF_COAP_ObservedResource_addObserver> (in *integer* p_obsResIdx, in <EPTF_COAP_PDU> p_msg)
// - <f_EPTF_COAP_ObservedResource_removeObserver> (in *integer* p_obsResIdx, in *integer* p_obsIdx)
// - <f_EPTF_COAP_ObservedResource_sendNotification> (in *integer* p_obsResIdx, inout <EPTF_COAP_PDU> p_msg)
// - <f_EPTF_COAP_ObservedResource_cleanUp> (in *integer* p_obsResIdx)
///////////////////////////////////////////////////////////
type record COAP_ObservedResource
{
charstring localAddress,
integer localPort,
charstring resourceId,
UriPath_List uriPath,
ObservationServerIdx_List observationServersIndices, // FIXME: Can be slow to update in case of larger nums
integer eCtxIdx
}
const COAP_ObservedResource c_COAP_ObservedResource_init :=
{
localAddress := "",
localPort := -1,
resourceId := "",
uriPath := {},
observationServersIndices := {},
eCtxIdx := -1
}
///////////////////////////////////////////////////////////
// Type: COAP_ObservedResource_List
//
// Purpose:
// List of <COAP_ObservedResource>
///////////////////////////////////////////////////////////
type record of COAP_ObservedResource COAP_ObservedResource_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_ObservedResource_DB.jpg
class COAP_ObservedResource_DB {
EPTF_FreeBusyQueue queue,
COAP_ObservedResource_List data,
integer hashRef
f_EPTF_COAP_observedResourceDB_init()
f_EPTF_COAP_observedResourceDB_add(in COAP_ObservedResource p_or)
f_EPTF_COAP_observedResourceDB_lookUp(in charstring p_localAddr, in integer p_localPort, in charstring p_resourceId)
f_EPTF_COAP_observedResourceDB_get(in integer p_idx, inout COAP_ObservedResource p_or)
f_EPTF_COAP_observedResourceDB_remove(in integer p_idx)
f_EPTF_COAP_observedResourceDB_cleanUp()
f_EPTF_COAP_observedResourceDB_tokenHash(in charstring p_localAddr, in integer p_localPort, in charstring p_resourceId)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_ObservedResource_DB
//
// Purpose:
// Storing <COAP_ObservedResource> instances
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_ObservedResource_DB.jpg)
//
// Elements:
// data - <COAP_ObservedResource_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_observedResourceDB_init> ()
// - <f_EPTF_COAP_observedResourceDB_add> (in <COAP_ObservedResource> p_or)
// - <f_EPTF_COAP_observedResourceDB_lookUp> (in *charstring* p_localAddr, in *integer* p_localPort, in *charstring* p_resourceId)
// - <f_EPTF_COAP_observedResourceDB_get> (in *integer* p_idx, inout <COAP_ObservedResource> p_or)
// - <f_EPTF_COAP_observedResourceDB_remove> (in *integer* p_idx)
// - <f_EPTF_COAP_observedResourceDB_cleanUp> ()
// - <f_EPTF_COAP_observedResourceDB_tokenHash> (in *charstring* p_localAddr, in *integer* p_localPort, in *charstring* p_resourceId)
///////////////////////////////////////////////////////////
type record COAP_ObservedResource_DB
{
EPTF_FreeBusyQueue queue,
COAP_ObservedResource_List data,
integer hashRef
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_Observation_Server.jpg
class COAP_Observation_Server {
charstring remoteAddress,
integer remotePort,
ProtoTuple protocol,
charstring resourceId,
octetstring token,
integer seqNum,
boolean confirmable,
integer observedResourceIdx,
integer trIdx
f_EPTF_COAP_ObservationServer_sendNotification(in integer p_obsIdx, inout EPTF_COAP_PDU p_msg)
f_EPTF_COAP_ObservationServer_cancelReceivedFromEnv(in integer p_obsIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_Observation_Server
//
// Purpose:
// Represents an observation relationship between an observed resource and an observer
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_Observation_Server.jpg)
//
// Elements:
// remoteAddress - *charstring* - address of the observer
// remotePort - *integer* - remote port of the observer
// protocol - <ProtoTuple> - the used transport protocol
// resourceId - *charstring* - id of the observed resource
// token - *octetstring* - token of the observation
// seqNum - *integer* - sequence number used for the notification
// confirmable - *boolean* - if true the notification should be send as a CON (default: false)
// observedResourceIdx - *integer* - pointer to the <COAP_ObservedResource>
// trIdx - *integer* - pointer to the notifications <COAP_Transaction>
//
// Related Functions:
// - <f_EPTF_COAP_ObservationServer_sendNotification> (in *integer* p_obsIdx, inout <EPTF_COAP_PDU> p_msg)
// - <f_EPTF_COAP_ObservationServer_cancelReceivedFromEnv> (in *integer* p_obsIdx)
///////////////////////////////////////////////////////////
type record COAP_Observation_Server
{
charstring remoteAddress,
integer remotePort,
ProtoTuple protocol,
charstring resourceId,
octetstring token,
integer seqNum,
boolean confirmable,
integer observedResourceIdx,
integer trIdx
}
const integer c_COAP_Observation_initSeqNum := 2;
const COAP_Observation_Server c_COAP_Observation_Server_init :=
{
remoteAddress := "",
remotePort := -1,
protocol := { udp := {} },
resourceId := "",
token := ''O,
seqNum := c_COAP_Observation_initSeqNum,
confirmable := false,
observedResourceIdx := -1,
trIdx := -1
}
///////////////////////////////////////////////////////////
// Type: COAP_Observation_Server_List
//
// Purpose:
// List of <COAP_Observation_Server>
///////////////////////////////////////////////////////////
type record of COAP_Observation_Server COAP_Observation_Server_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_Observation_DB.jpg
class COAP_Observation_DB {
EPTF_FreeBusyQueue queue,
COAP_Observation_Server_List data,
integer hashRef
f_EPTF_COAP_observationDB_init()
f_EPTF_COAP_observationDB_add(in COAP_Observation_Server p_os)
f_EPTF_COAP_observationDB_lookUp(in charstring p_remoteAddr, in integer p_remotePort, in charstring p_resId)
f_EPTF_COAP_observationDB_get(in integer p_idx, inout COAP_Observation_Server p_os)
f_EPTF_COAP_observationDB_remove(in integer p_idx)
f_EPTF_COAP_observationDB_cleanUp()
f_EPTF_COAP_observationDB_tokenHash(in charstring p_remoteAddr, in integer p_remotePort, in charstring p_resId)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_Observation_DB
//
// Purpose:
// Storing <COAP_Observation_Server> instances
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_Observation_DB.jpg)
//
// Elements:
// data - <COAP_Observation_Server_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_observationDB_init> ()
// - <f_EPTF_COAP_observationDB_add> (in <COAP_Observation_Server> p_os)
// - <f_EPTF_COAP_observationDB_lookUp> (in *charstring* p_remoteAddr, in *integer* p_remotePort, in *charstring* p_resId)
// - <f_EPTF_COAP_observationDB_get> (in *integer* p_idx, inout <COAP_Observation_Server> p_os)
// - <f_EPTF_COAP_observationDB_remove> (in *integer* p_idx)
// - <f_EPTF_COAP_observationDB_cleanUp> ()
// - <f_EPTF_COAP_observationDB_tokenHash> (in *charstring* p_remoteAddr, in *integer* p_remotePort, in *charstring* p_resId)
///////////////////////////////////////////////////////////
type record COAP_Observation_DB
{
EPTF_FreeBusyQueue queue,
COAP_Observation_Server_List data,
integer hashRef
}
///////////////////////////////////////////////////////////
// Type: COAP_Blockwise_Transfer
//
// Purpose:
// Represents a stateful blockwise transfer
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_Blockwise_Transfer.jpg)
//
// Elements:
// localAddress - *charstring* - local address of the resource
// localPort - *integer* - remote port of the observer
// remoteAddress - *charstring* - address of the observer
// remotePort - *integer* - remote port of the observer
// resourceId - *charstring* - id of the observed resource
// eCtxIdx - *integer* - pointer to the notifications <COAP_RR>
// lastBlock1Option - <BlockOption> - last received Block1 option
// headerCode - <Code> - the COAP header code
// contentFormat - *integer* - content format
//
// Related Functions:
// - <f_EPTF_COAP_BlockwiseTransfer_in> (in *integer* p_bsIdx, inout <EPTF_COAP_PDU> p_msg)
///////////////////////////////////////////////////////////
type record COAP_Blockwise_Transfer
{
charstring localAddress,
integer localPort,
charstring remoteAddress,
integer remotePort,
UriPath_List uriPath,
charstring resourceId,
integer eIdx,
integer fsmIdx,
integer lifetimeTimer,
boolean ongoingBlocksizeChange,
BlockOption lastBlock1Option,
Code headerCode,
integer contentFormat,
octetstring content
}
const COAP_Blockwise_Transfer c_COAP_Blockwise_Transfer_init :=
{
localAddress := "",
localPort := -1,
remoteAddress := "",
remotePort := -1,
uriPath := {},
resourceId := "",
eIdx := -1,
fsmIdx := -1,
lifetimeTimer := -1,
ongoingBlocksizeChange := false,
lastBlock1Option := c_BlockOption_empty,
headerCode := { 0, 2 },
contentFormat := -1,
content := ''O
}
const BlockOption c_BlockOption_empty :=
{
num := 0,
m := false,
szx := 1
}
///////////////////////////////////////////////////////////
// Type: COAP_Blockwise_Transfer_List
//
// Purpose:
// List of <COAP_Blockwise_Transfer>
///////////////////////////////////////////////////////////
type record of COAP_Blockwise_Transfer COAP_Blockwise_Transfer_List;
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.COAP_Blockwise_DB.jpg
class COAP_Blockwise_DB {
EPTF_FreeBusyQueue queue,
COAP_Blockwise_Server_List data,
integer hashRef
f_EPTF_COAP_blockwiseDB_init()
f_EPTF_COAP_blockwiseDB_add(in COAP_Blockwise_Transfer p_bt)
f_EPTF_COAP_blockwiseDB_lookUp(in charstring p_remoteAddr, in integer p_remotePort, in charstring p_resId)
f_EPTF_COAP_blockwiseDB_get(in integer p_idx, inout COAP_Blockwise_Transfer p_bt)
f_EPTF_COAP_blockwiseDB_remove(in integer p_idx)
f_EPTF_COAP_blockwiseDB_cleanUp()
f_EPTF_COAP_blockwiseDB_tokenHash(in charstring p_remoteAddr, in integer p_remotePort, in charstring p_resId)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: COAP_Blockwise_DB
//
// Purpose:
// Storing <COAP_Blockwise_Transfer> instances
//
// Class:
// (see EPTF_COAP_LGen_Definitions.COAP_Blockwise_DB.jpg)
//
// Elements:
// data - <COAP_Blockwise_Transfer_List> - elements
//
// Related Functions:
// - <f_EPTF_COAP_blockwiseDB_init> ()
// - <f_EPTF_COAP_blockwiseDB_add> (in <COAP_Blockwise_Transfer> p_bt)
// - <f_EPTF_COAP_blockwiseDB_lookUp> (in *charstring* p_remoteAddr, in *integer* p_remotePort, in *charstring* p_resId)
// - <f_EPTF_COAP_blockwiseDB_get> (in *integer* p_idx, inout <COAP_Blockwise_Transfer> p_bt)
// - <f_EPTF_COAP_blockwiseDB_remove> (in *integer* p_idx)
// - <f_EPTF_COAP_blockwiseDB_cleanUp> ()
// - <f_EPTF_COAP_blcokwiseDB_tokenHash> (in *charstring* p_remoteAddr, in *integer* p_remotePort, in *charstring* p_resId)
///////////////////////////////////////////////////////////
type record COAP_Blockwise_DB
{
EPTF_FreeBusyQueue queue,
COAP_Blockwise_Transfer_List data,
integer hashRef,
boolean collectContent
}
///////////////////////////////////////////////////////////
// Type: fcb_EPTF_COAP_messageReceived
//
// Purpose:
// Call-back function type for reporting received COAP messages
//
// Elements:
// pl_message - *in* <EPTF_COAP_PDU> - received COAP message
// p_duplicate - *in* *boolean* - flag, when true, indicates a duplicate message
// p_autoHandled - *in* *boolean* - flag, when true, indicates an automatically and the - by the stack - already handled message
///////////////////////////////////////////////////////////
type function fcb_EPTF_COAP_messageReceived(in EPTF_COAP_PDU pl_message, in boolean p_duplicate, in boolean p_autoHandled) runs on self;
///////////////////////////////////////////////////////////
// Type: fcb_EPTF_COAP_eventIndication
//
// Purpose:
// Call-back function type for reporting received COAP events
//
// Elements:
// pl_event - *in* <EPTF_COAP_EventDescriptor> - received COAP event
///////////////////////////////////////////////////////////
type function fcb_EPTF_COAP_eventIndication(in EPTF_COAP_EventDescriptor pl_event) runs on self;
///////////////////////////////////////////////////////////
// Type: fcb_EPTF_COAP_rttIndication
//
// Purpose:
// Call-back function type for reporting Round trip time measurements
//
// Elements:
// pl_rtt - *in* *float* - received round-trip time measurements
///////////////////////////////////////////////////////////
type function fcb_EPTF_COAP_rttIndication(in float pl_rtt) runs on self;
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_EventDescriptor
//
// Purpose:
// Describes a COAP event that can be reported to the COAP applib user
//
// Elements:
// resourceNotObserved - <EPTF_COAP_ResourceNotObserved_Event> - event that indicates that a resource is not observed any more
// atomicBlock1Finished - <EPTF_COAP_AtomicBlock1Finished_Event> - event that indicates that an atomic block1 transfer is finished
///////////////////////////////////////////////////////////
type union EPTF_COAP_EventDescriptor
{
EPTF_COAP_ResourceNotObserved_Event resourceNotObserved,
EPTF_COAP_AtomicBlock1Finished_Event atomicBlock1Finished
}
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_ResourceNotObserved_Event
//
// Purpose:
// Describes an event which indicates that a particular resource is not observed by any one anymore
//
// Elements:
// eIdx - *integer* - entity index
// uriPath - <UriPath_List> - the URI of the resource
///////////////////////////////////////////////////////////
type record EPTF_COAP_ResourceNotObserved_Event
{
integer eIdx,
UriPath_List uriPath
}
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_AtomicBlock1Finished_Event
//
// Purpose:
// Describes an event which indicates that a particular atomic block1 operation was finished
//
// Elements:
// eIdx - *integer* - entity index
// uriPath - <UriPath_List> - the URI of the resource
// method - <Code> - COAP request code for the atomic block1 operation
// contentFormat - *integer* - content format of the block1 transfer
///////////////////////////////////////////////////////////
type record EPTF_COAP_AtomicBlock1Finished_Event
{
integer eIdx,
UriPath_List uriPath,
Code method,
integer contentFormat,
octetstring content
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.EPTF_COAP_LGen_Statistics.jpg
class EPTF_COAP_LGen_Statistics {
integer noRetransmissions
integer noTransactionTimeouts
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_LGen_Statistics
//
// Purpose:
// Storing counters for load generator related statistics
//
// Class:
// (see EPTF_COAP_LGen_Definitions.EPTF_COAP_LGen_Statistics.jpg)
//
// Elements:
// noRetransmissions - *integer* - number of COAP message retransmissions
// noTransactionTimeouts - *integer* - number of timed out COAP transactions
// noDuplicates - *integer* - number of duplicated messages received
// noObserves - *integer* - number of observes
// block1 - <EPTF_COAP_Block1_Statistics> - Block1 related statistics
// incoming - <EPTF_COAP_Message_Statistics> - statistics of incoming messages
// outgoing - <EPTF_COAP_Message_Statistics> - statistics of outgoing messages
///////////////////////////////////////////////////////////
type record EPTF_COAP_LGen_Statistics
{
integer noRetransmissions,
integer noTransactionTimeouts,
integer noDuplicates,
integer noObserves,
EPTF_COAP_Block1_Statistics block1,
EPTF_COAP_Message_Statistics incoming,
EPTF_COAP_Message_Statistics outgoing
}
const EPTF_COAP_LGen_Statistics c_EPTF_COAP_LGen_Statistics_empty :=
{
noRetransmissions := 0,
noTransactionTimeouts := 0,
noDuplicates := 0,
noObserves := 0,
block1 := c_EPTF_COAP_Block1_Statistics_empty,
incoming := c_EPTF_COAP_Message_Statistics_empty,
outgoing := c_EPTF_COAP_Message_Statistics_empty
}
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_Block1_Statistics
//
// Purpose:
// Storing counters for block1 related statistics
//
// Elements:
// noBlocks - *integer* - number of block1 blocks received
// noAtomicSucc - *integer* - number of succesfully finished atomic blockwise transfers
// noAtomicUnsucc - *integer* - number of unsuccesfully finished atomic blockwise transfers
// noAtomicTimeouts - *integer* - number of timed out atomic blockwise transfers
///////////////////////////////////////////////////////////
type record EPTF_COAP_Block1_Statistics
{
integer noBlocks,
integer noAtomicSucc,
integer noAtomicUnsucc,
integer noAtomicTimeouts
}
const EPTF_COAP_Block1_Statistics c_EPTF_COAP_Block1_Statistics_empty :=
{
noBlocks := 0,
noAtomicSucc := 0,
noAtomicUnsucc := 0,
noAtomicTimeouts := 0
}
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_Message_Statistics
//
// Purpose:
// Storing counters for message related statistics
//
// Elements:
// noGET - *integer* - number of GET requests
// noPUT - *integer* - number of PUT request
// noPOST - *integer* - number of POST request
// noDELETE - *integer* - number of DELETE requests
// noEMPTY - *integer* - number of EMPTY requests
// noPosResp - *integer* - number of positive (2.xx) repsonses
// noNegResp - *integer* - number of negative (3.xx - 6.xx) repsonses
// noCON - *integer* - number of CONFIRMABLE messages
// noNON - *integer* - number of NON CONFIRMABLE messages
// noACK - *integer* - number of ACKNOWLEDGEMENT messages
// noRST - *integer* - number of RESET messages
// noNotifications - *integer* of NOTIFICATION messages
///////////////////////////////////////////////////////////
type record EPTF_COAP_Message_Statistics
{
integer noGET,
integer noPUT,
integer noPOST,
integer noDELETE,
integer noEMPTY,
integer noPosResp,
integer noNegResp,
integer noCON,
integer noNON,
integer noACK,
integer noRST,
integer noNotifications
}
const EPTF_COAP_Message_Statistics c_EPTF_COAP_Message_Statistics_empty :=
{
noGET := 0,
noPUT := 0,
noPOST := 0,
noDELETE := 0,
noEMPTY := 0,
noPosResp := 0,
noNegResp := 0,
noCON := 0,
noNON := 0,
noACK := 0,
noRST := 0,
noNotifications := 0
}
/*****************************************************************
@startuml EPTF_COAP_LGen_Definitions.EPTF_COAP_LGen_CT.jpg
class EPTF_COAP_LGen_CT {
boolean v_COAP_initialized
integer v_COAP_bIdx
integer v_COAP_loggingMaskId
COAP_EntityCtx_DB v_COAP_EntityCtxDB
COAP_FsmCtx_DB v_COAP_FsmCtxDB
COAP_TransportEndpointDB v_COAP_transportEndpointDB
COAP_Transaction_DB v_COAP_trDB
COAP_RR_DB v_COAP_rrDB
COAP_Template_DB v_COAP_templateDB
COAP_Observation_DB v_COAP_observationDB
COAP_ObservedResource_DB v_COAP_observedResourceDB
COAP_StepCtx v_COAP_ctx := c_COAP_StepCtx_empty;
COAP_TransportEndpoint v_COAP_transportEndpoint := c_COAP_TransportEndpoint_empty;
EPTF_COAP_PDU v_COAP_msgToProcess;
EPTF_COAP_PDU v_COAP_msgToSend;
fcb_EPTF_COAP_messageReceived vf_COAP_msgReceived
fcb_EPTF_COAP_eventIndication vf_COAP_eventIndication
fcb_EPTF_COAP_rttIndication vf_COAP_rttIndication
f_EPTF_COAP_LGen_init(in charstring pl_name)
f_COAP_cleanUp()
f_COAP_eCtxBind(in integer pl_eIdx)
f_COAP_eCtxUnbind(in integer pl_eIdx)
f_COAP_eCtxReset(in integer pl_eIdx)
f_EPTF_COAP_LGen_receiveMessage(in EPTF_COAP_PDU pl_message)
f_EPTF_COAP_LGen_receiveEvent(in ASP_Event p_event)
f_EPTF_COAP_LGen_transportApiResponse(in EPTF_COAP_Transport_Response pl_rsp)
f_EPTF_COAP_stack_fromApp(inout EPTF_COAP_PDU p_msg, in COAP_StepCtx p_ctx)
f_EPTF_COAP_stack_fromEnv(inout EPTF_COAP_PDU p_msg)
f_EPTF_COAP_declareEvents()
f_EPTF_COAP_declareSteps()
f_EPTF_COAP_setStepCtx(in EPTF_LGenBase_TestStepArgs pl_ptr, inout COAP_StepCtx p_ctx)
f_EPTF_COAP_setCtx(in integer p_eIdx, in integer p_fsmIdx, inout COAP_StepCtx p_ctx)
f_EPTF_COAP_isFsmInitialized(in integer pl_eIdx, in integer pl_fsmIdx, inout integer pl_fsmCtxIdx)
f_EPTF_COAP_dispatchEventsForCode(in Code pl_code, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs)
f_EPTF_COAP_dispatchEvent(in integer pl_eventIdx, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs)
}
@enduml
*****************************************************************/
///////////////////////////////////////////////////////////
// Type: EPTF_COAP_LGen_CT
//
// Purpose:
// COAP load generator component
//
// Class:
// (see EPTF_COAP_LGen_Definitions.EPTF_COAP_LGen_CT.jpg)
//
// Extensions:
// - <EPTF_LGenBase_CT>
// - <EPTF_COAP_Transport_User_CT>
// - <EPTF_Logging_CT>
//
// Ports:
// -
//
// Timers:
// -
//
// Variables:
// v_COAP_initialized - *boolean* - Flag to indicate that if init function was already called
// v_COAP_bIdx - *integer* - Name of the NAS_EPS LGen component
// v_COAP_loggingMaskId - *integer* - logging mask id <COAP_EntityCtx>
// v_COAP_Stack_autoHandled - *boolean* - the stack can automatically handle particular messages (e.g. Block1 requests), true when handled, false when not
//
// v_COAP_ctx - <COAP_StepCtx> - collection of the most important pointers
// v_COAP_transportEndpoint - <COAP_TransportEndpoint> - variable for a transport endpoint
//
// v_COAP_msgToProcess - <EPTF_COAP_PDU> - message to process
// v_COAP_msgToSend - <EPTF_COAP_PDU> - message to send
//
// v_COAP_transportEndpoint - <COAP_TransportEndpoint> - COAP load generator statistics
//
// vf_COAP_msgReceived - <fcb_EPTF_COAP_messageReceived> - Function hook for reporting received messages
// vf_COAP_eventIndication - <fcb_EPTF_COAP_eventIndication> - Function hook for reporting events
// vf_COAP_rttIndication - <fcb_EPTF_COAP_rttIndication> - Function hook for reporting round-trip time indications
//
// Instance databases:
// v_COAP_FsmCtxDB - <COAP_FsmCtx_DB> - FSM context database <COAP_FsmCtx>
// v_COAP_transportEndpointDB - <COAP_TransportEndpointDB> - transport endpoint database <COAP_TransportEndpoint>
// v_COAP_trDB - <COAP_Transaction_DB> - transaction database <COAP_Transaction>
// v_COAP_rrDB - <COAP_RR_DB> - erequest-response database <COAP_RR>
// v_COAP_templateDB - <COAP_Template_DB> - template database <COAP_Template>
// v_COAP_observationDB - <COAP_Observation_DB> - observation server database <COAP_Observation_Server>
// v_COAP_observedResourceDB - <COAP_ObservedResource_DB> - observed resource database <COAP_ObservedResource>
//
// Related Functions:
// - <f_EPTF_COAP_LGen_init> (in *charstring* pl_name)
// - <f_COAP_cleanUp> ()
// - <f_COAP_eCtxBind> (in *integer* pl_eIdx)
// - <f_COAP_eCtxUnbind> (in *integer* pl_eIdx)
// - <f_COAP_eCtxReset> (in *integer* pl_eIdx)
// - <f_EPTF_COAP_LGen_receiveMessage> (in <EPTF_COAP_PDU> pl_message)
// - <f_EPTF_COAP_LGen_receiveEvent> (in <ASP_Event> p_event)
// - <f_EPTF_COAP_LGen_transportApiResponse> (in <EPTF_COAP_Transport_Response> pl_rsp)
// - <f_EPTF_COAP_stack_fromApp> (inout <EPTF_COAP_PDU> p_msg, in <COAP_StepCtx> p_ctx)
// - <f_EPTF_COAP_stack_fromEnv> (inout <EPTF_COAP_PDU> p_msg)
// - <f_EPTF_COAP_declareEvents> ()
// - <f_EPTF_COAP_declareSteps> ()
// - <f_EPTF_COAP_setStepCtx> (in <EPTF_LGenBase_TestStepArgs> pl_ptr, inout <COAP_StepCtx> p_ctx)
// - <f_EPTF_COAP_setCtx> (in *integer* p_eIdx, in *integer* p_fsmIdx, inout <COAP_StepCtx> p_ctx)
// - <f_EPTF_COAP_isFsmInitialized> (in *integer* pl_eIdx, in *integer* pl_fsmIdx, inout *integer* pl_fsmCtxIdx)
// - <f_EPTF_COAP_dispatchEventsForCode> (in <Code> pl_code, in *integer* pl_eIdx, in *integer* pl_fsmCtx, in <EPTF_IntegerList> pl_reportedArgs)
// - <f_EPTF_COAP_dispatchEvent> (in *integer* pl_eventIdx, in *integer* pl_eIdx, in *integer* pl_fsmCtx, in <EPTF_IntegerList> pl_reportedArgs)
///////////////////////////////////////////////////////////
type component EPTF_COAP_LGen_CT extends EPTF_COAP_Transport_User_CT, EPTF_LGenBase_CT, EPTF_Logging_CT
{
var boolean v_COAP_initialized := false;
var integer v_COAP_bIdx;
var integer v_COAP_loggingMaskId := -1;
var COAP_EntityCtx_DB v_COAP_EntityCtxDB;
var COAP_FsmCtx_DB v_COAP_FsmCtxDB;
var COAP_TransportEndpointDB v_COAP_transportEndpointDB;
var COAP_Transaction_DB v_COAP_trDB;
var COAP_RR_DB v_COAP_rrDB;
var COAP_Template_DB v_COAP_templateDB := {};
var COAP_Observation_DB v_COAP_observationDB;
var COAP_ObservedResource_DB v_COAP_observedResourceDB;
var COAP_Blockwise_DB v_COAP_blockwiseDB;
var boolean v_COAP_Stack_autoHandled := false;
var COAP_StepCtx v_COAP_ctx := c_COAP_StepCtx_empty;
var COAP_TransportEndpoint v_COAP_transportEndpoint := c_COAP_TransportEndpoint_empty;
var EPTF_COAP_PDU v_COAP_msgToProcess;
var EPTF_COAP_PDU v_COAP_msgToSend;
var fcb_EPTF_COAP_messageReceived vf_COAP_msgReceived := null;
var fcb_EPTF_COAP_eventIndication vf_COAP_eventIndication := null;
var fcb_EPTF_COAP_rttIndication vf_COAP_rttIndication := null;
var EPTF_COAP_LGen_Statistics v_COAP_stats := c_EPTF_COAP_LGen_Statistics_empty;
}
const integer c_COAP_AppData_fsmCtxIdx := 0;
// Events
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_EMPTY
//
// Purpose:
// Integer constant for the COAP EMPTY message event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_EMPTY := 0;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_EMPTY
//
// Purpose:
// Charstring constant for the COAP EMPTY message event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_EMPTY := "COAP req: EMPTY";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_GET
//
// Purpose:
// Integer constant for the COAP GET request event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_GET := 1;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_GET
//
// Purpose:
// Charstring constant for the COAP GET request event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_GET := "COAP req: GET";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_POST
//
// Purpose:
// Integer constant for the COAP POST request event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_POST := 2;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_POST
//
// Purpose:
// Charstring constant for the COAP POST request event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_POST := "COAP req: POST";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_PUT
//
// Purpose:
// Integer constant for the COAP PUT request event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_PUT := 3;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_PUT
//
// Purpose:
// Charstring constant for the COAP PUT request event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_PUT := "COAP req: PUT";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_DELETE
//
// Purpose:
// Integer constant for the COAP DELETE request event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_DELETE := 4;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_DELETE
//
// Purpose:
// Charstring constant for the COAP DELETE request event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_DELETE := "COAP req: DELETE";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_OBSERVE
//
// Purpose:
// Integer constant for the COAP OBSERVE request event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_OBSERVE := 5;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_OBSERVE
//
// Purpose:
// Charstring constant for the COAP OBSERVE request event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_OBSERVE := "COAP req: OBSERVE";
template charstring c_COAP_eventName(in integer p_code) := "COAP rsp: "&int2str(p_code);
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_1xx
//
// Purpose:
// Integer constant for the COAP 1xx reponse event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_1xx := 700;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_1xx
//
// Purpose:
// Charstring constant for the COAP 1xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_1xx := "COAP rsp: 1xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_2xx
//
// Purpose:
// Integer constant for the COAP 2xx reponse event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_2xx := 701;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_2xx
//
// Purpose:
// Charstring constant for the COAP 2xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_2xx := "COAP rsp: 2xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_3xx
//
// Purpose:
// Integer constant for the COAP 3xx reponse event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_3xx := 702;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_3xx
//
// Purpose:
// Charstring constant for the COAP 3xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_3xx := "COAP rsp: 3xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_4xx
//
// Purpose:
// Integer constant for the COAP 4xx response event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_4xx := 703;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_4xx
//
// Purpose:
// Charstring constant for the COAP 4xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_4xx := "COAP rsp: 4xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_5xx
//
// Purpose:
// Integer constant for the COAP 5xx response event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_5xx := 704;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_5xx
//
// Purpose:
// Charstring constant for the COAP 5xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_5xx := "COAP rsp: 5xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_6xx
//
// Purpose:
// Integer constant for the COAP 6xx response event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_6xx := 705;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_6xx
//
// Purpose:
// Charstring constant for the COAP 6xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_6xx := "COAP rsp: 6xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_3xxto6xx
//
// Purpose:
// Integer constant for the COAP 3xx to 6xx response event
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_3xxto6xx := 706;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_3xxto6xx
//
// Purpose:
// Charstring constant for the COAP 3xx to 6xx response event
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_3xxto6xx := "COAP rsp: 3xxto6xx";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_transportSucc
//
// Purpose:
// Integer constant for the COAP transport succesful indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_transportSucc := 707;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_transportSucc
//
// Purpose:
// Charstring constant for the COAP transport succesful indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_transportSucc := "COAP transport: succ rsp";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_transportFail
//
// Purpose:
// Integer constant for the COAP transport failure indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_transportFail := 708;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_transportFail
//
// Purpose:
// Charstring constant for the COAP transport failure indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_transportFail := "COAP transport: fail rsp";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_trRST
//
// Purpose:
// Integer constant for the COAP transaction reset indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_trRST := 709;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_trRST
//
// Purpose:
// Charstring constant for the COAP transaction reset indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_trRST := "COAP transaction: reset";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_trTimeout
//
// Purpose:
// Integer constant for the COAP transaction timeout indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_trTimeout := 710;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_trTimeout
//
// Purpose:
// Charstring constant for the COAP transaction timeout indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_trTimeout := "COAP transaction: timeout";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_observeCanceled
//
// Purpose:
// Integer constant for the COAP observation canceled indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_observeCanceled := 711;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_observeCanceled
//
// Purpose:
// Charstring constant for the COAP observation canceled indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_observeCanceled := "COAP observe: canceled";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_resourceNotObservedIndication
//
// Purpose:
// Integer constant for the indication which is sent when there are no observers for a resource
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_resourceNotObservedIndication := 712;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_resourceNotObservedIndication
//
// Purpose:
// Charstring constant for the indication which is sent when there are no observers for a resource
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_resourceNotObservedIndication := "COAP observe: resource not observed";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_dtlsConnectionClosed
//
// Purpose:
// Integer constant for the COAP transport DTLS connection closed indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_dtlsConnectionClosed := 713;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_dtlsConnectionClosed
//
// Purpose:
// Charstring constant for the COAP transport DTLS connection closed indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_dtlsConnectionClosed := "COAP transport: DTLS connection closed";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_BLOCK1_init
//
// Purpose:
// Integer constant for the initial (num=0) Block1 request indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_BLOCK1_init := 714;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_BLOCK1_init
//
// Purpose:
// Charstring constant for the initial (num=0) Block1 request indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_BLOCK1_init := "COAP block1: first block indication";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_BLOCK1_block
//
// Purpose:
// Integer constant for Block1 request indication (not first, not last)
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_BLOCK1_block := 715;
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_BLOCK1_block
//
// Purpose:
// Charstring constant for Block1 request indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_BLOCK1_block := "COAP block1: block indication";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_BLOCK1_last
//
// Purpose:
// Integer constant for the last Block1 request indication
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_BLOCK1_last := 716
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_BLOCK1_last
//
// Purpose:
// Charstring constant for the last Block1 request indication
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_BLOCK1_last := "COAP block1: last block indication";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_BLOCK1_atomic_succ
//
// Purpose:
// Integer constant for indicating that the atomic block1 transfer was succesfully finished
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_BLOCK1_atomic_succ := 717
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_BLOCK1_atomic_succ
//
// Purpose:
// Charstring constant for indicating that the atomic block1 transfer was succesfully finished
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_BLOCK1_atomic_succ := "COAP block1: atomic succesfully finished";
///////////////////////////////////////////////////////////
// const: c_COAP_eventIdx_BLOCK1_atomic_fail
//
// Purpose:
// Integer constant for indicating that the atomic block1 transfer was unsuccesfully finished
///////////////////////////////////////////////////////////
const integer c_COAP_eventIdx_BLOCK1_atomic_fail := 718
///////////////////////////////////////////////////////////
// const: c_COAP_eventName_BLOCK1_atomic_fail
//
// Purpose:
// Charstring constant for indicating that the atomic block1 transfer was succesfully finished
///////////////////////////////////////////////////////////
const charstring c_COAP_eventName_BLOCK1_atomic_fail := "COAP block1: atomic unsuccesfully finished";
// Steps
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_init
//
// Purpose:
// Integer constant for the COAP init test step
//
// Related Function:
// - <f_COAP_step_init>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_init := 0;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_init
//
// Purpose:
// Charstring constant for the COAP init test step
//
// Related Function:
// - <f_COAP_step_init>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_init := "COAP Applib: init";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_cleanUp
//
// Purpose:
// Integer constant for the COAP cleanUp test step
//
// Related Function:
// - <f_COAP_step_cleanUp>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_cleanUp := 1;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_cleanUp
//
// Purpose:
// Charstring constant for the COAP cleanUp test step
//
// Related Function:
// - <f_COAP_step_cleanUp>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_cleanUp := "COAP Applib: cleanUp";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_setLocalAddress
//
// Purpose:
// Integer constant for the COAP setLocalAddress test step
//
// Related Function:
// - <f_COAP_step_setLocalAddress>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_setLocalAddress := 2;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_setLocalAddress
//
// Purpose:
// Charstring constant for the COAP setLocalAddress test step
//
// Related Function:
// - <f_COAP_step_setLocalAddress>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_setLocalAddress := "COAP Applib: setLocalAddress";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_setRemoteAddress_byIntIdx
//
// Purpose:
// Integer constant for the COAP setRemoteAddress test step
//
// Related Function:
// - <f_COAP_step_setRemoteAddress_byIntIdx>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_setRemoteAddress_byIntIdx := 3;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_setRemoteAddress_byIntIdx
//
// Purpose:
// Charstring constant for the COAP setRemoteAddress test step
//
// Related Function:
// - <f_COAP_step_setRemoteAddress_byIntIdx>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_setRemoteAddress_byIntIdx := "COAP Applib: setRemoteAddress_byIntIdx";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_send
//
// Purpose:
// Integer constant for the COAP send test step
//
// Related Function:
// - <f_COAP_step_send>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_send := 4;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_send
//
// Purpose:
// Charstring constant for the COAP send test step
//
// Related Function:
// - <f_COAP_step_send>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_send := "COAP Applib: send";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_loadTemplate_byIntIdx
//
// Purpose:
// Integer constant for the COAP loadTemplate test step
//
// Related Function:
// - <f_COAP_step_loadTemplate_byIntIdx>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_loadTemplate_byIntIdx := 5;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_loadTemplate_byIntIdx
//
// Purpose:
// Charstring constant for the COAP loadTemplate step
//
// Related Function:
// - <f_COAP_step_loadTemplate_byIntIdx>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_loadTemplate_byIntIdx := "COAP Applib: loadTemplate_byIntIdx";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_handleRequest
//
// Purpose:
// Integer constant for the COAP handleRequest test step
//
// Related Function:
// - <f_COAP_step_handleRequest>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_handleRequest := 6;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_handleRequest
//
// Purpose:
// Charstring constant for the COAP handleRequest step
//
// Related Function:
// - <f_COAP_step_handleRequest>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_handleRequest := "COAP Applib: handleRequest";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_sendResponse
//
// Purpose:
// Integer constant for the COAP sendResponse test step
//
// Related Function:
// - <f_COAP_step_sendResponse>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_sendResponse := 7;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_sendResponse
//
// Purpose:
// Charstring constant for the COAP sendResponse step
//
// Related Function:
// - <f_COAP_step_sendResponse>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_sendResponse := "COAP Applib: sendResponse";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_sendAccept
//
// Purpose:
// Integer constant for the COAP sendAccept test step
//
// Related Function:
// - <f_COAP_step_sendAccept>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_sendAccept := 8;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_sendAccept
//
// Purpose:
// Charstring constant for the COAP sendAccept step
//
// Related Function:
// - <f_COAP_step_sendAccept>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_sendAccept := "COAP Applib: sendAccept";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_startListening
//
// Purpose:
// Integer constant for the COAP startListening test step
//
// Related Function:
// - <f_COAP_step_startListening>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_startListening := 9;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_startListening
//
// Purpose:
// Charstring constant for the COAP startListening step
//
// Related Function:
// - <f_COAP_step_startListening>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_startListening := "COAP Applib: startListening";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_reportCoapEventForEntity
//
// Purpose:
// Integer constant for the COAP reportCoapEventForEntity test step
//
// Related Function:
// - <f_COAP_step_reportCoapEventForEntity>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_reportCoapEventForEntity := 10;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_reportCoapEventForEntity
//
// Purpose:
// Charstring constant for the COAP reportCoapEventForEntity step
//
// Related Function:
// - <f_COAP_step_reportCoapEventForEntity>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_reportCoapEventForEntity := "COAP Applib: reportCoapEventForEntity";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_loadTemplate_byStringId
//
// Purpose:
// Integer constant for the COAP loadTemplate test step
//
// Related Function:
// - <f_COAP_step_loadTemplate_byStringId>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_loadTemplate_byStringId := 11;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_loadTemplate_byStringId
//
// Purpose:
// Charstring constant for the COAP loadTemplate step
//
// Related Function:
// - <f_COAP_step_loadTemplate_byStringId>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_loadTemplate_byStringId := "COAP Applib: loadTemplate_byStringId";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_setRemoteAddress_byVars
//
// Purpose:
// Integer constant for the COAP setRemoteAddress test step
//
// Related Function:
// - <f_COAP_step_setRemoteAddress_byVars>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_setRemoteAddress_byVars := 12;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_setRemoteAddress_byVars
//
// Purpose:
// Charstring constant for the COAP setRemoteAddress step
//
// Related Function:
// - <f_COAP_step_setRemoteAddress_byVars>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_setRemoteAddress_byVars := "COAP Applib: setRemoteAddress_byVars";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_sendNotification_byIntIdx
//
// Purpose:
// Integer constant for the COAP sendNotification test step
//
// Related Function:
// - <f_COAP_step_sendNotification_byIntIdx>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_sendNotification_byIntIdx := 13;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_sendNotification_byIntIdx
//
// Purpose:
// Charstring constant for the COAP sendNotification step
//
// Related Function:
// - <f_COAP_step_sendNotification_byIntIdx>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_sendNotification_byIntIdx := "COAP Applib: sendNotification_byIntIdx";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_sendNotification_byStringId
//
// Purpose:
// Integer constant for the COAP sendNotification test step
//
// Related Function:
// - <f_COAP_step_sendNotification_byStringId>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_sendNotification_byStringId := 14;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_sendNotification_byStringId
//
// Purpose:
// Charstring constant for the COAP sendNotification step
//
// Related Function:
// - <f_COAP_step_sendNotification_byStringId>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_sendNotification_byStringId := "COAP Applib: sendNotification_byStringId";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_removeResourceObservations_byIntIdx
//
// Purpose:
// Integer constant for the COAP removeResourceObservations test step
//
// Related Function:
// - <f_COAP_step_removeResourceObservations_byIntIdx>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_removeResourceObservations_byIntIdx := 15;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_removeResourceObservations_byIntIdx
//
// Purpose:
// Charstring constant for the COAP removeResourceObservations step
//
// Related Function:
// - <f_COAP_step_removeResourceObservations_byIntIdx>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_removeResourceObservations_byIntIdx := "COAP Applib: removeResourceObservations_byIntIdx";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_removeResourceObservations_byStringId
//
// Purpose:
// Integer constant for the COAP removeResourceObservations test step
//
// Related Function:
// - <f_COAP_step_removeResourceObservations_byStringId>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_removeResourceObservations_byStringId := 16;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_removeResourceObservations_byStringId
//
// Purpose:
// Charstring constant for the COAP removeResourceObservations step
//
// Related Function:
// - <f_COAP_step_removeResourceObservations_byStringId>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_removeResourceObservations_byStringId := "COAP Applib: removeResourceObservations_byStringId";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_startDTLS
//
// Purpose:
// Integer constant for the COAP startDTLS test step
//
// Related Function:
// - <f_COAP_step_startDTLS>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_startDTLS := 17;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_startDTLS
//
// Purpose:
// Charstring constant for the COAP startDTLS step
//
// Related Function:
// - <f_COAP_step_startDTLS>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_startDTLS := "COAP Applib: startDTLS";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_startDTLS_byVarIds
//
// Purpose:
// Integer constant for the COAP startDTLS test step
//
// Related Function:
// - <f_COAP_step_startDTLS_byVarIds>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_startDTLS_byVarIds := 18;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_startDTLS_byVarIds
//
// Purpose:
// Charstring constant for the COAP startDTLS step
//
// Related Function:
// - <f_COAP_step_startDTLS_byVarIds>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_startDTLS_byVarIds := "COAP Applib: startDTLS_byVarIds";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_startDTLS_byIntIdx
//
// Purpose:
// Integer constant for the COAP startDTLS test step
//
// Related Function:
// - <f_COAP_step_startDTLS_byIntIdx>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_startDTLS_byIntIdx := 19;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_startDTLS_byIntIdx
//
// Purpose:
// Charstring constant for the COAP startDTLS step
//
// Related Function:
// - <f_COAP_step_startDTLS_byIntIdx>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_startDTLS_byIntIdx := "COAP Applib: startDTLS_byIntIdx";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_confirmableNotificationForEntity
//
// Purpose:
// Integer constant for the COAP confirmableNotificationForEntity test step
//
// Related Function:
// - <f_COAP_step_confirmableNotificationForEntity>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_confirmableNotificationForEntity := 20;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_confirmableNotificationForEntity
//
// Purpose:
// Charstring constant for the COAP confirmableNotificationForEntity step
//
// Related Function:
// - <f_COAP_step_confirmableNotificationForEntity>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_confirmableNotificationForEntity := "COAP Applib: confirmableNotificationForEntity";
///////////////////////////////////////////////////////////
// const: c_COAP_stepIdx_setPreferredBlocksize
//
// Purpose:
// Integer constant for the COAP setPreferredBlocksize test step
//
// Related Function:
// - <f_COAP_step_setPreferredBlocksize>
///////////////////////////////////////////////////////////
const integer c_COAP_stepIdx_setPreferredBlocksize := 21;
///////////////////////////////////////////////////////////
// const: c_COAP_stepName_setPreferredBlocksize
//
// Purpose:
// Charstring constant for the COAP setPreferredBlocksize step
//
// Related Function:
// - <f_COAP_step_setPreferredBlocksize>
///////////////////////////////////////////////////////////
const charstring c_COAP_stepName_setPreferredBlocksize := "COAP Applib: setPreferredBlocksize";
// Step parameters:
const integer c_COAP_stepParam_true := 1;
const integer c_COAP_stepParam_false := 0;
}