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 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
path 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
role Stringreadonly
-
The role of the section in the consuming circuit. This is a system-maintained field derived from the
SectionOrder
field in the Circuit table.Possible Values:"start-and-end" |"start" |"midspan" |"end"
-
sectionId
sectionId 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
startLocation CircuitLocation |null |undefinedautocast
-
The start location associated with the circuit section. This property is null if the circuit section consumes a subcircuit.
-
stopLocation
stopLocation CircuitLocation |null |undefinedautocast
-
The stop location associated with the circuit section. This property is null if the circuit section consumes a subcircuit.
-
subcircuit
subcircuit Subcircuit |null |undefinedautocast
-
The subcircuit being consumed by the circuit section.
Method Overview
Name | Return Type | Summary | Class |
---|---|---|---|
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
-
Sets the start and stop locations of the circuit section. This method sets the section's
subcircuit
to 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
startLocation
andstopLocation
to null.Parametersubcircuit SubcircuitThe subcircuit that the section will consume.
ReturnsType Description void