Commit 9ecfb1c7 authored by fmg005's avatar fmg005

header file for prosim library

parent d39aca98
#ifndef Prosim_H
#define Prosim_H
#include <string>
#include <iostream>
#include <cstdio>
#include <chrono>
#include <thread>
#include <map>
#include <libconfig.h++>
#include "serial/serial.h"
#include "CLA_Logger.h"
#include "Environment.h"
#include "Action.h"
#include "Pump.h"
#include "Monitor.h"
#include "PatientOut.h"
/* Pulse header files */
#include "PulsePhysiologyEngine.h"
#include "properties/SEScalarTime.h"
#include "properties/SEScalarPressure.h"
#include "properties/SEScalarFrequency.h"
#include "engine/SEEngineTracker.h"
#include "system/physiology/SECardiovascularSystem.h"
#include "system/physiology/SEBloodChemistrySystem.h"
#include "system/physiology/SERespiratorySystem.h"
using namespace std;
using namespace libconfig;
using namespace std::chrono;
class Prosim : public PatientOut {
private:
serial::Serial* m_serial;
CLA::Environment m_env;
double systolic_pressure;
double diastolic_pressure;
double heart_rate;
double resp_rate;
double oxygen_sat;
std::shared_ptr<CLA::LOGGER> m_logger;
std::map<std::string, CLA::Pump*> m_pumps;
size_t SendCommand(string);
string GetResponse();
void Clear();
string mode;
/* chrono */
system_clock::time_point m_start;
system_clock::time_point m_engine_advance_end;
system_clock::time_point m_command_start;
system_clock::time_point m_command_end;
system_clock::time_point m_infusion_start;
system_clock::time_point m_infusion_end;
time_t m_delta;
time_t m_next_update_time;
time_t m_engine_duration_ms;
time_t m_command_duration_ms;
time_t m_infusion_duration_ms;
time_t m_next_update_time_duration_ms;
time_t m_total_duration_ms;
public:
Prosim(std::shared_ptr<CLA::LOGGER>& logger, CLA::Environment&,\
std::map<std::string, CLA::Pump*>&);
~Prosim();
bool isOpen();
void SetHeartRate(double);
void SetRespRate(double);
void SetOxygenSat(double);
void SetIBP(int, double, double);
void SetRemoteMode();
void SetLocalMode();
string GetCurrentMode();
void update(std::unique_ptr<PhysiologyEngine>&);
};
#endif
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