tcMenu
Public Member Functions | List of all members
IpAddressMenuItem Class Reference

#include <RuntimeMenuItem.h>

Inheritance diagram for IpAddressMenuItem:
EditableMultiPartMenuItem RuntimeMenuItem MenuItem

Public Member Functions

 IpAddressMenuItem (RuntimeRenderingFn renderFn, menuid_t id, MenuItem *next=nullptr)
 
 IpAddressMenuItem (RuntimeRenderingFn renderFn, const IpAddressStorage &initialIp, menuid_t id, MenuItem *next=nullptr)
 
 IpAddressMenuItem (const AnyMenuInfo *info, RuntimeRenderingFn renderFn, const IpAddressStorage &initialIp, MenuItem *next=nullptr, bool isPgm=INFO_LOCATION_PGM)
 
 IpAddressMenuItem (const AnyMenuInfo *info, const IpAddressStorage &initialIp, MenuItem *next=nullptr, bool isPgm=INFO_LOCATION_PGM)
 
void setIpAddress (const char *source)
 
void setIpAddress (uint8_t p1, uint8_t p2, uint8_t p3, uint8_t p4)
 
uint8_t * getIpAddress ()
 
void setUnderlying (const IpAddressStorage &other)
 
IpAddressStoragegetUnderlying ()
 
void setIpPart (uint8_t part, uint8_t newVal)
 
- Public Member Functions inherited from EditableMultiPartMenuItem
 EditableMultiPartMenuItem (MenuType type, menuid_t id, int numberOfParts, RuntimeRenderingFn renderFn, MenuItem *next=nullptr)
 
 EditableMultiPartMenuItem (const AnyMenuInfo *rtInfo, bool isPgm, MenuType type, int numberOfParts, RuntimeRenderingFn renderFn, MenuItem *next=nullptr)
 
uint8_t beginMultiEdit ()
 
int changeEditBy (int amt)
 
int previousPart ()
 
int nextPart ()
 
int getCurrentRange () const
 
void stopMultiEdit ()
 
int getPartValueAsInt () const
 
bool valueChanged (int newVal)
 
- Public Member Functions inherited from RuntimeMenuItem
 RuntimeMenuItem (MenuType menuType, menuid_t id, RuntimeRenderingFn renderFn, uint8_t itemPosition, uint8_t numberOfRows, MenuItem *next=nullptr)
 
 RuntimeMenuItem (const AnyMenuInfo *rtInfo, bool isPgm, MenuType menuType, RuntimeRenderingFn renderFn, uint8_t itemPosition, uint8_t numberOfRows, MenuItem *next=nullptr)
 
void copyValue (char *buffer, int bufferSize) const
 
void runCallback () const
 
int getRuntimeId () const
 
int getRuntimeEeprom () const
 
uint8_t getNumberOfParts () const
 
void copyRuntimeName (char *buffer, int bufferSize) const
 
uint8_t getNumberOfRows () const
 
uint8_t getItemPosition () const
 
void setNumberOfRows (uint8_t rows)
 
- Public Member Functions inherited from MenuItem
uint8_t copyNameToBuffer (char *sz, int size) const
 
uint8_t copyNameToBuffer (char *sz, int offset, int size) const
 
menuid_t getId () const
 
uint16_t getMaximumValue () const
 
uint16_t getEepromPosition () const
 
MenuType getMenuType () const
 
void triggerCallback () const
 
bool isInfoProgMem () const
 
void setChanged (bool changed)
 
void setChanged (int num, bool changed)
 
bool isChanged (int num=0) const
 
bool isSendRemoteNeeded (uint8_t remoteNo) const
 
void setSendRemoteNeededAll ()
 
void clearSendRemoteNeededAll ()
 
void setSendRemoteNeeded (uint8_t remoteNo, bool needed)
 
void setReadOnly (bool active)
 
bool isReadOnly () const
 
void setLocalOnly (bool localOnly)
 
bool isLocalOnly () const
 
void setSecured (bool secured)
 
bool isSecured () const
 
void setVisible (bool visible)
 
bool isVisible () const
 
MenuItemgetNext () const
 
void setNext (MenuItem *pNext)
 
void changeOccurred (bool silent)
 

Additional Inherited Members

- Protected Member Functions inherited from MenuItem
 MenuItem (MenuType menuType, const AnyMenuInfo *menuInfo, MenuItem *next, bool infoProgMem)
 
- Protected Attributes inherited from RuntimeMenuItem
menuid_t id
 
uint8_t itemPosition
 
uint8_t noOfParts
 
- Protected Attributes inherited from MenuItem
uint16_t flags
 
MenuItemnext
 
const AnyMenuInfoinfo = nullptr
 
RuntimeRenderingFn renderFn = nullptr
 
MenuType menuType
 

Detailed Description

This menu item represents an IP address that can be configured / or just displayed on the device, if it is editable it is edited using the typical 4 byte entries. The default render function for this type is: ipAddressRenderFn

Constructor & Destructor Documentation

◆ IpAddressMenuItem() [1/4]

IpAddressMenuItem::IpAddressMenuItem ( RuntimeRenderingFn  renderFn,
menuid_t  id,
MenuItem next = nullptr 
)
inline

Create an IP address that initially points to 127.0.0.1, with a given ID and rendering function

Parameters
renderFnthe rendering function to use.
idthe ID of this item
nextoptional pointer to next item

◆ IpAddressMenuItem() [2/4]

IpAddressMenuItem::IpAddressMenuItem ( RuntimeRenderingFn  renderFn,
const IpAddressStorage initialIp,
menuid_t  id,
MenuItem next = nullptr 
)
inline

Create an IP address that has an initial value, with a given ID and rendering function

Parameters
renderFnthe rendering function to use.
idthe ID of this item
ipPartsa 4 digit IP address as a constant array
nextoptional pointer to next item

◆ IpAddressMenuItem() [3/4]

IpAddressMenuItem::IpAddressMenuItem ( const AnyMenuInfo info,
RuntimeRenderingFn  renderFn,
const IpAddressStorage initialIp,
MenuItem next = nullptr,
bool  isPgm = INFO_LOCATION_PGM 
)
inline

Create an IP address that has an initial value, with static data taken from an info block

Parameters
infothe info block to use for static data
renderFnthe rendering function to use.
idthe ID of this item
ipPartsa 4 digit IP address as a constant array
nextoptional pointer to next item
isPgmoptional, if the info block resides in PGM memory or RAM, default PGM.

◆ IpAddressMenuItem() [4/4]

IpAddressMenuItem::IpAddressMenuItem ( const AnyMenuInfo info,
const IpAddressStorage initialIp,
MenuItem next = nullptr,
bool  isPgm = INFO_LOCATION_PGM 
)
inline

Create an IP address that has an initial value, with a given ID and

Parameters
infothe info block to use for static data
idthe ID of this item
ipPartsa 4 digit IP address as a constant array
nextoptional pointer to next item
isPgmoptional, if the info block resides in PGM memory or RAM, default PGM.

Member Function Documentation

◆ setIpAddress()

void IpAddressMenuItem::setIpAddress ( uint8_t  p1,
uint8_t  p2,
uint8_t  p3,
uint8_t  p4 
)
inline

Sets the whole IP address as four parts

◆ getIpAddress()

uint8_t* IpAddressMenuItem::getIpAddress ( )
inline

gets the IP address as four separate bytes

◆ setIpPart()

void IpAddressMenuItem::setIpPart ( uint8_t  part,
uint8_t  newVal 
)

sets a single part in the address


The documentation for this class was generated from the following files: