diff --git a/NexButton.cpp b/NexButton.cpp old mode 100644 new mode 100755 index c8a8fc3..37aa3a9 --- a/NexButton.cpp +++ b/NexButton.cpp @@ -41,3 +41,311 @@ bool NexButton::setText(const char *buffer) return recvRetCommandFinished(); } + +uint32_t NexButton::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_press_background_color_bco2(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_press_background_color_bco2(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco2="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_press_font_color_pco2(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_press_font_color_pco2(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco2="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_background_cropi_picc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_press_background_crop_picc2(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_press_background_crop_picc2(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc2="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_background_image_pic(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_background_image_pic(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexButton::Get_press_background_image_pic2(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexButton::Set_press_background_image_pic2(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic2="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} diff --git a/NexButton.h b/NexButton.h old mode 100644 new mode 100755 index 8dae2ac..66d01c7 --- a/NexButton.h +++ b/NexButton.h @@ -56,7 +56,183 @@ public: /* methods */ * @param buffer - text buffer terminated with '\0'. * @return true if success, false for failure. */ - bool setText(const char *buffer); + bool setText(const char *buffer); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get bco2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_background_color_bco2(uint32_t *number); + + /** + * Set bco2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_background_color_bco2(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get pco2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_font_color_pco2(uint32_t *number); + + /** + * Set pco2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_font_color_pco2(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_background_cropi_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get picc2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_background_crop_picc2(uint32_t *number); + + /** + * Set picc2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_background_crop_picc2(uint32_t number); + + /** + * Get pic attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); + + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); + + /** + * Get pic2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_background_image_pic2(uint32_t *number); + + /** + * Set pic2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_background_image_pic2(uint32_t number); }; /** * @} diff --git a/NexCheckbox.cpp b/NexCheckbox.cpp new file mode 100755 index 00000000..5ba205d --- /dev/null +++ b/NexCheckbox.cpp @@ -0,0 +1,99 @@ +/** + * @file NexCheckbox.cpp + * + * The implementation of class NexCheckbox. + * + * @author huang xiaoming (email:) + * @date 2016/9/13 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ +#include "NexCheckbox.h" + +NexCheckbox::NexCheckbox(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +uint32_t NexCheckbox::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexCheckbox::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexCheckbox::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexCheckbox::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexCheckbox::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexCheckbox::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} \ No newline at end of file diff --git a/NexCheckbox.h b/NexCheckbox.h new file mode 100755 index 00000000..d398286 --- /dev/null +++ b/NexCheckbox.h @@ -0,0 +1,97 @@ +/** + * @file NexCheckbox.h + * + * The definition of class NexCheckbox. + * + * @author huang xiaoming (email:) + * @date 2016/9/13 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXCHECKBOX_H__ +#define __NEXCHECKBOX_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexButton component. + * + * Commonly, you want to do something after push and pop it. It is recommanded that only + * call @ref NexTouch::attachPop to satisfy your purpose. + * + * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. + */ +class NexCheckbox: public NexTouch +{ +public: /* methods */ + + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexCheckbox(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get val attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getValue(uint32_t *number); + + /** + * Set val attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); +}; +/** + * @} + */ + + +#endif /* #ifndef __NEXCHECKBOX_H__ */ \ No newline at end of file diff --git a/NexCrop.cpp b/NexCrop.cpp old mode 100644 new mode 100755 index 90b6a24..d8a3472 --- a/NexCrop.cpp +++ b/NexCrop.cpp @@ -20,6 +20,29 @@ NexCrop::NexCrop(uint8_t pid, uint8_t cid, const char *name) { } +bool NexCrop::Get_background_crop_picc(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexCrop::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + bool NexCrop::getPic(uint32_t *number) { String cmd = String("get "); diff --git a/NexCrop.h b/NexCrop.h old mode 100644 new mode 100755 index 4b1d1ea..2ce1342 --- a/NexCrop.h +++ b/NexCrop.h @@ -44,6 +44,26 @@ public: /* methods */ * @retval true - success. * @retval false - failed. */ + bool Get_background_crop_picc(uint32_t *number); + + /** + * Set the number of picture. + * + * @param number - the number of picture. + * + * @retval true - success. + * @retval false - failed. + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get the number of picture. + * + * @param number - an output parameter to save the number of picture. + * + * @retval true - success. + * @retval false - failed. + */ bool getPic(uint32_t *number); /** diff --git a/NexDualStateButton.cpp b/NexDualStateButton.cpp old mode 100644 new mode 100755 index debf709..7f2e5d0 --- a/NexDualStateButton.cpp +++ b/NexDualStateButton.cpp @@ -1,46 +1,347 @@ -/** - * @file NexDualStateButton.cpp - * - * The implementation of class NexDSButton. - * - * @author huang xianming (email:) - * @date 2015/11/11 - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#include "NexDualStateButton.h" - -NexDSButton::NexDSButton(uint8_t pid, uint8_t cid, const char *name) - :NexTouch(pid, cid, name) -{ -} - -bool NexDSButton::getValue(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".val"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::setValue(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".val="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - - +/** + * @file NexDualStateButton.cpp + * + * The implementation of class NexDSButton. + * + * @author huang xianming (email:) + * @date 2015/11/11 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#include "NexDualStateButton.h" + +NexDSButton::NexDSButton(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +bool NexDSButton::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint16_t NexDSButton::getText(char *buffer, uint16_t len) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".txt"; + sendCommand(cmd.c_str()); + return recvRetString(buffer,len); +} + +bool NexDSButton::setText(const char *buffer) +{ + String cmd; + cmd += getObjName(); + cmd += ".txt=\""; + cmd += buffer; + cmd += "\""; + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state0_color_bco0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state0_color_bco0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state1_color_bco1(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco1"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state1_color_bco1(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco1="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state0_crop_picc0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state0_crop_picc0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state1_crop_picc1(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc1"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state1_crop_picc1(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc1="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state0_image_pic0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state0_image_pic0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state1_image_pic1(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic1"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state1_image_pic1(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic1="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + + diff --git a/NexDualStateButton.h b/NexDualStateButton.h old mode 100644 new mode 100755 index ebda9e7..428baeb --- a/NexDualStateButton.h +++ b/NexDualStateButton.h @@ -1,67 +1,243 @@ -/** - * @file NexDualStateButton.h - * - * The definition of class NexDSButton. - * - * @author huang xianming (email:) - * @date 2015/11/11 - * - * - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#ifndef __NEXDSBUTTON_H__ -#define __NEXDSBUTTON_H__ - -#include "NexTouch.h" -#include "NexHardware.h" -/** - * @addtogroup Component - * @{ - */ - -/** - * NexDSButton component. - * - * Commonly, you want to do something after push and pop it. It is recommanded that only - * call @ref NexTouch::attachPop to satisfy your purpose. - * - * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. - */ -class NexDSButton: public NexTouch -{ -public: /* methods */ - /** - * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); - */ - NexDSButton(uint8_t pid, uint8_t cid, const char *name); - - /** - * Get number attribute of component. - * - * @param buffer - buffer storing text returned. - * @param len - length of buffer. - * @return The real length of text returned. - */ - bool getValue(uint32_t *number); - - /** - * Set number attribute of component. - * - * @param buffer - number buffer. - * @return true if success, false for failure. - */ - bool setValue(uint32_t number); -}; -/** - * @} - */ - - - -#endif /* #ifndef __NEXDSBUTTON_H__ */ +/** + * @file NexDualStateButton.h + * + * The definition of class NexDSButton. + * + * @author huang xianming (email:) + * @date 2015/11/11 + * + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXDSBUTTON_H__ +#define __NEXDSBUTTON_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexDSButton component. + * + * Commonly, you want to do something after push and pop it. It is recommanded that only + * call @ref NexTouch::attachPop to satisfy your purpose. + * + * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. + */ +class NexDSButton: public NexTouch +{ +public: /* methods */ + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexDSButton(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get number attribute of component. + * + * @param number - buffer storing text returned. + * @return The real length of text returned. + */ + bool getValue(uint32_t *number); + + /** + * Set number attribute of component. + * + * @param number - number buffer. + * @return true if success, false for failure. + */ + bool setValue(uint32_t number); + + /** + * Get text attribute of component. + * + * @param buffer - buffer storing text returned. + * @param len - length of buffer. + * @return The real length of text returned. + */ + uint16_t getText(char *buffer, uint16_t len); + + /** + * Set text attribute of component. + * + * @param buffer - text buffer terminated with '\0'. + * @return true if success, false for failure. + */ + bool setText(const char *buffer); + + /** + * Get bco0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state0_color_bco0(uint32_t *number); + + /** + * Set bco0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state0_color_bco0(uint32_t number); + + /** + * Get bco1 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state1_color_bco1(uint32_t *number); + + /** + * Set bco1 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state1_color_bco1(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get picc0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state0_crop_picc0(uint32_t *number); + + /** + * Set picc0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state0_crop_picc0(uint32_t number); + + /** + * Get picc1 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state1_crop_picc1(uint32_t *number); + + /** + * Set picc1 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state1_crop_picc1(uint32_t number); + + /** + * Get pic0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state0_image_pic0(uint32_t *number); + + /** + * Set pic0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state0_image_pic0(uint32_t number); + + /** + * Get pic1 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state1_image_pic1(uint32_t *number); + + /** + * Set pic1 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state1_image_pic1(uint32_t number); +}; +/** + * @} + */ + + + +#endif /* #ifndef __NEXDSBUTTON_H__ */ diff --git a/NexGauge.cpp b/NexGauge.cpp old mode 100644 new mode 100755 index 906f9fe..4f294fb --- a/NexGauge.cpp +++ b/NexGauge.cpp @@ -42,4 +42,117 @@ bool NexGauge::setValue(uint32_t number) sendCommand(cmd.c_str()); return recvRetCommandFinished(); } + +uint32_t NexGauge::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexGauge::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexGauge::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexGauge::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexGauge::Get_pointer_thickness_wid(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".wid"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexGauge::Set_pointer_thickness_wid(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".wid="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexGauge::Get_background_cropi_picc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexGauge::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + diff --git a/NexGauge.h b/NexGauge.h old mode 100644 new mode 100755 index 5abf7f7..10796ab --- a/NexGauge.h +++ b/NexGauge.h @@ -54,6 +54,70 @@ public: /* methods */ * @retval false - failed. */ bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get wid attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_pointer_thickness_wid(uint32_t *number); + + /** + * Set wid attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_pointer_thickness_wid(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_cropi_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); }; /** diff --git a/NexNumber.cpp b/NexNumber.cpp old mode 100644 new mode 100755 index c372b7e..86217cb --- a/NexNumber.cpp +++ b/NexNumber.cpp @@ -1,44 +1,266 @@ -/** - * @file NexNumber.cpp - * - * The implementation of class NexNumber. - * - * @author huang xianming (email:) - * @date 2015/8/13 - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ -#include "NexNumber.h" - -NexNumber::NexNumber(uint8_t pid, uint8_t cid, const char *name) - :NexTouch(pid, cid, name) -{ -} - -bool NexNumber::getValue(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".val"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::setValue(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".val="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - +/** + * @file NexNumber.cpp + * + * The implementation of class NexNumber. + * + * @author huang xianming (email:) + * @date 2015/8/13 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ +#include "NexNumber.h" + +NexNumber::NexNumber(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +bool NexNumber::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_number_lenth(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".lenth"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_number_lenth(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".lenth="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_background_crop_picc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_background_image_pic(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_background_image_pic(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} \ No newline at end of file diff --git a/NexNumber.h b/NexNumber.h old mode 100644 new mode 100755 index 7b3cd75..5f22790 --- a/NexNumber.h +++ b/NexNumber.h @@ -1,60 +1,187 @@ -/** - * @file NexNumber.h - * - * The definition of class NexNumber. - * - * @author Wu Pengfei (email:) - * @date 2015/8/13 - * - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#ifndef __NEXNUMBER_H__ -#define __NEXNUMBER_H__ - -#include "NexTouch.h" -#include "NexHardware.h" -/** - * @addtogroup Component - * @{ - */ - -/** - * NexNumber component. - */ -class NexNumber: public NexTouch -{ -public: /* methods */ - /** - * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); - */ - NexNumber(uint8_t pid, uint8_t cid, const char *name); - - /** - * Get number attribute of component. - * - * @param buffer - buffer storing text returned. - * @param len - length of buffer. - * @return The real length of text returned. - */ - bool getValue(uint32_t *number); - - /** - * Set number attribute of component. - * - * @param buffer - number buffer. - * @return true if success, false for failure. - */ - bool setValue(uint32_t number); -}; - -/** - * @} - */ - -#endif /* #ifndef __NEXNUMBER_H__ */ +/** + * @file NexNumber.h + * + * The definition of class NexNumber. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXNUMBER_H__ +#define __NEXNUMBER_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexNumber component. + */ +class NexNumber: public NexTouch +{ +public: /* methods */ + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexNumber(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get number attribute of component. + * + * @param number - buffer storing text returned. + * @return The real length of text returned. + */ + bool getValue(uint32_t *number); + + /** + * Set number attribute of component. + * + * @param number - number buffer. + * @return true if success, false for failure. + */ + bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get lenth attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_number_lenth(uint32_t *number); + + /** + * Set lenth attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_number_lenth(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_crop_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get pic attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); + + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); +}; + +/** + * @} + */ + +#endif /* #ifndef __NEXNUMBER_H__ */ diff --git a/NexPicture.cpp b/NexPicture.cpp old mode 100644 new mode 100755 index ad4cd50..dc070c5 --- a/NexPicture.cpp +++ b/NexPicture.cpp @@ -20,6 +20,29 @@ NexPicture::NexPicture(uint8_t pid, uint8_t cid, const char *name) { } +bool NexPicture::Get_background_image_pic(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexPicture::Set_background_image_pic(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + bool NexPicture::getPic(uint32_t *number) { String cmd = String("get "); @@ -42,4 +65,3 @@ bool NexPicture::setPic(uint32_t number) sendCommand(cmd.c_str()); return recvRetCommandFinished(); } - diff --git a/NexPicture.h b/NexPicture.h old mode 100644 new mode 100755 index 19f86a0..efa36a4 --- a/NexPicture.h +++ b/NexPicture.h @@ -43,6 +43,26 @@ public: /* methods */ * @retval true - success. * @retval false - failed. */ + bool Get_background_image_pic(uint32_t *number); + + /** + * Set picture's number. + * + * @param number -the picture number. + * + * @retval true - success. + * @retval false - failed. + */ + bool Set_background_image_pic(uint32_t number); + + /** + * Get picture's number. + * + * @param number - an output parameter to save picture number. + * + * @retval true - success. + * @retval false - failed. + */ bool getPic(uint32_t *number); /** diff --git a/NexProgressBar.cpp b/NexProgressBar.cpp old mode 100644 new mode 100755 index 50c403f..245dda0 --- a/NexProgressBar.cpp +++ b/NexProgressBar.cpp @@ -43,3 +43,58 @@ bool NexProgressBar::setValue(uint32_t number) return recvRetCommandFinished(); } +uint32_t NexProgressBar::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexProgressBar::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexProgressBar::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexProgressBar::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} diff --git a/NexProgressBar.h b/NexProgressBar.h old mode 100644 new mode 100755 index af13b95..1948518 --- a/NexProgressBar.h +++ b/NexProgressBar.h @@ -54,6 +54,38 @@ public: /* methods */ * @retval false - failed. */ bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); }; /** diff --git a/NexRadio.cpp b/NexRadio.cpp new file mode 100755 index 00000000..c80aae5 --- /dev/null +++ b/NexRadio.cpp @@ -0,0 +1,99 @@ +/** + * @file NexRadio.cpp + * + * The implementation of class NexRadio. + * + * @author huang xiaoming (email:) + * @date 2016/9/13 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ +#include "NexRadio.h" + +NexRadio::NexRadio(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +uint32_t NexRadio::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexRadio::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexRadio::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexRadio::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexRadio::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexRadio::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} \ No newline at end of file diff --git a/NexRadio.h b/NexRadio.h new file mode 100755 index 00000000..c36dea7 --- /dev/null +++ b/NexRadio.h @@ -0,0 +1,98 @@ +/** + * @file NexRadio.h + * + * The definition of class NexRadio. + * + * @author huang xiaoming (email:) + * @date 2016/9/13 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXRADIO_H__ +#define __NEXRADIO_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexRadio component. + * + * Commonly, you want to do something after push and pop it. It is recommanded that only + * call @ref NexTouch::attachPop to satisfy your purpose. + * + * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. + */ +class NexRadio:public NexTouch +{ +public: /* methods */ + + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexRadio(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get val attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getValue(uint32_t *number); + + /** + * Set val attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + +}; +/** + * @} + */ + + +#endif /* #ifndef __NEXRADION_H__ */ \ No newline at end of file diff --git a/NexScrolltext.cpp b/NexScrolltext.cpp new file mode 100755 index 00000000..faa207a --- /dev/null +++ b/NexScrolltext.cpp @@ -0,0 +1,351 @@ +/** + * @file NexScrolltext.cpp + * + * The implementation of class NexScrolltext. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ +#include "NexScrolltext.h" + +NexScrolltext::NexScrolltext(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +uint16_t NexScrolltext::getText(char *buffer, uint16_t len) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".txt"; + sendCommand(cmd.c_str()); + return recvRetString(buffer,len); +} + +bool NexScrolltext::setText(const char *buffer) +{ + String cmd; + cmd += getObjName(); + cmd += ".txt=\""; + cmd += buffer; + cmd += "\""; + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_background_crop_picc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_background_image_pic(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_background_image_pic(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_scroll_dir(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".dir"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_scroll_dir(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".dir="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_scroll_distance(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".dis"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_scroll_distance(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + if (number < 2) + { + number = 2; + } + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".dis="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexScrolltext::Get_cycle_tim(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".tim"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexScrolltext::Set_cycle_tim(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + if (number < 8) + { + number = 8; + } + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".tim="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + + +bool NexScrolltext::enable(void) +{ + char buf[10] = {0}; + String cmd; + utoa(1, buf, 10); + cmd += getObjName(); + cmd += ".en="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +bool NexScrolltext::disable(void) +{ + char buf[10] = {0}; + String cmd; + utoa(0, buf, 10); + cmd += getObjName(); + cmd += ".en="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} diff --git a/NexScrolltext.h b/NexScrolltext.h new file mode 100755 index 00000000..caf7f1d --- /dev/null +++ b/NexScrolltext.h @@ -0,0 +1,223 @@ +/** + * @file NexScrolltext.h + * + * The definition of class NexScrolltext. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXSCROLLTEXT_H__ +#define __NEXSCROLLTEXT_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexText component. + */ +class NexScrolltext: public NexTouch +{ +public: /* methods */ + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexScrolltext(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get text attribute of component. + * + * @param buffer - buffer storing text returned. + * @param len - length of buffer. + * @return The real length of text returned. + */ + uint16_t getText(char *buffer, uint16_t len); + + /** + * Set text attribute of component. + * + * @param buffer - text buffer terminated with '\0'. + * @return true if success, false for failure. + */ + bool setText(const char *buffer); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_crop_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get pic attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); + + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); + + /** + * Get dir attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_scroll_dir(uint32_t *number); + + /** + * Set dir attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_scroll_dir(uint32_t number); + + /** + * Get dis attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_scroll_distance(uint32_t *number); + + /** + * Set dis attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_scroll_distance(uint32_t number); + + /** + * Get tim attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_cycle_tim(uint32_t *number); + + /** + * Set tim attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_cycle_tim(uint32_t number); + + bool enable(void); + bool disable(void); +}; + +/** + * @} + */ + +#endif /* #ifndef __NEXSCROLLTEXT_H__ */ \ No newline at end of file diff --git a/NexSlider.cpp b/NexSlider.cpp old mode 100644 new mode 100755 index e714662..43ace8c --- a/NexSlider.cpp +++ b/NexSlider.cpp @@ -42,3 +42,170 @@ bool NexSlider::setValue(uint32_t number) return recvRetCommandFinished(); } +uint32_t NexSlider::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexSlider::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexSlider::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexSlider::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexSlider::Get_pointer_thickness_wid(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".wid"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexSlider::Set_pointer_thickness_wid(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".wid="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexSlider::Get_cursor_height_hig(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".hig"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexSlider::Set_cursor_height_hig(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".hig="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexSlider::getMaxval(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".maxval"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexSlider::setMaxval(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".maxval="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexSlider::getMinval(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".minval"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexSlider::setMinval(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".minval="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} \ No newline at end of file diff --git a/NexSlider.h b/NexSlider.h old mode 100644 new mode 100755 index 7b22b6a..47cac68 --- a/NexSlider.h +++ b/NexSlider.h @@ -54,6 +54,102 @@ public: /* methods */ * @retval false - failed. */ bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get wid attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_pointer_thickness_wid(uint32_t *number); + + /** + * Set wid attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_pointer_thickness_wid(uint32_t number); + + /** + * Get hig attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_cursor_height_hig(uint32_t *number); + + /** + * Set hig attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_cursor_height_hig(uint32_t number); + + /** + * Get maxval attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getMaxval(uint32_t *number); + + /** + * Set maxval attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setMaxval(uint32_t number); + + /** + * Get minval attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getMinval(uint32_t *number); + + /** + * Set minval attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setMinval(uint32_t number); }; /** * @} diff --git a/NexText.cpp b/NexText.cpp old mode 100644 new mode 100755 index b59c475..0f1e4d4 --- a/NexText.cpp +++ b/NexText.cpp @@ -40,3 +40,195 @@ bool NexText::setText(const char *buffer) return recvRetCommandFinished(); } +uint32_t NexText::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexText::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexText::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexText::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexText::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexText::Get_background_crop_picc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexText::Get_background_image_pic(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexText::Set_background_image_pic(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + + diff --git a/NexText.h b/NexText.h old mode 100644 new mode 100755 index 44dc7c4..d2f4787 --- a/NexText.h +++ b/NexText.h @@ -51,6 +51,118 @@ public: /* methods */ * @return true if success, false for failure. */ bool setText(const char *buffer); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_crop_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get pic attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); + + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); }; /** diff --git a/NexTimer.cpp b/NexTimer.cpp old mode 100644 new mode 100755 index 2f2b57e..9d69527 --- a/NexTimer.cpp +++ b/NexTimer.cpp @@ -1,86 +1,115 @@ -/** - * @file NexTimer.cpp - * - * The implementation of class NexTimer. - * - * @author huang xianming (email:) - * @date 2015/8/26 - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#include "NexTimer.h" - -NexTimer::NexTimer(uint8_t pid, uint8_t cid, const char *name) - :NexTouch(pid, cid, name) -{ -} - -void NexTimer::attachTimer(NexTouchEventCb timer, void *ptr) -{ - NexTouch::attachPop(timer, ptr); -} - -void NexTimer::detachTimer(void) -{ - NexTouch::detachPop(); -} - -bool NexTimer::getCycle(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".tim"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexTimer::setCycle(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - if (number < 50) - { - number = 50; - } - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".tim="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - - -bool NexTimer::enable(void) -{ - char buf[10] = {0}; - String cmd; - utoa(1, buf, 10); - cmd += getObjName(); - cmd += ".en="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -bool NexTimer::disable(void) -{ - char buf[10] = {0}; - String cmd; - utoa(0, buf, 10); - cmd += getObjName(); - cmd += ".en="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - - +/** + * @file NexTimer.cpp + * + * The implementation of class NexTimer. + * + * @author huang xianming (email:) + * @date 2015/8/26 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#include "NexTimer.h" + +NexTimer::NexTimer(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +void NexTimer::attachTimer(NexTouchEventCb timer, void *ptr) +{ + NexTouch::attachPop(timer, ptr); +} + +void NexTimer::detachTimer(void) +{ + NexTouch::detachPop(); +} + +bool NexTimer::getCycle(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".tim"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexTimer::setCycle(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + if (number < 50) + { + number = 50; + } + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".tim="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + + +bool NexTimer::enable(void) +{ + char buf[10] = {0}; + String cmd; + utoa(1, buf, 10); + cmd += getObjName(); + cmd += ".en="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +bool NexTimer::disable(void) +{ + char buf[10] = {0}; + String cmd; + utoa(0, buf, 10); + cmd += getObjName(); + cmd += ".en="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexTimer::Get_cycle_tim(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".tim"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexTimer::Set_cycle_tim(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + if (number < 8) + { + number = 8; + } + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".tim="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + diff --git a/NexTimer.h b/NexTimer.h old mode 100644 new mode 100755 index c37d776..2bb24a6 --- a/NexTimer.h +++ b/NexTimer.h @@ -1,105 +1,120 @@ -/** - * @file NexTimer.h - * - * The definition of class NexTimer. - * - * @author huang xianming (email:) - * @date 2015/8/26 - * - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#ifndef __NEXTIMER_H__ -#define __NEXTIMER_H__ - -#include "NexTouch.h" -#include "NexHardware.h" -/** - * @addtogroup Component - * @{ - */ - -/** - * NexTimer component. - * - * Commonly, you want to do something after set timer cycle and enable it,and the cycle value - * must be greater than 50 - * - */ -class NexTimer: public NexTouch -{ -public: /* methods */ - - /** - * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); - */ - NexTimer(uint8_t pid, uint8_t cid, const char *name); - - /** - * Attach an callback function of timer respond event. - * - * @param timer - callback called with ptr when a timer respond event occurs. - * @param ptr - parameter passed into push[default:NULL]. - * @return none. - * - * @note If calling this method multiply, the last call is valid. - */ - void attachTimer(NexTouchEventCb timer, void *ptr = NULL); - - /** - * Detach an callback function. - * - * @return none. - */ - void detachTimer(void); - - /** - * Get the value of timer cycle val. - * - * @param number - an output parameter to save the value of timer cycle. - * - * @retval true - success. - * @retval false - failed. - */ - bool getCycle(uint32_t *number); - - /** - * Set the value of timer cycle val. - * - * @param number - the value of timer cycle. - * - * @retval true - success. - * @retval false - failed. - * - * @warning the cycle value must be greater than 50. - */ - bool setCycle(uint32_t number); - - /** - * contorl timer enable. - * - * @retval true - success. - * @retval false - failed. - */ - bool enable(void); - - /** - * contorl timer disable. - * - * @retval true - success. - * @retval false - failed. - */ - bool disable(void); - -}; -/** - * @} - */ - - -#endif /* #ifndef __NEXTIMER_H__ */ +/** + * @file NexTimer.h + * + * The definition of class NexTimer. + * + * @author huang xianming (email:) + * @date 2015/8/26 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXTIMER_H__ +#define __NEXTIMER_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexTimer component. + * + * Commonly, you want to do something after set timer cycle and enable it,and the cycle value + * must be greater than 50 + * + */ +class NexTimer: public NexTouch +{ +public: /* methods */ + + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexTimer(uint8_t pid, uint8_t cid, const char *name); + + /** + * Attach an callback function of timer respond event. + * + * @param timer - callback called with ptr when a timer respond event occurs. + * @param ptr - parameter passed into push[default:NULL]. + * @return none. + * + * @note If calling this method multiply, the last call is valid. + */ + void attachTimer(NexTouchEventCb timer, void *ptr = NULL); + + /** + * Detach an callback function. + * + * @return none. + */ + void detachTimer(void); + + /** + * Get the value of timer cycle val. + * + * @param number - an output parameter to save the value of timer cycle. + * + * @retval true - success. + * @retval false - failed. + */ + bool getCycle(uint32_t *number); + + /** + * Set the value of timer cycle val. + * + * @param number - the value of timer cycle. + * + * @retval true - success. + * @retval false - failed. + * + * @warning the cycle value must be greater than 50. + */ + bool setCycle(uint32_t number); + + /** + * contorl timer enable. + * + * @retval true - success. + * @retval false - failed. + */ + bool enable(void); + + /** + * contorl timer disable. + * + * @retval true - success. + * @retval false - failed. + */ + bool disable(void); + + /** + * Get tim attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_cycle_tim(uint32_t *number); + + /** + * Set tim attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_cycle_tim(uint32_t number); +}; +/** + * @} + */ + + +#endif /* #ifndef __NEXTIMER_H__ */ diff --git a/NexUpload.h b/NexUpload.h old mode 100644 new mode 100755 index c3c57b1..7129128 --- a/NexUpload.h +++ b/NexUpload.h @@ -38,16 +38,16 @@ public: /* methods */ * * @param file_name - tft file name. * @param SD_chip_select - sd chip select pin. - * @download_baudrate - set download baudrate. + * @param download_baudrate - set download baudrate. */ NexUpload(const char *file_name,const uint8_t SD_chip_select,uint32_t download_baudrate); /** * Constructor. * - * @param file_name - tft file name. + * @param file_Name - tft file name. * @param SD_chip_select - sd chip select pin. - * @download_baudrate - set download baudrate. + * @param download_baudrate - set download baudrate. */ NexUpload(const String file_Name,const uint8_t SD_chip_select,uint32_t download_baudrate); diff --git a/NexVariable.cpp b/NexVariable.cpp new file mode 100755 index 00000000..187ba11 --- /dev/null +++ b/NexVariable.cpp @@ -0,0 +1,64 @@ +/** + * @file NexVariable.cpp + * + * The implementation of class NexText. + * + * @author huang xiaoming (email:) + * @date 2016/9/13 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ +#include "NexVariable.h" + +NexVariable::NexVariable(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +uint32_t NexVariable::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexVariable::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexVariable::getText(char *buffer, uint32_t len) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".txt"; + sendCommand(cmd.c_str()); + return recvRetString(buffer,len); +} + +bool NexVariable::setText(const char *buffer) +{ + String cmd; + cmd += getObjName(); + cmd += ".txt=\""; + cmd += buffer; + cmd += "\""; + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} \ No newline at end of file diff --git a/NexVariable.h b/NexVariable.h new file mode 100755 index 00000000..ebbba13 --- /dev/null +++ b/NexVariable.h @@ -0,0 +1,82 @@ +/** + * @file NexButton.h + * + * The definition of class NexButton. + * + * @author huang xiaoming (email:) + * @date 2016/9/13 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXVARRIABLE_H__ +#define __NEXVARRIABLE_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexButton component. + * + * Commonly, you want to do something after push and pop it. It is recommanded that only + * call @ref NexTouch::attachPop to satisfy your purpose. + * + * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. + */ +class NexVariable: public NexTouch +{ +public: /* methods */ + + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexVariable(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get text attribute of component. + * + * @param buffer - buffer storing text returned. + * @param len - length of buffer. + * @return The real length of text returned. + */ + uint32_t getText(char *buffer, uint32_t len); + + /** + * Set text attribute of component. + * + * @param buffer - text buffer terminated with '\0'. + * @return true if success, false for failure. + */ + bool setText(const char *buffer); + + /** + * Get val attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getValue(uint32_t *number); + + /** + * Set val attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setValue(uint32_t number); +}; +/** + * @} + */ + + +#endif /* #ifndef __NEXVARRIABLE_H__*/ diff --git a/NexWaveform.cpp b/NexWaveform.cpp old mode 100644 new mode 100755 index ac868d6..c1fbe9a --- a/NexWaveform.cpp +++ b/NexWaveform.cpp @@ -33,4 +33,144 @@ bool NexWaveform::addValue(uint8_t ch, uint8_t number) sendCommand(buf); return true; } + +uint32_t NexWaveform::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexWaveform::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexWaveform::Get_grid_color_gdc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".gdc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexWaveform::Set_grid_color_gdc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".gdc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexWaveform::Get_grid_width_gdw(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".gdw"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexWaveform::Set_grid_width_gdw(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".gdw="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexWaveform::Get_grid_height_gdh(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".gdh"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexWaveform::Set_grid_height_gdh(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".gdh="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexWaveform::Get_channel_0_color_pco0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexWaveform::Set_channel_0_color_pco0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} diff --git a/NexWaveform.h b/NexWaveform.h old mode 100644 new mode 100755 index 02f3a78..52bdef9 --- a/NexWaveform.h +++ b/NexWaveform.h @@ -44,6 +44,86 @@ public: /* methods */ * @retval false - failed. */ bool addValue(uint8_t ch, uint8_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get gdc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_grid_color_gdc(uint32_t *number); + + /** + * Set gdc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_grid_color_gdc(uint32_t number); + + /** + * Get gdw attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_grid_width_gdw(uint32_t *number); + + /** + * Set gdw attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_grid_width_gdw(uint32_t number); + + /** + * Get gdh attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_grid_height_gdh(uint32_t *number); + + /** + * Set gdh attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_grid_height_gdh(uint32_t number); + + /** + * Get pco0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_channel_0_color_pco0(uint32_t *number); + + /** + * Set pco0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_channel_0_color_pco0(uint32_t number); }; /** diff --git a/Nextion.h b/Nextion.h old mode 100644 new mode 100755 index 16ed1eb..3848db1 --- a/Nextion.h +++ b/Nextion.h @@ -35,6 +35,10 @@ #include "NexTimer.h" #include "NexNumber.h" #include "NexDualStateButton.h" +#include "NexVariable.h" +#include "NexCheckbox.h" +#include "NexRadio.h" +#include "NexScrolltext.h" #endif /* #ifndef __NEXTION_H__ */ diff --git a/doc/Documentation/Logo.png b/doc/Documentation/Logo.png old mode 100644 new mode 100755 diff --git a/doc/Documentation/_comp_button_8ino-example.html b/doc/Documentation/_comp_button_8ino-example.html old mode 100644 new mode 100755 index 8bd9847..9be747d --- a/doc/Documentation/_comp_button_8ino-example.html +++ b/doc/Documentation/_comp_button_8ino-example.html @@ -152,7 +152,7 @@ This program is free software; you can redistribute it and/or modify it under th @@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_number.html','');}); More...

#include <NexNumber.h>

-
-Inheritance diagram for NexNumber:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexNumber:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexTouch.

@@ -107,6 +95,54 @@ Public Member Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,6 +218,222 @@ Public Member Functions

Member Function Documentation

+ +
+
+

Public Member Functions

bool setValue (uint32_t number)
 Set number attribute of component. More...
 
uint32_t Get_background_color_bco (uint32_t *number)
 Get bco attribute of component. More...
 
bool Set_background_color_bco (uint32_t number)
 Set bco attribute of component. More...
 
uint32_t Get_font_color_pco (uint32_t *number)
 Get pco attribute of component. More...
 
bool Set_font_color_pco (uint32_t number)
 Set pco attribute of component. More...
 
uint32_t Get_place_xcen (uint32_t *number)
 Get xcen attribute of component. More...
 
bool Set_place_xcen (uint32_t number)
 Set xcen attribute of component. More...
 
uint32_t Get_place_ycen (uint32_t *number)
 Get ycen attribute of component. More...
 
bool Set_place_ycen (uint32_t number)
 Set ycen attribute of component. More...
 
uint32_t getFont (uint32_t *number)
 Get font attribute of component. More...
 
bool setFont (uint32_t number)
 Set font attribute of component. More...
 
uint32_t Get_number_lenth (uint32_t *number)
 Get lenth attribute of component. More...
 
bool Set_number_lenth (uint32_t number)
 Set lenth attribute of component. More...
 
uint32_t Get_background_crop_picc (uint32_t *number)
 Get picc attribute of component. More...
 
bool Set_background_crop_picc (uint32_t number)
 Set picc attribute of component. More...
 
uint32_t Get_background_image_pic (uint32_t *number)
 Get pic attribute of component. More...
 
bool Set_background_image_pic (uint32_t number)
 Set pic attribute of component. More...
 
- Public Member Functions inherited from NexTouch
 NexTouch (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
+ + + + + + + +
uint32_t NexNumber::Get_background_color_bco (uint32_t * number)
+
+ +

Get bco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 45 of file NexNumber.cpp.

+ +
+ + +
+
+ + + + + + + + +
uint32_t NexNumber::Get_background_crop_picc (uint32_t * number)
+
+ +

Get picc attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 213 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexNumber::Get_background_image_pic (uint32_t * number)
+
+ +

Get pic attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 241 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexNumber::Get_font_color_pco (uint32_t * number)
+
+ +

Get pco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 73 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexNumber::Get_number_lenth (uint32_t * number)
+
+ +

Get lenth attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 185 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexNumber::Get_place_xcen (uint32_t * number)
+
+ +

Get xcen attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 101 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexNumber::Get_place_ycen (uint32_t * number)
+
+ +

Get ycen attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 129 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexNumber::getFont (uint32_t * number)
+
+ +

Get font attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 157 of file NexNumber.cpp.

+ +
+
@@ -199,8 +451,7 @@ Public Member Functions

Get number attribute of component.

Parameters
- - +
buffer- buffer storing text returned.
len- length of buffer.
number- buffer storing text returned.
@@ -209,6 +460,222 @@ Public Member Functions

Definition at line 22 of file NexNumber.cpp.

+
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_background_color_bco (uint32_t number)
+
+ +

Set bco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 55 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_background_crop_picc (uint32_t number)
+
+ +

Set picc attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 223 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_background_image_pic (uint32_t number)
+
+ +

Set pic attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 250 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_font_color_pco (uint32_t number)
+
+ +

Set pco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 83 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_number_lenth (uint32_t number)
+
+ +

Set lenth attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 195 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_place_xcen (uint32_t number)
+
+ +

Set xcen attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 111 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::Set_place_ycen (uint32_t number)
+
+ +

Set ycen attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 139 of file NexNumber.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexNumber::setFont (uint32_t number)
+
+ +

Set font attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 167 of file NexNumber.cpp.

+
@@ -228,7 +695,7 @@ Public Member Functions

Set number attribute of component.

Parameters
- +
buffer- number buffer.
number- number buffer.
@@ -249,7 +716,7 @@ Public Member Functions @@ -83,7 +83,7 @@ $(document).ready(function(){initNavTree('class_nex_object.html','');}); @@ -81,13 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_object.html','');}); More...

#include <NexObject.h>

-
-Inheritance diagram for NexObject:
-
-
Inheritance graph
- - -
[legend]
+ +

Inherited by NexGauge, NexProgressBar, NexTouch, and NexWaveform.

@@ -180,7 +175,7 @@ Public Member Functions @@ -90,7 +90,7 @@ $(document).ready(function(){initNavTree('class_nex_page.html','');}); @@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_page.html','');}); More...

#include <NexPage.h>

-
-Inheritance diagram for NexPage:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexPage:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexTouch.

Public Member Functions

@@ -211,7 +199,7 @@ Public Member Functions @@ -80,18 +80,20 @@ $(document).ready(function(){initNavTree('class_nex_picture.html','');}); - - - - - + + + + + + +

Public Member Functions

attachPush(NexTouchEventCb push, void *ptr=NULL)NexTouch
detachPop(void)NexTouch
detachPush(void)NexTouch
getPic(uint32_t *number)NexPicture
NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject
NexPicture(uint8_t pid, uint8_t cid, const char *name)NexPicture
NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch
printObjInfo(void)NexObject
Get_background_image_pic(uint32_t *number)NexPicture
getPic(uint32_t *number)NexPicture
NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject
NexPicture(uint8_t pid, uint8_t cid, const char *name)NexPicture
NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch
printObjInfo(void)NexObject
Set_background_image_pic(uint32_t number)NexPicture
setPic(uint32_t number)NexPicture
@@ -81,26 +81,20 @@ $(document).ready(function(){initNavTree('class_nex_picture.html','');}); More...

#include <NexPicture.h>

-
-Inheritance diagram for NexPicture:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexPicture:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexTouch.

+ + + + + + @@ -182,6 +176,39 @@ Public Member Functions

Member Function Documentation

+ +
+
+

Public Member Functions

 NexPicture (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
 
bool Get_background_image_pic (uint32_t *number)
 Get picture's number. More...
 
bool Set_background_image_pic (uint32_t number)
 Set picture's number. More...
 
bool getPic (uint32_t *number)
 Get picture's number. More...
 
+ + + + + + + +
bool NexPicture::Get_background_image_pic (uint32_t * number)
+
+ +

Get picture's number.

+
Parameters
+ + +
number- an output parameter to save picture number.
+
+
+
Return values
+ + + +
true- success.
false- failed.
+
+
+ +

Definition at line 23 of file NexPicture.cpp.

+ +
+
@@ -212,7 +239,40 @@ Public Member Functions
Examples:
CompPicture.ino.
-

Definition at line 23 of file NexPicture.cpp.

+

Definition at line 46 of file NexPicture.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexPicture::Set_background_image_pic (uint32_t number)
+
+ +

Set picture's number.

+
Parameters
+ + +
number-the picture number.
+
+
+
Return values
+ + + +
true- success.
false- failed.
+
+
+ +

Definition at line 32 of file NexPicture.cpp.

@@ -246,7 +306,7 @@ Public Member Functions
Examples:
CompPicture.ino.
-

Definition at line 32 of file NexPicture.cpp.

+

Definition at line 55 of file NexPicture.cpp.

@@ -260,7 +320,7 @@ Public Member Functions @@ -76,17 +76,21 @@ $(document).ready(function(){initNavTree('class_nex_progress_bar.html','');});

This is the complete list of members for NexProgressBar, including all inherited members.

+ + + +
Get_background_color_bco(uint32_t *number)NexProgressBar
Get_font_color_pco(uint32_t *number)NexProgressBar
getValue(uint32_t *number)NexProgressBar
NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject
NexProgressBar(uint8_t pid, uint8_t cid, const char *name)NexProgressBar
printObjInfo(void)NexObject
Set_background_color_bco(uint32_t number)NexProgressBar
Set_font_color_pco(uint32_t number)NexProgressBar
setValue(uint32_t number)NexProgressBar
@@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_progress_bar.html','');}); More...

#include <NexProgressBar.h>

-
-Inheritance diagram for NexProgressBar:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexProgressBar:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexObject.

@@ -107,6 +95,18 @@ Public Member Functions + + + + + + + + + + + + @@ -166,6 +166,60 @@ Public Member Functions

Member Function Documentation

+ +
+
+

Public Member Functions

bool setValue (uint32_t number)
 Set the value of progress bar. More...
 
uint32_t Get_background_color_bco (uint32_t *number)
 Get bco attribute of component. More...
 
bool Set_background_color_bco (uint32_t number)
 Set bco attribute of component. More...
 
uint32_t Get_font_color_pco (uint32_t *number)
 Get pco attribute of component. More...
 
bool Set_font_color_pco (uint32_t number)
 Set pco attribute of component. More...
 
- Public Member Functions inherited from NexObject
 NexObject (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
+ + + + + + + +
uint32_t NexProgressBar::Get_background_color_bco (uint32_t * number)
+
+ +

Get bco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 46 of file NexProgressBar.cpp.

+ +
+ + +
+
+ + + + + + + + +
uint32_t NexProgressBar::Get_font_color_pco (uint32_t * number)
+
+ +

Get pco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 74 of file NexProgressBar.cpp.

+ +
+
@@ -198,6 +252,60 @@ Public Member Functions

Definition at line 23 of file NexProgressBar.cpp.

+
+
+ +
+
+ + + + + + + + +
bool NexProgressBar::Set_background_color_bco (uint32_t number)
+
+ +

Set bco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 56 of file NexProgressBar.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexProgressBar::Set_font_color_pco (uint32_t number)
+
+ +

Set pco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 84 of file NexProgressBar.cpp.

+
@@ -244,7 +352,7 @@ Public Member Functions @@ -80,18 +80,30 @@ $(document).ready(function(){initNavTree('class_nex_slider.html','');}); attachPush(NexTouchEventCb push, void *ptr=NULL)NexTouch detachPop(void)NexTouch detachPush(void)NexTouch + Get_background_color_bco(uint32_t *number)NexSlider + Get_cursor_height_hig(uint32_t *number)NexSlider + Get_font_color_pco(uint32_t *number)NexSlider + Get_pointer_thickness_wid(uint32_t *number)NexSlider + getMaxval(uint32_t *number)NexSlider + getMinval(uint32_t *number)NexSlider getValue(uint32_t *number)NexSlider NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject NexSlider(uint8_t pid, uint8_t cid, const char *name)NexSlider NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch printObjInfo(void)NexObject + Set_background_color_bco(uint32_t number)NexSlider + Set_cursor_height_hig(uint32_t number)NexSlider + Set_font_color_pco(uint32_t number)NexSlider + Set_pointer_thickness_wid(uint32_t number)NexSlider + setMaxval(uint32_t number)NexSlider + setMinval(uint32_t number)NexSlider setValue(uint32_t number)NexSlider @@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_slider.html','');}); More...

#include <NexSlider.h>

-
-Inheritance diagram for NexSlider:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexSlider:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexTouch.

@@ -107,6 +95,42 @@ Public Member Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,6 +206,168 @@ Public Member Functions

Member Function Documentation

+ +
+
+

Public Member Functions

bool setValue (uint32_t number)
 Set the value of slider. More...
 
uint32_t Get_background_color_bco (uint32_t *number)
 Get bco attribute of component. More...
 
bool Set_background_color_bco (uint32_t number)
 Set bco attribute of component. More...
 
uint32_t Get_font_color_pco (uint32_t *number)
 Get pco attribute of component. More...
 
bool Set_font_color_pco (uint32_t number)
 Set pco attribute of component. More...
 
uint32_t Get_pointer_thickness_wid (uint32_t *number)
 Get wid attribute of component. More...
 
bool Set_pointer_thickness_wid (uint32_t number)
 Set wid attribute of component. More...
 
uint32_t Get_cursor_height_hig (uint32_t *number)
 Get hig attribute of component. More...
 
bool Set_cursor_height_hig (uint32_t number)
 Set hig attribute of component. More...
 
uint32_t getMaxval (uint32_t *number)
 Get maxval attribute of component. More...
 
bool setMaxval (uint32_t number)
 Set maxval attribute of component. More...
 
uint32_t getMinval (uint32_t *number)
 Get minval attribute of component. More...
 
bool setMinval (uint32_t number)
 Set minval attribute of component. More...
 
- Public Member Functions inherited from NexTouch
 NexTouch (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
+ + + + + + + +
uint32_t NexSlider::Get_background_color_bco (uint32_t * number)
+
+ +

Get bco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 45 of file NexSlider.cpp.

+ +
+ + +
+
+ + + + + + + + +
uint32_t NexSlider::Get_cursor_height_hig (uint32_t * number)
+
+ +

Get hig attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 129 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexSlider::Get_font_color_pco (uint32_t * number)
+
+ +

Get pco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 73 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexSlider::Get_pointer_thickness_wid (uint32_t * number)
+
+ +

Get wid attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 101 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexSlider::getMaxval (uint32_t * number)
+
+ +

Get maxval attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 157 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexSlider::getMinval (uint32_t * number)
+
+ +

Get minval attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 185 of file NexSlider.cpp.

+ +
+
@@ -214,6 +400,168 @@ Public Member Functions

Definition at line 22 of file NexSlider.cpp.

+
+
+ +
+
+ + + + + + + + +
bool NexSlider::Set_background_color_bco (uint32_t number)
+
+ +

Set bco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 55 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexSlider::Set_cursor_height_hig (uint32_t number)
+
+ +

Set hig attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 139 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexSlider::Set_font_color_pco (uint32_t number)
+
+ +

Set pco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 83 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexSlider::Set_pointer_thickness_wid (uint32_t number)
+
+ +

Set wid attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 111 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexSlider::setMaxval (uint32_t number)
+
+ +

Set maxval attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 167 of file NexSlider.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexSlider::setMinval (uint32_t number)
+
+ +

Set minval attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 195 of file NexSlider.cpp.

+
@@ -259,7 +607,7 @@ Public Member Functions @@ -80,18 +80,32 @@ $(document).ready(function(){initNavTree('class_nex_text.html','');}); attachPush(NexTouchEventCb push, void *ptr=NULL)NexTouch detachPop(void)NexTouch detachPush(void)NexTouch - getText(char *buffer, uint16_t len)NexText - NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject - NexText(uint8_t pid, uint8_t cid, const char *name)NexText - NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch - printObjInfo(void)NexObject + Get_background_color_bco(uint32_t *number)NexText + Get_background_crop_picc(uint32_t *number)NexText + Get_background_image_pic(uint32_t *number)NexText + Get_font_color_pco(uint32_t *number)NexText + Get_place_xcen(uint32_t *number)NexText + Get_place_ycen(uint32_t *number)NexText + getFont(uint32_t *number)NexText + getText(char *buffer, uint16_t len)NexText + NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject + NexText(uint8_t pid, uint8_t cid, const char *name)NexText + NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch + printObjInfo(void)NexObject + Set_background_color_bco(uint32_t number)NexText + Set_background_crop_picc(uint32_t number)NexText + Set_background_image_pic(uint32_t number)NexText + Set_font_color_pco(uint32_t number)NexText + Set_place_xcen(uint32_t number)NexText + Set_place_ycen(uint32_t number)NexText + setFont(uint32_t number)NexText setText(const char *buffer)NexText @@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_text.html','');}); More...

#include <NexText.h>

-
-Inheritance diagram for NexText:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexText:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexTouch.

@@ -107,6 +95,48 @@ Public Member Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,6 +212,195 @@ Public Member Functions

Member Function Documentation

+ +
+
+

Public Member Functions

bool setText (const char *buffer)
 Set text attribute of component. More...
 
uint32_t Get_background_color_bco (uint32_t *number)
 Get bco attribute of component. More...
 
bool Set_background_color_bco (uint32_t number)
 Set bco attribute of component. More...
 
uint32_t Get_font_color_pco (uint32_t *number)
 Get pco attribute of component. More...
 
bool Set_font_color_pco (uint32_t number)
 Set pco attribute of component. More...
 
uint32_t Get_place_xcen (uint32_t *number)
 Get xcen attribute of component. More...
 
bool Set_place_xcen (uint32_t number)
 Set xcen attribute of component. More...
 
uint32_t Get_place_ycen (uint32_t *number)
 Get ycen attribute of component. More...
 
bool Set_place_ycen (uint32_t number)
 Set ycen attribute of component. More...
 
uint32_t getFont (uint32_t *number)
 Get font attribute of component. More...
 
bool setFont (uint32_t number)
 Set font attribute of component. More...
 
uint32_t Get_background_crop_picc (uint32_t *number)
 Get picc attribute of component. More...
 
bool Set_background_crop_picc (uint32_t number)
 Set picc attribute of component. More...
 
uint32_t Get_background_image_pic (uint32_t *number)
 Get pic attribute of component. More...
 
bool Set_background_image_pic (uint32_t number)
 Set pic attribute of component. More...
 
- Public Member Functions inherited from NexTouch
 NexTouch (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
+ + + + + + + +
uint32_t NexText::Get_background_color_bco (uint32_t * number)
+
+ +

Get bco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 43 of file NexText.cpp.

+ +
+ + +
+
+ + + + + + + + +
uint32_t NexText::Get_background_crop_picc (uint32_t * number)
+
+ +

Get picc attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 183 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexText::Get_background_image_pic (uint32_t * number)
+
+ +

Get pic attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 211 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexText::Get_font_color_pco (uint32_t * number)
+
+ +

Get pco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 71 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexText::Get_place_xcen (uint32_t * number)
+
+ +

Get xcen attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 99 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexText::Get_place_ycen (uint32_t * number)
+
+ +

Get ycen attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 127 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexText::getFont (uint32_t * number)
+
+ +

Get font attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 155 of file NexText.cpp.

+ +
+
@@ -219,6 +438,195 @@ Public Member Functions

Definition at line 22 of file NexText.cpp.

+
+
+ +
+
+ + + + + + + + +
bool NexText::Set_background_color_bco (uint32_t number)
+
+ +

Set bco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 53 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexText::Set_background_crop_picc (uint32_t number)
+
+ +

Set picc attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 193 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexText::Set_background_image_pic (uint32_t number)
+
+ +

Set pic attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 220 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexText::Set_font_color_pco (uint32_t number)
+
+ +

Set pco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 81 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexText::Set_place_xcen (uint32_t number)
+
+ +

Set xcen attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 109 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexText::Set_place_ycen (uint32_t number)
+
+ +

Set ycen attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 137 of file NexText.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexText::setFont (uint32_t number)
+
+ +

Set font attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 165 of file NexText.cpp.

+
@@ -259,7 +667,7 @@ Public Member Functions @@ -84,18 +84,20 @@ $(document).ready(function(){initNavTree('class_nex_timer.html','');}); detachTimer(void)NexTimer disable(void)NexTimer enable(void)NexTimer - getCycle(uint32_t *number)NexTimer - NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject - NexTimer(uint8_t pid, uint8_t cid, const char *name)NexTimer - NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch - printObjInfo(void)NexObject + Get_cycle_tim(uint32_t *number)NexTimer + getCycle(uint32_t *number)NexTimer + NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject + NexTimer(uint8_t pid, uint8_t cid, const char *name)NexTimer + NexTouch(uint8_t pid, uint8_t cid, const char *name)NexTouch + printObjInfo(void)NexObject + Set_cycle_tim(uint32_t number)NexTimer setCycle(uint32_t number)NexTimer @@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_timer.html','');}); More...

#include <NexTimer.h>

-
-Inheritance diagram for NexTimer:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexTimer:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexTouch.

@@ -119,6 +107,12 @@ Public Member Functions + + + + + + @@ -233,15 +227,6 @@ Public Member Functions

Definition at line 23 of file NexTimer.cpp.

-

-Here is the call graph for this function:
-
-
- - -
-

- @@ -263,15 +248,6 @@ Here is the call graph for this function:

Definition at line 28 of file NexTimer.cpp.

-

-Here is the call graph for this function:
-
-
- - -
-

- @@ -328,6 +304,33 @@ Here is the call graph for this function:

Definition at line 60 of file NexTimer.cpp.

+ + + +
+
+

Public Member Functions

bool disable (void)
 contorl timer disable. More...
 
uint32_t Get_cycle_tim (uint32_t *number)
 Get tim attribute of component. More...
 
bool Set_cycle_tim (uint32_t number)
 Set tim attribute of component. More...
 
- Public Member Functions inherited from NexTouch
 NexTouch (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
+ + + + + + + +
uint32_t NexTimer::Get_cycle_tim (uint32_t * number)
+
+ +

Get tim attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 86 of file NexTimer.cpp.

+
@@ -362,6 +365,33 @@ Here is the call graph for this function:

Definition at line 33 of file NexTimer.cpp.

+ + + +
+
+ + + + + + + + +
bool NexTimer::Set_cycle_tim (uint32_t number)
+
+ +

Set tim attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 95 of file NexTimer.cpp.

+
@@ -409,7 +439,7 @@ Here is the call graph for this function: @@ -88,7 +88,7 @@ $(document).ready(function(){initNavTree('class_nex_touch.html','');}); @@ -81,20 +81,10 @@ $(document).ready(function(){initNavTree('class_nex_touch.html','');}); More...

#include <NexTouch.h>

-
-Inheritance diagram for NexTouch:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexTouch:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexObject.

+ +

Inherited by NexButton, NexCheckbox, NexCrop, NexDSButton, NexHotspot, NexNumber, NexPage, NexPicture, NexRadio, NexScrolltext, NexSlider, NexText, NexTimer, and NexVariable.

@@ -211,15 +201,6 @@ Public Member Functions

Definition at line 39 of file NexTouch.cpp.

-

-Here is the caller graph for this function:
-
-
- - -
-

- @@ -281,15 +262,6 @@ Here is the caller graph for this function:

Definition at line 45 of file NexTouch.cpp.

-

-Here is the caller graph for this function:
-
-
- - -
-

- @@ -323,7 +295,7 @@ Here is the caller graph for this function: @@ -77,15 +77,25 @@ $(document).ready(function(){initNavTree('class_nex_waveform.html','');});

This is the complete list of members for NexWaveform, including all inherited members.

Public Member Functions

- - - + + + + + + + + + + + + +
addValue(uint8_t ch, uint8_t number)NexWaveform
NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject
NexWaveform(uint8_t pid, uint8_t cid, const char *name)NexWaveform
printObjInfo(void)NexObject
Get_background_color_bco(uint32_t *number)NexWaveform
Get_channel_0_color_pco0(uint32_t *number)NexWaveform
Get_grid_color_gdc(uint32_t *number)NexWaveform
Get_grid_height_gdh(uint32_t *number)NexWaveform
Get_grid_width_gdw(uint32_t *number)NexWaveform
NexObject(uint8_t pid, uint8_t cid, const char *name)NexObject
NexWaveform(uint8_t pid, uint8_t cid, const char *name)NexWaveform
printObjInfo(void)NexObject
Set_background_color_bco(uint32_t number)NexWaveform
Set_channel_0_color_pco0(uint32_t number)NexWaveform
Set_grid_color_gdc(uint32_t number)NexWaveform
Set_grid_height_gdh(uint32_t number)NexWaveform
Set_grid_width_gdw(uint32_t number)NexWaveform
@@ -81,20 +81,8 @@ $(document).ready(function(){initNavTree('class_nex_waveform.html','');}); More...

#include <NexWaveform.h>

-
-Inheritance diagram for NexWaveform:
-
-
Inheritance graph
- - -
[legend]
-
-Collaboration diagram for NexWaveform:
-
-
Collaboration graph
- - -
[legend]
+ +

Inherits NexObject.

@@ -104,6 +92,36 @@ Public Member Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -206,6 +224,276 @@ Public Member Functions

Definition at line 22 of file NexWaveform.cpp.

+ + + +
+
+

Public Member Functions

bool addValue (uint8_t ch, uint8_t number)
 Add value to show. More...
 
uint32_t Get_background_color_bco (uint32_t *number)
 Get bco attribute of component. More...
 
bool Set_background_color_bco (uint32_t number)
 Set bco attribute of component. More...
 
uint32_t Get_grid_color_gdc (uint32_t *number)
 Get gdc attribute of component. More...
 
bool Set_grid_color_gdc (uint32_t number)
 Set gdc attribute of component. More...
 
uint32_t Get_grid_width_gdw (uint32_t *number)
 Get gdw attribute of component. More...
 
bool Set_grid_width_gdw (uint32_t number)
 Set gdw attribute of component. More...
 
uint32_t Get_grid_height_gdh (uint32_t *number)
 Get gdh attribute of component. More...
 
bool Set_grid_height_gdh (uint32_t number)
 Set gdh attribute of component. More...
 
uint32_t Get_channel_0_color_pco0 (uint32_t *number)
 Get pco0 attribute of component. More...
 
bool Set_channel_0_color_pco0 (uint32_t number)
 Set pco0 attribute of component. More...
 
- Public Member Functions inherited from NexObject
 NexObject (uint8_t pid, uint8_t cid, const char *name)
 Constructor. More...
+ + + + + + + +
uint32_t NexWaveform::Get_background_color_bco (uint32_t * number)
+
+ +

Get bco attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 37 of file NexWaveform.cpp.

+ +
+ + +
+
+ + + + + + + + +
uint32_t NexWaveform::Get_channel_0_color_pco0 (uint32_t * number)
+
+ +

Get pco0 attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 149 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexWaveform::Get_grid_color_gdc (uint32_t * number)
+
+ +

Get gdc attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 65 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexWaveform::Get_grid_height_gdh (uint32_t * number)
+
+ +

Get gdh attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 121 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
uint32_t NexWaveform::Get_grid_width_gdw (uint32_t * number)
+
+ +

Get gdw attribute of component.

+
Parameters
+ + +
number- buffer storing data retur
+
+
+
Returns
the length of the data
+ +

Definition at line 93 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexWaveform::Set_background_color_bco (uint32_t number)
+
+ +

Set bco attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 47 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexWaveform::Set_channel_0_color_pco0 (uint32_t number)
+
+ +

Set pco0 attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 159 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexWaveform::Set_grid_color_gdc (uint32_t number)
+
+ +

Set gdc attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 75 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexWaveform::Set_grid_height_gdh (uint32_t number)
+
+ +

Set gdh attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 131 of file NexWaveform.cpp.

+ +
+
+ +
+
+ + + + + + + + +
bool NexWaveform::Set_grid_width_gdw (uint32_t number)
+
+ +

Set gdw attribute of component.

+
Parameters
+ + +
number- To set up the data
+
+
+
Returns
true if success, false for failure
+ +

Definition at line 103 of file NexWaveform.cpp.

+

The documentation for this class was generated from the following files:
    @@ -218,7 +506,7 @@ Public Member Functions @@ -76,10 +76,11 @@ $(document).ready(function(){initNavTree('classes.html','');}); - - - + + + + +
      N  
    -
    NexDSButton   NexObject   NexSlider   NexWaveform   
    NexGauge   NexPage   NexText   
    NexButton   NexHotspot   NexPicture   NexTimer   
    NexCrop   NexNumber   NexProgressBar   NexTouch   
    NexDSButton   NexPage   NexSlider   NexVariable   
    NexGauge   NexPicture   NexText   NexWaveform   
    NexButton   NexHotspot   NexProgressBar   NexTimer   
    NexCheckbox   NexNumber   NexRadio   NexTouch   
    NexCrop   NexObject   NexScrolltext   NexUpload   
    @@ -88,7 +89,7 @@ $(document).ready(function(){initNavTree('classes.html','');});
    -
    -Directory dependency graph for CompNumber:
    -
    -
    examples/CompNumber
    - - -
    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompDualStateButton:
    -
    -
    examples/CompDualStateButton
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompSlider:
    -
    -
    examples/CompSlider
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompWaveform:
    -
    -
    examples/CompWaveform
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompTimer:
    -
    -
    examples/CompTimer
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompProgressBar:
    -
    -
    examples/CompProgressBar
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompCrop:
    -
    -
    examples/CompCrop
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompButton:
    -
    -
    examples/CompButton
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompGauge:
    -
    -
    examples/CompGauge
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompText:
    -
    -
    examples/CompText
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompPicture:
    -
    -
    examples/CompPicture
    - - -

    Files

    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for examples:
    -
    -
    examples
    - - -

    Files

    @@ -101,6 +94,8 @@ Directories + +

    Directories

     
    directory  CompWaveform
     
    directory  Upload
     
    @@ -108,7 +103,7 @@ Directories
    -
    -Directory dependency graph for CompHotspot:
    -
    -
    examples/CompHotspot
    - - -
    @@ -84,7 +77,7 @@ Files
    -
    -Directory dependency graph for CompPage:
    -
    -
    examples/CompPage
    - - -

    Files

    @@ -84,7 +77,7 @@ Files

    Files

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      examples
      CompButton
     CompButton.ino
      CompCrop
     CompCrop.ino
      CompDualStateButton
     CompDualStateButton.ino
      CompGauge
     CompGauge.ino
      CompHotspot
     CompHotspot.ino
      CompNumber
     CompNumber.ino
      CompPage
     CompPage.ino
      CompPicture
     CompPicture.ino
      CompProgressBar
     CompProgressBar.ino
      CompSlider
     CompSlider.ino
      CompText
     CompText.ino
      CompTimer
     CompTimer.ino
      CompWaveform
     CompWaveform.ino
     doxygen.hDefine modules in API doc
     NexButton.cppThe implementation of class NexButton
     NexButton.hThe definition of class NexButton
     NexConfig.hOptions for user can be found here
     NexCrop.cppThe implementation of class NexCrop
     NexCrop.hThe definition of class NexCrop
     NexDualStateButton.cppThe implementation of class NexDSButton
     NexDualStateButton.hThe definition of class NexDSButton
     NexGauge.cppThe implementation of class NexGauge
     NexGauge.hThe definition of class NexGauge
     NexHardware.cppThe implementation of base API for using Nextion
     NexHardware.hThe definition of base API for using Nextion
     NexHotspot.cppThe implementation of class NexHotspot
     NexHotspot.hThe definition of class NexHotspot
     NexNumber.cppThe implementation of class NexNumber
     NexNumber.hThe definition of class NexNumber
     NexObject.cppThe implementation of class NexObject
     NexObject.hThe definition of class NexObject
     NexPage.cppThe implementation of class NexPage
     NexPage.hThe definition of class NexPage
     NexPicture.cppThe implementation of class NexPicture
     NexPicture.hThe definition of class NexPicture
     NexProgressBar.cppThe implementation of class NexProgressBar
     NexProgressBar.hThe definition of class NexProgressBar
     NexSlider.cppThe implementation of class NexSlider
     NexSlider.hThe definition of class NexSlider
     NexText.cppThe implementation of class NexText
     NexText.hThe definition of class NexText
     NexTimer.cppThe implementation of class NexTimer
     NexTimer.hThe definition of class NexTimer
     Nextion.hThe header file including all other header files provided by this library
     NexTouch.cppThe implementation of class NexTouch
     NexTouch.hThe definition of class NexTouch
     NexWaveform.cppThe implementation of class NexWaveform
     NexWaveform.hThe definition of class NexWaveform
      CompButton
      CompCrop
      CompDualStateButton
      CompGauge
      CompHotspot
      CompNumber
      CompPage
      CompPicture
      CompProgressBar
      CompSlider
      CompText
      CompTimer
      CompWaveform
      Upload
      html
      search
     dynsections.js
     jquery.js
     doxygen.hDefine modules in API doc
     NexButton.cppThe implementation of class NexButton
     NexButton.hThe definition of class NexButton
     NexCheckbox.cppThe implementation of class NexCheckbox
     NexCheckbox.hThe definition of class NexCheckbox
     NexConfig.hOptions for user can be found here
     NexCrop.cppThe implementation of class NexCrop
     NexCrop.hThe definition of class NexCrop
     NexDualStateButton.cppThe implementation of class NexDSButton
     NexDualStateButton.hThe definition of class NexDSButton
     NexGauge.cppThe implementation of class NexGauge
     NexGauge.hThe definition of class NexGauge
     NexHardware.cppThe implementation of base API for using Nextion
     NexHardware.hThe definition of base API for using Nextion
     NexHotspot.cppThe implementation of class NexHotspot
     NexHotspot.hThe definition of class NexHotspot
     NexNumber.cppThe implementation of class NexNumber
     NexNumber.hThe definition of class NexNumber
     NexObject.cppThe implementation of class NexObject
     NexObject.hThe definition of class NexObject
     NexPage.cppThe implementation of class NexPage
     NexPage.hThe definition of class NexPage
     NexPicture.cppThe implementation of class NexPicture
     NexPicture.hThe definition of class NexPicture
     NexProgressBar.cppThe implementation of class NexProgressBar
     NexProgressBar.hThe definition of class NexProgressBar
     NexRadio.cppThe implementation of class NexRadio
     NexRadio.hThe definition of class NexRadio
     NexScrolltext.cppThe implementation of class NexScrolltext
     NexScrolltext.hThe definition of class NexScrolltext
     NexSlider.cppThe implementation of class NexSlider
     NexSlider.hThe definition of class NexSlider
     NexText.cppThe implementation of class NexText
     NexText.hThe definition of class NexText
     NexTimer.cppThe implementation of class NexTimer
     NexTimer.hThe definition of class NexTimer
     Nextion.hThe header file including all other header files provided by this library
     NexTouch.cppThe implementation of class NexTouch
     NexTouch.hThe definition of class NexTouch
     NexUpload.cppThe implementation of download tft file for nextion
     NexUpload.hThe definition of class NexUpload
     NexVariable.cppThe implementation of class NexText
     NexVariable.h
     NexWaveform.cppThe implementation of class NexWaveform
     NexWaveform.hThe definition of class NexWaveform
    @@ -142,7 +189,7 @@ $(document).ready(function(){initNavTree('files.html','');}); @@ -61,13 +61,14 @@ @@ -102,138 +103,12 @@ $(document).ready(function(){initNavTree('functions.html','');}); : NexTimer
- - -

- d -

- - -

- e -

- - -

- g -

- - -

- n -

- - -

- p -

- - -

- s -

@@ -61,13 +61,14 @@ @@ -102,138 +103,12 @@ $(document).ready(function(){initNavTree('functions_func.html','');}); : NexTimer - - -

- d -

- - -

- e -

- - -

- g -

- - -

- n -

- - -

- p -

- - -

- s -