Wrapper classs for the ua stack structure OpcUa_ByteString. Derived from OpcUa_ByteString. More...

#include <uabytestring.h>

List of all members.

Public Member Functions

 UaByteString ()
 UaByteString (const UaByteString &other)
 UaByteString (const OpcUa_ByteString &other)
 UaByteString (OpcUa_Int32 Length, OpcUa_Byte *pData)
 ~UaByteString ()
void clear ()
void setByteString (OpcUa_Int32 Length, OpcUa_Byte *pData)
UaByteStringoperator= (const UaByteString &other)
void operator<< (const UaByteString &)
bool operator== (const UaByteString &) const
bool operator!= (const UaByteString &) const
bool operator< (const UaByteString &) const
bool operator> (const UaByteString &) const
 operator const OpcUa_ByteString * () const
OpcUa_ByteString * copy () const
void copyTo (OpcUa_ByteString *pDst) const
void detach ()
void attach (const OpcUa_ByteString *pSrc)
OpcUa_Int32 length () const
const OpcUa_Byte * data () const

Static Public Member Functions

static bool compare (const OpcUa_ByteString &, const OpcUa_ByteString &)
static OpcUa_ByteString * clone (const OpcUa_ByteString &source)
static void cloneTo (const OpcUa_ByteString &source, OpcUa_ByteString &copy)
static char * base64encode (const OpcUa_ByteString rawData)
static OpcUa_StatusCode base64decode (const char *pBase64, UaByteString &rawData)

Detailed Description

Wrapper classs for the ua stack structure OpcUa_ByteString. Derived from OpcUa_ByteString.


Constructor & Destructor Documentation

UaByteString::UaByteString (  )

construction

UaByteString::UaByteString ( const UaByteString other )

construction

Parameters:
otherthe UaBytestring
UaByteString::UaByteString ( const OpcUa_ByteString &  other )

construction

Parameters:
otherthe OpcUa_ByteString
UaByteString::UaByteString ( OpcUa_Int32  iLength,
OpcUa_Byte *  pData 
)

construction

Parameters:
iLengththe length of the data.
pDataa pointer to the data itself.
UaByteString::~UaByteString (  )

destruction


Member Function Documentation

void UaByteString::attach ( const OpcUa_ByteString *  pSrc )

Attach the internal byte string data of the passed byte string to the own byte string.

Parameters:
pSrcthe source of this operation.
OpcUa_StatusCode UaByteString::base64decode ( const char *  pBase64,
UaByteString rawData 
) [static]

This method decodes a BASE64 encoded string and returns the decoded data.

Parameters:
pBase64[in] The BASE64 string
rawData[out] The decoded raw data
Returns:
Returns the result code for the operation.
char * UaByteString::base64encode ( const OpcUa_ByteString  rawData ) [static]

This method encodes the passed ByteString into a BASE64 encoded string.

Parameters:
rawDataByteString to encode
Returns:
Returns the encoded string. Must be deleted with delete[].
void UaByteString::clear (  )

Clear the data of the UaByteString.

OpcUa_ByteString * UaByteString::clone ( const OpcUa_ByteString &  source ) [static]

Copy OpcUa_ByteString data to a newly allocated OpcUa_ByteString.

Parameters:
sourcethe source of this operation.
Returns:
a newly allocated OpcUa_ByteString.
void UaByteString::cloneTo ( const OpcUa_ByteString &  source,
OpcUa_ByteString &  copy 
) [static]

Copy OpcUa_ByteString data to an exisitng OpcUa_ByteString structure.

Parameters:
sourceSource OpcUa_ByteString to clone.
copyNew copy of source OpcUa_ByteString.
bool UaByteString::compare ( const OpcUa_ByteString &  data1,
const OpcUa_ByteString &  data2 
) [static]

Compare two UaByteString variables.

Parameters:
data1a value as UaByteString.
data2a value as UaByteString.
Returns:
true if equal false if not.
OpcUa_ByteString * UaByteString::copy (  ) const

Copy UaByteString data to a newly allocated OpcUa_ByteString.

Returns:
a newly allocated OpcUa_ByteString.
void UaByteString::copyTo ( OpcUa_ByteString *  pDst ) const

Copy UaByteString data to an exisitng OpcUa_ByteString structure.

Parameters:
pDstthe destination of the copyoperation.
const OpcUa_Byte* UaByteString::data (  ) const [inline]

Get the data of the actual variable.

Returns:
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.

OpcUa_Int32 UaByteString::length (  ) const [inline]

Get the length of the var.

Returns:
the length of the var.
UaByteString::operator const OpcUa_ByteString * (  ) const

Return internal OpcUa_ByteString structure.

Returns:
internal OpcUa_ByteString structure.
bool UaByteString::operator!= ( const UaByteString other ) const

Returns true if other is not equal to this.

See also:
operator==
Parameters:
otherthe UaString to compare.
Returns:
true if other is not equal to this.
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

Parameters:
otherthe UaByteString to compare.
Returns:
true if lower false if not.
void UaByteString::operator<< ( const UaByteString other )

Appends the other bytestring. This method reallocated the internal memory as needed.

Parameters:
otherthe ByteString to append.
UaByteString & UaByteString::operator= ( const UaByteString other )

Assignment operator.

Parameters:
otherthe ByteString to assign.
Returns:
Assignment operator.
bool UaByteString::operator== ( const UaByteString other ) const

Compare variables if they are similar.

Parameters:
otherthe char to compare.
Returns:
true if not similar false if similar.
bool UaByteString::operator> ( const UaByteString other ) const

Is greater than operator.

Parameters:
otherthe UaByteString to compare.
Returns:
true if greater false if not.
void UaByteString::setByteString ( OpcUa_Int32  iLength,
OpcUa_Byte *  pData 
)

Set ByteString data.

Parameters:
iLengththe length of the data.
pDatathe actual used data.

The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uabase/uabasecpp/uabytestring.h
  • /home/buildbot/work/uasdkcpp/src/uabase/uabasecpp/uabytestring.cpp