Skip to content

C API Get Functions

ziAPIGetValueD

ZIResult_enum ziAPIGetValueD(ZIConnection conn, const char *path, ZIDoubleData *value)

gets the double-type value of the specified node

This function retrieves the numerical value of the specified node as an double-type value. The value first found is returned if more than one value is available (a wildcard is used in the path).See example ExampleSetGet.cpp. ziAPISetValueD, ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to ZIConnection with which the value should be retrieved
path const char * in Path to the node holding the value
value ZIDoubleData * out Pointer to a double in which the value should be written

Returns

  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
  • ZI_ERROR_LENGTH if the path's length exceeds MAX_PATH_LEN
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetComplexData

ZIResult_enum ziAPIGetComplexData(ZIConnection conn, const char *path, ZIDoubleData *real, ZIDoubleData *imag)

gets the complex double-type value of the specified node

This function retrieves the numerical value of the specified node as an complex double-type value. The value first found is returned if more than one value is available (a wildcard is used in the path).See example ExampleSetGet.cpp. ziAPISetComplexData, ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to ZIConnection with which the value should be retrieved
path const char * in Path to the node holding the value
real ZIDoubleData * out Pointer to a double in which the real value should be written
imag ZIDoubleData * out Pointer to a double in which the imaginary value should be written

Returns

  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
  • ZI_ERROR_LENGTH if the path's length exceeds MAX_PATH_LEN
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetValueI

ZIResult_enum ziAPIGetValueI(ZIConnection conn, const char *path, ZIIntegerData *value)

gets the integer-type value of the specified node

This function retrieves the numerical value of the specified node as an integer-type value. The value first found is returned if more than one value is available (a wildcard is used in the path). ziAPISetValueI, ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to ZIConnection with which the value should be retrieved
path const char * in Path to the node holding the value
value ZIIntegerData * out Pointer to an 64bit integer in which the value should be written

Returns

  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
  • ZI_ERROR_LENGTH if the path's length exceeds MAX_PATH_LEN
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetDemodSample

ZIResult_enum ziAPIGetDemodSample(ZIConnection conn, const char *path, ZIDemodSample *value)

Gets the demodulator sample value of the specified node.

This function retrieves the value of the specified node as an DemodSample struct. The value first found is returned if more than one value is available (a wildcard is used in the path). This function is only applicable to paths matching DEMODS/[0-9]+/SAMPLE. ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to ZIConnection with which the value should be retrieved
path const char * in Path to the node holding the value
value ZIDemodSample * out Pointer to a ZIDemodSample struct in which the value should be written

Returns

  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
  • ZI_ERROR_LENGTH if the path's length exceeds MAX_PATH_LEN
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetDIOSample

ZIResult_enum ziAPIGetDIOSample(ZIConnection conn, const char *path, ZIDIOSample *value)

Gets the Digital I/O sample of the specified node.

This function retrieves the newest available DIO sample from the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path). This function is only applicable to nodes ending in "/DIOS/[0-9]+/INPUT". ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to the ZIConnection with which the value should be retrieved
path const char * in Path to the node holding the value
value ZIDIOSample * out Pointer to a ZIDIOSample struct in which the value should be written

Returns

  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
  • ZI_ERROR_LENGTH if the Path's Length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by MaxLen is too small for all elements
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetAuxInSample

ZIResult_enum ziAPIGetAuxInSample(ZIConnection conn, const char *path, ZIAuxInSample *value)

gets the AuxIn sample of the specified node

This function retrieves the newest available AuxIn sample from the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path). This function is only applicable to nodes ending in "/AUXINS/[0-9]+/SAMPLE". ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to the ziConnection with which the Value should be retrieved
path const char * in Path to the Node holding the value
value ZIAuxInSample * out Pointer to an ZIAuxInSample struct in which the value should be written

Returns

  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred
  • ZI_ERROR_LENGTH if the Path's Length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by MaxLen is too small for all elements
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetValueB

ZIResult_enum ziAPIGetValueB(ZIConnection conn, const char *path, unsigned char *buffer, unsigned int *length, unsigned int bufferSize)

gets the Bytearray value of the specified node

This function retrieves the newest available DIO sample from the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path). ziAPISetValueB, ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to the ziConnection with which the value should be retrieved
path const char * in Path to the Node holding the value
buffer unsigned char * out Pointer to a buffer to store the retrieved data in
length unsigned int * out Pointer to an unsigned int which after the call, contains the length of the retrieved data. If the length of the passed buffer is insufficient, the value is modified to indicate the required minimum buffer size and ZI_ERROR_LENGTH is returned.
bufferSize unsigned int in The length of the passed buffer

Returns

  • ZI_INFO_SUCCESS on success.
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred.
  • ZI_ERROR_LENGTH if the Path's Length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by MaxLen is too small for all elements.
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetValueString

ZIResult_enum ziAPIGetValueString(ZIConnection conn, const char *path, char *buffer, unsigned int *length, unsigned int bufferSize)

gets a null-terminated string value of the specified node

This function retrieves the newest string value for the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path). ziAPISetValueString, ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to the ziConnection with which the value should be retrieved
path const char * in Path to the Node holding the value
buffer char * out Pointer to a buffer to store the retrieved null-terminated string
length unsigned int * out Pointer to an unsigned int which after the call, contains the length of the retrieved data (including the null terminator). If the length of the passed buffer is insufficient, the value is modified to indicate the required minimum buffer size and ZI_ERROR_LENGTH is returned.
bufferSize unsigned int in The length of the passed buffer

Returns

  • ZI_INFO_SUCCESS on success.
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred.
  • ZI_ERROR_LENGTH if the Path's Length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by MaxLen is too small for all elements.
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.

ziAPIGetValueStringUnicode

ZIResult_enum ziAPIGetValueStringUnicode(ZIConnection conn, const char *path, wchar_t *wbuffer, unsigned int *length, unsigned int bufferSize)

gets a null-terminated string value of the specified node

This function retrieves the newest unicode string value for the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path). ziAPISetValueStringUnicode, ziAPIGetValueAsPollData

Parameters

Name Type Direction Description
conn ZIConnection in Pointer to the ziConnection with which the value should be retrieved
path const char * in Path to the Node holding the value
wbuffer wchar_t * out Pointer to a buffer to store the retrieved null-terminated string
length unsigned int * out Pointer to an unsigned int which after the call, contains the length of the retrieved data (including the null terminator). If the length of the passed buffer is insufficient, the value is modified to indicate the required minimum buffer size and ZI_ERROR_LENGTH is returned.
bufferSize unsigned int in The length of the passed buffer

Returns

  • ZI_INFO_SUCCESS on success.
  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred.
  • ZI_ERROR_LENGTH if the Path's Length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by MaxLen is too small for all elements.
  • ZI_ERROR_COMMAND on an incorrect answer of the server
  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server
  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node
  • ZI_ERROR_TIMEOUT when communication timed out
  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.