export class commonSettings {
    //public hubAddr: string = "";
    public hwdName: string = "";
    public friendlyName: string = "";

    public set(unknownSettings : any) :boolean
    {
        if (unknownSettings["hwdName"] === undefined)
        {
            console.log("invalid local settings");
            return false
        }
      //  if ("hubAddr" in unknownSettings) this.hubAddr = unknownSettings["hubAddr"].toString();
        if ("hwdName" in unknownSettings) this.hwdName = unknownSettings["hwdName"].toString();
        if ("friendlyName" in unknownSettings) this.friendlyName = unknownSettings["friendlyName"].toString();
        return true
    }
}

export class globalSettings
  {   public hubAddrList: string = "";
      public set(unknownSettings : any) :boolean
      {
          if (unknownSettings["hubAddrList"] === undefined)
          {
              console.log("invalid global settings");
              return false
          }
          if ("hubAddrList" in unknownSettings) this.hubAddrList = unknownSettings["hubAddrList"].toString();
          return true
      }
  }