BroadbandForum / obuspa

OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent. https://github.com/BroadbandForum/obuspa/wiki
BSD 3-Clause "New" or "Revised" License
93 stars 62 forks source link

Some of the DeviceInfo. parameters are defined as constants #17

Closed shanthakumarks closed 3 years ago

shanthakumarks commented 3 years ago

We noticed that some the below mentioned Device.DeviceInfo. paramteters are registered as parameter constants in Core code which reads values from #define .

err |= USP_REGISTER_Param_Constant("Device.DeviceInfo.ProductClass", VENDOR_PRODUCT_CLASS, DM_STRING);
err |= USP_REGISTER_Param_Constant("Device.DeviceInfo.Manufacturer", VENDOR_MANUFACTURER, DM_STRING);
err |= USP_REGISTER_Param_Constant("Device.DeviceInfo.ModelName", VENDOR_MODEL_NAME, DM_STRING);

is there any reason for defining them as constants ? We would like to implement a vendor specific functions to pull values from device for these parameters but unfortunately there is no option to hook up the vendor specific function as they are defined as constants. is modifying the core code to enable vendor hook function the only solution to handle this ?

duttajnu commented 3 years ago

Hi @shanthakumarks ,

You can enable #define REMOVE_DEVICE_INFO parameter in vendor_defs.h file and then override the values in vendor specific file(s).

shanthakumarks commented 3 years ago

Hi @duttajnu

Great ! Thanks for the quick resolution . I overlooked the #define REMOVE_DEVICE_INFO.