openETCS
case study for the European Train Control System developed for the authors dissertation
Public Slots | Public Member Functions | Public Attributes | Private Attributes | List of all members
oETCS::DF::CBaliseDeviceIn Class Reference

base class for all balise devices for incomming messages More...

#include <PlatformSpecificClientsMOC.h>

Inheritance diagram for oETCS::DF::CBaliseDeviceIn:
Inheritance graph
Collaboration diagram for oETCS::DF::CBaliseDeviceIn:
Collaboration graph

Public Slots

void Error (const QString &ErrorMessage)
 informs the stub about an error ocurred in the PS part
void NewTelegramReceived (const QByteArray &Bytes, int iBits)
 informs the stub about a new telegram available

Public Member Functions

 CBaliseDeviceIn (const ::std::vector< oETCS::DF::CTelegram * > &Telegrams, const bool &bUsePS=false) throw ()
 general constructor
 CBaliseDeviceIn (const CBaliseDeviceIn &Source)
 deleted copy constructor
void Clear () throw ()
 clears all bit arrays
::std::vector< unsigned char > HasNewTelegram () throw (::oETCS::DF::Error::CException)
 gets flag for a new telegram
CBaliseDeviceInoperator= (const CBaliseDeviceIn &Source)
 deleted assignment operator
virtual ~CBaliseDeviceIn () throw ()
 destructor

Public Attributes

const bool m_bUsePlatformSpecific
 flag for the usage of a platform specific implmentation via D-Bus

Private Attributes

::std::vector< ::QBitArray > m_BitArrays
 locally stored bit arrays
::std::vector< ::std::string > m_ErrorStack
 stack with error messages from the platform specific adaptor implementation
::std::recursive_mutex m_Mutex
 muteable exclusion object
oETCS::DF::IBaliseDeviceIn * m_pProxy
 pointer to the proxy object
const ::std::vector
< oETCS::DF::CTelegram * > 
m_Telegrams
 vector with pointers of all connected telegrams

Detailed Description

base class for all balise devices for incomming messages

Definition at line 59 of file PlatformSpecificClientsMOC.h.

Constructor & Destructor Documentation

oETCS::DF::CBaliseDeviceIn::CBaliseDeviceIn ( const ::std::vector< oETCS::DF::CTelegram * > &  Telegrams,
const bool &  bUsePS = false 
) throw ()
explicit

general constructor

Parameterises the the communication incoming device with all constant members.

Parameters
[in]Telegramsvector with pointers to all telegrams supported
[in]bUsePSoptional flag for the usage of the platform specifc implementation via D-Bus

Definition at line 39 of file PlatformSpecificClientsMOC.cpp.

oETCS::DF::CBaliseDeviceIn::CBaliseDeviceIn ( const CBaliseDeviceIn Source)

deleted copy constructor

oETCS::DF::CBaliseDeviceIn::~CBaliseDeviceIn ( ) throw ()
virtual

destructor

Definition at line 103 of file PlatformSpecificClientsMOC.cpp.

References m_bUsePlatformSpecific, and m_pProxy.

Member Function Documentation

void oETCS::DF::CBaliseDeviceIn::Clear ( ) throw ()

clears all bit arrays

Definition at line 202 of file PlatformSpecificClientsMOC.cpp.

References m_BitArrays, and m_Mutex.

void oETCS::DF::CBaliseDeviceIn::Error ( const QString &  ErrorMessage)
slot

informs the stub about an error ocurred in the PS part

Remarks
this method should be called by a platform specific implementation
Parameters
[in]ErrorMessagetextual description of the error
std::vector< unsigned char > oETCS::DF::CBaliseDeviceIn::HasNewTelegram ( ) throw (::oETCS::DF::Error::CException)

gets flag for a new telegram

Starts the evaluation of a new telegram, if a new teleragm is available.

Returns
non empty vector of received packet IDs, in case of a new telegram

Definition at line 120 of file PlatformSpecificClientsMOC.cpp.

References m_BitArrays, m_Mutex, and m_Telegrams.

void oETCS::DF::CBaliseDeviceIn::NewTelegramReceived ( const QByteArray &  Bytes,
int  iBits 
)
slot

informs the stub about a new telegram available

Remarks
this method should be called by a platform specific implementation
Parameters
[in]Bytesarray of bytes of the new telegram
[in]iBitsnumber of bits only used from the beginning in the byte array

Definition at line 220 of file PlatformSpecificClientsMOC.cpp.

References m_BitArrays, and m_Mutex.

CBaliseDeviceIn& oETCS::DF::CBaliseDeviceIn::operator= ( const CBaliseDeviceIn Source)

deleted assignment operator

Member Data Documentation

::std::vector< ::QBitArray > oETCS::DF::CBaliseDeviceIn::m_BitArrays
private

locally stored bit arrays

Definition at line 160 of file PlatformSpecificClientsMOC.h.

Referenced by Clear(), HasNewTelegram(), and NewTelegramReceived().

const bool oETCS::DF::CBaliseDeviceIn::m_bUsePlatformSpecific

flag for the usage of a platform specific implmentation via D-Bus

Definition at line 144 of file PlatformSpecificClientsMOC.h.

Referenced by ~CBaliseDeviceIn().

::std::vector< ::std::string > oETCS::DF::CBaliseDeviceIn::m_ErrorStack
private

stack with error messages from the platform specific adaptor implementation

Definition at line 153 of file PlatformSpecificClientsMOC.h.

::std::recursive_mutex oETCS::DF::CBaliseDeviceIn::m_Mutex
private

muteable exclusion object

Definition at line 181 of file PlatformSpecificClientsMOC.h.

Referenced by Clear(), HasNewTelegram(), and NewTelegramReceived().

oETCS::DF::IBaliseDeviceIn* oETCS::DF::CBaliseDeviceIn::m_pProxy
private

pointer to the proxy object

Definition at line 174 of file PlatformSpecificClientsMOC.h.

Referenced by ~CBaliseDeviceIn().

const ::std::vector< oETCS::DF::CTelegram* > oETCS::DF::CBaliseDeviceIn::m_Telegrams
private

vector with pointers of all connected telegrams

Definition at line 167 of file PlatformSpecificClientsMOC.h.

Referenced by HasNewTelegram().


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

Copyright (C) 2010-2012 Johannes Feuser (feuser@uni-bremen.de)
The openETCS library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
The openETCS library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the openETCS library. If not, see "http://www.gnu.org/licenses/.