summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/linkCalculationApp/src/handlers')
-rw-r--r--sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts51
1 files changed, 48 insertions, 3 deletions
diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
index 608367072..edfad052a 100644
--- a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
+++ b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
@@ -21,7 +21,7 @@ import { combineActionHandler } from '../../../../framework/src/flux/middleware'
// ** do not remove **
import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
import { IActionHandler } from '../../../../framework/src/flux/action';;
-import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction, UpdatePolAction, updateAltitudeAction, UpdateAbsorptionLossAction, UpdateWorstMonthRainAction} from '../actions/commonLinkCalculationActions';
+import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction, UpdatePolAction, updateAltitudeAction, UpdateAbsorptionLossAction, UpdateWorstMonthRainAction, UpdateEIRPAction, UpdateAntennaAction, UpdateAntennaListAction, UpdateAntennaGainAction, UpdateTxPowerAction, UpdateRxSensitivityAction} from '../actions/commonLinkCalculationActions';
declare module '../../../../framework/src/store/applicationStore' {
interface IApplicationStoreState {
@@ -55,7 +55,20 @@ export type ILinkCalculationAppStateState= {
aglB:number,
absorptionWater:number,
absorptionOxygen: number,
- month: string
+ month: string,
+ eirpA: number,
+ eirpB: number,
+ antennaGainA: number,
+ antennaGainB :number,
+ antennaList:string[],
+ antennaGainList:string[],
+ antennaA: string,
+ antennaB:string,
+ systemOperatingMargin : number,
+ txPowerA : string,
+ txPowerB: string,
+ rxSensitivityA : string,
+ rxSensitivityB: string
}
const initialState: ILinkCalculationAppStateState ={
@@ -80,7 +93,20 @@ const initialState: ILinkCalculationAppStateState ={
aglB:0,
absorptionWater:0,
absorptionOxygen: 0,
- month: ''
+ month: '',
+ eirpA: 0,
+ eirpB: 0,
+ antennaGainA :0,
+ antennaGainB :0,
+ antennaList:[],
+ antennaGainList:[],
+ antennaA: '0',
+ antennaB:'0',
+ systemOperatingMargin : 0,
+ txPowerA : '0',
+ txPowerB: '0',
+ rxSensitivityA: '0',
+ rxSensitivityB: '0'
}
@@ -130,6 +156,25 @@ export const LinkCalculationHandler: IActionHandler<ILinkCalculationAppStateStat
else if (action instanceof UpdateWorstMonthRainAction){
state = Object.assign({}, state, {month:action.month})
}
+ else if (action instanceof UpdateEIRPAction){
+ state = Object.assign({}, state, {eirpA:action.eirpA, eirpB:action.eirpB})
+ }
+ else if (action instanceof UpdateAntennaGainAction){
+ state = Object.assign({}, state, {antennaGainList:action.antennaGainList})
+ }
+ else if (action instanceof UpdateAntennaListAction){
+ state = Object.assign({}, state, {antennaList:action.antennaList})
+ }
+ else if (action instanceof UpdateAntennaAction){
+ state = Object.assign({}, state, {antennaA:action.antennaA == null ? state.antennaA : action.antennaA , antennaB: action.antennaB == null? state.antennaB : action.antennaB})
+ }
+ else if (action instanceof UpdateTxPowerAction){
+ state = Object.assign({}, state, {txPowerA:action.txPowerA == null ? state.txPowerA : action.txPowerA , txPowerB: action.txPowerB == null? state.txPowerB : action.txPowerB})
+ }
+ else if (action instanceof UpdateRxSensitivityAction){
+ state = Object.assign({}, state, {rxSensitivityA:action.rxSensitivityA == null ? state.rxSensitivityA : action.rxSensitivityA , rxSensitivityB: action.rxSensitivityB == null? state.rxSensitivityB : action.rxSensitivityB})
+ }
+
return state
}