tes
Dependencies: NetServices mbed C027_Supports mbed-rpcx
RtuRpc.h@0:64967b7043c2, 2019-08-06 (annotated)
- Committer:
- irsanjul
- Date:
- Tue Aug 06 12:59:05 2019 +0000
- Revision:
- 0:64967b7043c2
testes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
irsanjul | 0:64967b7043c2 | 1 | #ifndef RTURPC_H |
irsanjul | 0:64967b7043c2 | 2 | #define RTURPC_H |
irsanjul | 0:64967b7043c2 | 3 | |
irsanjul | 0:64967b7043c2 | 4 | #include "HTTPClient.h" |
irsanjul | 0:64967b7043c2 | 5 | #include <string> |
irsanjul | 0:64967b7043c2 | 6 | #include <ctime> |
irsanjul | 0:64967b7043c2 | 7 | |
irsanjul | 0:64967b7043c2 | 8 | class RtuRpc |
irsanjul | 0:64967b7043c2 | 9 | { |
irsanjul | 0:64967b7043c2 | 10 | public: |
irsanjul | 0:64967b7043c2 | 11 | |
irsanjul | 0:64967b7043c2 | 12 | RtuRpc(std::string host); |
irsanjul | 0:64967b7043c2 | 13 | |
irsanjul | 0:64967b7043c2 | 14 | void commitReading(const std::time_t &dt, int readingId, double value); |
irsanjul | 0:64967b7043c2 | 15 | |
irsanjul | 0:64967b7043c2 | 16 | void commitEvent(const std::time_t &dt, int eventId, double value); |
irsanjul | 0:64967b7043c2 | 17 | |
irsanjul | 0:64967b7043c2 | 18 | private: |
irsanjul | 0:64967b7043c2 | 19 | |
irsanjul | 0:64967b7043c2 | 20 | std::string hostAddr; |
irsanjul | 0:64967b7043c2 | 21 | |
irsanjul | 0:64967b7043c2 | 22 | HTTPClient cl; |
irsanjul | 0:64967b7043c2 | 23 | |
irsanjul | 0:64967b7043c2 | 24 | }; |
irsanjul | 0:64967b7043c2 | 25 | |
irsanjul | 0:64967b7043c2 | 26 | #endif |