fesa-core  7.0.0
fesa::MultiplexingContext Class Reference

This class contains the information used for multiplexed fields. More...

#include <MultiplexingContext.h>

Inheritance diagram for fesa::MultiplexingContext:
fesa::NoneContext fesa::TimingContext

Public Types

enum  MuxContextType
 Category of multiplexing context.
 
enum  ActionType
 Action where the context is going to be use.
 
enum  accessMaskBitPattern
 Definition of the different modes of field access.
 

Public Member Functions

virtual ~MultiplexingContext ()
 Destructor.
 
timestamp_ns getCycleStamp () const
 Returns the time of the start-cycle event which occurs at the start of the first basic period of the given cycle. It is expressed as a 64-bit integer counting the number of nanoseconds elapsed since the UNIX epoch i.e. since January 1st 1970 at 00.00 A.M. The constant UNKNOWN_TIMESTAMP is return if the cycle stamp is unknown.
 
timestamp_ns getTimeStamp () const
 returns the timeStamp associated to the context More...
 
int32_t getCycleId () const
 returns the cycle ID More...
 
const std::string & getTimingDomainName () const
 
const std::string & getCycleName () const
 returns the cycle name as string More...
 
virtual void serialize (std::ostream &stream)
 this method serializes the multiplexing context into the stream
 
const std::string & getExtraCondition () const
 returns the extra condition More...
 
void setExtraCondition (const std::string &extraCondition)
 Sets the extra condition. More...
 
bool match (const std::string &cycleSelector) const
 Matches the context with a cycle-string argument, in order to check if the context lies within this argument. The match function is implemented by the different childs of this class. More...
 
MuxContextType getType () const
 Retrieve the type of multiplexing context. More...
 
 MultiplexingContext (const MultiplexingContext &other, ActionType actionType, uint8_t acquisitionAccess, uint8_t settingAccess)
 Copy-Constructor with possibility to change the access-rights and the action-type. More...
 

Static Public Attributes

static const timestamp_ns UNKNOWN_TIMESTAMP = -1
 
static const std::string DEFAULT_TIMING_DOMAIN_NAME
 The default value to use whenever the timing domain name is not given in input.
 

Protected Member Functions

 MultiplexingContext ()
 Constructor.
 
 MultiplexingContext (ActionType actionType, uint8_t acquisitionAccess, uint8_t settingAccess)
 Constructor with possibility to set the access-rights and the action-type. More...
 
 MultiplexingContext (std::istream &stream)
 constructor More...
 
void setType (MuxContextType)
 Set the type of multiplexing context. More...
 
uint8_t getSettingAccessMask () const
 Retrieve the access mask of the context. More...
 
uint8_t getAcquisitionAccessMask () const
 Retrieve the access mask for acquistion fields of the context. More...
 

Protected Attributes

std::string cycleName_
 contains the name of the cycle
 
std::string extraCondition_
 This condition can be used for advanced multiplexing.
 
timestamp_ns timeStamp_
 contains the time stamp of the event.
 
timestamp_ns cycleStamp_
 contains the time stamp of start of the cycle in which the event occurred or UNKNOWN_TIMESTAMP.
 
MuxContextType type_
 Indicates the type of multiplexing context This information is used for the Data Integrity Later.
 
ActionType actionType_
 Indicates which type of action is going to use the context.
 
bool forewarning_
 Indicates that the context belongs to the next cycle, not to the current one. For example to control a slow power converter where you need to send the settings one cycle in advance, to give time to the power converter to follow the new request.
 
std::string timingDomainName_
 timing domain name
 
uint8_t settingAccessMask_
 setting access mask
 
uint8_t acquisitionAccessMask_
 acquisition access mask
 

Detailed Description

This class contains the information used for multiplexed fields.

Constructor & Destructor Documentation

fesa::MultiplexingContext::MultiplexingContext ( const MultiplexingContext other,
ActionType  actionType,
uint8_t  acquisitionAccess,
uint8_t  settingAccess 
)

Copy-Constructor with possibility to change the access-rights and the action-type.

Parameters
otherthe object to copy
actionTypeThe new actionType of the mux-context
acquisitionAccessThe new acquisition-access restrictions of this context
settingAccessThe new setting-access restrictions of this context
fesa::MultiplexingContext::MultiplexingContext ( ActionType  actionType,
uint8_t  acquisitionAccess,
uint8_t  settingAccess 
)
protected

Constructor with possibility to set the access-rights and the action-type.

Parameters
actionTypeThe new actionType of the mux-context
acquisitionAccessThe new acquisition-access restrictions of this context
settingAccessThe new setting-access restrictions of this context
fesa::MultiplexingContext::MultiplexingContext ( std::istream &  stream)
protected

constructor

Parameters
streamthat contains the object serialized

Member Function Documentation

uint8_t fesa::MultiplexingContext::getAcquisitionAccessMask ( ) const
protected

Retrieve the access mask for acquistion fields of the context.

Returns
char with the access mask bit pattern
int32_t fesa::MultiplexingContext::getCycleId ( ) const

returns the cycle ID

Returns
the cycle ID
const std::string & fesa::MultiplexingContext::getCycleName ( ) const
inline

returns the cycle name as string

Returns
the cycle name
const std::string & fesa::MultiplexingContext::getExtraCondition ( ) const
inline

returns the extra condition

Returns
the extra condition
uint8_t fesa::MultiplexingContext::getSettingAccessMask ( ) const
protected

Retrieve the access mask of the context.

Returns
char with the access mask bit pattern
timestamp_ns fesa::MultiplexingContext::getTimeStamp ( ) const
inline

returns the timeStamp associated to the context

Returns
the timestamp.
const std::string & fesa::MultiplexingContext::getTimingDomainName ( ) const
inline
Returns
timing domain name
MultiplexingContext::MuxContextType fesa::MultiplexingContext::getType ( ) const
inline

Retrieve the type of multiplexing context.

Returns
the type of multiplexing context
bool fesa::MultiplexingContext::match ( const std::string &  cycleSelector) const
inline

Matches the context with a cycle-string argument, in order to check if the context lies within this argument. The match function is implemented by the different childs of this class.

Parameters
cycleSelectorthe cycleSelector to match
void fesa::MultiplexingContext::setExtraCondition ( const std::string &  extraCondition)

Sets the extra condition.

Parameters
extraConditionThe condition to set
Exceptions
Thisfunction can throw different FesaExceptions
void fesa::MultiplexingContext::setType ( MultiplexingContext::MuxContextType  type)
inlineprotected

Set the type of multiplexing context.

Returns
the type of multiplexing context

Member Data Documentation

const timestamp_ns fesa::MultiplexingContext::UNKNOWN_TIMESTAMP = -1
static

Constant returned whenever a time stamp value is unavailable


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