Writable table as VirtualParameter

Dan Morphis dan at milkcarton.com
Mon Apr 16 17:04:50 EDT 2018


I stand corrected! I wasn't aware this functionality was implemented.

-dan

On Mon, Apr 16, 2018 at 12:09 PM, Robert Drake <rdrake-genieacs at ipsek.net>
wrote:

> Dan Morphis(dan at milkcarton.com)@2018-04-15 14:31:56 -0800:
> > Also, v parameters aren’t writable at this time.
> >
> > -dan
> >
>
> I think they are, but I'm not sure if there are unintended side effects or
> other
> problems (this is from genieacs 1.0 I believe).  It'd be a shame if this
> doesn't work
> because I was pretty much counting on it for easy provisioning of
> different device types.
>
> my vparameter for SSID looks like this:
>
>         if (VALUES && VALUES.value) {
>            m = VALUES.value[0];
>            declare("Device.WiFi.SSID.1.SSID", null, {value: m});
>            declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID",
> null, {value: m});
>         }
>         else {
>                 let d = declare("Device.WiFi.SSID.1.SSID", {value:
> Date.now()});
>                 let igd = declare("InternetGatewayDevice.
> LANDevice.1.WLANConfiguration.1.SSID", {value: Date.now()});
>
>                 if (d.size) {
>                   m = d.value[0];
>                 }
>                 else if (igd.size) {
>                   m = igd.value[0];
>                 }
>         }
>         return {writable: true, value: [m, "xsd:string"]};
>
>
> It seems to update the SSID if I edit VirtualParameter.SSID.
> _______________________________________________
> 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/20180416/ee263a1a/attachment.html>


More information about the Users mailing list