cniElementValue グループ

これらの関数は、指定した構文エレメントの値を検索します。

構文

CciSize cniElementBitArrayValue(
    int*                        returnCode,
    CciElement*     targetElement,
  const struct   CciBitArray* value);
CciBool cniElementBooleanValue(
    int*                        returnCode,
  CciElement*  targetElement);
CciSize cniElementByteArrayValue(
    int*                        returnCode,
    CciElement*     targetElement,
  const struct   CciByteArray* value);
CciSize cniElementCharacterValue(
    int*                        returnCode,
    CciElement*     targetElement,
    const CciChar*             value,
  CciSize        length);
struct CciDate cniElementDateValue(
    int*                        returnCode,
  CciElement*  targetElement);
CciSize cniElementDecimalValue(
    int*                        returnCode,
    CciElement*     targetElement,
    const CciChar*             value,
  CciSize        length);
struct CciTimestamp cniElementGmtTimestampValue(
    int*                        returnCode,
  CciElement*  targetElement);
struct CciTime cniElementGmtTimeValue(
    int*                        returnCode,
  CciElement*  targetElement);
CciInt cniElementIntegerValue(
    int*                        returnCode,
  CciElement*  targetElement);
CciReal cniElementRealValue(
    int*                        returnCode,
  CciElement*  targetElement);
struct CciTimestamp cniElementTimestampValue(
    int*                        returnCode,
  CciElement*  targetElement);
struct CciTime cniElementTimeValue(
    int*                        returnCode,
  CciElement*  targetElement);

パラメーター

returnCode
関数からの戻りコード (出力)。
targetElement
ターゲット構文エレメント・オブジェクトのアドレス (入力)。
value
構文エレメントの値が保管される出力バッファーのアドレス (入力)。 関係のある関数呼び出しにのみ使用されます。
length
value パラメーターで指定される、文字単位の出力バッファーの長さ (入力)。 関係のある関数呼び出しにのみ使用されます。

戻り値

  • 成功した場合、ターゲット・エレメントの値が戻されます。
  • エレメントのデータのサイズが異なる場合、正しいデータ・サイズが戻されます。
  • 指定した長さが小さすぎる場合、エラー・コードは CCI_BUFFER_TOO_SMALL に設定されます。
  • エラーが発生した場合、returnCode パラメーターがエラーの理由を示します。

     numberOfChars     = cniElementCharacterValue(
		 		 &rc, firstChild, (CciChar*)&elementValue, sizeof(elementValue)
		 		 );

if (rc==CCI_BUFFER_TOO_SMALL) {
        free(elementValue);
        elementValue      = (CciChar*)malloc(numberOfChars * sizeof(CciChar));
        numberOfChars     = cniElementCharacterValue(
                                    &rc, firstChild, (CciChar*)&elementValue, sizeof(elementValue));
  }

関連概念
ユーザー定義のメッセージ処理ノード
ユーザー定義の出力ノード

関連タスク
C でのメッセージ処理ノードの作成

関連資料
C 言語ノード・ユーティリティー関数
cniElementAsBitstream
cniElementName
cniElementType
cniElementValueState
cniElementValueType
cniElementValueValue
cniSetElementValue グループ