Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ make
sudo make install
```

### Optional Build Features

| Flag | Macro | Default | Description |
|------|-------|---------|-------------|
| `--enable-dynamic-table-support` | `ENABLE_DYNAMIC_TABLE_SUPPORT` | Disabled | Dynamic TR-181 table traversal via `dataModelTable` profile entries |

#### Dynamic Table Support

When enabled (`./configure --enable-dynamic-table-support=yes`), this unlocks:

- **`dataModelTable` parameter type** in report profiles — collect structured multi-row data from any TR-181 table (e.g., `Device.WiFi.Radio.`, `Device.DHCPv6.Server.Pool.`)
- **Index-based row selection** — filter specific rows using comma-separated indices or ranges (e.g., `"1,2"`, `"1-4"`)
- **Wildcard collection** — omit index to collect all available table rows automatically
- **Nested table traversal** — support sub-tables within tables
- **Structured JSON array encoding** — report output keyed by table base path with 1-based row positioning

When disabled (default), profiles containing `dataModelTable` entries are silently ignored at runtime with no impact on existing functionality.

See [Profile Schema](schemas/t2_reportProfileSchema.schema.json) for the `dataModelTable` JSON schema definition.

### Docker Development

Refer to the provided Docker container for a consistent development environment:
Expand Down
2 changes: 1 addition & 1 deletion build_inside_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export CFLAGS=" ${DEBUG_CFLAGS} -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_D

export LDFLAGS="-L/usr/lib/x86_64-linux-gnu -lglib-2.0"

./configure --prefix=${INSTALL_DIR} --enable-rdkcertselector=yes && make && make install
./configure --prefix=${INSTALL_DIR} --enable-rdkcertselector=yes --enable-dynamic-table-support=yes && make && make install
1 change: 1 addition & 0 deletions docs/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ graph TB
- **Purpose**: Retrieve TR-181 data model parameters
- **Protocol**: D-Bus (CCSP) or RBUS
- **Caching**: Parameter value cache with TTL
- **Dynamic Tables**: Supports structured traversal of multi-instance TR-181 objects via `dataModelTable` profile entries
- **Files**: `source/ccspinterface/`

### 3. Processing Layer
Expand Down
14 changes: 9 additions & 5 deletions schemas/t2_reportProfileSchema.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,34 @@
},
"dataModelSimple": {
"title": "\"dataModel\" Parameter (restricted for use in dataModelTable)",
"description": "A simplified dataModel parameter used within dataModelTable entries. The 'reference' is a leaf parameter name relative to the table row path (e.g. 'Enable', 'SSID', 'Channel').",
"type": "object",
"properties": {
"type": { "type": "string", "const": "dataModel" },
"reference": { "type": "string" }
"reference": { "type": "string", "description": "Leaf parameter name relative to the table row (e.g. 'Enable', 'Status', 'SSID')." }
},
"required": ["type", "reference"],
"additionalProperties": false
},
"dataModelTable": {
"title": "\"dataModelTable\" Parameter",
"description": "A dataModelTable parameter enables structured traversal of TR-181 multi-instance objects (tables). It collects sub-parameter values for each row in the table and encodes them as a JSON array keyed by the table base path.",
"type": "object",
"properties": {
"type": { "type": "string", "const": "dataModelTable" },
"type": { "type": "string", "const": "dataModelTable", "description": "Defines a dynamic table parameter for multi-row TR-181 data collection." },
"reference": {
"type": "string",
"pattern": ".*\\.$",
"description": "Reference must end with a dot '.'"
"description": "The TR-181 table base path. Must end with a dot '.', e.g. 'Device.WiFi.Radio.' or 'Device.DHCPv6.Server.Pool.'"
},
"index": {
"type": "string",
"pattern": "^(\\d+(-\\d+)?)(,(\\d+(-\\d+)?))*$",
"description": "Comma separated numbers, ranges (e.g. 1-4), or combinations (e.g. 1,2,5-7)."
"description": "Optional. Comma-separated row indices or ranges to collect. Examples: '1' (single row), '1-4' (range), '1,3,5' (list), '1-2,5,7-9' (mixed). Values must be 0-255. If omitted, all available rows are collected via wildcard query."
},
"Parameter": {
"type": "array",
"description": "Array of sub-parameters to collect from each table row. Each item must be a dataModel (leaf parameter) or a nested dataModelTable (sub-table traversal).",
"items": {
"oneOf": [
{ "$ref": "#/definitions/parmDefinitions/properties/dataModelSimple" },
Expand All @@ -132,7 +135,8 @@
}
},
"required": ["type", "reference", "Parameter"],
"additionalProperties": false
"additionalProperties": false,
"example": "{ \"type\": \"dataModelTable\", \"reference\": \"Device.WiFi.Radio.\", \"index\": \"1,2\", \"Parameter\": [ { \"type\": \"dataModel\", \"reference\": \"Enable\" }, { \"type\": \"dataModel\", \"reference\": \"Channel\" } ] }"
}
}
},
Expand Down
Loading
Loading