Skip to content

Group StringAccess

Modules > StringAccess

The functions in this section provide access to string nodes using character pointers and arrays. This includes getters and setters of values and value lengths.

Public Functions

Type Name
spinStringGetMaxLength (spinNodeHandle hNode, int64_t * pValue)
spinStringGetValue (spinNodeHandle hNode, char * pBuf, size_t * pBufLen)
spinStringGetValueEx (spinNodeHandle hNode, bool8_t bVerify, char * pBuf, size_t * pBufLen)
spinStringSetValue (spinNodeHandle hNode, const char * pBuf)
spinStringSetValueEx (spinNodeHandle hNode, bool8_t bVerify, const char * pBuf)

Public Functions Documentation

function spinStringGetMaxLength

spinStringGetMaxLength (
    spinNodeHandle hNode,
    int64_t * pValue
) 

Retrieves the maximum length of the c-string to be returned

See also: spinError

Parameters:

  • hNode The string node of the length to retrieve
  • pValue The integer pointer in which the maximum length of the c-string is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinStringGetValue

spinStringGetValue (
    spinNodeHandle hNode,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the value of a string node as a c-string

See also: spinError

Parameters:

  • hNode The string node of the value to read
  • pBuf The c-string character buffer in which the value of the node is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinStringGetValueEx

spinStringGetValueEx (
    spinNodeHandle hNode,
    bool8_t bVerify,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the value of a string node as a cstring; manually set whether to verify the node

See also: spinError

Parameters:

  • hNode The string node of the value to read
  • bVerify The boolean of whether to verify the node
  • pBuf The c-string character buffer in which the value of the node is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinStringSetValue

spinStringSetValue (
    spinNodeHandle hNode,
    const char * pBuf
) 

Sets the value of a string node

See also: spinError

Parameters:

  • hNode The string node having its value changed
  • pBuf The c-string of the value to set

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinStringSetValueEx

spinStringSetValueEx (
    spinNodeHandle hNode,
    bool8_t bVerify,
    const char * pBuf
) 

Sets the value of a string node; manually set whether to verify the node

See also: spinError

Parameters:

  • hNode The string node having its value changed
  • bVerify The boolean of whether to verify the node
  • pBuf The c-string of the value to set

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error