Skip to main content

Class: PerformancePlanRepository

Correlates flight plan indices with performance plan objects

Constructors

constructor

new PerformancePlanRepository(flightPlanner, bus): PerformancePlanRepository

Ctor

Parameters

NameTypeDescription
flightPlannerFlightPlanner<any>a flight planner instance
busEventBusthe event bus

Returns

PerformancePlanRepository

Defined in

workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:36

Methods

copy

copy(from, to, skipChecks?): void

Copies a performance plan onto another

Parameters

NameTypeDefault valueDescription
fromnumberundefinedfrom index
tonumberundefinedto index
skipChecksbooleanfalsewhether 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

NameTypeDescription
atIndexnumberthe index

Returns

PerformancePlan

the created plan

Defined in

workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:144


defaultValuesPlan

defaultValuesPlan(): PerformancePlan

Returns the performance plan containing default values

Returns

PerformancePlan

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

NameTypeDescription
indexnumberflight plan index

Returns

PerformancePlan

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

PerformancePlan

the active plan

Defined in

workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:107


getModPlan

getModPlan(): PerformancePlan

Gets the mod plan.

Returns

PerformancePlan

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

NameTypeDescription
indexnumberthe 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

NameTypeDescription
planIndexnumberthe plan index

Returns

void

Defined in

workingtitle-instruments-wt21/shared/Performance/PerformancePlanRepository.ts:178