SensESP
2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
timestring.cpp
Go to the documentation of this file.
1
2
#include "
timestring.h
"
3
4
namespace
sensesp
{
5
6
TimeString::TimeString
(
String
config_path
)
7
:
Transform
<
time_t
,
String
>(
config_path
) {}
8
9
void
TimeString::set_input
(
time_t
input,
uint8_t
inputChannel
) {
10
char
buf
[
sizeof
"2011-10-08T07:07:09Z"
];
11
strftime
(
buf
,
sizeof
buf
,
"%FT%TZ"
,
gmtime
(&input));
12
this->
emit
(
String
(
buf
));
13
}
14
15
}
// namespace sensesp
sensesp::LambdaTransform
Construct a new transform based on a single function.
Definition
lambda_transform.h:71
sensesp::TimeString::TimeString
TimeString(String config_path="")
Definition
timestring.cpp:6
sensesp::TimeString::set_input
virtual void set_input(time_t input, uint8_t input_channel=0) override
Definition
timestring.cpp:9
sensesp::Transform
The main Transform class. A transform is identified primarily by the type of value that is produces (...
Definition
transform.h:54
sensesp::ValueProducer::emit
void emit(T new_value)
Definition
valueproducer.h:109
sensesp
Definition
sensesp.h:22
timestring.h
src
sensesp
transforms
timestring.cpp
Generated by
1.9.8