| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // 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: InfluxDB_Definitions.ttcn |
| // Description: |
| // Rev: R1A |
| // Prodnr: LPA 108 661 |
| // Updated: 2017-09-01 |
| // Contact: http://ttcn.ericsson.se |
| /////////////////////////////////////////////////////////////////////////////// |
| module InfluxDB_Definitions |
| { |
| import from IPL4asp_Types all; |
| import from IPL4asp_PortType all; |
| |
| modulepar integer tsp_InfluxDB_client_basePort := 9000; |
| |
| type component InfluxDB_CT |
| { |
| var InfluxDBContext v_InfluxDB_ctx := c_InfluxDBContext_empty; |
| |
| var ASP_SendTo v_InfluxDB_sendAsp; |
| var charstring v_InfluxDB_msgToSend_encoded; |
| var InfluxLineProtocol v_InfluxDB_msgToSend; |
| |
| port IPL4asp_PT INFLUXDB_PCO; |
| } |
| |
| type record InfluxDBContext |
| { |
| integer connId, |
| integer connId_listen, |
| charstring remoteHost, |
| integer remotePort, |
| charstring localHost, |
| integer localPort |
| } |
| with { extension "done" } |
| |
| const InfluxDBContext c_InfluxDBContext_empty := |
| { |
| connId := -1, |
| connId_listen := -1, |
| remoteHost := "127.0.0.1", |
| remotePort := 8089, |
| localHost := "127.0.0.1", |
| localPort := 9000 |
| } |
| |
| type record InfluxLineProtocol |
| { |
| charstring measurement, |
| InfluxAttrValue_List tagSet, |
| InfluxAttrValue_List fieldSet |
| } |
| |
| const InfluxLineProtocol c_InfluxLineProtocol_empty := |
| { |
| measurement := "", |
| tagSet := {}, |
| fieldSet := {} |
| } |
| |
| type record of InfluxAttrValue InfluxAttrValue_List; |
| |
| type record InfluxAttrValue |
| { |
| charstring name, |
| charstring val |
| } |
| } |