WIP: SCEX Init #272
@ -23,7 +23,7 @@
|
|||||||
UartTestClass::UartTestClass(object_id_t objectId, ScexUartReader* reader)
|
UartTestClass::UartTestClass(object_id_t objectId, ScexUartReader* reader)
|
||||||
: TestTask(objectId), reader(reader) {
|
: TestTask(objectId), reader(reader) {
|
||||||
mode = TestModes::SCEX;
|
mode = TestModes::SCEX;
|
||||||
scexMode = ScexModes::READER_TASK;
|
scexMode = ScexModes::SIMPLE;
|
||||||
currCmd = scex::ScexCmds::FRAM;
|
currCmd = scex::ScexCmds::FRAM;
|
||||||
if (scexMode == ScexModes::SIMPLE) {
|
if (scexMode == ScexModes::SIMPLE) {
|
||||||
auto encodingBuf = new std::array<uint8_t, 4096>;
|
auto encodingBuf = new std::array<uint8_t, 4096>;
|
||||||
|
@ -170,7 +170,7 @@ void ScexUartReader::foundDlePacketHandler(const DleParser::Context &ctx) {
|
|||||||
void ScexUartReader::handleFoundDlePacket(uint8_t *packet, size_t len) {
|
void ScexUartReader::handleFoundDlePacket(uint8_t *packet, size_t len) {
|
||||||
// TODO: insert data into IPC ring buffer here
|
// TODO: insert data into IPC ring buffer here
|
||||||
sif::info << "Detected DLE encoded packet with decoded size " << len << std::endl;
|
sif::info << "Detected DLE encoded packet with decoded size " << len << std::endl;
|
||||||
//MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
ReturnValue_t result = ipcQueue.insert(len);
|
ReturnValue_t result = ipcQueue.insert(len);
|
||||||
if(result != RETURN_OK){
|
if(result != RETURN_OK){
|
||||||
sif::warning<< "IPCQueue error" << std::endl;
|
sif::warning<< "IPCQueue error" << std::endl;
|
||||||
@ -184,7 +184,7 @@ void ScexUartReader::handleFoundDlePacket(uint8_t *packet, size_t len) {
|
|||||||
|
|
||||||
ReturnValue_t ScexUartReader::readReceivedMessage(CookieIF *cookie, uint8_t **buffer,
|
ReturnValue_t ScexUartReader::readReceivedMessage(CookieIF *cookie, uint8_t **buffer,
|
||||||
size_t *size) {
|
size_t *size) {
|
||||||
//MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
if (ipcQueue.empty()) {
|
if (ipcQueue.empty()) {
|
||||||
*size = 0;
|
*size = 0;
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user