Class: PerformancePlanRepository
Correlates flight plan indices with performance plan objects
Constructors
constructor
• new PerformancePlanRepository(flightPlanner
, bus
): PerformancePlanRepository
Ctor
Parameters
Name | Type | Description |
---|---|---|
flightPlanner | FlightPlanner <any > | a flight planner instance |
bus | EventBus | the event bus |
Returns
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:36
Methods
copy
▸ copy(from
, to
, skipChecks?
): void
Copies a performance plan onto another
Parameters
Name | Type | Default value | Description |
---|---|---|---|
from | number | undefined | from index |
to | number | undefined | to index |
skipChecks | boolean | false | whether to skip flight planner checks |
Returns
void
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:159
create
▸ create(atIndex
): PerformancePlan
Creates a performance plan at the given index
Parameters
Name | Type | Description |
---|---|---|
atIndex | number | the index |
Returns
the created plan
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:144
defaultValuesPlan
▸ defaultValuesPlan(): PerformancePlan
Returns the performance plan containing default values
Returns
the plan
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:124
forFlightPlanIndex
▸ forFlightPlanIndex(index
): PerformancePlan
Returns a performance plan for a given flight plan index, or creates it
Parameters
Name | Type | Description |
---|---|---|
index | number | flight plan index |
Returns
the performance plan
Throws
if an invalid flight plan index is specified
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:83
getActivePlan
▸ getActivePlan(): PerformancePlan
Gets the active plan. This is the plan that always exists even if there is no valid flight plan yet.
Returns
the active plan
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:107
getModPlan
▸ getModPlan(): PerformancePlan
Gets the mod plan.
Returns
the mod plan
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:115
has
▸ has(index
): boolean
Whether the repository has a performance plan already stored for a given index
Parameters
Name | Type | Description |
---|---|---|
index | number | the index |
Returns
boolean
boolean
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:70
hasAnyPlan
▸ hasAnyPlan(): boolean
Returns whether this plan repository has nay valid plans
Returns
boolean
boolean
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:133
triggerSync
▸ triggerSync(planIndex
): void
Triggers a synchronisation of the active plan performance plan over the EventBus.
Parameters
Name | Type | Description |
---|---|---|
planIndex | number | the plan index |
Returns
void
Defined in
workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:178