cniSetElementValue group

Use one or more of the functions in this group to set the value of the specified syntax element.

Specify the appropriate function from this group that matches the type of data to be retrieved:

  • cniSetElementBitArrayValue
  • cniSetElementBooleanValue
  • cniSetElementByteArrayValue
  • cniSetElementCharacterValue
  • cniSetElementDateValue
  • cniSetElementDecimalValue
  • cniSetElementGmtTimestampValue
  • cniSetElementGmtTimeValue
  • cniSetElementIntegerValue
  • cniSetElementRealValue
  • cniSetElementTimestampValue
  • cniSetElementTimeValue

Syntax

void cniSetElementBitArrayValue(
  int*                      returnCode,
  CciElement*               targetElement,
  const struct CciBitArray* value);
void cniSetElementBooleanValue(
  int*                       returnCode,
  CciElement*                targetElement,
  CciBool                    value);
void cniSetElementByteArrayValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const struct CciByteArray* value);
void cniSetElementCharacterValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const CciChar*             value,
  CciSize                    length);
void cniSetElementDateValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const struct CciDate*      value);
void cniSetElementDecimalValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const CciChar*             value);
void cniSetElementGmtTimestampValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const struct CciTimestamp* value);
void cniSetElementGmtTimeValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const struct CciTime*      value);
void cniSetElementIntegerValue(
  int*                       returnCode,
  CciElement*                targetElement,
  CciInt                     value);
void cniSetElementRealValue(
  int*                       returnCode,
  CciElement*                targetElement,
  CciReal                    value);
void cniSetElementTimestampValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const struct CciTimestamp* value);
void cniSetElementTimeValue(
  int*                       returnCode,
  CciElement*                targetElement,
  const struct CciTime*      value);

Parameters

returnCode
The return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
  • CCI_INV_DATA_POINTER
  • CCI_INV_DATA_BUFLEN
targetElement
The address of the target syntax element object (input).
value
The value to store in the syntax element (input).
length
The length of the data value (input). Used on relevant function calls only.

Return values

None. If an error occurs, the returnCode parameter indicates the reason for the error.

Example

	static char* functionName = (char *)"_Input_run()";
	void* buffer;
	CciTerminal* terminalObject;
	int buflen = 4096;
	int rc = CCI_SUCCESS;
	int rcDispatch = CCI_SUCCESS;
	char xmlData[] = "<A>data</a>";
	buffer = malloc(buflen);
	memcpy(buffer, &xmlData, sizeof(xmlData));

	cniSetInputBuffer(&rc, message, buffer, buflen);