@linyixian/node-red-contrib-aitrios-meta-desirialize 0.0.3

A Node-RED node to deserialize AITRIOS metadata (FlatBuffers) to JSON.

npm install @linyixian/node-red-contrib-aitrios-meta-desirialize

node-red-contrib-aitrios-meta-desirialize

English | 日本語

English

A Node-RED node for deserializing AITRIOS metadata from FlatBuffers format to JSON.

Features

  • Deserializes AITRIOS metadata (FlatBuffers) to JSON format
  • Supports object detection data including:
    • Class ID
    • Confidence score
    • Bounding box coordinates (2D)
  • Handles error cases gracefully
  • Provides detailed error messages

Installation

npm install @linyixian/node-red-contrib-aitrios-meta-desirialize

Usage

  1. Add the "AITRIOS Meta Deserialize" node to your flow
  2. Connect a node that outputs AITRIOS metadata in FlatBuffers format to the input
  3. Connect the output to your desired destination node

Input

The input message should have a payload property containing the FlatBuffers data as a Buffer.

Example input:

{
    payload: <Buffer containing FlatBuffers data>
}

Output

The output message will have a payload property containing the deserialized JSON data.

Example output:

{
    payload: {
        perception: {
            object_detection_list: [
                {
                    class_id: 1,
                    score: 0.95,
                    bounding_box: {
                        left: 10,
                        top: 20,
                        right: 30,
                        bottom: 40
                    }
                }
            ]
        }
    }
}

Error Handling

If the input is invalid, the node will:

  1. Set an error message in msg.error
  2. Log the error using Node-RED's error logging
  3. Forward the message with the error information

Development

# Install dependencies
npm install

# Run tests
npm test

日本語

AITRIOSメタデータをFlatBuffers形式からJSON形式にデシリアライズするためのNode-REDノードです。

機能

  • AITRIOSメタデータ(FlatBuffers)をJSON形式にデシリアライズ
  • 以下のオブジェクト検出データをサポート:
    • クラスID
    • 信頼度スコア
    • バウンディングボックス座標(2D)
  • エラーケースを適切に処理
  • 詳細なエラーメッセージを提供

インストール

npm install @linyixian/node-red-contrib-aitrios-meta-desirialize

使用方法

  1. フローに「AITRIOS Meta Deserialize」ノードを追加
  2. FlatBuffers形式のAITRIOSメタデータを出力するノードを入力に接続
  3. 出力を目的のノードに接続

入力

入力メッセージは、FlatBuffersデータをBufferとして含むpayloadプロパティを持つ必要があります。

入力例:

{
    payload: <FlatBuffersデータを含むBuffer>
}

出力

出力メッセージは、デシリアライズされたJSONデータを含むpayloadプロパティを持ちます。

出力例:

{
    payload: {
        perception: {
            object_detection_list: [
                {
                    class_id: 1,
                    score: 0.95,
                    bounding_box: {
                        left: 10,
                        top: 20,
                        right: 30,
                        bottom: 40
                    }
                }
            ]
        }
    }
}

エラー処理

入力が無効な場合、ノードは以下の処理を行います:

  1. msg.errorにエラーメッセージを設定
  2. Node-REDのエラーログ機能を使用してエラーを記録
  3. エラー情報を含むメッセージを転送

開発

# 依存関係のインストール
npm install

# テストの実行
npm test

License

Apache License 2.0

Node Info

Version: 0.0.3
Updated 7 hours ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • aitrios-meta-desirialize

Keywords

  • node-red
  • aitrios
  • flatbuffers

Maintainers