datetime.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 #ifndef __OPC_UA_BINARY_DATE_TIME__H__
00012 #define __OPC_UA_BINARY_DATE_TIME__H__
00013 
00014 #include <stdint.h>
00015 #include <time.h>
00016 
00017 namespace OpcUa
00018 {
00019 
00020   struct DateTime
00021   {
00022     DateTime()
00023       : Value(0)
00024     {
00025     }
00026 
00027     explicit DateTime(int64_t value)
00028       : Value(value)
00029     {
00030     }
00031 
00032     static DateTime Current();
00033     static DateTime FromTimeT(time_t t, unsigned usec = 0);
00034     static time_t ToTimeT(DateTime dateTime);
00035 
00036     DateTime(const DateTime&) = default;
00037     DateTime& operator=(const DateTime&) = default;
00038     DateTime& operator+=(const DateTime& val)
00039     {
00040       Value += val.Value;
00041       return *this;
00042     }
00043 
00044     operator int64_t() const
00045     {
00046       return Value;
00047     }
00048 
00049     int64_t Value;
00050   };
00051 
00052 
00053   typedef double Duration; // Time duration in miliseconds.
00054 
00055 } // OpcUa
00056 
00057 
00058 #endif // __OPC_UA_BINARY_DATE_TIME__H__
00059 


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Sat Jun 8 2019 18:24:40