script provision behaviour

Miguel Ángel Sánchez Moragues sanchez.moragues at gmail.com
Fri May 5 11:55:43 EDT 2017


It's ok, but Why the ACS executes the "refresh2 script" twice?

I see that for every preset with script provision which has
GetParameterValues or SetParamereterValues executes twice.

2017-05-05 17:15 GMT+02:00 Dan Morphis <dan at milkcarton.com>:

> See below
>
> -dan
>
> > On May 5, 2017, at 3:22 AM, Miguel Ángel Sánchez Moragues <
> sanchez.moragues at gmail.com> wrote:
> >
> > Sorry, I don't understand the behavior.
> >
> > Another example with the following script which is execute every "2
> PERIODIC" event:
> >
> >
> > let now = Date.now();
> > let serialNumber = declare("DeviceID.SerialNumber", {value: 1});
> >
> > log('start refresh3 script SN=' + serialNumber.value[0]);
> >
> > /*
> > let credentials = ext('gateway', 'getPPPoE', serialNumber.value[0]);
> >
> > if (credentials) {
> >       log('username = ' + credentials.username + ' , password = ' +
> credentials.password);
> > }
> > */
> >
> > declare("InternetGatewayDevice.ManagementServer.PeriodicInformInterval",
> {value: now}, {value: 60});
> > declare("InternetGatewayDevice.ManagementServer.PeriodicInformEnable",
> {value: now}, {value: true});
> > declare("InternetGatewayDevice.ManagementServer.ConnectionRequestUsername",
> {value: now}, {value: "cpe"});
> >
> >
> > The acs sends a GetParameterValues but doesn't send a SetParameterValues
> because the values are the same that in local bbdd. What is the change in
> this case?
>
> The change is "{value: now}, {value: 60}", that's telling genie to verify
> the value for that parameter is 60 if the timestamp is older than now
> (which will always be the case). If you change it to value:1, then the
> parameter will be set only one time (because one one time will the
> timestamp be older than 1).
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170505/18ee5509/attachment-0002.html>


More information about the Users mailing list