Avena Webapp API - v0.0.1
    Preparing search index...

    Function labjackConfigKey

    • Builds the key of a LabJack config in the KV bucket avenabox.

      Every token is sanitized. Missing or empty values fall back to unknown-site and unknown-box, and the source falls back from source_id to labjack_name to asset<NNN>, the same order as the subject builders and Rust's source_token. Only without an asset number does the source become unknown-source.

      Parameters

      • config: {
            asset_number?: number | null;
            box_id?: string | null;
            labjack_name?: string | null;
            site_id?: string | null;
            source_id?: string | null;
        }

        Identity fields of the config.

      Returns string

      <site>.<box>.<source>.config, e.g. i69.i69-mu1.i69-lj2.config.

      labjackConfigKey({ site_id: "i69", box_id: "i69-mu1", source_id: "i69-lj2" });
      // "i69.i69-mu1.i69-lj2.config"
      labjackConfigKey({ site_id: "i69", box_id: "i69-mu1", source_id: "", labjack_name: "", asset_number: 7 });
      // "i69.i69-mu1.asset007.config"