3D-ICE 3.0.0
IceWrapper.h
Go to the documentation of this file.
1/******************************************************************************
2 * This file is part of 3D-ICE, version 3.1.0 . *
3 * *
4 * 3D-ICE is free software: you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free *
6 * Software Foundation, either version 3 of the License, or any later *
7 * version. *
8 * *
9 * 3D-ICE is distributed in the hope that it will be useful, but WITHOUT *
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
12 * more details. *
13 * *
14 * You should have received a copy of the GNU General Public License along *
15 * with 3D-ICE. If not, see <http://www.gnu.org/licenses/>. *
16 * *
17 * Copyright (C) 2021 *
18 * Embedded Systems Laboratory - Ecole Polytechnique Federale de Lausanne *
19 * All Rights Reserved. *
20 * *
21 * Authors: Arvind Sridhar Alessandro Vincenzi *
22 * Giseong Bak Martino Ruggiero *
23 * Thomas Brunschwiler Eder Zulian *
24 * Federico Terraneo Darong Huang *
25 * Luis Costero Marina Zapater *
26 * David Atienza *
27 * *
28 * For any comment, suggestion or request about 3D-ICE, please register and *
29 * write to the mailing list (see http://listes.epfl.ch/doc.cgi?liste=3d-ice) *
30 * Any usage of 3D-ICE for research, commercial or other purposes must be *
31 * properly acknowledged in the resulting products or publications. *
32 * *
33 * EPFL-STI-IEL-ESL Mail : 3d-ice@listes.epfl.ch *
34 * Batiment ELG, ELG 130 (SUBSCRIPTION IS NECESSARY) *
35 * Station 11 *
36 * 1015 Lausanne, Switzerland Url : http://esl.epfl.ch/3d-ice *
37 ******************************************************************************/
38
43#ifndef ICEWRAPPER_H
44#define ICEWRAPPER_H
45
46#include <iostream>
47#include <systemc.h>
48#include <string>
49#include <fstream>
50
51#include "network_socket.h"
52#include "network_message.h"
53
62{
63 private:
64 // Network Related Variables:
65 std::string serverIP;
66 unsigned int serverPort;
67 Socket_t client_socket;
68 NetworkMessage_t client_nflp,
69 client_powers,
70 client_simulate,
71 client_tmap,
72 client_temperatures,
73 server_reply;
74
75 // 3D Structure related:
76 unsigned int numberOfFloorplanElements;
77
78 public:
89 IceWrapper(std::string serverIp, unsigned int portNumber);
90
97
98 private:
104 bool openConnection();
105
111 bool closeConnection();
112
120 void getMap(OutputType_t type, std::string filename);
121
122 public:
128
138 void sendPowerValues(std::vector<float> *powerValues);
139
145 void simulate();
146
154 void getTemperature(std::vector<float> &TemperatureValues, OutputInstant_t instant, OutputType_t type, OutputQuantity_t quantity);
155
161 void getTemperatureMap(std::string filename);
162
168 void getPowerMap(std::string filename);
169};
170
171#endif /* ICEWRAPPER_H */
172
SystemC/TLM-2.0 wrapper for 3D-ICE.
Definition: IceWrapper.h:62
unsigned int getNumberOfFloorplanElements()
void simulate()
void getTemperatureMap(std::string filename)
void getTemperature(std::vector< float > &TemperatureValues, OutputInstant_t instant, OutputType_t type, OutputQuantity_t quantity)
void getPowerMap(std::string filename)
void sendPowerValues(std::vector< float > *powerValues)
IceWrapper(std::string serverIp, unsigned int portNumber)
Structure used to store messages to be sent over network.
Structure used to set up and use network connections.
OutputType_t
Definition: types.h:500
OutputInstant_t
Definition: types.h:525
OutputQuantity_t
Definition: types.h:477