Commit 64050d8c authored by fmg005's avatar fmg005

wrapper for pump client

parent c00b215f
#include "Pump.h"
using namespace CLA;
/* wrapper for tcp client */
Pump::Pump(const string& substance, const string& topic, const string& type) : m_substance(substance),
m_tcp_pump_client(topic, type) {
m_tcp_pump_client.initialize(); /* connection to server via tcp socket */
double Pump::getCurrentInfusionRate () {
if (m_substance == "Norepinephrine") {
current_rate = m_tcp_pump_client.getCurrentInfusionRate(m_substance);
else if (m_substance == "Saline") {
current_rate = m_tcp_pump_client.getCurrentInfusionRate(m_substance);
return current_rate;
string Pump::getSubstance() const {
return m_substance;
Pump::~Pump() {
#ifndef PUMP_H
#define PUMP_H
#include <string.h>
#include <iostream>
#include "tcp_pump_client.h"
using namespace std;
namespace CLA {
class Pump {
/* wrapper for tcp client */
CLA::tcp_pump_client m_tcp_pump_client;
string m_substance;
double current_rate;
Pump(const string&, const string&,const string&);
string getSubstance() const ;
double getCurrentInfusionRate();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment