Separate library that holds helper functions for the main OMF code.
osisoft-omf.h
- Committer:
- danielelopez
- Date:
- 2018-02-02
- Revision:
- 1:1c31b413ba0c
- Parent:
- 0:6156b29d3c91
- Child:
- 8:e5fe40b77f8f
File content as of revision 1:1c31b413ba0c:
//Copyright 2017 OSIsoft, LLC // //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License at // //<http://www.apache.org/licenses/LICENSE-2.0> // //Unless required by applicable law or agreed to in writing, software //distributed under the License is distributed on an "AS IS" BASIS, //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //See the License for the specific language governing permissions and //limitations under the License. #ifndef OSISOFT_OMF_H #define OSISOFT_OMF_H #include "mbed.h" #include "https_request.h" // ************************************************************************ // Helper function that casts floats into strings // ************************************************************************ string OMFLib_float_to_string(float f); // ************************************************************************ // Helper function that sends an actual web request // ************************************************************************ void OMFLib_sendMessageToEndpoint(TLSSocket* socket, const char* action, const char* message_type, const char* body); // ************************************************************************ // Helper function that sends an actual web request; does not reuse sockets // ************************************************************************ void OMFLib_sendMessageToEndpoint_NoSocketReuse(NetworkInterface* network, const char* action, const char* message_type, const char* body); // ************************************************************************ // Helper function: prints out an HTTP response // ************************************************************************ void OMFLib_dump_response(HttpResponse* res); // ************************************************************************ // Gets the current time in the appropriate OMF format // ************************************************************************ string OMFLib_getCurrentTimeString(); // ************************************************************************ // Sets the clock via NTP via the nwtwork // ************************************************************************ void OMFLib_syncClockViaNTP(NetworkInterface* network); #endif