Generation working and Compilation of MARTe components
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_standby():
|
||||
"""
|
||||
In the WaitStandby State, simulate PLC STANDBY signal.
|
||||
Turn on FHPS by push auto-on button.
|
||||
Turn on SCM PSs automatically.
|
||||
State transition condition is checked at last.
|
||||
"""
|
||||
print '---------- Start WatiStandby test ----------'
|
||||
print '1. Simulate SELECT signal. State should go to WatiStandby from Disabled.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY1 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-CON-OPGY2 1', shell=True)
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '2. Set MCPS rampup parameter(target current, sweep rate.)'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MI 4', shell=True) #For A
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-TRG-SWPR-SET 1.69', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-TRG-CURR-SET-MI 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-TRG-SWPR-SET 1.0', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-TRG-CURR-SET-MI 4', shell=True) #For B
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-TRG-SWPR-SET 1.69', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-TRG-CURR-SET-MI 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-TRG-SWPR-SET 1.0', shell=True)
|
||||
time.sleep(1)
|
||||
print '3. Simulate STANDBY signal. MCPS, GCPS, FHPS rampup must be started.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GPS:PLC4110-YTS-ST1R 1', shell=True)
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '4. Set FHPS rampup parameter and start it.'
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-TAGV 6', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-RU-TIME 60', shell=True) #in second.
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-AUTO-START 1', shell=True) #in second.
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-TAGV 6', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-RU-TIME 60', shell=True) #in second.
|
||||
#res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-AUTO-START 1', shell=True) #in second.
|
||||
print 'Enter to continue test'
|
||||
inpval = raw_input()
|
||||
print '5. Simulate FHPS, MCPS and GCPS state.'
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB.SVAL 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON.SVAL 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON 4', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB.SVAL 3', shell=True) #turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB 3', shell=True) #turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON.SVAL 4', shell=True)#turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON 4', shell=True) #turn off for GCPS test
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB.SVAL 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-OUTON-RB 1', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV.SVAL 6', shell=True)
|
||||
#res = subprocess.call('caput EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV 6', shell=True)
|
||||
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-ACT-RB.SVAL 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-ACT-RB 3', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON.SVAL 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON 4', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-ACT-RB.SVAL 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-ACT-RB 3', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON.SVAL 4', shell=True)#turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON 4', shell=True) #turn off for GCPS test
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-OUTON-RB.SVAL 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-OUTON-RB 1', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACV.SVAL 6', shell=True)
|
||||
res = subprocess.call('caput EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACV 6', shell=True)
|
||||
time.sleep(1)
|
||||
print '6. Confirm FHPS and SCM ramp-up complete. The state goes to WaitREADY from WaitStandby.'
|
||||
print '---------- END WaitStandby test ----------'
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* @file JASourceChoiseGAM.h
|
||||
* @brief Header file for class JASourceChoiseGAM
|
||||
* @date Mar 04, 2019
|
||||
* @author kuchida
|
||||
*
|
||||
* @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and
|
||||
* the Development of Fusion Energy ('Fusion for Energy').
|
||||
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved
|
||||
* by the European Commission - subsequent versions of the EUPL (the "Licence")
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
* You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
|
||||
*
|
||||
* @warning Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
* or implied. See the Licence permissions and limitations under the Licence.
|
||||
|
||||
* @details This header file contains the declaration of the class JASourceChoiseGAM
|
||||
* with all of its public, protected and private members. It may also include
|
||||
* definitions for inline methods which need to be visible to the compiler.
|
||||
*/
|
||||
|
||||
#ifndef GAMS_JASourceChoiseGAM_H_
|
||||
#define GAMS_JASourceChoiseGAM_H_
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "GAM.h"
|
||||
#include <vector>
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Class declaration */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
class JASourceChoiseGAM : public MARTe::GAM, public MARTe::StatefulI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
JASourceChoiseGAM();
|
||||
|
||||
virtual ~JASourceChoiseGAM();
|
||||
|
||||
virtual bool Initialise(MARTe::StructuredDataI & data);
|
||||
|
||||
virtual bool Setup();
|
||||
|
||||
virtual bool Execute();
|
||||
|
||||
virtual bool PrepareNextState(const MARTe::char8 * const currentStateName,
|
||||
const MARTe::char8 * const nextStateName);
|
||||
|
||||
private:
|
||||
//The list of possible states
|
||||
//GAM fixed parameters.
|
||||
MARTe::uint32 numberOfPVs;
|
||||
|
||||
// Input signals
|
||||
std::vector<MARTe::uint32 *> inputUInt32;
|
||||
std::vector<MARTe::float32 *> inputFloat32;
|
||||
std::vector<MARTe::uint32 *> choise;
|
||||
|
||||
// Output signals
|
||||
std::vector<MARTe::uint32 *> outputUInt32;
|
||||
std::vector<MARTe::float32 *> outputFloat32;
|
||||
|
||||
// Previous Input value
|
||||
std::vector<MARTe::uint32> prevUInt32;
|
||||
std::vector<MARTe::float32> prevFloat32;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Inline method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#endif /* GAMS_JASourceChoiseGAM_H_ */
|
||||
Reference in New Issue
Block a user