-
Notifications
You must be signed in to change notification settings - Fork 0
Model Info User Interface
The User interface is a read only interface, which allows ecosystem operators to determine the manufacturer ID of a Model, which components are contained in the model, and the ability to read a JSON description of the model.
It is expected that the ecosystem operator will first access a compliance contract to determine the ModelId, based on a unique identifier (data hashing method) supplied by the model as it attempts to join the network. All compliance contracts shall contain the ModelId. However, the DeviceInfo contract does not provide information regarding which compliance contracts reference the ModelId.
A model may have components, which are also stored in the DeviceInfo contract. However, a model is not required to have components, in which the ComponentCount returned in the Read function shall be 0.
The Read function provides the manufacturer ID, JSON model data, and number of subcomponents.
| Type | Name | Description |
|---|---|---|
| address | ModelId | ModelId for the model. This value shall be obtained by the associated compliance contract |
| Type | Name | Description |
|---|---|---|
| string | Data | JSON model data |
| address | MfgId | Manufacturer's ID |
| uint | ComponentCount | Number of components contained in the model |
ModelInfo.Read("0x867015b994c81df651bd4f4e66643d021545bf57");
"{\"Mfg\":\"MfgA\",\"Model\":\"ModelB\",\"HwVer\":\"Hw1\",\"FwVer\":\"Fw2\"}","0xbd4d579e0819c4ab3d1b6d59b8429218fc923507",1
The ReadComponent function allows the user to read each address of components contained in the model. The user must first call the Read function to determine the number of components contained int the model.
| Type | Name | Description |
|---|---|---|
| address | ModelId | ModelId for the model. This value shall be obtained by the associated compliance contract |
| uint | ComponentIndex | Index starting at 0 |
| Type | Name | Description |
|---|---|---|
| address | Component | ModelId of the component |
ModelInfo.ReadComponent("0x867015b994c81df651bd4f4e66643d021545bf57",0);
0xbd4d579e0819c4ab3d1b6d59b8429218fc923507