Nextion User Manual
For Arduino developers
NexObject.cpp
Go to the documentation of this file.
1 
15 #include "NexObject.h"
16 
17 NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name)
18 {
19  this->__pid = pid;
20  this->__cid = cid;
21  this->__name = name;
22 }
23 
24 uint8_t NexObject::getObjPid(void)
25 {
26  return __pid;
27 }
28 
29 uint8_t NexObject::getObjCid(void)
30 {
31  return __cid;
32 }
33 
34 const char* NexObject::getObjName(void)
35 {
36  return __name;
37 }
38 
40 {
41  dbSerialPrint("[");
42  dbSerialPrint((uint32_t)this);
43  dbSerialPrint(":");
44  dbSerialPrint(__pid);
45  dbSerialPrint(",");
46  dbSerialPrint(__cid);
47  dbSerialPrint(",");
48  if (__name)
49  {
50  dbSerialPrint(__name);
51  }
52  else
53  {
54  dbSerialPrint("(null)");
55  }
56  dbSerialPrintln("]");
57 }
58 
NexObject(uint8_t pid, uint8_t cid, const char *name)
Constructor.
Definition: NexObject.cpp:17
The definition of class NexObject.
void printObjInfo(void)
Print current object'address, page id, component id and name.
Definition: NexObject.cpp:39