Hello everyone, can someone please explain me the difference between these two different ways to fetch/get parameter values?
1: getParameterValues
query = { “name”: “getParameterValues”, “parameterNames”: [ “InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnectionNumberOfEntries”, “InternetGatewayDevice.Time.NTPServer1”, “InternetGatewayDevice.Time.Status” ] }
curl -i ‘http://localhost:7557/devices/00236a-96318REF-SR360NA0A4%252D0003196/tasks?timeout=3000&connection_request’
-X POST
–data ‘{“name”: “getParameterValues”, “parameterNames”: [“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnectionNumberOfEntries”, “InternetGatewayDevice.Time.NTPServer1”, “InternetGatewayDevice.Time.Status”] }’
2: Using projection
to return specific parameters for a given device:
query = {“_id”: “202BC1-BM632w-000000”}
curl -i ‘http://localhost:7557/devices?query={“_id”%3A"202BC1-BM632w-000000"}&projection=InternetGatewayDevice.DeviceInfo.ModelName,InternetGatewayDevice.DeviceInfo.Manufacturer’
The projection
URL param is a comma-separated list of the parameters to receive.
The first one tells the ACS to refresh the InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnectionNumberOfEntries
, InternetGatewayDevice.Time.NTPServer1
and InternetGatewayDevice.Time.Status
parameters from the CPE.
The second is used for querying data from the ACS. Without a projection, the entire data model for the target device will be returned. Most of the time, thats way more than you need. So you can use a projection to limit the data returned to just the parameters you care about.
If that’s the case, how is getParameterValues
different from using refreshObject
?
For example:
curl -i ‘http://localhost:7557/devices/00236a-SR552n-SR552NA084%252D0003269/tasks?timeout=3000&connection_request’
-X POST
–data ‘{“name”: “refreshObject”, “objectName”: “InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnectionNumberOfEntries”}’
Does refreshObject
effectively perform the same action as the parameter refresh you mentioned, or is there a key distinction between them?
i’m not 100% honestly. I never use refreshObject, only GPN/GPV/SPV.
And what does “getParameterNames” do? As there is nothing mentioned in the docs.
Try google. The information is out there.