AppCore
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
CardEventDownloader Class Reference

Class is responsible for downloading of IFC event files. More...

#include <CardEventDownloader.h>

Inheritance diagram for CardEventDownloader:
Inheritance graph
[legend]
Collaboration diagram for CardEventDownloader:
Collaboration graph
[legend]

Classes

class  DataClass
 

Public Member Functions

 CardEventDownloader ()
 
 ~CardEventDownloader ()
 
bool CheckEventFile ()
 
bool StartDownloading ()
 
void StopDownloading ()
 
bool StartProcessingEvents ()
 
void StopProcessingEvents ()
 
void SetSerialNumber (unsigned long snr)
 
std::string GetWS_URL ()
 
std::string GetPathToEvents ()
 
std::string GetEventFileName ()
 
bool IsIFCEnabled ()
 
bool GetEventFileInfo (uint32_t &actualCardEventID, uint32_t &lastDownloadDateTime)
 
void ForceDownload ()
 
 CardEventDownloader ()
 
 ~CardEventDownloader ()
 
bool CheckEventFile ()
 
bool StartDownloading ()
 
void StopDownloading ()
 
bool StartProcessingEvents ()
 
void StopProcessingEvents ()
 
void SetSerialNumber (unsigned long snr)
 
std::string GetWS_URL ()
 
std::string GetPathToEvents ()
 
std::string GetEventFileName ()
 
bool IsIFCEnabled ()
 
bool GetEventFileInfo (uint32_t &actualCardEventID, uint32_t &lastDownloadDateTime)
 
void ForceDownload ()
 

Detailed Description

Class is responsible for downloading of IFC event files.

Constructor & Destructor Documentation

◆ CardEventDownloader() [1/2]

CardEventDownloader::CardEventDownloader ( )

Constructor

Here is the call graph for this function:

◆ ~CardEventDownloader() [1/2]

CardEventDownloader::~CardEventDownloader ( )

Destructor

◆ CardEventDownloader() [2/2]

CardEventDownloader::CardEventDownloader ( )

Constructor

◆ ~CardEventDownloader() [2/2]

CardEventDownloader::~CardEventDownloader ( )

Destructor

Member Function Documentation

◆ CheckEventFile() [1/2]

bool CardEventDownloader::CheckEventFile ( )

Checks if there is an actual event file on disc. Actual means file created today and is not empty.

Here is the call graph for this function:

◆ CheckEventFile() [2/2]

bool CardEventDownloader::CheckEventFile ( )

Checks if there is an actual event file on disc. Actual means file created today and is not empty.

◆ ForceDownload() [1/2]

void CardEventDownloader::ForceDownload ( )

ForceDownload Forces downloading files immediatelly

Note
Downloading have to be running (StartDownloading was called before). Otherwise calling ForceDownload has no effect.
See also
StartDownloading

◆ ForceDownload() [2/2]

void CardEventDownloader::ForceDownload ( )

ForceDownload Forces downloading files immediatelly

Note
Downloading have to be running (StartDownloading was called before). Otherwise calling ForceDownload has no effect.
See also
StartDownloading

◆ GetEventFileInfo() [1/2]

bool CardEventDownloader::GetEventFileInfo ( uint32_t &  actualCardEventID,
uint32_t &  lastDownloadDateTime 
)

GetEventFileInfo Provides information about actual card event ID (highest event ID in file) and last download time

Parameters
actualCardEventID: unsigned long [out] - highest event ID in file
lastDownloadDateTime: unsigned long [out] - last download dateTime (seconds since 1/1/1970)
Returns
bool - true - ok
  • false - an error occured
Here is the call graph for this function:

◆ GetEventFileInfo() [2/2]

bool CardEventDownloader::GetEventFileInfo ( uint32_t &  actualCardEventID,
uint32_t &  lastDownloadDateTime 
)

GetEventFileInfo Provides information about actual card event ID (highest event ID in file) and last download time

Parameters
actualCardEventID: unsigned long [out] - highest event ID in file
lastDownloadDateTime: unsigned long [out] - last download dateTime (seconds since 1/1/1970)
Returns
bool - true - ok
  • false - an error occured

◆ GetEventFileName() [1/2]

std::string CardEventDownloader::GetEventFileName ( )

Returns fileName of event files This fileName is read from PrjConfig, if it is not specified, default fileName is used

Returns
fileName - fileName of event files (should not contain extension)
Here is the caller graph for this function:

◆ GetEventFileName() [2/2]

std::string CardEventDownloader::GetEventFileName ( )

Returns fileName of event files This fileName is read from PrjConfig, if it is not specified, default fileName is used

Returns
fileName - fileName of event files (should not contain extension)

◆ GetPathToEvents() [1/2]

string CardEventDownloader::GetPathToEvents ( )

Returns path to events. This path is read from PrjConfig, if it is not specified, default path is used

Returns
path - path to event files (including '/' at the end)
Here is the caller graph for this function:

◆ GetPathToEvents() [2/2]

std::string CardEventDownloader::GetPathToEvents ( )

Returns path to events. This path is read from PrjConfig, if it is not specified, default path is used

Returns
path - path to event files (including '/' at the end)

◆ GetWS_URL() [1/2]

string CardEventDownloader::GetWS_URL ( )

Returns webservice URL

Returns
webservice URL

◆ GetWS_URL() [2/2]

std::string CardEventDownloader::GetWS_URL ( )

Returns webservice URL

Returns
webservice URL

◆ IsIFCEnabled() [1/2]

bool CardEventDownloader::IsIFCEnabled ( )

Returns if IFC is enabled or not.

Enabled means that downloading period and at least one URL is specified in Prjconfig.

Returns
true - IFC is enabled
  • IFC is disabled

◆ IsIFCEnabled() [2/2]

bool CardEventDownloader::IsIFCEnabled ( )

Returns if IFC is enabled or not.

Enabled means that downloading period and at least one URL is specified in Prjconfig.

Returns
true - IFC is enabled
  • IFC is disabled

◆ SetSerialNumber() [1/2]

void CardEventDownloader::SetSerialNumber ( unsigned long  snr)

Sets serial number If serial number is not set via this function, it will be taken from system. Usefull if getting serial number from system is not implemented on our device (e.g. LISA) or we want to override system setting.

Parameters
snr- the serial number

◆ SetSerialNumber() [2/2]

void CardEventDownloader::SetSerialNumber ( unsigned long  snr)

Sets serial number If serial number is not set via this function, it will be taken from system. Usefull if getting serial number from system is not implemented on our device (e.g. LISA) or we want to override system setting.

Parameters
snr- the serial number

◆ StartDownloading() [1/2]

bool CardEventDownloader::StartDownloading ( )

Starts cycle downloading Downloader reads period for itself.

start thread

◆ StartDownloading() [2/2]

bool CardEventDownloader::StartDownloading ( )

Starts cycle downloading Downloader reads period for itself.

◆ StartProcessingEvents() [1/2]

bool CardEventDownloader::StartProcessingEvents ( )

Event files must not be downloded and processed at the same time. Client application which processes events must call StartProcessingEvents before every processing a only if 'true' is returned can continue. After processing StopProcessingEvents must be called.

Here is the caller graph for this function:

◆ StartProcessingEvents() [2/2]

bool CardEventDownloader::StartProcessingEvents ( )

Event files must not be downloded and processed at the same time. Client application which processes events must call StartProcessingEvents before every processing a only if 'true' is returned can continue. After processing StopProcessingEvents must be called.

◆ StopDownloading() [1/2]

void CardEventDownloader::StopDownloading ( )

Stops cycle downloading

◆ StopDownloading() [2/2]

void CardEventDownloader::StopDownloading ( )

Stops cycle downloading

◆ StopProcessingEvents() [1/2]

void CardEventDownloader::StopProcessingEvents ( )
Here is the caller graph for this function:

◆ StopProcessingEvents() [2/2]

void CardEventDownloader::StopProcessingEvents ( )

The documentation for this class was generated from the following files: