Commit 42da9c56 authored by Liliana Grigoriu's avatar Liliana Grigoriu
Browse files

first interaction with the smkex class

parent 8f6c5d64
......@@ -3,6 +3,7 @@
#include "MpIMsg.h"
#include <stdint.h>
#include "Smkex.h"
class MpMsg: public MpIMsg {
public:
......
#include "MpMsg.h"
#include "MpBaseService.h"
#include "MpStatus.h"
#include <iostream>
#include<iostream>
#include<string.h>
#include<cstring>
#include "Smkex.h"
#define THIS_TAG "MpMsg"
......@@ -30,6 +31,12 @@ void MpMsg::onSendMsgDone(void* msgId, mp_status_t xferStatus) {
void MpMsg::onMsgReceived(MpString const& serial, const uint8_t* msg, uint32_t msgLen) { // aici e aplicatia layer de sus, serial este id celelalt
if(Smkex::status==0){
cout<< "\n\nthe Smkex::status is 0 checking whether it is a key\n\n";
exit(1);
}
MpService::instance()->getLogger()->print(THIS_TAG, __FUNCTION__,
"Message received...");
......@@ -54,7 +61,7 @@ void MpMsg::onMsgReceived(MpString const& serial, const uint8_t* msg, uint32_t m
pos= message.find("Please start SMKEX");
if(pos!=string::npos){
cout <<"\n\n\n found substring \"Please start SMKEX\" in the message " << message<<" at position "<< pos<<"\n\n\n";
//exit(1);
//exit(1);
}
else{
......@@ -113,7 +120,6 @@ void MpMsg::onMsgReceived(MpString const& serial, const uint8_t* msg, uint32_t m
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment