Modules are essentially collections of arbitrary EDB objects. Modules can even contain other modules. The class EdbModule is the representation of the modules in an EDB.

Configurable attributes, configurable partner relations (between pairs of inliner cavities and inliner connectors) and configurable wire-cavity connections are not supported yet.

Hierarchy (View Summary)

Accessors

  • get id(): ObjectID
  • The unique EDB ID of the object.

    Returns ObjectID

  • get name(): undefined | string
  • The name of the object.

    Returns undefined | string

  • get options(): undefined | readonly string[]
  • Return the options set at the module. Currently, there is only one option available: "autocomplete". It is used to denote (function) modules that only consist of the cavities of devices that are relevant for the vehicle function. EEvision automatically adds all wires, inliners, splices, and eyelets that are needed to electrically connect these cavities.

    Returns undefined | readonly string[]

  • get otype(): ObjectType
  • The object type of the object.

    Returns ObjectType

  • get type(): EdbModuleType
  • The sub-type of the module. For instance, "function" or "config".

    Returns EdbModuleType

Methods

  • Iterate over the attributes of an object.

    Returns Generator<[string, string | readonly string[]], void, any>

    for (const [name, value] of obj.attributes()) {
    if (typeof value === "string") {
    console.log(`${name} = ${value}`);
    } else {
    console.log(`${name} = [${value.join(", ")}]`);
    }
    }
  • Get the value of an attribute.

    Parameters

    • name: string

      the name of the attribute.

    Returns undefined | string | string[]

    the value(s) of the attribute if it exists, or undefined if the object does not have an attribute with the given name. In case the object has multiple attributes with the same name, an array with the values is returned instead of a single string.

  • Iterate over all objects in a module. If the module contains other modules, this does not iterate over their contents.

    Returns Generator<EdbObject, void, any>

    console.log(`Module ${mod.name} contains the following objects:`);
    for (const obj of mod.members()) {
    console.log(`${obj.otype} ${obj.name}`);
    }