fixed casting and non initalised array
This commit is contained in:
@@ -127,6 +127,7 @@ bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI &data) {
|
|||||||
if (ok) {
|
if (ok) {
|
||||||
level++;
|
level++;
|
||||||
uint32 n_inputs = data.GetNumberOfChildren();
|
uint32 n_inputs = data.GetNumberOfChildren();
|
||||||
|
inputSignalTypes = new TypeDescriptor[n_inputs];
|
||||||
comparators = new comparator_t[n_inputs];
|
comparators = new comparator_t[n_inputs];
|
||||||
StreamString strbuff;
|
StreamString strbuff;
|
||||||
TypeDescriptor td;
|
TypeDescriptor td;
|
||||||
@@ -154,6 +155,7 @@ bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI &data) {
|
|||||||
"Wrong value for field Type from InputSignals[%d]", i);
|
"Wrong value for field Type from InputSignals[%d]", i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
inputSignalTypes[i] = td;
|
||||||
strbuff = "";
|
strbuff = "";
|
||||||
ok = data.Read("Comparator", strbuff);
|
ok = data.Read("Comparator", strbuff);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
@@ -307,6 +309,9 @@ bool JAConditionalSignalUpdateGAM::Compare(MARTe::uint32 index) {
|
|||||||
if (inputSignalTypes[index] == MARTe::UnsignedInteger32Bit) {
|
if (inputSignalTypes[index] == MARTe::UnsignedInteger32Bit) {
|
||||||
return Compare<MARTe::uint32>(index);
|
return Compare<MARTe::uint32>(index);
|
||||||
}
|
}
|
||||||
|
if (inputSignalTypes[index] == MARTe::UnsignedInteger8Bit) {
|
||||||
|
return Compare<MARTe::uint8>(index);
|
||||||
|
}
|
||||||
return Compare<MARTe::uint16>(index);
|
return Compare<MARTe::uint16>(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user