WIP: SCEX Init #272
@ -160,7 +160,9 @@ void ObjectFactory::produce(void* args) {
|
||||
#if OBSW_ADD_MGT == 1
|
||||
I2cCookie* imtqI2cCookie =
|
||||
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
|
||||
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
|
||||
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
|
||||
pcdu::Switches::PDU1_CH3_MGT_5V);
|
||||
imtqHandler->setPowerSwitcher(pwrSwitcher);
|
||||
static_cast<void>(imtqHandler);
|
||||
#if OBSW_DEBUG_IMTQ == 1
|
||||
imtqHandler->setStartUpImmediately();
|
||||
@ -187,12 +189,14 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
#if OBSW_ADD_STAR_TRACKER == 1
|
||||
UartCookie* starTrackerCookie =
|
||||
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, UartModes::NON_CANONICAL,
|
||||
uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2);
|
||||
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
|
||||
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
|
||||
starTrackerCookie->setNoFixedSizeReply();
|
||||
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
|
||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie, strHelper,
|
||||
pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
||||
auto starTracker =
|
||||
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
|
||||
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
|
||||
starTracker->setPowerSwitcher(pwrSwitcher);
|
||||
|
||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||
|
||||
@ -625,14 +629,15 @@ void ObjectFactory::createSolarArrayDeploymentComponents() {
|
||||
gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000);
|
||||
}
|
||||
|
||||
void ObjectFactory::createSyrlinksComponents() {
|
||||
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
UartCookie* syrlinksUartCookie =
|
||||
new UartCookie(objects::SYRLINKS_HK_HANDLER, q7s::UART_SYRLINKS_DEV, UartModes::NON_CANONICAL,
|
||||
uart::SYRLINKS_BAUD, syrlinks::MAX_REPLY_SIZE);
|
||||
new UartCookie(objects::SYRLINKS_HK_HANDLER, q7s::UART_SYRLINKS_DEV, uart::SYRLINKS_BAUD,
|
||||
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||
syrlinksUartCookie->setParityEven();
|
||||
|
||||
new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie,
|
||||
pcdu::PDU1_CH1_SYRLINKS_12V);
|
||||
auto syrlinksHandler = new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF,
|
||||
syrlinksUartCookie, pcdu::PDU1_CH1_SYRLINKS_12V);
|
||||
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
|
||||
}
|
||||
|
||||
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
@ -646,8 +651,8 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
mpsocGpioCookie->addGpio(gpioIds::ENABLE_MPSOC_UART, gpioConfigMPSoC);
|
||||
gpioComIF->addGpios(mpsocGpioCookie);
|
||||
auto mpsocCookie =
|
||||
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
|
||||
UartModes::NON_CANONICAL, uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE);
|
||||
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV, uart::PLOC_MPSOC_BAUD,
|
||||
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||
mpsocCookie->setNoFixedSizeReply();
|
||||
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
|
||||
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
|
||||
@ -663,8 +668,8 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
supvGpioCookie->addGpio(gpioIds::ENABLE_SUPV_UART, gpioConfigSupv);
|
||||
gpioComIF->addGpios(supvGpioCookie);
|
||||
auto supervisorCookie = new UartCookie(objects::PLOC_SUPERVISOR_HANDLER,
|
||||
q7s::UART_PLOC_SUPERVSIOR_DEV, UartModes::NON_CANONICAL,
|
||||
uart::PLOC_SUPERVISOR_BAUD, supv::MAX_PACKET_SIZE * 20);
|
||||
q7s::UART_PLOC_SUPERVSIOR_DEV, uart::PLOC_SUPERVISOR_BAUD,
|
||||
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||
supervisorCookie->setNoFixedSizeReply();
|
||||
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
|
||||
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||
|
@ -24,7 +24,7 @@ void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF,
|
||||
PowerSwitchIF* pwrSwitcher);
|
||||
void createHeaterComponents();
|
||||
void createSolarArrayDeploymentComponents();
|
||||
void createSyrlinksComponents();
|
||||
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
|
||||
void createPayloadComponents(LinuxLibgpioIF* gpioComIF);
|
||||
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF);
|
||||
void createCcsdsComponents(LinuxLibgpioIF* gpioComIF);
|
||||
|
@ -21,331 +21,333 @@
|
||||
#endif
|
||||
|
||||
UartTestClass::UartTestClass(object_id_t objectId, ScexUartReader* reader)
|
||||
: TestTask(objectId), reader(reader) {
|
||||
mode = TestModes::SCEX;
|
||||
scexMode = ScexModes::SIMPLE;
|
||||
currCmd = scex::ScexCmds::FRAM;
|
||||
if (scexMode == ScexModes::SIMPLE) {
|
||||
auto encodingBuf = new std::array<uint8_t, 4096>;
|
||||
DleParser::BufPair encodingBufPair {encodingBuf->data(), encodingBuf->size()};
|
||||
auto decodedBuf = new std::array<uint8_t, 4096>;
|
||||
DleParser::BufPair decodingBufPair {decodedBuf->data(), decodedBuf->size()};
|
||||
dleParser =
|
||||
new ScexDleParser(*(new SimpleRingBuffer(4096, true)), dleEncoder, encodingBufPair, decodingBufPair, &foundDlePacketHandler, this);
|
||||
}
|
||||
: TestTask(objectId), reader(reader) {
|
||||
mode = TestModes::SCEX;
|
||||
scexMode = ScexModes::READER_TASK;
|
||||
currCmd = scex::ScexCmds::PING;
|
||||
if (scexMode == ScexModes::SIMPLE) {
|
||||
auto encodingBuf = new std::array<uint8_t, 4096>;
|
||||
DleParser::BufPair encodingBufPair{encodingBuf->data(), encodingBuf->size()};
|
||||
auto decodedBuf = new std::array<uint8_t, 4096>;
|
||||
DleParser::BufPair decodingBufPair{decodedBuf->data(), decodedBuf->size()};
|
||||
dleParser = new ScexDleParser(*(new SimpleRingBuffer(4096, true)), dleEncoder, encodingBufPair,
|
||||
decodingBufPair, &foundDlePacketHandler, this);
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t UartTestClass::initialize() {
|
||||
if (mode == TestModes::GPS) {
|
||||
gpsInit();
|
||||
} else if (mode == TestModes::SCEX) {
|
||||
scexInit();
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
if (mode == TestModes::GPS) {
|
||||
gpsInit();
|
||||
} else if (mode == TestModes::SCEX) {
|
||||
scexInit();
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t UartTestClass::performOneShotAction() { return HasReturnvaluesIF::RETURN_OK; }
|
||||
|
||||
ReturnValue_t UartTestClass::performPeriodicAction() {
|
||||
if (mode == TestModes::GPS) {
|
||||
gpsPeriodic();
|
||||
} else if (mode == TestModes::SCEX) {
|
||||
scexPeriodic();
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
if (mode == TestModes::GPS) {
|
||||
gpsPeriodic();
|
||||
} else if (mode == TestModes::SCEX) {
|
||||
scexPeriodic();
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
void UartTestClass::gpsInit() {
|
||||
#if RPI_TEST_GPS_HANDLER == 1
|
||||
int result = lwgps_init(&gpsData);
|
||||
if (result == 0) {
|
||||
sif::warning << "lwgps_init error: " << result << std::endl;
|
||||
}
|
||||
int result = lwgps_init(&gpsData);
|
||||
if (result == 0) {
|
||||
sif::warning << "lwgps_init error: " << result << std::endl;
|
||||
}
|
||||
|
||||
/* Get file descriptor */
|
||||
serialPort = open("/dev/serial0", O_RDWR);
|
||||
if (serialPort < 0) {
|
||||
sif::warning << "open call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
}
|
||||
/* Setting up UART parameters */
|
||||
tty.c_cflag &= ~PARENB; // Clear parity bit
|
||||
tty.c_cflag &= ~CSTOPB; // Clear stop field, only one stop bit used in communication
|
||||
tty.c_cflag &= ~CSIZE; // Clear all the size bits
|
||||
tty.c_cflag |= CS8; // 8 bits per byte
|
||||
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
|
||||
tty.c_cflag |= CREAD | CLOCAL; // Turn on READ & ignore ctrl lines (CLOCAL = 1)
|
||||
// Use canonical mode for GPS device
|
||||
tty.c_lflag |= ICANON;
|
||||
tty.c_lflag &= ~ECHO; // Disable echo
|
||||
tty.c_lflag &= ~ECHOE; // Disable erasure
|
||||
tty.c_lflag &= ~ECHONL; // Disable new-line echo
|
||||
tty.c_lflag &= ~ISIG; // Disable interpretation of INTR, QUIT and SUSP
|
||||
tty.c_iflag &= ~(IXON | IXOFF | IXANY); // Turn off s/w flow ctrl
|
||||
tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR |
|
||||
ICRNL); // Disable any special handling of received bytes
|
||||
tty.c_oflag &= ~OPOST; // Prevent special interpretation of output bytes (e.g. newline chars)
|
||||
tty.c_oflag &= ~ONLCR; // Prevent conversion of newline to carriage return/line feed
|
||||
/* Get file descriptor */
|
||||
serialPort = open("/dev/serial0", O_RDWR);
|
||||
if (serialPort < 0) {
|
||||
sif::warning << "open call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
}
|
||||
/* Setting up UART parameters */
|
||||
tty.c_cflag &= ~PARENB; // Clear parity bit
|
||||
tty.c_cflag &= ~CSTOPB; // Clear stop field, only one stop bit used in communication
|
||||
tty.c_cflag &= ~CSIZE; // Clear all the size bits
|
||||
tty.c_cflag |= CS8; // 8 bits per byte
|
||||
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
|
||||
tty.c_cflag |= CREAD | CLOCAL; // Turn on READ & ignore ctrl lines (CLOCAL = 1)
|
||||
// Use canonical mode for GPS device
|
||||
tty.c_lflag |= ICANON;
|
||||
tty.c_lflag &= ~ECHO; // Disable echo
|
||||
tty.c_lflag &= ~ECHOE; // Disable erasure
|
||||
tty.c_lflag &= ~ECHONL; // Disable new-line echo
|
||||
tty.c_lflag &= ~ISIG; // Disable interpretation of INTR, QUIT and SUSP
|
||||
tty.c_iflag &= ~(IXON | IXOFF | IXANY); // Turn off s/w flow ctrl
|
||||
tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR |
|
||||
ICRNL); // Disable any special handling of received bytes
|
||||
tty.c_oflag &= ~OPOST; // Prevent special interpretation of output bytes (e.g. newline chars)
|
||||
tty.c_oflag &= ~ONLCR; // Prevent conversion of newline to carriage return/line feed
|
||||
|
||||
// Non-blocking mode
|
||||
tty.c_cc[VTIME] = 0;
|
||||
tty.c_cc[VMIN] = 0;
|
||||
// Non-blocking mode
|
||||
tty.c_cc[VTIME] = 0;
|
||||
tty.c_cc[VMIN] = 0;
|
||||
|
||||
cfsetispeed(&tty, B9600);
|
||||
cfsetospeed(&tty, B9600);
|
||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
;
|
||||
}
|
||||
// Flush received and unread data. Those are old NMEA strings which are not relevant anymore
|
||||
tcflush(serialPort, TCIFLUSH);
|
||||
cfsetispeed(&tty, B9600);
|
||||
cfsetospeed(&tty, B9600);
|
||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
;
|
||||
}
|
||||
// Flush received and unread data. Those are old NMEA strings which are not relevant anymore
|
||||
tcflush(serialPort, TCIFLUSH);
|
||||
#endif
|
||||
}
|
||||
|
||||
void UartTestClass::gpsPeriodic() {
|
||||
#if RPI_TEST_GPS_HANDLER == 1
|
||||
int bytesRead = 0;
|
||||
do {
|
||||
bytesRead = read(serialPort, reinterpret_cast<void*>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead < 0) {
|
||||
sif::warning << "UartTestClass::performPeriodicAction: read call failed with error [" << errno
|
||||
<< ", " << strerror(errno) << "]" << std::endl;
|
||||
break;
|
||||
} else if (bytesRead >= static_cast<int>(recBuf.size())) {
|
||||
sif::debug << "UartTestClass::performPeriodicAction: "
|
||||
"recv buffer might not be large enough"
|
||||
<< std::endl;
|
||||
} else if (bytesRead > 0) {
|
||||
// pass data to lwgps for processing
|
||||
int bytesRead = 0;
|
||||
do {
|
||||
bytesRead = read(serialPort, reinterpret_cast<void*>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead < 0) {
|
||||
sif::warning << "UartTestClass::performPeriodicAction: read call failed with error [" << errno
|
||||
<< ", " << strerror(errno) << "]" << std::endl;
|
||||
break;
|
||||
} else if (bytesRead >= static_cast<int>(recBuf.size())) {
|
||||
sif::debug << "UartTestClass::performPeriodicAction: "
|
||||
"recv buffer might not be large enough"
|
||||
<< std::endl;
|
||||
} else if (bytesRead > 0) {
|
||||
// pass data to lwgps for processing
|
||||
#if GPS_REPLY_WIRETAPPING == 1
|
||||
sif::info << recBuf.data() << std::endl;
|
||||
sif::info << recBuf.data() << std::endl;
|
||||
#endif
|
||||
int result = lwgps_process(&gpsData, recBuf.data(), bytesRead);
|
||||
if (result == 0) {
|
||||
sif::warning << "UartTestClass::performPeriodicAction: lwgps_process error" << std::endl;
|
||||
}
|
||||
recvCnt++;
|
||||
if (recvCnt == 6) {
|
||||
recvCnt = 0;
|
||||
sif::info << "GPS Data" << std::endl;
|
||||
// Print messages
|
||||
printf("Valid status: %d\n", gpsData.is_valid);
|
||||
printf("Latitude: %f degrees\n", gpsData.latitude);
|
||||
printf("Longitude: %f degrees\n", gpsData.longitude);
|
||||
printf("Altitude: %f meters\n", gpsData.altitude);
|
||||
}
|
||||
}
|
||||
} while (bytesRead > 0);
|
||||
int result = lwgps_process(&gpsData, recBuf.data(), bytesRead);
|
||||
if (result == 0) {
|
||||
sif::warning << "UartTestClass::performPeriodicAction: lwgps_process error" << std::endl;
|
||||
}
|
||||
recvCnt++;
|
||||
if (recvCnt == 6) {
|
||||
recvCnt = 0;
|
||||
sif::info << "GPS Data" << std::endl;
|
||||
// Print messages
|
||||
printf("Valid status: %d\n", gpsData.is_valid);
|
||||
printf("Latitude: %f degrees\n", gpsData.latitude);
|
||||
printf("Longitude: %f degrees\n", gpsData.longitude);
|
||||
printf("Altitude: %f meters\n", gpsData.altitude);
|
||||
}
|
||||
}
|
||||
} while (bytesRead > 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void UartTestClass::scexInit() {
|
||||
if (reader == nullptr) {
|
||||
sif::warning << "UartTestClass::scexInit: Reader invalid" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (scexMode == ScexModes::SIMPLE) {
|
||||
scexSimpleInit();
|
||||
} else {
|
||||
if (reader == nullptr) {
|
||||
sif::warning << "UartTestClass::scexInit: Reader invalid" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (scexMode == ScexModes::SIMPLE) {
|
||||
scexSimpleInit();
|
||||
} else {
|
||||
#if defined(RASPBERRY_PI)
|
||||
std::string devname = "/dev/serial0";
|
||||
std::string devname = "/dev/serial0";
|
||||
#else
|
||||
std::string devname = "/dev/ul-scex";
|
||||
std::string devname = "/dev/ul-scex";
|
||||
#endif
|
||||
uartCookie = new UartCookie(this->getObjectId(), devname, UartBaudRate::RATE_57600, 4096);
|
||||
reader->setDebugMode(true);
|
||||
ReturnValue_t result = reader->initializeInterface(uartCookie);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "UartTestClass::gpsPeriodic: Initializing SCEX reader "
|
||||
"UART IF failed"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
uartCookie = new UartCookie(this->getObjectId(), devname, UartBaudRate::RATE_57600, 4096);
|
||||
reader->setDebugMode(true);
|
||||
ReturnValue_t result = reader->initializeInterface(uartCookie);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "UartTestClass::gpsPeriodic: Initializing SCEX reader "
|
||||
"UART IF failed"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UartTestClass::scexPeriodic() {
|
||||
using namespace std;
|
||||
if (reader == nullptr) {
|
||||
return;
|
||||
}
|
||||
using namespace std;
|
||||
if (reader == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (scexMode == ScexModes::SIMPLE) {
|
||||
scexSimplePeriodic();
|
||||
} else {
|
||||
if (not cmdSent){
|
||||
size_t len = 0;
|
||||
prepareScexCmd(scex::ScexCmds::PING, false, cmdBuf.data(), &len);
|
||||
reader->sendMessage(uartCookie, cmdBuf.data(), len);
|
||||
cmdSent = true;
|
||||
cmdDone = false;
|
||||
}
|
||||
if (cmdSent and not cmdDone){
|
||||
uint8_t* decodedPacket = nullptr;
|
||||
size_t len = 0;
|
||||
ReturnValue_t result = reader->readReceivedMessage(uartCookie, &decodedPacket, &len);
|
||||
if (scexMode == ScexModes::SIMPLE) {
|
||||
scexSimplePeriodic();
|
||||
} else {
|
||||
if (not cmdSent) {
|
||||
size_t len = 0;
|
||||
prepareScexCmd(scex::ScexCmds::PING, false, cmdBuf.data(), &len);
|
||||
reader->sendMessage(uartCookie, cmdBuf.data(), len);
|
||||
cmdSent = true;
|
||||
cmdDone = false;
|
||||
}
|
||||
if (cmdSent and not cmdDone) {
|
||||
uint8_t* decodedPacket = nullptr;
|
||||
size_t len = 0;
|
||||
ReturnValue_t result = reader->readReceivedMessage(uartCookie, &decodedPacket, &len);
|
||||
|
||||
if(len > 0){
|
||||
sif::info<<"CmdByte: "<<(int)decodedPacket[0]<<endl;
|
||||
scex::ScexCmds cmd = static_cast<scex::ScexCmds>((decodedPacket[0] >> 1) & 0b11111);
|
||||
size_t packetCounter = decodedPacket[1];
|
||||
sif::info<<"PacketCounter: "<<packetCounter<<endl;
|
||||
size_t totalPacketCounter = decodedPacket[2];
|
||||
sif::info<<"TotalPacketCount: "<<totalPacketCounter<<endl;
|
||||
uint16_t packetLen = (decodedPacket[3]<< 8) | (decodedPacket[4]);
|
||||
sif::info<<"PacketLength: "<< packetLen <<endl;
|
||||
uint16_t expectedPacketLen = packetLen + 7;
|
||||
|
||||
sif::info<<"ExpectedPacketLength: "<< packetLen+7 <<endl;
|
||||
if(expectedPacketLen != len){
|
||||
sif::warning<<"ExpectedPacketLength " << expectedPacketLen <<" is not Length"<< len<<endl;
|
||||
|
||||
}
|
||||
if(CRC::crc16ccitt(decodedPacket, expectedPacketLen) != 0){
|
||||
sif::warning<<"CRC invalid"<<endl;
|
||||
}else{
|
||||
sif::info<<"CRC valid"<<endl;
|
||||
}
|
||||
if(packetCounter == totalPacketCounter){
|
||||
reader->finish();
|
||||
sif::info<<"Reader is finished" << endl;
|
||||
cmdDone = true;
|
||||
if(cmd == scex::ScexCmds::PING){
|
||||
cmdSent = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (len > 0) {
|
||||
sif::info << "CmdByte: " << std::setw(2) << std::setfill('0') << std::hex
|
||||
<< (int)decodedPacket[0] << std::dec << endl;
|
||||
scex::ScexCmds cmd = static_cast<scex::ScexCmds>((decodedPacket[0] >> 1) & 0b11111);
|
||||
sif::info << "Command: 0x" << std::setw(2) << std::setfill('0') << std::hex
|
||||
<< static_cast<int>(cmd) << std::dec << std::endl;
|
||||
size_t packetCounter = decodedPacket[1];
|
||||
sif::info << "PacketCounter: " << packetCounter << endl;
|
||||
size_t totalPacketCounter = decodedPacket[2];
|
||||
sif::info << "TotalPacketCount: " << totalPacketCounter << endl;
|
||||
uint16_t packetLen = (decodedPacket[3] << 8) | (decodedPacket[4]);
|
||||
sif::info << "PacketLength: " << packetLen << endl;
|
||||
uint16_t expectedPacketLen = packetLen + 7;
|
||||
|
||||
sif::info << "ExpectedPacketLength: " << packetLen + 7 << endl;
|
||||
if (expectedPacketLen != len) {
|
||||
sif::warning << "ExpectedPacketLength " << expectedPacketLen << " is not Length" << len
|
||||
<< endl;
|
||||
}
|
||||
if (CRC::crc16ccitt(decodedPacket, expectedPacketLen) != 0) {
|
||||
sif::warning << "CRC invalid" << endl;
|
||||
} else {
|
||||
sif::info << "CRC valid" << endl;
|
||||
}
|
||||
if (packetCounter == totalPacketCounter) {
|
||||
reader->finish();
|
||||
sif::info << "Reader is finished" << endl;
|
||||
cmdDone = true;
|
||||
// TODO: Bug in firmware, other command will be returned
|
||||
cmdSent = false;
|
||||
// if (cmd == scex::ScexCmds::PING) {
|
||||
// cmdSent = false;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UartTestClass::scexSimpleInit() {
|
||||
#if defined(RASPBERRY_PI)
|
||||
std::string devname = "/dev/serial0";
|
||||
std::string devname = "/dev/serial0";
|
||||
#else
|
||||
std::string devname = "/dev/ul-scex";
|
||||
std::string devname = "/dev/ul-scex";
|
||||
#endif
|
||||
/* Get file descriptor */
|
||||
serialPort = open(devname.c_str(), O_RDWR);
|
||||
if (serialPort < 0) {
|
||||
sif::warning << "open call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
// Setting up UART parameters
|
||||
tty.c_cflag &= ~PARENB; // Clear parity bit
|
||||
tty.c_cflag &= ~CSTOPB; // Clear stop field, only one stop bit used in communication
|
||||
tty.c_cflag &= ~CSIZE; // Clear all the size bits
|
||||
tty.c_cflag |= CS8; // 8 bits per byte
|
||||
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
|
||||
tty.c_cflag |= CREAD | CLOCAL; // Turn on READ & ignore ctrl lines (CLOCAL = 1)
|
||||
/* Get file descriptor */
|
||||
serialPort = open(devname.c_str(), O_RDWR);
|
||||
if (serialPort < 0) {
|
||||
sif::warning << "open call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
// Setting up UART parameters
|
||||
tty.c_cflag &= ~PARENB; // Clear parity bit
|
||||
tty.c_cflag &= ~CSTOPB; // Clear stop field, only one stop bit used in communication
|
||||
tty.c_cflag &= ~CSIZE; // Clear all the size bits
|
||||
tty.c_cflag |= CS8; // 8 bits per byte
|
||||
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
|
||||
tty.c_cflag |= CREAD | CLOCAL; // Turn on READ & ignore ctrl lines (CLOCAL = 1)
|
||||
|
||||
// Use non-canonical mode and clear echo flag
|
||||
tty.c_lflag &= ~(ICANON | ECHO);
|
||||
// Use non-canonical mode and clear echo flag
|
||||
tty.c_lflag &= ~(ICANON | ECHO);
|
||||
|
||||
// Non-blocking mode, read until either line is 0.1 second idle or maximum of 255 bytes are
|
||||
// received in one go
|
||||
tty.c_cc[VTIME] = 10; // In units of 0.1 seconds
|
||||
tty.c_cc[VMIN] = 255; // Read up to 255 bytes
|
||||
// Non-blocking mode, read until either line is 0.1 second idle or maximum of 255 bytes are
|
||||
// received in one go
|
||||
tty.c_cc[VTIME] = 0; // In units of 0.1 seconds
|
||||
tty.c_cc[VMIN] = 0; // Read up to 255 bytes
|
||||
|
||||
// Q7S UART Lite has fixed baud rate. For other linux systems, set baud rate here.
|
||||
// Q7S UART Lite has fixed baud rate. For other linux systems, set baud rate here.
|
||||
#if !defined(XIPHOS_Q7S)
|
||||
if (cfsetispeed(&tty, B57600) != 0) {
|
||||
sif::warning << "UartTestClass::scexInit: Setting baud rate failed" << std::endl;
|
||||
}
|
||||
if (cfsetispeed(&tty, B57600) != 0) {
|
||||
sif::warning << "UartTestClass::scexInit: Setting baud rate failed" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
}
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIOFLUSH);
|
||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
||||
<< std::endl;
|
||||
}
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIOFLUSH);
|
||||
}
|
||||
|
||||
void UartTestClass::scexSimplePeriodic() {
|
||||
using namespace scex;
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
if (not cmdSent) {
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIFLUSH);
|
||||
uint8_t tmpCmdBuf[32] = {};
|
||||
size_t len = 0;
|
||||
sif::info << "UartTestClass::scexSimplePeriodic: Sending command to SCEX" << std::endl;
|
||||
prepareScexCmd(currCmd, false, tmpCmdBuf, &len);
|
||||
result = dleEncoder.encode(tmpCmdBuf, len, cmdBuf.data(), cmdBuf.size(), &encodedLen, true);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "UartTestClass::scexInit: Encoding failed" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (result != 0) {
|
||||
return;
|
||||
};
|
||||
size_t bytesWritten = write(serialPort, cmdBuf.data(), encodedLen);
|
||||
if (bytesWritten != encodedLen) {
|
||||
sif::warning << "Sending command to solar experiment failed" << std::endl;
|
||||
}
|
||||
cmdSent = true;
|
||||
cmdDone = false;
|
||||
}
|
||||
if (not cmdDone) {
|
||||
// Read back reply immediately
|
||||
int bytesRead = 0;
|
||||
do {
|
||||
bytesRead = read(serialPort, reinterpret_cast<void*>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead == 0) {
|
||||
sif::warning << "Reading SCEX: Timeout or no bytes read" << std::endl;
|
||||
} else if (bytesRead < 0) {
|
||||
sif::warning << "UartTestClass::performPeriodicAction: read call failed with error ["
|
||||
<< errno << ", " << strerror(errno) << "]" << std::endl;
|
||||
break;
|
||||
} else if (bytesRead >= static_cast<int>(recBuf.size())) {
|
||||
sif::debug << "UartTestClass::performPeriodicAction: recv buffer might not be large enough"
|
||||
<< std::endl;
|
||||
} else if (bytesRead > 0) {
|
||||
dleParser->passData(recBuf.data(), bytesRead);
|
||||
if (currCmd == ScexCmds::PING) {
|
||||
cmdDone = true;
|
||||
cmdSent = false;
|
||||
}
|
||||
}
|
||||
} while (bytesRead > 0);
|
||||
}
|
||||
using namespace scex;
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
if (not cmdSent) {
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIFLUSH);
|
||||
uint8_t tmpCmdBuf[32] = {};
|
||||
size_t len = 0;
|
||||
sif::info << "UartTestClass::scexSimplePeriodic: Sending command to SCEX" << std::endl;
|
||||
prepareScexCmd(currCmd, false, tmpCmdBuf, &len);
|
||||
result = dleEncoder.encode(tmpCmdBuf, len, cmdBuf.data(), cmdBuf.size(), &encodedLen, true);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "UartTestClass::scexInit: Encoding failed" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (result != 0) {
|
||||
return;
|
||||
};
|
||||
size_t bytesWritten = write(serialPort, cmdBuf.data(), encodedLen);
|
||||
if (bytesWritten != encodedLen) {
|
||||
sif::warning << "Sending command to solar experiment failed" << std::endl;
|
||||
}
|
||||
cmdSent = true;
|
||||
cmdDone = false;
|
||||
}
|
||||
if (not cmdDone) {
|
||||
// Read back reply immediately
|
||||
int bytesRead = 0;
|
||||
do {
|
||||
bytesRead = read(serialPort, reinterpret_cast<void*>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead == 0) {
|
||||
sif::warning << "Reading SCEX: Timeout or no bytes read" << std::endl;
|
||||
} else if (bytesRead < 0) {
|
||||
sif::warning << "UartTestClass::performPeriodicAction: read call failed with error ["
|
||||
<< errno << ", " << strerror(errno) << "]" << std::endl;
|
||||
break;
|
||||
} else if (bytesRead >= static_cast<int>(recBuf.size())) {
|
||||
sif::debug << "UartTestClass::performPeriodicAction: recv buffer might not be large enough"
|
||||
<< std::endl;
|
||||
} else if (bytesRead > 0) {
|
||||
dleParser->passData(recBuf.data(), bytesRead);
|
||||
if (currCmd == ScexCmds::PING) {
|
||||
cmdDone = true;
|
||||
cmdSent = false;
|
||||
}
|
||||
}
|
||||
} while (bytesRead > 0);
|
||||
}
|
||||
}
|
||||
|
||||
int UartTestClass::prepareScexCmd(scex::ScexCmds cmd, bool tempCheck, uint8_t* cmdBuf,
|
||||
size_t* len) {
|
||||
using namespace scex;
|
||||
// Send ping command
|
||||
cmdBuf[0] = scex::createCmdByte(cmd, false);
|
||||
// These two fields are the packet counter and the total packet count. Those are 1 and 1 for each
|
||||
// telecommand so far
|
||||
cmdBuf[1] = 1;
|
||||
cmdBuf[2] = 1;
|
||||
uint16_t userDataLen = 0;
|
||||
cmdBuf[3] = (userDataLen >> 8) & 0xff;
|
||||
cmdBuf[4] = userDataLen & 0xff;
|
||||
uint16_t crc = CRC::crc16ccitt(cmdBuf, 5);
|
||||
cmdBuf[5] = (crc >> 8) & 0xff;
|
||||
cmdBuf[6] = crc & 0xff;
|
||||
*len = 7;
|
||||
return 0;
|
||||
size_t* len) {
|
||||
using namespace scex;
|
||||
// Send ping command
|
||||
cmdBuf[0] = scex::createCmdByte(cmd, false);
|
||||
// These two fields are the packet counter and the total packet count. Those are 1 and 1 for each
|
||||
// telecommand so far
|
||||
cmdBuf[1] = 1;
|
||||
cmdBuf[2] = 1;
|
||||
uint16_t userDataLen = 0;
|
||||
cmdBuf[3] = (userDataLen >> 8) & 0xff;
|
||||
cmdBuf[4] = userDataLen & 0xff;
|
||||
uint16_t crc = CRC::crc16ccitt(cmdBuf, 5);
|
||||
cmdBuf[5] = (crc >> 8) & 0xff;
|
||||
cmdBuf[6] = crc & 0xff;
|
||||
*len = 7;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UartTestClass::foundDlePacketHandler(const DleParser::Context& ctx) {
|
||||
UartTestClass* obj = reinterpret_cast<UartTestClass*>(ctx.userArgs);
|
||||
if (ctx.getType() == DleParser::ContextType::PACKET_FOUND) {
|
||||
obj->handleFoundDlePacket(ctx.decodedPacket.first, ctx.decodedPacket.second);
|
||||
} else {
|
||||
DleParser::defaultErrorHandler(ctx.error.first, ctx.error.second);
|
||||
}
|
||||
UartTestClass* obj = reinterpret_cast<UartTestClass*>(ctx.userArgs);
|
||||
if (ctx.getType() == DleParser::ContextType::PACKET_FOUND) {
|
||||
obj->handleFoundDlePacket(ctx.decodedPacket.first, ctx.decodedPacket.second);
|
||||
} else {
|
||||
DleParser::defaultErrorHandler(ctx.error.first, ctx.error.second);
|
||||
}
|
||||
}
|
||||
|
||||
void UartTestClass::handleFoundDlePacket(uint8_t* packet, size_t len) {
|
||||
sif::info << "Detected DLE encoded packet with decoded size " << len << std::endl;
|
||||
sif::info << "Detected DLE encoded packet with decoded size " << len << std::endl;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <fsfw/ipc/MutexFactory.h>
|
||||
#include <fsfw/ipc/MutexGuard.h>
|
||||
#include <fsfw/tasks/SemaphoreFactory.h>
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
||||
#include <linux/devices/ScexDleParser.h>
|
||||
#include <unistd.h> // write(), read(), close()
|
||||
@ -34,16 +35,17 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
||||
semaphore->acquire();
|
||||
sif::info << "task was started" << std::endl;
|
||||
int bytesRead = 0;
|
||||
while(true) {
|
||||
while (true) {
|
||||
bytesRead = read(serialPort, reinterpret_cast<void *>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead == 0) {
|
||||
MutexGuard mg(lock);
|
||||
States currentState = state;
|
||||
if (currentState == States::FINISH) {
|
||||
if (state == States::FINISH) {
|
||||
sif::debug << "finish detected" << std::endl;
|
||||
state = States::IDLE;
|
||||
break;
|
||||
}
|
||||
TaskFactory::delayTask(1000);
|
||||
} else if (bytesRead < 0) {
|
||||
sif::warning << "ScexUartReader::performOperation: read call failed with error [" << errno
|
||||
<< ", " << strerror(errno) << "]" << std::endl;
|
||||
@ -63,7 +65,7 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
||||
}
|
||||
};
|
||||
// task block comes here
|
||||
std::cout << "done" << std::endl;
|
||||
sif::info << "task was stopped" << std::endl;
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
||||
@ -74,7 +76,7 @@ ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) {
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
std::string devname = uartCookie->getDeviceFile();
|
||||
sif::info << devname << std::endl;
|
||||
sif::info << devname << std::endl;
|
||||
/* Get file descriptor */
|
||||
serialPort = open(devname.c_str(), O_RDWR);
|
||||
if (serialPort < 0) {
|
||||
@ -94,8 +96,8 @@ ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) {
|
||||
tty.c_lflag &= ~(ICANON | ECHO);
|
||||
|
||||
// Non-blocking mode, use polling
|
||||
tty.c_cc[VTIME] = 10; // Read for up to 1 seconds
|
||||
tty.c_cc[VMIN] = 255; // Read as much as there is available
|
||||
tty.c_cc[VTIME] = 0;
|
||||
tty.c_cc[VMIN] = 0;
|
||||
|
||||
// Q7S UART Lite has fixed baud rate. For other linux systems, set baud rate here.
|
||||
#if !defined(XIPHOS_Q7S)
|
||||
@ -109,7 +111,7 @@ ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) {
|
||||
<< std::endl;
|
||||
}
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIFLUSH);
|
||||
tcflush(serialPort, TCIOFLUSH);
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
@ -172,13 +174,13 @@ void ScexUartReader::handleFoundDlePacket(uint8_t *packet, size_t len) {
|
||||
sif::info << "Detected DLE encoded packet with decoded size " << len << std::endl;
|
||||
MutexGuard mg(lock);
|
||||
ReturnValue_t result = ipcQueue.insert(len);
|
||||
if(result != RETURN_OK){
|
||||
sif::warning<< "IPCQueue error" << std::endl;
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "IPCQueue error" << std::endl;
|
||||
}
|
||||
result = ipcRingBuf.writeData(packet, len);
|
||||
if(result != RETURN_OK){
|
||||
sif::warning<< "IPCRingBuf error" << std::endl;
|
||||
}
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "IPCRingBuf error" << std::endl;
|
||||
}
|
||||
sif::info << "DLE handler done" << std::endl;
|
||||
}
|
||||
|
||||
@ -189,7 +191,8 @@ ReturnValue_t ScexUartReader::readReceivedMessage(CookieIF *cookie, uint8_t **bu
|
||||
*size = 0;
|
||||
return RETURN_OK;
|
||||
}
|
||||
*size = ipcQueue.pop();
|
||||
sif::info << "returning data" << std::endl;
|
||||
ipcQueue.retrieve(size);
|
||||
*buffer = ipcBuffer.data();
|
||||
ReturnValue_t result = ipcRingBuf.readData(ipcBuffer.data(), *size, true);
|
||||
if (result != RETURN_OK) {
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie)
|
||||
IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
|
||||
power::Switch_t pwrSwitcher)
|
||||
: DeviceHandlerBase(objectId, comIF, comCookie),
|
||||
engHkDataset(this),
|
||||
calMtmMeasurementSet(this),
|
||||
@ -17,8 +18,9 @@ IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comC
|
||||
posYselfTestDataset(this),
|
||||
negYselfTestDataset(this),
|
||||
posZselfTestDataset(this),
|
||||
negZselfTestDataset(this) {
|
||||
if (comCookie == NULL) {
|
||||
negZselfTestDataset(this),
|
||||
switcher(pwrSwitcher) {
|
||||
if (comCookie == nullptr) {
|
||||
sif::error << "IMTQHandler: Invalid com cookie" << std::endl;
|
||||
}
|
||||
}
|
||||
@ -118,7 +120,7 @@ ReturnValue_t IMTQHandler::buildCommandFromCommand(DeviceCommandId_t deviceComma
|
||||
case (IMTQ::START_ACTUATION_DIPOLE): {
|
||||
/* IMTQ expects low byte first */
|
||||
commandBuffer[0] = IMTQ::CC::START_ACTUATION_DIPOLE;
|
||||
if(commandData == nullptr) {
|
||||
if (commandData == nullptr) {
|
||||
return DeviceHandlerIF::INVALID_COMMAND_PARAMETER;
|
||||
}
|
||||
commandBuffer[1] = commandData[1];
|
||||
@ -2178,3 +2180,12 @@ std::string IMTQHandler::makeStepString(const uint8_t step) {
|
||||
}
|
||||
return stepString;
|
||||
}
|
||||
|
||||
ReturnValue_t IMTQHandler::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) {
|
||||
if (switcher != power::NO_SWITCH) {
|
||||
*numberOfSwitches = 1;
|
||||
*switches = &switcher;
|
||||
return RETURN_OK;
|
||||
}
|
||||
return DeviceHandlerBase::NO_SWITCH;
|
||||
}
|
||||
|
@ -12,7 +12,8 @@
|
||||
*/
|
||||
class IMTQHandler : public DeviceHandlerBase {
|
||||
public:
|
||||
IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
|
||||
IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
|
||||
power::Switch_t pwrSwitcher);
|
||||
virtual ~IMTQHandler();
|
||||
|
||||
/**
|
||||
@ -36,6 +37,7 @@ class IMTQHandler : public DeviceHandlerBase {
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
ReturnValue_t getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) override;
|
||||
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::IMTQ_HANDLER;
|
||||
@ -111,6 +113,7 @@ class IMTQHandler : public DeviceHandlerBase {
|
||||
|
||||
StartupStep startupStep = StartupStep::COMMAND_SELF_TEST;
|
||||
|
||||
power::Switch_t switcher = power::NO_SWITCH;
|
||||
bool selfTestPerformed = false;
|
||||
|
||||
/**
|
||||
|
@ -1 +1,5 @@
|
||||
#include "AcsSubsystem.h"
|
||||
|
||||
AcsSubsystem::AcsSubsystem(object_id_t setObjectId, object_id_t parent,
|
||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables)
|
||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
||||
|
@ -1,4 +1,14 @@
|
||||
#ifndef MISSION_SYSTEM_ACSSUBSYSTEM_H_
|
||||
#define MISSION_SYSTEM_ACSSUBSYSTEM_H_
|
||||
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
|
||||
class AcsSubsystem : public Subsystem {
|
||||
public:
|
||||
AcsSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
||||
uint32_t maxNumberOfTables);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_ACSSUBSYSTEM_H_ */
|
||||
|
@ -1,9 +1,11 @@
|
||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||
EiveSystem.cpp
|
||||
AcsSubsystem.cpp
|
||||
ComSubsystem.cpp
|
||||
PayloadSubsystem.cpp
|
||||
|
||||
AcsBoardAssembly.cpp
|
||||
SusAssembly.cpp
|
||||
AcsSubsystem.cpp
|
||||
EiveSystem.cpp
|
||||
ComSubsystem.cpp
|
||||
DualLanePowerStateMachine.cpp
|
||||
PowerStateMachineBase.cpp
|
||||
DualLaneAssemblyBase.cpp
|
||||
|
@ -1 +1,5 @@
|
||||
#include "ComSubsystem.h"
|
||||
|
||||
ComSubsystem::ComSubsystem(object_id_t setObjectId, object_id_t parent,
|
||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables)
|
||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
||||
|
@ -1,4 +1,14 @@
|
||||
#ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_
|
||||
#define MISSION_SYSTEM_COMSUBSYSTEM_H_
|
||||
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
|
||||
class ComSubsystem : public Subsystem {
|
||||
public:
|
||||
ComSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
||||
uint32_t maxNumberOfTables);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_COMSUBSYSTEM_H_ */
|
||||
|
@ -1 +1,5 @@
|
||||
#include "EiveSystem.h"
|
||||
|
||||
EiveSystem::EiveSystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
||||
uint32_t maxNumberOfTables)
|
||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
||||
|
@ -1,4 +1,14 @@
|
||||
#ifndef MISSION_SYSTEM_EIVESYSTEM_H_
|
||||
#define MISSION_SYSTEM_EIVESYSTEM_H_
|
||||
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
|
||||
class EiveSystem : public Subsystem {
|
||||
public:
|
||||
EiveSystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
||||
uint32_t maxNumberOfTables);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_EIVESYSTEM_H_ */
|
||||
|
@ -1 +1,5 @@
|
||||
#include "PayloadSubsystem.h"
|
||||
|
||||
PayloadSubsystem::PayloadSubsystem(object_id_t setObjectId, object_id_t parent,
|
||||
uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables)
|
||||
: Subsystem(setObjectId, parent, maxNumberOfSequences, maxNumberOfTables) {}
|
||||
|
@ -1,4 +1,14 @@
|
||||
#ifndef MISSION_SYSTEM_PAYLOADSUBSYSTEM_H_
|
||||
#define MISSION_SYSTEM_PAYLOADSUBSYSTEM_H_
|
||||
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
|
||||
class PayloadSubsystem : public Subsystem {
|
||||
public:
|
||||
PayloadSubsystem(object_id_t setObjectId, object_id_t parent, uint32_t maxNumberOfSequences,
|
||||
uint32_t maxNumberOfTables);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_PAYLOADSUBSYSTEM_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user