CRxIPv4 Class
#include "Rx.Core/RxIPv4.h"
class CRxIPv4
Provides data and methods for processing an IPv4 address.
Constructors
CRxIPv4() | Default constructor. |
CRxIPv4(uIP) | Constructor with unsigned as IP initialization. Interpreted in the way, that the first byte is oriented to the right: 0x01 00 00 0A – This would be 10.0.0.1. |
CRxIPv4(ucIP1, ucIP2, ucIP3, ucIP4) | Constructor with single unsigned char values as arguments for initialization of the IP. Example for 10.0.0.1 would be: |
CRxIPv4(sIP) | Constructor with a CRxString as initialization. Expected is a string with unsigned values separated by ".". Example: CRxString xIP = "10.0.0.1";. |
CRxIPv4(xIP) | Copy constructor. |
Methods
Set(sIP) | Sets the given string as new IP. See comment for CRxIPv4(). |
Set(uIP) | Sets the given unsigned as new IP. Interpreted in the way, that the first byte is oriented to the right: 0x01 00 00 0A – This would be 10.0.0.1. |
Set(ucIP1, ucIP2, ucIP3, ucIP4) | Sets the IP with single unsigned char values. Example for 10.0.0.1 would be: |
Get() | Gets the IP represented as an unsigned value. To be interpreted in the way, that the first byte is oriented to the right: 0x01 00 00 0A – This would be 10.0.0.1. |
GetRef() | Gets the reference to the unsigned int member that contains the IP address. |
Get(ucIP1, ucIP2, ucIP3, ucIP4) | Gets the IP address with each of the 4 parts in a unsigned char. Example for 10.0.0.1 would be: |
ToString() | Convert this CRxIPv4 into a string representation. |
IsValid() | Query if this CRxIPv4 is valid. |
Operators
operator[](uIdx) | Array indexer operator. |
operator[](uIdx) | Array indexer operator. |