Removed multithtreading (thanks windows)
This commit is contained in:
parent
e0135b6753
commit
d62fda675a
8 changed files with 23 additions and 24 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
// #include <mutex>
|
||||
|
||||
#include "microinverter.h"
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ typedef _modbus modbus_t;
|
|||
class Dtu {
|
||||
private:
|
||||
std::shared_ptr<modbus_t*> modbus_context;
|
||||
std::mutex modbus_context_mutex;
|
||||
// std::mutex modbus_context_mutex;
|
||||
|
||||
std::vector<Microinverter> microinverters;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
// #include <mutex>
|
||||
|
||||
#include "port.h"
|
||||
|
||||
|
|
@ -13,12 +13,12 @@ typedef _modbus modbus_t;
|
|||
class Microinverter {
|
||||
private:
|
||||
std::shared_ptr<modbus_t*> modbus_context;
|
||||
std::mutex *modbus_context_mutex;
|
||||
// std::mutex *modbus_context_mutex;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
Microinverter(std::shared_ptr<modbus_t*> modbus_context, std::mutex *modbus_context_mutex, long serialNumber);
|
||||
Microinverter(std::shared_ptr<modbus_t*> modbus_context, long serialNumber);
|
||||
|
||||
long serialNumber;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
// #include <mutex>
|
||||
|
||||
#include "portParametersGeneric.h"
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ typedef _modbus modbus_t;
|
|||
class Port {
|
||||
private:
|
||||
std::shared_ptr<modbus_t*> modbus_context;
|
||||
std::mutex *modbus_context_mutex;
|
||||
// std::mutex *modbus_context_mutex;
|
||||
|
||||
uint16_t portStartAddress;
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ class Port {
|
|||
bool currentFixed;
|
||||
|
||||
public:
|
||||
Port(std::shared_ptr<modbus_t*> modbus_context, std::mutex *modbus_context_mutex, uint16_t portStartAddress);
|
||||
Port(std::shared_ptr<modbus_t*> modbus_context, uint16_t portStartAddress);
|
||||
|
||||
std::vector<std::shared_ptr<PortParameter>> parameters;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
// #include <mutex>
|
||||
|
||||
struct _modbus;
|
||||
typedef _modbus modbus_t;
|
||||
|
|
@ -40,7 +40,7 @@ class PortParameter {
|
|||
|
||||
virtual std::string getOutputValue();
|
||||
|
||||
void updateValue(std::shared_ptr<modbus_t*> modbus_context, std::mutex *modbus_context_mutex, uint16_t portStartAddress);
|
||||
void updateValue(std::shared_ptr<modbus_t*> modbus_context, uint16_t portStartAddress);
|
||||
};
|
||||
|
||||
class PortParameterFloat : virtual public PortParameter {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue