| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // Copyright (c) 2000-2018 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_MQTT_Transport_Definitions.ttcn |
| // Description: |
| // Rev: R1A |
| // Prodnr: CNL 113 860 |
| // Updated: 2017-09-01 |
| // Contact: http://ttcn.ericsson.se |
| /////////////////////////////////////////////////////////////////////////////// |
| module EPTF_MQTT_Transport_Definitions |
| { |
| import from MQTT_v3_1_1_Types all; |
| import from IPL4asp_Types all; |
| |
| type function fcb_EPTF_MQTT_Transport_receiveMessage(in EPTF_MQTT_PDU pl_message) runs on self; |
| type function fcb_EPTF_MQTT_Transport_receiveEvent(in ASP_Event p_event) runs on self; |
| type function fcb_EPTF_MQTT_Transport_sendMessage(in EPTF_MQTT_PDU pl_msg) runs on self; |
| type function fcb_EPTF_MQTT_Transport_apiRequest(in EPTF_MQTT_Transport_Request pl_req) runs on self; |
| type function fcb_EPTF_MQTT_Transport_apiResponse(in EPTF_MQTT_Transport_Response pl_rsp) runs on self; |
| |
| type record EPTF_MQTT_PDU |
| { |
| MQTT_v3_1_1_ReqResp pdu, |
| EPTF_MQTT_TransportParameters transportParams, |
| integer sessionIdx |
| } |
| |
| type record EPTF_MQTT_TransportParameters |
| { |
| Socket localAddress, |
| Socket remoteAddress, |
| ProtoTuple proto |
| } |
| |
| type record EPTF_MQTT_Transport_Request |
| { |
| integer sessionIdx, |
| boolean expectResponse, |
| EPTF_MQTT_Transport_RequestParams params optional |
| } |
| |
| const EPTF_MQTT_Transport_Request c_EPTF_MQTT_Transport_Request_init := |
| { |
| sessionIdx := -1, |
| expectResponse := true, |
| params := omit |
| } |
| |
| type union EPTF_MQTT_Transport_RequestParams |
| { |
| EPTF_MQTT_Transport_startListening startListening, |
| EPTF_MQTT_Transport_connect connect_, |
| EPTF_MQTT_Transport_close close |
| } |
| |
| type record EPTF_MQTT_Transport_startListening |
| { |
| Socket localAddress |
| } |
| |
| type record EPTF_MQTT_Transport_connect |
| { |
| Socket localAddress, |
| Socket remoteAddress |
| } |
| |
| type record EPTF_MQTT_Transport_close |
| { |
| Socket localAddress |
| } |
| |
| type record EPTF_MQTT_Transport_Response |
| { |
| boolean succ, |
| integer sessionIdx, |
| EPTF_MQTT_Transport_ResponseParams params optional |
| } |
| |
| const EPTF_MQTT_Transport_Response c_EPTF_MQTT_Transport_Response_init := |
| { |
| succ := false, |
| sessionIdx := -1, |
| params := omit |
| } |
| |
| type union EPTF_MQTT_Transport_ResponseParams |
| { |
| boolean listening, |
| Socket connectionClosed |
| } |
| |
| type component EPTF_MQTT_Transport_Provider_CT |
| { |
| var fcb_EPTF_MQTT_Transport_receiveMessage vf_EPTF_MQTT_Transport_receiveMessage := null; |
| var fcb_EPTF_MQTT_Transport_receiveEvent vf_EPTF_MQTT_Transport_receiveEvent := null; |
| var fcb_EPTF_MQTT_Transport_apiResponse vf_EPTF_MQTT_Transport_apiResponse := null; |
| } |
| |
| type component EPTF_MQTT_Transport_User_CT |
| { |
| var fcb_EPTF_MQTT_Transport_sendMessage vf_EPTF_MQTT_Transport_send := null; |
| var fcb_EPTF_MQTT_Transport_apiRequest vf_EPTF_MQTT_Transport_apiRequest := null; |
| } |
| } |