import CircuitSection from "@arcgis/core/networks/support/CircuitSection.js";
const CircuitSection = await $arcgis.import("@arcgis/core/networks/support/CircuitSection.js");
@arcgis/core/networks/support/CircuitSection
Represents a circuit section in a telecom domain network.
Creating a CircuitSection
CircuitSections may be created in one of three ways: with start location and stop location, with a subcircuit, or with neither.
Keep in mind that sectionId must always be specified when instantiating a Circuit, and
sectionType may optionally be specified during instantiation (defaults to physical).
With start and stop location
If created with start and stop locations, the section does not consume a subcircuit.
const startLocation = new CircuitLocation({
sourceId: 20,
globalId: "{728C3E4A-DA4B-4766-9CA5-AF19B9E3F89C}",
terminalId: 1,
firstUnit: 1,
numUnits: 1,
});
const stopLocation = new CircuitLocation({
sourceId: 20,
globalId: "{0E3D7C20-E74D-482F-AE40-4319BCF0EA74}",
terminalId: 1,
firstUnit: 1,
numUnits: 1,
});
const section = new CircuitSection({
sectionId: 1,
sectionType: "physical",
startLocation,
stopLocation,
});
With a subcircuit
If created with a subcircuit, the section does consume a subcircuit.
const section = new CircuitSection({
sectionId: 1,
sectionType: "physical",
subcircuit: new Subcircuit({
name: "SUBCIRCUITVALUE1",
isReserved: false,
}),
});
As an empty section
To create an empty circuit section:
const section = new CircuitSection({ sectionId: 1 });
Constructors
-
Parameterproperties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
| Name | Type | Summary | Class |
|---|---|---|---|
The name of the class. | Accessor | ||
The path between the circuit's start and stop locations. | CircuitSection | ||
The role of the section in the consuming circuit. | CircuitSection | ||
The unique identifier of the circuit section within a circuit. | CircuitSection | ||
Indicates the type of the circuit section. | CircuitSection | ||
The start location associated with the circuit section. | CircuitSection | ||
The stop location associated with the circuit section. | CircuitSection | ||
The subcircuit being consumed by the circuit section. | CircuitSection |
Property Details
-
path
Propertypath CircuitPath |null |undefinedreadonly -
The path between the circuit's start and stop locations. This property is null unless the circuit section is returned by a circuit trace on a sectioned circuit.
-
role
Propertyrole Stringreadonly -
The role of the section in the consuming circuit. This is a system-maintained field derived from the
SectionOrderfield in the Circuit table.Possible Values:"start-and-end" |"start" |"midspan" |"end"
-
sectionId
PropertysectionId Number -
The unique identifier of the circuit section within a circuit. This property is used to define section order in a circuit.
-
Indicates the type of the circuit section. A virtual circuit section does not require traversability between its start and stop locations.
Possible Values:"physical" |"virtual"
-
startLocation
PropertystartLocation CircuitLocation |null |undefinedautocast -
The start location associated with the circuit section. This property is null if the circuit section consumes a subcircuit.
-
stopLocation
PropertystopLocation CircuitLocation |null |undefinedautocast -
The stop location associated with the circuit section. This property is null if the circuit section consumes a subcircuit.
-
subcircuit
Propertysubcircuit Subcircuit |null |undefinedautocast -
The subcircuit being consumed by the circuit section.
Method Overview
| Name | Return Type | Summary | Class |
|---|---|---|---|
Adds one or more handles which are to be tied to the lifecycle of the object. | Accessor | ||
Returns true if a named group of handles exist. | Accessor | ||
Removes a group of handles owned by the object. | Accessor | ||
void | Sets the start and stop locations of the circuit section. | CircuitSection | |
void | Sets the subcircuit for the circuit section to consume. | CircuitSection |
Method Details
-
Inherited from Accessor
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}Inherited from Accessor -
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType Description Boolean Returns trueif a named group of handles exist.Example// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
Inherited from Accessor
-
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");
-
Sets the start and stop locations of the circuit section. This method sets the section's
subcircuitto null.ParametersstartLocation CircuitLocationThe start location of the circuit section.
stopLocation CircuitLocationThe stop location of the circuit section.
ReturnsType Description void
-
Sets the subcircuit for the circuit section to consume. This method sets the section's
startLocationandstopLocationto null.Parametersubcircuit SubcircuitThe subcircuit that the section will consume.
ReturnsType Description void