remove sourceId from api in sendNMEA0183
This commit is contained in:
parent
c105eef969
commit
15c572ed9a
|
@ -10,11 +10,16 @@ class GwApi{
|
|||
public:
|
||||
virtual GwRequestQueue *getQueue()=0;
|
||||
virtual void sendN2kMessage(const tN2kMsg &msg, bool convert=true)=0;
|
||||
/**
|
||||
* deprecated - sourceId will be ignored
|
||||
*/
|
||||
virtual void sendNMEA0183Message(const tNMEA0183Msg &msg, int sourceId,bool convert=true)=0;
|
||||
virtual void sendNMEA0183Message(const tNMEA0183Msg &msg, bool convert=true)=0;
|
||||
virtual int getSourceId()=0;
|
||||
virtual GwConfigHandler *getConfig()=0;
|
||||
virtual GwLog *getLogger()=0;
|
||||
virtual GwBoatData *getBoatData()=0;
|
||||
virtual const char* getTalkerId()=0;
|
||||
virtual ~GwApi(){}
|
||||
};
|
||||
#ifndef DECLARE_USERTASK
|
||||
|
|
|
@ -70,6 +70,11 @@ public:
|
|||
GWSYNCHRONIZED(mainLock);
|
||||
api->sendNMEA0183Message(msg, this->sourceId,convert);
|
||||
}
|
||||
virtual void sendNMEA0183Message(const tNMEA0183Msg &msg, bool convert)
|
||||
{
|
||||
GWSYNCHRONIZED(mainLock);
|
||||
api->sendNMEA0183Message(msg, this->sourceId,convert);
|
||||
}
|
||||
virtual int getSourceId()
|
||||
{
|
||||
return sourceId;
|
||||
|
@ -86,6 +91,9 @@ public:
|
|||
{
|
||||
return api->getBoatData();
|
||||
}
|
||||
virtual const char* getTalkerId(){
|
||||
return api->getTalkerId();
|
||||
}
|
||||
virtual ~TaskApi(){};
|
||||
};
|
||||
|
||||
|
|
|
@ -317,6 +317,10 @@ public:
|
|||
{
|
||||
SendNMEA0183Message(msg, sourceId,convert);
|
||||
}
|
||||
virtual void sendNMEA0183Message(const tNMEA0183Msg &msg, bool convert)
|
||||
{
|
||||
SendNMEA0183Message(msg, sourceId,convert);
|
||||
}
|
||||
virtual int getSourceId()
|
||||
{
|
||||
return sourceId;
|
||||
|
@ -331,6 +335,9 @@ public:
|
|||
virtual GwBoatData *getBoatData(){
|
||||
return &boatData;
|
||||
}
|
||||
virtual const char* getTalkerId(){
|
||||
return config.getString(config.talkerId,String("GP")).c_str();
|
||||
}
|
||||
virtual ~ApiImpl(){}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue