/////////////////////////////////////////////////////////////////////////////// | |
// | |
// Copyright (c) 2000-2017 Ericsson Telecom AB | |
// | |
// All rights reserved. This program and the accompanying materials | |
// are made available under the terms of the Eclipse Public License v1.0 | |
// which accompanies this distribution, and is available at | |
// http://www.eclipse.org/legal/epl-v10.html | |
/////////////////////////////////////////////////////////////////////////////// | |
// File: EPTF_LwM2M_LGen_Definitions.ttcn | |
// Description: | |
// Rev: R1A | |
// Prodnr: CNL 113 859 | |
// Updated: 2017-09-01 | |
// Contact: http://ttcn.ericsson.se | |
/////////////////////////////////////////////////////////////////////////////// | |
module EPTF_LwM2M_LGen_Definitions | |
{ | |
import from EPTF_CLL_LGenBase_Definitions all; | |
import from EPTF_CLL_Logging_Definitions all; | |
import from EPTF_CLL_FBQ_Definitions all; | |
import from EPTF_LwM2M_Object_Definitions all; | |
import from EPTF_LwM2M_Transport_Definitions all; | |
import from LightweightM2M_Types all; | |
modulepar boolean tsp_EPTF_LwM2M_LGen_debug := false; | |
modulepar boolean tsp_EPTF_LwM2M_LGen_debugVerbose := false; | |
modulepar integer tsp_EPTF_LwM2M_LGen_maxBindableCtx := -1; | |
modulepar LwM2M_Template_List tsp_EPTF_LwM2M_LGen_templates := {}; | |
const integer c_LwM2M_LGen_Logging_WARNING := 0; | |
const integer c_LwM2M_LGen_Logging_DEBUG := 1; | |
const integer c_LwM2M_LGen_Logging_DEBUGV := 2; | |
const integer c_LwM2M_LGen_Logging_ERROR := 3; | |
const charstring c_LwM2M_behaviorType := "LWM2M Behavior"; | |
type record LwM2M_EntityCtx | |
{ | |
integer eIdx, | |
integer currentDevice | |
} | |
const LwM2M_EntityCtx c_LwM2M_EntityCtx_init := | |
{ | |
eIdx := -1, | |
currentDevice := -1 | |
} | |
type record of LwM2M_EntityCtx LwM2M_EntityCtx_List; | |
type record LwM2M_EntityCtx_DB | |
{ | |
EPTF_FreeBusyQueue queue, | |
LwM2M_EntityCtx_List data, | |
integer hashRef | |
} | |
type record LwM2M_Device | |
{ | |
Location registeredLocation, | |
LwM2M_ObjectDB objects, | |
LwM2M_Device_State state | |
} | |
type enumerated LwM2M_Device_State | |
{ | |
NOT_REGISTERED, | |
REGISTERED | |
} | |
const LwM2M_Device c_LwM2M_Device_init := | |
{ | |
registeredLocation := {}, | |
objects := c_LwM2M_ObjectDB_init, | |
state := NOT_REGISTERED | |
} | |
type record of LwM2M_Device LwM2M_Device_List; | |
type record LwM2M_Device_DB | |
{ | |
EPTF_FreeBusyQueue queue, | |
LwM2M_Device_List data, | |
integer hashRef | |
} | |
type record LwM2M_Template | |
{ | |
charstring id, | |
LWM2M_PDU msg | |
} | |
type record of LwM2M_Template LwM2M_Template_List; | |
type record LwM2M_Template_DB | |
{ | |
LwM2M_Template_List data, | |
integer hashRef | |
} | |
type record LwM2M_StepCtx | |
{ | |
integer eIdx, | |
integer fsmIdx, | |
integer eCtxIdx, | |
integer deviceIdx | |
} | |
const LwM2M_StepCtx c_LwM2M_StepCtx_empty := | |
{ | |
eIdx := -1, | |
fsmIdx := -1, | |
eCtxIdx := -1, | |
deviceIdx := -1 | |
} | |
type component EPTF_LwM2M_LGen_CT extends EPTF_LwM2M_Transport_User_CT, EPTF_LGenBase_CT, EPTF_Logging_CT | |
{ | |
var boolean v_LwM2M_initialized := false; | |
var integer v_LwM2M_bIdx; | |
var integer v_LwM2M_loggingMaskId := -1; | |
var LwM2M_ObjectSpecificationDB v_LwM2M_ObjectSpecificationDB; | |
var LwM2M_EntityCtx_DB v_LwM2M_EntityCtxDB; | |
var LwM2M_Device_DB v_LwM2M_DeviceDB; | |
var LwM2M_Template_DB v_LwM2M_templateDB := {}; | |
var LwM2M_StepCtx v_LwM2M_ctx := c_LwM2M_StepCtx_empty; | |
var EPTF_LwM2M_PDU v_LwM2M_msgToProcess; | |
var EPTF_LwM2M_PDU v_LwM2M_msgToSend; | |
} | |
// FSM AppData | |
const integer c_LwM2M_AppData_deviceIdx := 0; | |
// Events | |
const integer c_LwM2M_eventIdx_Register := 0; | |
const charstring c_LwM2M_eventName_Register := "LWM2M req: Register"; | |
const integer c_LwM2M_eventIdx_Update := 1; | |
const charstring c_LwM2M_eventName_Update := "LWM2M req: Update"; | |
const integer c_LwM2M_eventIdx_Deregister := 2; | |
const charstring c_LwM2M_eventName_Deregister := "LWM2M req: Deregister"; | |
const integer c_LwM2M_eventIdx_Read := 3; | |
const charstring c_LwM2M_eventName_Read := "LWM2M req: Read"; | |
const integer c_LwM2M_eventIdx_Write := 4; | |
const charstring c_LwM2M_eventName_Write := "LWM2M req: Write"; | |
const integer c_LwM2M_eventIdx_Execute := 5; | |
const charstring c_LwM2M_eventName_Execute := "LWM2M req: Execute"; | |
const integer c_LwM2M_eventIdx_Create := 6; | |
const charstring c_LwM2M_eventName_Create := "LWM2M req: Create"; | |
const integer c_LwM2M_eventIdx_Delete := 7; | |
const charstring c_LwM2M_eventName_Delete := "LWM2M req: Delete"; | |
const integer c_LwM2M_eventIdx_1xx := 700; | |
const charstring c_LwM2M_eventName_1xx := "LWM2M rsp: 1xx"; | |
const integer c_LwM2M_eventIdx_2xx := 701; | |
const charstring c_LwM2M_eventName_2xx := "LWM2M rsp: 2xx"; | |
const integer c_LwM2M_eventIdx_3xx := 702; | |
const charstring c_LwM2M_eventName_3xx := "LWM2M rsp: 3xx"; | |
const integer c_LwM2M_eventIdx_4xx := 703; | |
const charstring c_LwM2M_eventName_4xx := "LWM2M rsp: 4xx"; | |
const integer c_LwM2M_eventIdx_5xx := 704; | |
const charstring c_LwM2M_eventName_5xx := "LWM2M rsp: 5xx"; | |
const integer c_LwM2M_eventIdx_6xx := 705; | |
const charstring c_LwM2M_eventName_6xx := "LWM2M rsp: 6xx"; | |
const integer c_LwM2M_eventIdx_3xxto6xx := 706; | |
const charstring c_LwM2M_eventName_3xxto6xx := "LWM2M rsp: 3xxto6xx"; | |
// Steps | |
const integer c_LwM2M_stepIdx_loadTemplate_byIntIdx := 0; | |
const charstring c_LwM2M_stepName_loadTemplate_byIntIdx := "LWM2M Applib: loadTemplate_byIntIdx"; | |
const integer c_LwM2M_stepIdx_send := 1; | |
const charstring c_LwM2M_stepName_send := "LWM2M Applib: send"; | |
const integer c_LwM2M_stepIdx_createDevice := 2; | |
const charstring c_LwM2M_stepName_createDevice := "LWM2M Applib: createDevice"; | |
const integer c_LwM2M_stepIdx_cleanupDevice := 3; | |
const charstring c_LwM2M_stepName_cleanupDevice := "LWM2M Applib: cleanupDevice"; | |
const integer c_LwM2M_stepIdx_logDevice := 4; | |
const charstring c_LwM2M_stepName_logDevice := "LWM2M Applib: logDevice"; | |
const integer c_LwM2M_stepIdx_createObject := 5; | |
const charstring c_LwM2M_stepName_createObject := "LWM2M Applib: createObject"; | |
const integer c_LwM2M_stepIdx_createObjectInstance := 6; | |
const charstring c_LwM2M_stepName_createObjectInstance := "LWM2M Applib: createObjectInstance"; | |
const integer c_LwM2M_stepIdx_handleReadRequest := 7; | |
const charstring c_LwM2M_stepName_handleReadRequest := "LWM2M Applib: handleReadRequest"; | |
const integer c_LwM2M_stepIdx_handleWriteRequest := 8; | |
const charstring c_LwM2M_stepName_handleWriteRequest := "LWM2M Applib: handleWriteRequest"; | |
const integer c_LwM2M_stepIdx_handleExecuteRequest := 9; | |
const charstring c_LwM2M_stepName_handleExecuteRequest := "LWM2M Applib: handleExecuteRequest"; | |
const integer c_LwM2M_stepIdx_loadTemplate_byStringId := 10; | |
const charstring c_LwM2M_stepName_loadTemplate_byStringId := "LWM2M Applib: loadTemplate_byStringId"; | |
const integer c_LwM2M_stepParam_createObjectInstance_DoNotAddResources := 0; | |
} |