C++ UA Server SDK
1.5.1.326
|
Wrapper class for the UA stack structure OpcUa_ByteString. More...
#include <uabytestring.h>
Inherits OpcUa_ByteString.
Public Member Functions | |
UaByteString () | |
construction | |
UaByteString (const UaByteString &other) | |
construction More... | |
UaByteString (const OpcUa_ByteString &other) | |
construction More... | |
UaByteString (OpcUa_Int32 iLength, OpcUa_Byte *pData) | |
construction More... | |
UaByteString (const UaByteArray &other) | |
construction More... | |
~UaByteString () | |
destruction | |
void | clear () |
Clear the data of the UaByteString. More... | |
void | setByteString (OpcUa_Int32 iLength, OpcUa_Byte *pData) |
Set ByteString data. More... | |
UaByteString & | operator= (const UaByteString &other) |
Assignment operator. More... | |
void | operator<< (const UaByteString &) |
Appends the other byte string. More... | |
bool | operator== (const UaByteString &) const |
Compare variables if they are similar. More... | |
bool | operator!= (const UaByteString &) const |
Returns true if other is not equal to this. More... | |
bool | operator< (const UaByteString &) const |
Is lower than operator. More... | |
bool | operator> (const UaByteString &) const |
Is greater than operator. More... | |
operator const OpcUa_ByteString * () const | |
Return internal OpcUa_ByteString structure. More... | |
OpcUa_ByteString * | copy () const |
Copy UaByteString data to a newly allocated OpcUa_ByteString. More... | |
void | copyTo (OpcUa_ByteString *pDst) const |
Copy UaByteString data to an existing OpcUa_ByteString structure. More... | |
UaString | toHex (bool bSeparateWithSpace=false) const |
Converts the byte string into a hex string. More... | |
void | detach () |
Detach internal structure from data. More... | |
void | attach (const OpcUa_ByteString *pSrc) |
Attach the internal byte string data of the passed byte string to the own byte string. More... | |
UaByteString & | append (const UaByteString &other) |
Append a byte string to the own byte string. More... | |
OpcUa_Int32 | length () const |
Get the length of the var. More... | |
const OpcUa_Byte * | data () const |
Get the data of the actual variable. More... | |
Static Public Member Functions | |
static bool | compare (const OpcUa_ByteString &, const OpcUa_ByteString &) |
Compare two UaByteString variables. More... | |
static OpcUa_ByteString * | clone (const OpcUa_ByteString &source) |
Copy OpcUa_ByteString data to a newly allocated OpcUa_ByteString. More... | |
static void | cloneTo (const OpcUa_ByteString &source, OpcUa_ByteString ©) |
Copy OpcUa_ByteString data to an existing OpcUa_ByteString structure. More... | |
static UaByteString | fromHex (const UaString &src) |
Converts a hexadecimal string representation of a byte string into a UaByteString. More... | |
static char * | base64encode (const OpcUa_ByteString rawData) |
This method encodes the passed ByteString into a BASE64 encoded string. More... | |
static OpcUa_StatusCode | base64decode (const char *pBase64, UaByteString &rawData) |
This method decodes a BASE64 encoded string and returns the decoded data. More... | |
Wrapper class for the UA stack structure OpcUa_ByteString.
Derived from OpcUa_ByteString.
UaByteString::UaByteString | ( | const UaByteString & | other | ) |
construction
other | the UaBytestring |
UaByteString::UaByteString | ( | const OpcUa_ByteString & | other | ) |
construction
other | the OpcUa_ByteString |
UaByteString::UaByteString | ( | OpcUa_Int32 | iLength, |
OpcUa_Byte * | pData | ||
) |
construction
iLength | the length of the data. |
pData | a pointer to the data itself. |
UaByteString::UaByteString | ( | const UaByteArray & | other | ) |
construction
other | the UaByteArray |
UaByteString & UaByteString::append | ( | const UaByteString & | other | ) |
Append a byte string to the own byte string.
other | the byte string to append |
void UaByteString::attach | ( | const OpcUa_ByteString * | pSrc | ) |
Attach the internal byte string data of the passed byte string to the own byte string.
pSrc | the source of this operation. |
|
static |
This method decodes a BASE64 encoded string and returns the decoded data.
pBase64 | [in] The BASE64 string |
rawData | [out] The decoded raw data |
|
static |
This method encodes the passed ByteString into a BASE64 encoded string.
rawData | ByteString to encode |
void UaByteString::clear | ( | ) |
Clear the data of the UaByteString.
|
static |
Copy OpcUa_ByteString data to a newly allocated OpcUa_ByteString.
source | the source of this operation. |
|
static |
Copy OpcUa_ByteString data to an existing OpcUa_ByteString structure.
source | Source OpcUa_ByteString to clone. |
copy | New copy of source OpcUa_ByteString. |
|
static |
Compare two UaByteString variables.
data1 | a value as UaByteString. |
data2 | a value as UaByteString. |
OpcUa_ByteString * UaByteString::copy | ( | ) | const |
Copy UaByteString data to a newly allocated OpcUa_ByteString.
void UaByteString::copyTo | ( | OpcUa_ByteString * | pDst | ) | const |
Copy UaByteString data to an existing OpcUa_ByteString structure.
pDst | the destination of the copy operation. |
|
inline |
Get the data of the actual variable.
void UaByteString::detach | ( | ) |
Detach internal structure from data.
A caller must take ownership of the internal memory before calling detach.
|
static |
Converts a hexadecimal string representation of a byte string into a UaByteString.
This string should not contain spaces and the string length must be a multiple of 2 (2 chars per byte).
src | the source of this operation. |
|
inline |
Get the length of the var.
UaByteString::operator const OpcUa_ByteString * | ( | ) | const |
Return internal OpcUa_ByteString structure.
bool UaByteString::operator!= | ( | const UaByteString & | other | ) | const |
Returns true if other is not equal to this.
other | the UaString to compare. |
bool UaByteString::operator< | ( | const UaByteString & | other | ) | const |
Is lower than operator.
This is used to sort ByteStrings e.g. to use it as key in map
other | the UaByteString to compare. |
void UaByteString::operator<< | ( | const UaByteString & | other | ) |
Appends the other byte string.
This method reallocated the internal memory as needed.
other | the ByteString to append. |
UaByteString & UaByteString::operator= | ( | const UaByteString & | other | ) |
Assignment operator.
other | the ByteString to assign. |
bool UaByteString::operator== | ( | const UaByteString & | other | ) | const |
Compare variables if they are similar.
other | the char to compare. |
bool UaByteString::operator> | ( | const UaByteString & | other | ) | const |
Is greater than operator.
other | the UaByteString to compare. |
void UaByteString::setByteString | ( | OpcUa_Int32 | iLength, |
OpcUa_Byte * | pData | ||
) |
Set ByteString data.
iLength | the length of the data. |
pData | the actual used data. |
UaString UaByteString::toHex | ( | bool | bSeparateWithSpace = false | ) | const |
Converts the byte string into a hex string.
bSeparateWithSpace | Separates each byte in the hex string with a space. Per default bSeparateWithSpace=false, you can use bSeparateWithSpace = true for better display. |