fixed input/out signal types
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "JARTStateMachineGAM.h"
|
#include "JARTStateMachineGAM.h"
|
||||||
|
|
||||||
#include "AdvancedErrorManagement.h"
|
#include "AdvancedErrorManagement.h"
|
||||||
|
#include "TypeDescriptor.h"
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Static definitions */
|
/* Static definitions */
|
||||||
@@ -57,7 +58,7 @@ JARTStateMachineGAM::JARTStateMachineGAM() {
|
|||||||
mhvps_hvon = 0;
|
mhvps_hvon = 0;
|
||||||
|
|
||||||
// Parameters which get from Input signals.
|
// Parameters which get from Input signals.
|
||||||
triggerSignal = NULL_PTR(MARTe::uint32 *);
|
triggerSignal = NULL_PTR(MARTe::uint8 *);
|
||||||
currentTime = NULL_PTR(MARTe::uint32 *);
|
currentTime = NULL_PTR(MARTe::uint32 *);
|
||||||
turn_off_delay = 2000; //us
|
turn_off_delay = 2000; //us
|
||||||
|
|
||||||
@@ -68,18 +69,18 @@ JARTStateMachineGAM::JARTStateMachineGAM() {
|
|||||||
triggerDelay_bps_swon = NULL_PTR(MARTe::uint32 *);
|
triggerDelay_bps_swon = NULL_PTR(MARTe::uint32 *);
|
||||||
triggerDelay_shotlen = NULL_PTR(MARTe::uint32 *);
|
triggerDelay_shotlen = NULL_PTR(MARTe::uint32 *);
|
||||||
|
|
||||||
stopRequest = NULL_PTR(MARTe::uint32 *);
|
stopRequest = NULL_PTR(MARTe::uint8 *);
|
||||||
modePulseLengthLimit = NULL_PTR(MARTe::uint32 *);
|
modePulseLengthLimit = NULL_PTR(MARTe::uint32 *);
|
||||||
short_pulse_mode = NULL_PTR(MARTe::uint32 *);
|
short_pulse_mode = NULL_PTR(MARTe::uint32 *);
|
||||||
|
|
||||||
modulation = NULL_PTR(MARTe::uint32 *);
|
modulation = NULL_PTR(MARTe::uint8 *);
|
||||||
|
|
||||||
// write out target.
|
// write out target.
|
||||||
outputSignal = NULL_PTR(MARTe::uint32 *);
|
outputSignal = NULL_PTR(MARTe::uint32 *);
|
||||||
outputBeamON = NULL_PTR(MARTe::uint32 *);
|
outputBeamON = NULL_PTR(MARTe::uint8 *);
|
||||||
outputHVArmed = NULL_PTR(MARTe::uint32 *);
|
outputHVArmed = NULL_PTR(MARTe::uint8*);
|
||||||
outputHVInjection = NULL_PTR(MARTe::uint32 *);
|
outputHVInjection = NULL_PTR(MARTe::uint8 *);
|
||||||
outputRFON = NULL_PTR(MARTe::uint32 *);
|
outputRFON = NULL_PTR(MARTe::uint8 *);
|
||||||
outputBeamONTime = NULL_PTR(MARTe::uint32 *);
|
outputBeamONTime = NULL_PTR(MARTe::uint32 *);
|
||||||
outputRFONTime = NULL_PTR(MARTe::uint32 *);
|
outputRFONTime = NULL_PTR(MARTe::uint32 *);
|
||||||
shotCounter = NULL_PTR(MARTe::uint32 *);
|
shotCounter = NULL_PTR(MARTe::uint32 *);
|
||||||
@@ -165,7 +166,7 @@ bool JARTStateMachineGAM::Setup() {
|
|||||||
uint32 c;
|
uint32 c;
|
||||||
for (c = 0u; c < numberOfInputSignals; c++) {
|
for (c = 0u; c < numberOfInputSignals; c++) {
|
||||||
TypeDescriptor inputType = GetSignalType(InputSignals, c);
|
TypeDescriptor inputType = GetSignalType(InputSignals, c);
|
||||||
ok = (inputType == UnsignedInteger32Bit);
|
ok = (inputType == UnsignedInteger32Bit || inputType == UnsignedInteger8Bit);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
StreamString signalName;
|
StreamString signalName;
|
||||||
(void) GetSignalName(InputSignals, c, signalName);
|
(void) GetSignalName(InputSignals, c, signalName);
|
||||||
@@ -181,41 +182,41 @@ bool JARTStateMachineGAM::Setup() {
|
|||||||
ok = (outputType == UnsignedInteger32Bit || outputType == UnsignedInteger8Bit);
|
ok = (outputType == UnsignedInteger32Bit || outputType == UnsignedInteger8Bit);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
StreamString signalName;
|
StreamString signalName;
|
||||||
(void) GetSignalName(InputSignals, c, signalName);
|
(void) GetSignalName(OutputSignals, c, signalName);
|
||||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint32", signalName.Buffer());
|
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint32", signalName.Buffer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ok) {
|
if (ok) {
|
||||||
currentTime = reinterpret_cast<uint32 *>(GetInputSignalMemory(0));
|
currentTime = reinterpret_cast<uint32 *>(GetInputSignalMemory(0));
|
||||||
triggerSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(1));
|
triggerSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(1));
|
||||||
triggerDelay_mhvps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(2));
|
triggerDelay_mhvps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(2));
|
||||||
triggerDelay_aps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(3));
|
triggerDelay_aps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(3));
|
||||||
triggerDelay_aps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(4));
|
triggerDelay_aps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(4));
|
||||||
triggerDelay_bps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(5));
|
triggerDelay_bps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(5));
|
||||||
triggerDelay_bps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(6));
|
triggerDelay_bps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(6));
|
||||||
triggerDelay_shotlen = reinterpret_cast<uint32 *>(GetInputSignalMemory(7));
|
triggerDelay_shotlen = reinterpret_cast<uint32 *>(GetInputSignalMemory(7));
|
||||||
stopRequest = reinterpret_cast<uint32 *>(GetInputSignalMemory(8));
|
stopRequest = reinterpret_cast<uint8 *>(GetInputSignalMemory(8));
|
||||||
modePulseLengthLimit = reinterpret_cast<uint32 *>(GetInputSignalMemory(9));
|
modePulseLengthLimit = reinterpret_cast<uint32 *>(GetInputSignalMemory(9));
|
||||||
short_pulse_mode = reinterpret_cast<uint32 *>(GetInputSignalMemory(10));
|
short_pulse_mode = reinterpret_cast<uint32 *>(GetInputSignalMemory(10));
|
||||||
modulation = reinterpret_cast<uint32 *>(GetInputSignalMemory(11));
|
modulation = reinterpret_cast<uint8 *>(GetInputSignalMemory(11));
|
||||||
pauseSet = reinterpret_cast<uint32 *>(GetInputSignalMemory(12));
|
pauseSet = reinterpret_cast<uint8 *>(GetInputSignalMemory(12));
|
||||||
|
|
||||||
|
|
||||||
outputSignal = reinterpret_cast<uint32 *>(GetOutputSignalMemory(0));
|
outputSignal = reinterpret_cast<uint32 *>(GetOutputSignalMemory(0));
|
||||||
outputBeamON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
|
outputBeamON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(1));
|
||||||
outputHVArmed = reinterpret_cast<uint32 *>(GetOutputSignalMemory(2));
|
outputHVArmed = reinterpret_cast<uint8 *>(GetOutputSignalMemory(2));
|
||||||
outputHVInjection = reinterpret_cast<uint32 *>(GetOutputSignalMemory(3));
|
outputHVInjection = reinterpret_cast<uint8 *>(GetOutputSignalMemory(3));
|
||||||
outputRFON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(4));
|
outputRFON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(4));
|
||||||
outputBeamONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(5));
|
outputBeamONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(5));
|
||||||
outputRFONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(6));
|
outputRFONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(6));
|
||||||
shotCounter = reinterpret_cast<uint32 *>(GetOutputSignalMemory(7));
|
shotCounter = reinterpret_cast<uint32 *>(GetOutputSignalMemory(7));
|
||||||
|
|
||||||
outputAPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(8));
|
outputAPSHVON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(8));
|
||||||
outputAPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(9));
|
outputAPSSWON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(9));
|
||||||
outputBPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(10));
|
outputBPSHVON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(10));
|
||||||
outputBPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(11));
|
outputBPSSWON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(11));
|
||||||
outputMHVPSON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(12));
|
outputMHVPSON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(12));
|
||||||
|
|
||||||
outputSignalNI6259 = reinterpret_cast<uint32 *>(GetOutputSignalMemory(13));
|
outputSignalNI6259 = reinterpret_cast<uint32 *>(GetOutputSignalMemory(13));
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
/* Project header includes */
|
/* Project header includes */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||||
#include "GAM.h"
|
#include "GAM.h"
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
@@ -174,7 +175,7 @@ private:
|
|||||||
MARTe::uint32 bps_swon;
|
MARTe::uint32 bps_swon;
|
||||||
|
|
||||||
//The trigger signal (PLC_ON)
|
//The trigger signal (PLC_ON)
|
||||||
MARTe::uint32 *triggerSignal;
|
MARTe::uint8 *triggerSignal;
|
||||||
|
|
||||||
//Time signal
|
//Time signal
|
||||||
MARTe::uint32 *currentTime;
|
MARTe::uint32 *currentTime;
|
||||||
@@ -188,24 +189,24 @@ private:
|
|||||||
MARTe::uint32 *triggerDelay_shotlen;
|
MARTe::uint32 *triggerDelay_shotlen;
|
||||||
|
|
||||||
// Input signal for sequence stop request.
|
// Input signal for sequence stop request.
|
||||||
MARTe::uint32 *stopRequest;
|
MARTe::uint8 *stopRequest;
|
||||||
// Input signal for pulse length limit by mode.
|
// Input signal for pulse length limit by mode.
|
||||||
MARTe::uint32 *modePulseLengthLimit;
|
MARTe::uint32 *modePulseLengthLimit;
|
||||||
// Input signal for short pulse mode.
|
// Input signal for short pulse mode.
|
||||||
MARTe::uint32 *short_pulse_mode;
|
MARTe::uint32 *short_pulse_mode;
|
||||||
// Input signal for modulation pv.
|
// Input signal for modulation pv.
|
||||||
MARTe::uint32 *modulation;
|
MARTe::uint8 *modulation;
|
||||||
// Input signal for pause signal set pv.
|
// Input signal for pause signal set pv.
|
||||||
MARTe::uint32 *pauseSet;
|
MARTe::uint8 *pauseSet;
|
||||||
|
|
||||||
// Output signal to which the output value will be written.
|
// Output signal to which the output value will be written.
|
||||||
// One state write One signal.
|
// One state write One signal.
|
||||||
MARTe::uint32 *outputSignal;
|
MARTe::uint32 *outputSignal;
|
||||||
// state notify output
|
// state notify output
|
||||||
MARTe::uint32 *outputBeamON;
|
MARTe::uint8 *outputBeamON;
|
||||||
MARTe::uint32 *outputHVArmed;
|
MARTe::uint8 *outputHVArmed;
|
||||||
MARTe::uint32 *outputHVInjection;
|
MARTe::uint8 *outputHVInjection;
|
||||||
MARTe::uint32 *outputRFON;
|
MARTe::uint8 *outputRFON;
|
||||||
// elapsed time notify output;
|
// elapsed time notify output;
|
||||||
MARTe::uint32 *outputBeamONTime;
|
MARTe::uint32 *outputBeamONTime;
|
||||||
MARTe::uint32 *outputRFONTime;
|
MARTe::uint32 *outputRFONTime;
|
||||||
@@ -213,11 +214,11 @@ private:
|
|||||||
MARTe::uint32 *shotCounter;
|
MARTe::uint32 *shotCounter;
|
||||||
|
|
||||||
// Added for HVPS state (20201117)
|
// Added for HVPS state (20201117)
|
||||||
MARTe::uint32 *outputAPSHVON;
|
MARTe::uint8 *outputAPSHVON;
|
||||||
MARTe::uint32 *outputAPSSWON;
|
MARTe::uint8 *outputAPSSWON;
|
||||||
MARTe::uint32 *outputBPSHVON;
|
MARTe::uint8 *outputBPSHVON;
|
||||||
MARTe::uint32 *outputBPSSWON;
|
MARTe::uint8 *outputBPSSWON;
|
||||||
MARTe::uint32 *outputMHVPSON;
|
MARTe::uint8 *outputMHVPSON;
|
||||||
|
|
||||||
// Output signals for NI devices
|
// Output signals for NI devices
|
||||||
MARTe::uint32 *outputSignalNI6259;
|
MARTe::uint32 *outputSignalNI6259;
|
||||||
|
|||||||
Reference in New Issue
Block a user