aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2021-08-05 08:50:16 +0200
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2021-08-05 08:50:16 +0200
commit3ba5eb125ac8890968e4437b098e39195d699434 (patch)
treeac58a39013fc9ab2cd468da83e4c41cd2d62b600 /sdnr/wt/odlux/apps/linkCalculationApp/src/handlers
parent437f67407aece6f7aed8e989638b0d64075f0c0a (diff)
Update ODLUX
Add LineOfSightApp, update Framework, Connect, Performance and LinkCalculatorApp Issue-ID: CCSDK-3417 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: I651a2fb771d2963aea70f916c70c8fdfd3443e87
Diffstat (limited to 'sdnr/wt/odlux/apps/linkCalculationApp/src/handlers')
-rw-r--r--sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts60
1 files changed, 36 insertions, 24 deletions
diff --git a/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts b/sdnr/wt/odlux/apps/linkCalculationApp/src/handlers/linkCalculationAppRootHandler.ts
index edfad052a..01512eb92 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, UpdateEIRPAction, UpdateAntennaAction, UpdateAntennaListAction, UpdateAntennaGainAction, UpdateTxPowerAction, UpdateRxSensitivityAction} from '../actions/commonLinkCalculationActions';
+import { UpdateLinkIdAction, UpdateFrequencyAction , UpdateLatLonAction, UpdateRainAttAction, UpdateRainValAction, updateHideForm, UpdateFslCalculation, UpdateSiteAction, UpdateDistanceAction, isCalculationServerReachableAction, UpdatePolAction, updateAltitudeAction, UpdateAbsorptionLossAction, UpdateWorstMonthRainAction, UpdateEIRPAction, UpdateAntennaGainAction, UpdateTxPowerAction, UpdateRxSensitivityAction, updateAntennaNameAction, UpdateWaveguideLossAction, UpdateRxPowerAction, UpdateSomAction} from '../actions/commonLinkCalculationActions';
declare module '../../../../framework/src/store/applicationStore' {
interface IApplicationStoreState {
@@ -60,15 +60,18 @@ export type ILinkCalculationAppStateState= {
eirpB: number,
antennaGainA: number,
antennaGainB :number,
- antennaList:string[],
- antennaGainList:string[],
- antennaA: string,
- antennaB:string,
- systemOperatingMargin : number,
+ antennaNameA: string,
+ antennaNameB:string,
+ systemOperatingMarginA : number,
+ systemOperatingMarginB : number,
txPowerA : string,
txPowerB: string,
rxSensitivityA : string,
- rxSensitivityB: string
+ rxSensitivityB: string,
+ waveguideLossA : number,
+ waveguideLossB: number,
+ rxPowerA :number,
+ rxPowerB: number
}
const initialState: ILinkCalculationAppStateState ={
@@ -98,19 +101,20 @@ const initialState: ILinkCalculationAppStateState ={
eirpB: 0,
antennaGainA :0,
antennaGainB :0,
- antennaList:[],
- antennaGainList:[],
- antennaA: '0',
- antennaB:'0',
- systemOperatingMargin : 0,
+ antennaNameA: '',
+ antennaNameB:'',
+ systemOperatingMarginA : 0,
+ systemOperatingMarginB : 0,
txPowerA : '0',
txPowerB: '0',
rxSensitivityA: '0',
- rxSensitivityB: '0'
+ rxSensitivityB: '0',
+ waveguideLossA : 0,
+ waveguideLossB: 0,
+ rxPowerA : 0,
+ rxPowerB: 0
}
-
-
export const LinkCalculationHandler: IActionHandler<ILinkCalculationAppStateState> = (state=initialState, action) => {
if(action instanceof UpdateLinkIdAction){
@@ -156,17 +160,12 @@ 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})
+ state = Object.assign({}, state, {antennaGainA:action.antennaGainA,antennaGainB:action.antennaGainB})
}
- 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 updateAntennaNameAction){
+ state = Object.assign({}, state, {antennaNameA:action.antennaNameA, antennaNameB: action.antennaNameB})
}
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})
@@ -174,6 +173,19 @@ export const LinkCalculationHandler: IActionHandler<ILinkCalculationAppStateStat
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})
}
+ else if (action instanceof UpdateWaveguideLossAction){
+ state = Object.assign({}, state, {waveguideLossA:action.waveguideLossA, waveguideLossB: action.waveguideLossB})
+ }
+ else if (action instanceof UpdateEIRPAction){
+ state = Object.assign({}, state, {eirpA:action.eirpA, eirpB:action.eirpB})
+ }
+ else if (action instanceof UpdateRxPowerAction){
+ state = Object.assign({}, state, {rxPowerA:action.rxPowerA, rxPowerB:action.rxPowerB})
+ }
+ else if (action instanceof UpdateSomAction){
+ state = Object.assign({}, state, {systemOperatingMarginA:action.somA , systemOperatingMarginB :action.somB})
+ }
+
return state
}