Open paulr34 opened 3 months ago
If you tell us what format ZAP can ingest here, we can try to add the relevant bits to the XML.
@bzbarsky-apple it makes sense based on previous discussion to do something like following:
Example 1
<endpointComposition>
<type>fullFamily</type>
<endpoint>
<deviceType> name of device type </deviceType>
</endpoint>
</endpointComposition>
OR
Example 2
<endpointComposition>
<endpoint>
<deviceType> name of device type </deviceType>
</endpoint>
<endpoint>
<deviceType> name of device type </deviceType>
</endpoint>
</endpointComposition>
ZAP can parse the XML in this case and know
Alternatively we could put "type" for tree as well like:
Example 3
<endpointComposition>
<type> tree </type>
<endpoint>
<deviceType> name of device type </deviceType>
</endpoint>
<endpoint>
<deviceType> name of device type </deviceType>
</endpoint>
</endpointComposition>
I might be out of date or missing some context, but If something along these lines is added to the XML, ZAP can parse and add to the database per Device Type
That all seems fine; how do you want to handle child endpoints that must be present vs child endpoints that are allowed to be present but not required?
And do we want name of device type, or id?
It makes sense to assign an attribute to an endpoint XML tag to indicate whether it's optional. In the example below, the first endpoint is marked as mandatory (true), while the second one is not (false), making it optional. Despite not being mandatory, the presence of the second endpoint in the table implies that it's allowed.
Something along these lines makes sense to me:
<endpointComposition>
<endpoint mandatory=true>
<deviceType> name of device type </deviceType>
</endpoint>
<endpoint mandatory=false>
<deviceType> name of device type </deviceType>
</endpoint>
</endpointComposition>
Regarding Device Type or Id, from a ZAP perspective either could work but let me double check and get back to you tomorrow.
It makes most sense for ZAP to consume the Device Type ID rather than the name
<endpointComposition>
<endpoint mandatory=true>
<deviceId> device type ID </deviceId>
</endpoint>
<endpoint mandatory=false>
<deviceId> device type ID </deviceId>
</endpoint>
</endpointComposition>
That seems pretty reasonable.
Feature description
ZAP utilizes the data model XML and has recently incorporated support for Parent Endpoints.
For ZAP to store Endpoint Composition into the database, it requires the Endpoint Composition to be specified in the Device Type XML.
For instance, the XML should accurately represent the specifications regarding Endpoint Composition. Notably, the current XML lacks any mention of the Temperature Controlled Cabinet being mandatory for a Refrigerator Device Type.
Referencing the "old XML" here and the "new XML" here, it's evident that we need the Device Type to be defined as either "Tree" or "FullFamily" if the Device Type includes Endpoint Composition.
Platform
all
Platform Version(s)
No response
Anything else?
No response