-
- // Set properties
- rgn->BindMeta = meta;
-
- rgn->PriBindOps = _get_token_idx(str, &str);
- if( !str ) continue ;
- rgn->SecBindOps = _get_token_idx(str, &str);
- if( !str ) continue ;
- rgn->BindCb = _get_token_idx(str, &str);
- if( !str ) continue ;
- if( *str ) {
- // TODO: Please sir, I want an EOL
- }
- break;
- }
- case UDIPROPS__child_bind_ops:
- {
- tUDI_BindOps *bind = &driver_module->ChildBindOps[child_bind_index++];
- bind->meta_idx = _get_token_idx(str, &str);
- if( !str ) continue ;
- bind->region_idx = _get_token_idx(str, &str);
- if( !str ) continue ;
- bind->ops_idx = _get_token_idx(str, &str);
- if( *str ) {
- // Expected EOL, didn't get it :(
- }
- Log_Debug("UDI", "Child bind - meta:%i,rgn:%i,ops:%i",
- bind->meta_idx, bind->region_idx, bind->ops_idx);
- break;
- }
- case UDIPROPS__supplier:
- case UDIPROPS__contact:
- case UDIPROPS__name:
- case UDIPROPS__shortname:
- case UDIPROPS__release:
- break;
- //case UDIPROPS__requires:
- // // TODO: Requires
- // break;
- case UDIPROPS__device:
- {
- int n_attr = 0;
- // Count properties (and validate)
- _get_token_idx(str, &str); // message
- if( !str ) continue;
- _get_token_idx(str, &str); // meta
- if( !str ) continue;
- while( *str )
+ }
+
+ // Set properties
+ rgn->BindMeta = meta;
+
+ rgn->PriBindOps = _get_token_idx(str, &str);
+ if( !str ) continue ;
+ rgn->SecBindOps = _get_token_idx(str, &str);
+ if( !str ) continue ;
+ rgn->BindCb = _get_token_idx(str, &str);
+ if( !str ) continue ;
+ if( *str ) {
+ // TODO: Please sir, I want an EOL
+ }
+ break;
+ }
+ case UDIPROPS__child_bind_ops:
+ {
+ tUDI_BindOps *bind = &driver_module->ChildBindOps[child_bind_index++];
+ bind->meta_idx = _get_token_idx(str, &str);
+ if( !str ) continue ;
+ bind->region_idx = _get_token_idx(str, &str);
+ if( !str ) continue ;
+ bind->ops_idx = _get_token_idx(str, &str);
+ if( *str ) {
+ // Expected EOL, didn't get it :(
+ }
+ Log_Debug("UDI", "Child bind - meta:%i,rgn:%i,ops:%i",
+ bind->meta_idx, bind->region_idx, bind->ops_idx);
+ break;
+ }
+ case UDIPROPS__supplier:
+ case UDIPROPS__contact:
+ case UDIPROPS__name:
+ case UDIPROPS__shortname:
+ case UDIPROPS__release:
+ break;
+ //case UDIPROPS__requires:
+ // // TODO: Requires
+ // break;
+ case UDIPROPS__device:
+ {
+ int n_attr = 0;
+ // Count properties (and validate)
+ _get_token_idx(str, &str); // message
+ if( !str ) continue;
+ _get_token_idx(str, &str); // meta
+ if( !str ) continue;
+ while( *str )
+ {
+ _get_token_str(str, &str, NULL);
+ if( !str ) break;
+ _get_token_sym(str, &str, true, "string", "ubit32", "boolean", "array", NULL);
+ if( !str ) break;
+ _get_token_str(str, &str, NULL);
+ if( !str ) break;
+ n_attr ++;
+ }
+ // Rewind and actually parse
+ _get_token_str(udipropsptrs[i], &str, NULL);
+
+ tUDI_PropDevSpec *dev = NEW_wA(tUDI_PropDevSpec, Attribs, n_attr);
+ driver_module->Devices[device_index++] = dev;;
+ dev->MessageNum = _get_token_idx(str, &str);
+ dev->MetaIdx = _get_token_idx(str, &str);
+ dev->nAttribs = n_attr;
+ n_attr = 0;
+ while( *str )
+ {
+ udi_instance_attr_list_t *at = &dev->Attribs[n_attr];
+ _get_token_str(str, &str, at->attr_name);
+ if( !str ) break;
+ at->attr_type = _get_token_sym(str, &str, true,
+ " ", "string", "array", "ubit32", "boolean", NULL);
+ if( !str ) break;
+ udi_ubit32_t val;
+ switch( dev->Attribs[n_attr].attr_type )