AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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::CardEventDownloader ( )

Constructor

Here is the call graph for this function:

CardEventDownloader::~CardEventDownloader ( )

Destructor

CardEventDownloader::CardEventDownloader ( )

Constructor

CardEventDownloader::~CardEventDownloader ( )

Destructor

Member Function Documentation

bool CardEventDownloader::CheckEventFile ( )

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

bool CardEventDownloader::CheckEventFile ( )

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

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
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
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
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
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)
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:

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:

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)
std::string CardEventDownloader::GetWS_URL ( )

Returns webservice URL

Returns
webservice URL
string CardEventDownloader::GetWS_URL ( )

Returns webservice URL

Returns
webservice URL
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
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
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
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
bool CardEventDownloader::StartDownloading ( )

Starts cycle downloading Downloader reads period for itself.

start thread

bool CardEventDownloader::StartDownloading ( )

Starts cycle downloading Downloader reads period for itself.

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.

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.

void CardEventDownloader::StopDownloading ( )

Stops cycle downloading

void CardEventDownloader::StopDownloading ( )

Stops cycle downloading

void CardEventDownloader::StopProcessingEvents ( )
void CardEventDownloader::StopProcessingEvents ( )

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