Added ATCA channels 14/15
Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
@@ -712,7 +712,6 @@ ErrorManagement::ErrorType AtcaIopADC::Execute(ExecutionInfo& info) {
|
||||
|
||||
float64 t = counterAndTimer[1];
|
||||
t /= 1e6;
|
||||
// Compute simulated Sinus Signals
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ namespace MARTe {
|
||||
DataSourceI(),
|
||||
MessageI() {
|
||||
devFileDescriptor = -1;
|
||||
//numberOfDACsEnabled = 0u;
|
||||
//isMaster = 0u;
|
||||
deviceName = "";
|
||||
boardId = 0u;
|
||||
@@ -62,7 +61,6 @@ namespace MARTe {
|
||||
uint32 n;
|
||||
synchCounter = 0u;
|
||||
|
||||
//channelsMemory = NULL_PTR(float32 *);
|
||||
eoValues = NULL_PTR(int32 *);
|
||||
woValues = NULL_PTR(float32 *);
|
||||
eoWriteFlag = false;
|
||||
@@ -88,9 +86,6 @@ namespace MARTe {
|
||||
if (woValues != NULL_PTR(float32 *)) {
|
||||
delete[] woValues;
|
||||
}
|
||||
//if (channelsMemory != NULL_PTR(float32 *)) {
|
||||
//delete[] channelsMemory;
|
||||
//}
|
||||
}
|
||||
|
||||
bool AtcaIopConfig::AllocateMemory() {
|
||||
@@ -114,14 +109,6 @@ namespace MARTe {
|
||||
else {
|
||||
ok = false;
|
||||
}
|
||||
/*
|
||||
bool ok = (signalIdx < (ATCA_IOP_MAX_DAC_CHANNELS));
|
||||
if (ok) {
|
||||
if (channelsMemory != NULL_PTR(float32 *)) {
|
||||
signalAddress = &(channelsMemory[signalIdx]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -313,7 +300,6 @@ namespace MARTe {
|
||||
ErrorManagement::ErrorType err;
|
||||
REPORT_ERROR(ErrorManagement::Information, "AtcaIopConfig::WriteEoWo. Got Message!");
|
||||
|
||||
//ret = err.ErrorsCleared();
|
||||
eoWriteFlag = true;
|
||||
return err;
|
||||
}
|
||||
@@ -339,13 +325,12 @@ namespace MARTe {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail Write wo0:%6.3f", woValues[0]);
|
||||
ok = false;
|
||||
}
|
||||
/* Reset is done by fiber
|
||||
/* Reset may be done by fiber... */
|
||||
rv = ioctl(devFileDescriptor, ATCA_PCIE_IOPT_RST_INTEG);
|
||||
if (rv ) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail reset Integrators");
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail reset Integrator regs");
|
||||
ok = false;
|
||||
}
|
||||
*/
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -353,4 +338,4 @@ namespace MARTe {
|
||||
CLASS_METHOD_REGISTER(AtcaIopConfig, WriteEoWo)
|
||||
|
||||
}
|
||||
// vim: syntax=cpp ts=4 sw=4 sts=4 sr et
|
||||
// vim: syntax=cpp ts=2 sw=2 sts=2 sr et
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace MARTe {
|
||||
const uint32 ATCA_IOP_MAX_ADC_CHANNELS = 16u;
|
||||
|
||||
/**
|
||||
* @brief A DataSource which provides an analogue output interface to the ATCA IOP boards.
|
||||
* @brief A DataSource which provides an interface to config EO, WO parameters on
|
||||
* the ATCA IOP board.
|
||||
* @details The configuration syntax is (names are only given as an example):
|
||||
*
|
||||
* <pre>
|
||||
@@ -158,7 +159,6 @@ namespace MARTe {
|
||||
* @return true if all the mandatory parameters are correctly specified and if the specified optional parameters have valid values.
|
||||
uint32 synchCounter;
|
||||
*/
|
||||
|
||||
virtual bool Initialise(StructuredDataI & data);
|
||||
|
||||
|
||||
@@ -168,9 +168,6 @@ namespace MARTe {
|
||||
* are valid and consistent with the board parameters set during the initialisation phase.
|
||||
* In particular the following conditions shall be met:
|
||||
* - At least one triggering signal was requested by a GAM (with the property Trigger = 1)
|
||||
* - All the DAC channels have type float32.
|
||||
uint32 synchCounter;
|
||||
* - The number of samples of all the DAC channels is exactly one.
|
||||
* @return true if all the parameters are valid and consistent with the board parameters and if the board can be successfully configured with
|
||||
* these parameters.
|
||||
*/
|
||||
@@ -184,12 +181,11 @@ namespace MARTe {
|
||||
virtual bool Synchronise();
|
||||
|
||||
/**
|
||||
* @brief Set flag to write Eo, Wo Synchronisly
|
||||
* @brief Set flag to write synchronously Eo, Wo parameters
|
||||
* @details This method
|
||||
* It can be called within a
|
||||
* MARTe message.
|
||||
*/
|
||||
//ErrorManagement::ErrorType Reset();
|
||||
ErrorManagement::ErrorType WriteEoWo();
|
||||
|
||||
|
||||
@@ -209,10 +205,6 @@ namespace MARTe {
|
||||
int32 devFileDescriptor;
|
||||
|
||||
uint32 synchCounter;
|
||||
/**
|
||||
* DAC values
|
||||
*/
|
||||
// int32 dacValues[ATCA_IOP_N_DACs];
|
||||
|
||||
/**
|
||||
* EO values Signal
|
||||
@@ -226,11 +218,6 @@ namespace MARTe {
|
||||
|
||||
bool eoWriteFlag;
|
||||
|
||||
/**
|
||||
* The signal memory
|
||||
*/
|
||||
// float32 *channelsMemory;
|
||||
|
||||
|
||||
/**
|
||||
* Filter to receive the RPC which allows to change the...
|
||||
@@ -242,8 +229,10 @@ namespace MARTe {
|
||||
*/
|
||||
bool triggerSet;
|
||||
|
||||
/**
|
||||
* Perform ioctl functions
|
||||
*/
|
||||
bool IoWriteEoWo();
|
||||
//int32 SetDacReg(uint32 channel, float32 val) const;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user