semilimes mcu sdk 1.1.4 semilimes Software Development Kit for microcontrollers

Loading...
Searching...
No Matches
fc_switch.h
1#ifndef _fc_switch_
2#define _fc_switch_
3
4#include "../defines.h"
5
6 class FcSwitch
7{
8 private:
9 SmeJson json_data;
10 char* json = nullptr;
11
12 public:
13// Function: ~FcSwitch
14
15// distructor of the class, frees up the memory occupied by the array/s
16
17// Prototype:
18// ~FcSwitch()
19
20// Parameters:
21
22// Returns:
24 ~FcSwitch()
25 {
26 delete[] json;
27 json = nullptr;
28 }
29
30// Function: FcSwitch.set
31
32// An on/off switch
33
34// Prototype:
35// void FcSwitch::set(const char* refname,const char* title,bool value);
36
37// Parameters:
41
42// Returns:
44
45 void set(const char* refname,const char* title,bool value);
46
47// Function: FcSwitch.get
48
49// return the json script
50
51// Prototype:
52// void FcSwitch::get();
53
54// Parameters:
55
56// Returns:
58 char* get();
59};
60
61#endif
FcSwitch
Definition fc_switch.h:7
FcSwitch::~FcSwitch
~FcSwitch()
Definition fc_switch.h:24
FcSwitch::set
void set(const char *refname, const char *title, bool value)
Definition fc_switch.cpp:18
FcSwitch::get
char * get()
Definition fc_switch.cpp:42