blob: e5f9d96a98f3011c7e80f5eede85e32b312fd284 [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: IFW_CoAP_Peer_Definitions.ttcn
// Description:
// Rev: <RnXnn>
// Prodnr: CNL 113 910
// Updated: 2020-02-06
// Contact: http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
module IFW_CoAP_Peer_Definitions
{
import from CoAP_Types all;
import from IPL4asp_Types all;
import from IPL4asp_PortType all;
import from IFW_Common all;
type component IFW_COAP_CT extends IFW_BASE_CT
{
var CoapContext ctx := CoapContext_empty;
var CoAP_ReqResp msgToSend := c_CoAP_ReqResp_empty;
var CoAP_ReqResp lastReceived := c_CoAP_ReqResp_empty;
var ASP_SendTo_List buffer := {};
port IPL4asp_PT IPL4_PCO;
}
type record CoapContext
{
integer connId,
boolean temporarilyUnavailable,
integer connId_listen,
charstring remoteHost,
integer remotePort,
ProtoTuple connectProtocol,
OptionList connectOptions,
charstring localHost,
integer localPort,
ProtoTuple listeningProtocol,
OptionList listeningOptions,
boolean cherryPickOptionsCheck,
Charstring_List locationPath
}
with { extension "done" }
type record CoapPSKParameters
{
charstring identity,
charstring key
}
const CoapContext CoapContext_empty :=
{
connId := -1,
temporarilyUnavailable := false,
connId_listen := -1,
remoteHost := "",
remotePort := -1,
connectProtocol := { udp := {} },
connectOptions := {{reuseAddress := {enable := true}}},
localHost := "",
localPort := -1,
listeningProtocol := { udp := {} },
listeningOptions := {{reuseAddress := {enable := true}}},
cherryPickOptionsCheck := false,
locationPath := {}
}
type record of ASP_SendTo ASP_SendTo_List;
const CoAP_ReqResp c_CoAP_ReqResp_empty :=
{
header :=
{
version := 1,
msg_type := CONFIRMABLE,
code :=
{
class := 0,
detail := 0
},
message_id := 0
},
token := ''O,
options := omit,
payload := omit
}
template CoAP_ReqResp t_CoAP_ReqResp_empty :=
{
header :=
{
version := ?,
msg_type := ?,
code :=
{
class := ?,
detail := ?
},
message_id := ?
},
token := ?,
options := *,
payload := *
}
type record of UCHAR0_255 Charstring_List;
type enumerated MID_Generation {
GENERATE_NEW_MID,
USE_GIVEN_MID,
USE_LAST_RECEIVED_MID
}
type enumerated Token_Generation {
GENERATE_NEW_TOKEN,
USE_GIVEN_TOKEN,
USE_LAST_RECEIVED_TOKEN
}
type enumerated MID_Check {
CHECK_MID,
DO_NOT_CHECK_MID
}
}