| Documentation For Arduino users

- Main Page
- Related Pages
- Modules
- Classes
- Files
- Examples

- File List
- File Members

NexButton.cpp
Go to the documentation of this file.
1
16 #include "NexButton.h"
17
18 NexButton::NexButton(uint8_t pid, uint8_t cid, const char *name)
19 :NexTouch(pid, cid, name)
20 {
21 }
22
23 uint16_t NexButton::getText(char *buffer, uint16_t len)
24 {
25 String cmd;
26 cmd += "get ";
27 cmd += getObjName();
28 cmd += ".txt";
29 sendCommand(cmd.c_str());
30 return recvRetString(buffer,len);
31 }
32
33 bool NexButton::setText(const char *buffer)
34 {
35 String cmd;
36 cmd += getObjName();
37 cmd += ".txt=\"";
38 cmd += buffer;
39 cmd += "\"";
40 sendCommand(cmd.c_str());
41 return recvRetCommandFinished();
42 }
43
NexButton::NexButton
NexButton(uint8_t pid, uint8_t cid, const char *name)
Constructor.
Definition: NexButton.cpp:18
NexButton::getText
uint16_t getText(char *buffer, uint16_t len)
Get text attribute of component.
Definition: NexButton.cpp:23
NexButton.h
The definition of class NexButton.
NexButton::setText
bool setText(const char *buffer)
Set text attribute of component.
Definition: NexButton.cpp:33
NexTouch
Father class of the components with touch events.
Definition: NexTouch.h:53