| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // 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 // |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_ILog_Transport_Definitions |
| // |
| // Purpose: |
| // This module contains type definitions for demo of EPTF ILog |
| // Transport layer |
| // |
| // Module Parameters: |
| // - |
| // |
| // Module depends on: |
| // <EPTF_CLL_ILog_Functions> |
| // |
| // Current Owner: |
| // Jozsef Gyurusi (ethjgi) |
| // |
| // Last Review Date: |
| // - |
| // |
| // Detailed Comments: |
| // - |
| /////////////////////////////////////////////////////////// |
| |
| module EPTF_ILog_Transport_Definitions { |
| |
| import from EPTF_CLL_ILog_Definitions all; |
| import from EPTF_CLL_Common_Definitions all; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ILog_Transport_MsgType |
| // |
| // Purpose: |
| // Dummy message type. Contains no data. |
| // |
| /////////////////////////////////////////////////////////// |
| type record EPTF_ILog_Transport_MsgType {}; |
| |
| type union EPTF_ILog_Transport_RequestMsg { |
| EPTF_ILog_Transport_MsgType Begin, |
| EPTF_ILog_Transport_MsgType End, |
| EPTF_ILog_Transport_MsgType Invoke |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ILog_Transport_ResponseMsg |
| // |
| // Purpose: |
| // Defines the type for response message |
| // |
| // Elements: |
| // OK - <EPTF_ILog_Transport_MsgType> - OK message, response sent to Begin,End,Invoke |
| // NOK - <EPTF_ILog_Transport_MsgType> - NOK message, response sent to Begin,End,Invoke |
| // |
| /////////////////////////////////////////////////////////// |
| type union EPTF_ILog_Transport_ResponseMsg { |
| EPTF_ILog_Transport_MsgType OK, // response sent to Begin,End,Invoke |
| EPTF_ILog_Transport_MsgType NOK // response sent to Begin,End,Invoke |
| } |
| |
| type union EPTF_ILog_Transport_UserMsg { |
| EPTF_ILog_Transport_RequestMsg req, |
| EPTF_ILog_Transport_ResponseMsg resp |
| } |
| |
| type record EPTF_ILog_Transport_Msg { |
| integer connId, |
| integer transactionId, |
| EPTF_ILog_Transport_UserMsg msg |
| } |
| |
| // type union EPTF_ILog_Transport_Mngmnt_Msg { |
| // integer Connect, // notify remote PTC about conn |
| // integer Disco // notify remote PTC about disconn |
| // } |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ILog_Transport_RespHandler_FT |
| // |
| // Purpose: |
| // Function type for handling responses. |
| // |
| // Parameters: |
| // pl_ILogChainIds - *in* <EPTF_IntegerList> - chain list that belong to the request sent |
| // pl_connId - *in* *integer* - connectionId |
| // pl_transactionId - *in* *integer* - transactionId |
| // pl_msg - *in* <EPTF_ILog_Transport_ResponseMsg> - the message received |
| // |
| /////////////////////////////////////////////////////////// |
| type function EPTF_ILog_Transport_RespHandler_FT( |
| in EPTF_IntegerList pl_ILogChainIds, |
| in integer pl_connId, |
| in integer pl_transactionId, |
| in EPTF_ILog_Transport_ResponseMsg pl_msg |
| ) runs on self; |
| |
| type record of EPTF_ILog_Transport_RespHandler_FT EPTF_ILog_Transport_RespHandler_FT_List; |
| |
| type record EPTF_ILog_Transport_ResponseWeights { |
| float OK, |
| float NOK, |
| float ErroneousResp, |
| float NoResp |
| } |
| |
| |
| type record EPTF_ILog_Transport_Transaction { |
| EPTF_IntegerList chainIds |
| } |
| |
| type record of EPTF_ILog_Transport_Transaction EPTF_ILog_Transport_Transactions; |
| |
| // connection data for connected components |
| type record EPTF_ILog_Transport_ConnectionData { |
| EPTF_ILog_Transport_CT remoteComp, |
| integer transactionId, |
| EPTF_IntegerList connectionChainIds, |
| EPTF_ILog_Transport_Transactions transactions |
| } |
| |
| type record EPTF_ILog_Transport_Connection { |
| integer connId |
| } |
| |
| type record EPTF_ILog_Transport_Disconnection { |
| integer connId |
| } |
| |
| type record EPTF_ILog_Transport_Request { |
| integer connId, |
| integer transactionId, |
| EPTF_ILog_Transport_RequestMsg msg |
| } |
| |
| type record EPTF_ILog_Transport_Response { |
| integer connId, |
| integer transactionId, |
| EPTF_ILog_Transport_ResponseMsg msg |
| } |
| |
| type union EPTF_ILog_Transport_ILogElement { |
| EPTF_ILog_Transport_Connection connection, |
| EPTF_ILog_Transport_Disconnection disconnection, |
| EPTF_ILog_Transport_Request request, |
| EPTF_ILog_Transport_Response response |
| } |
| |
| type record of EPTF_ILog_Transport_ILogElement EPTF_ILog_Transport_ILogElementList; |
| |
| type record of EPTF_ILog_Transport_ConnectionData EPTF_ILog_Transport_ConnectionDB; |
| |
| const EPTF_ILog_Transport_ConnectionData c_ILog_Transport_connectionDB_new := { |
| null, |
| -1, |
| {}, |
| {} |
| } |
| |
| type port EPTF_ILog_Transport_PT message { |
| inout EPTF_ILog_Transport_Msg; |
| // inout EPTF_ILog_Transport_Mngmnt_Msg; |
| } with {extension "internal"} |
| |
| |
| /////////////////////////////////////////////////////////// |
| // Type: EPTF_ILog_Transport_CT |
| // |
| // Purpose: |
| // Defines a demonstrative transport layer for ILog Logging |
| // |
| // Elements: |
| // v_msgPort - <EPTF_ILog_Transport_PT> - port on which messages are sent |
| // v_ILog_Transport_eventHandler - *default* - default altstep reference |
| // v_ILog_Transport_connId - *integer* - last connection ID |
| // v_ILog_Transport_connectionDB - <EPTF_ILog_Transport_ConnectionDB> - connection database |
| // v_respHandlerFns - <EPTF_ILog_Transport_RespHandler_FT_List> - database for response handler function |
| // v_ILog_Transport_responseWeights - <EPTF_ILog_Transport_ResponseWeights> - weight factors to generate different responses to the requests |
| // v_ILog_Transport_dbId - *integer* - the ILog database id |
| // v_ILog_Transport_ILogElementList - <EPTF_ILog_Transport_ILogElementList> - database of the log items |
| // |
| // Detailed Comments: |
| // |
| /////////////////////////////////////////////////////////// |
| type component EPTF_ILog_Transport_CT extends EPTF_ILog_CT { |
| private port EPTF_ILog_Transport_PT v_msgPort; |
| private var default v_ILog_Transport_eventHandler := null; |
| private var integer v_ILog_Transport_connId; |
| private var EPTF_ILog_Transport_ConnectionDB v_ILog_Transport_connectionDB; |
| private var EPTF_ILog_Transport_RespHandler_FT_List v_respHandlerFns; |
| private var EPTF_ILog_Transport_ResponseWeights v_ILog_Transport_responseWeights; |
| private var integer v_ILog_Transport_dbId; |
| private var EPTF_ILog_Transport_ILogElementList v_ILog_Transport_ILogElementList; |
| } |
| |
| } //module EPTF_ILog_Transport_Definitions |