| Documentation For Arduino users

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

- File List
- File Members

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