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

class for holding telegram information More...

#include <Language.h>

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

Public Member Functions

 CTelegram (oETCS::DF::CEVCStateMachine *const pStateMachine, const ::std::vector< oETCS::DF::CVariable * > &Header, const ::std::vector< oETCS::DF::CPacket * > &Packets) throw ()
 general constructor
 CTelegram (const CTelegram &Source)
 deleted copy constructor
unsigned long GetSize () const throw ()
 gets the size of the telegram depending on the packets stored
::std::vector< unsigned char > operator<< (const ::std::vector< bool > &Bits) throw (::oETCS::DF::Error::CException)
 streaming operator for filling a telegram with raw data
CTelegramoperator= (const CTelegram &Source)
 deleted assignment operator
CTelegramoperator>> (::std::vector< bool > &Bits) throw ()
 streaming operator for getting the raw data in a telegram
virtual ~CTelegram () throw ()
 destructor

Private Attributes

const ::std::vector
< oETCS::DF::CVariable * > 
m_Header
 vector with pointers to all variables defining the header of a telegram
::std::vector
< oETCS::DF::CPacket * > 
m_Packets
 vector with pointers to all possible included packets

Detailed Description

class for holding telegram information

Definition at line 450 of file Language.h.

Constructor & Destructor Documentation

oETCS::DF::CTelegram::CTelegram ( oETCS::DF::CEVCStateMachine *const  pStateMachine,
const ::std::vector< oETCS::DF::CVariable * > &  Header,
const ::std::vector< oETCS::DF::CPacket * > &  Packets 
) throw ()

general constructor

Parameterises the Telegram with all constant members. The Telegram object takes over the posession of all variables/memory passed by pointer.

Parameters
[in]pStateMachinepointer to parent EVC state machine
[in]Headervector with pointers to all variables used as header
[in]Packetsvector with pointers to all packets supported

Definition at line 1132 of file Language.cpp.

oETCS::DF::CTelegram::CTelegram ( const CTelegram Source)

deleted copy constructor

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

destructor

Definition at line 1146 of file Language.cpp.

Member Function Documentation

unsigned long oETCS::DF::CTelegram::GetSize ( ) const throw ()

gets the size of the telegram depending on the packets stored

Returns
size of the telegram in bits

Definition at line 1157 of file Language.cpp.

References m_Header, and m_Packets.

std::vector< unsigned char > oETCS::DF::CTelegram::operator<< ( const ::std::vector< bool > &  Bits) throw (::oETCS::DF::Error::CException)

streaming operator for filling a telegram with raw data

Parameters
[in]Bitsvector of boolean holding the bit raw data in little endian format
Returns
vector with used ETCS Language Packet IDs found

Definition at line 1192 of file Language.cpp.

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

deleted assignment operator

oETCS::DF::CTelegram & oETCS::DF::CTelegram::operator>> ( ::std::vector< bool > &  Bits) throw ()

streaming operator for getting the raw data in a telegram

Parameters
[out]Bitsvector of boolean holding the bit raw data in little endian format
Returns
reference to this instance

Definition at line 1327 of file Language.cpp.

Member Data Documentation

const ::std::vector< oETCS::DF::CVariable* > oETCS::DF::CTelegram::m_Header
private

vector with pointers to all variables defining the header of a telegram

Definition at line 531 of file Language.h.

Referenced by GetSize().

::std::vector< oETCS::DF::CPacket* > oETCS::DF::CTelegram::m_Packets
private

vector with pointers to all possible included packets

Definition at line 524 of file Language.h.

Referenced by GetSize().


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/.