80 dieWithError(
"Manager::getNextSourceId(): We are out of source IDs - exiting.");
99 device =
new LDMRS(
this);
103 " , Name=" + deviceName +
"). Ignoring this call!");
132 std::string text =
"Manager::addAndRunDevice: Created Device of type " +
134 " with Name " + deviceName +
140 bool result = device->
init();
143 printInfoMessage(
"Manager::addAndRunDevice: Device is initialized.", beVerboseHere);
147 printError(
"Manager::addAndRunDevice: Failed to initialize the device, aborting.");
152 result = device->
run();
155 printInfoMessage(
"Manager::addAndRunDevice: Device is running.", beVerboseHere);
159 printError(
"Manager::addAndRunDevice: Failed to run device, aborting.");
165 printInfoMessage(
"Manager::addAndRunDevice: Added device, now running source thread.", beVerboseHere);
169 printInfoMessage(
"Manager::addAndRunDevice: All done, leaving.", beVerboseHere);
202 " , Name=" + appName +
"). Ignoring this call!");
225 std::string text =
"Manager::addApplication: Created application " +
277 text =
"Manager::stopAllDevices: Stopping device with ID " +
toString(device->
getSourceId()) +
".";
302 text =
"Manager::setDeviceData(): Added data. Device data buffer size is now " +
311 text =
"Manager::setDeviceData(): Failed to add data. Device data buffer size is currently " +
352 text =
"Manager::sourceThreadFunction(): Popped a dataset of type " +
toString(data->
getDatatype()) +
398 if ((*iter)->getSourceId() == id)
418 if ((*iter)->getDevicetype() == type)
void printError(std::string message)
std::string toString(const PositionWGS84::PositionWGS84SourceType &type)
void sourceThreadFunction(bool &endThread, UINT16 &waitTimeMs)
virtual const UINT32 getUsedMemory() const =0
Mutex m_sourceBufferMutex
devices::BasicDevice * getFirstDeviceByType(Sourcetype type)
bool addAndRunDevice(Sourcetype deviceType, std::string deviceName, UINT16 wantedId=0xFFFF)
void setDeviceName(std::string name)
#define printInfoMessage(a, b)
UINT16 getApplicationType()
bool addApplication(Sourcetype appType, std::string appName, UINT16 wantedId=0xFFFF)
bool pushData(BasicData *data)
void dieWithError(std::string errorMessage)
void setSourceId(UINT16 applicationId)
SickThread< Manager,&Manager::sourceThreadFunction > m_sourceThread
void infoMessage(std::string message, bool print)
void setSourceId(UINT16 deviceId)
BasicDataBuffer m_sourceBuffer
Manager()
Default constructor.
void setLimit(UINT32 maxBytesToBeUsed)
virtual void setData(BasicData &data)=0
devices::BasicDevice * getDeviceById(UINT32 id)
std::string getApplicationName()
void printWarning(std::string message)
void setApplicationName(std::string appName)
ApplicationList m_appList
void setDeviceData(BasicData *data)